Advice how to check relay

Simbad

New Member
Iam sniffing volts from battery and want to switch relay when volt ar >x or <x. What is best way to simulate,test this, like if volt > 571 then high one relay, if volt < 545 then high other relay, need your advice what is the simplest way to simulate this, whether you can send a command via the terminal without messing with hardware?
 

nick12ab

Senior Member
Iam sniffing volts from battery and want to switch relay when volt ar >x or <x. What is best way to simulate,test this, like if volt > 571 then high one relay, if volt < 545 then high other relay, need your advice what is the simplest way to simulate this, whether you can send a command via the terminal without messing with hardware?
What part do you want to simulate - the battery or the relays? I'm assuming that you want to simulate the battery because you talk about sending a command using the terminal so read on.

Replace the readadc command with the serrxd command and that will let you receive data from the computer using the download cable. Remember to precede the variable with #. I'd suggest adding sertxd commands before and after to send confirmation messages to the terminal to make sure that everything is working OK.
 

Simbad

New Member
What part do you want to simulate - the battery or the relays? I'm assuming that you want to simulate the battery because you talk about sending a command using the terminal so read on.

Replace the readadc command with the serrxd command and that will let you receive data from the computer using the download cable. Remember to precede the variable with #. I'd suggest adding sertxd commands before and after to send confirmation messages to the terminal to make sure that everything is working OK.
And how can I get readadc values for example 11 12 13v? I can get working 12, but how to get discharged volts value and bit overcharget without battery manipulation
 

nick12ab

Senior Member
And how can I get readadc values for example 11 12 13v? I can get working 12, but how to get discharged volts value and bit overcharget without battery manipulation
Look here and use the adc wizard to get the ADC values for when the battery is charged and discharged.
 

Svejk

Senior Member
Maybe a better approach is to use the internal fixed voltage reference feature of the M2 series.

1. setup your FVR to one of the fixed references (see FVRSETUP)
2. setup your ADC to use the FVR as Vref+ (see ADCCONFIG)
3. hardware wise: use a voltage divider to feed a rail to rail op amp setup as a voltage follower (see AN31 from Texas Instruments as a starter) I'd recommend MCP601.
 
Top