I have a battery charger 24V 50A
Help me build automation using Arduino and relay?
I want the Arduino to monitor battery charging as follows:
When the battery voltage reaches 29V arduino engage a relay and disengage the relay only when the battery voltage drops to 23.5 V.
you can use transistors instead of relays.
you may start with the basic code examples. To build your project you may have to understand the following codes & functionality first.
- Blink
- AnalogReadSerial
- ReadAnalogVoltage
- Button
See the codes from your Arduino IDE > Examples >
I'm sure you will get a clear idea of what you should do with the resources.
All the best.
The basics:
void loop(){
batteryLevel = analogRead(A0); // sample the battery voltage, result is 0 to 1023
// see if battery level is high enough to turn on relay
if (batteryLevel >= highVolt){ // highVolt = 988: 4.83/5V * 1023
digitalWrite (relayPin, HIGH);
}
// see battery level dropped low enough to turn off relay
if (batteryLevel <=lowVolt){ // lowVolt = 802: 3.92/5V * 1023
digitalWrite (relayPin, LOW);
}
// once turned off, stays off until voltage goes above 29V.
// once turned on, stays on until voltage goes below 23.5
}// end loop
wow! brilliant
thank you very much
No problem. Good luck in your building.
prozorianu:
I have a battery charger 24V 50A
nightcrawler218:
you can use transistors instead of relays.
Transistor or relay, 50A is a lot of current! Careful you don't let the magic smoke out.
oops! My bad. Yes, In that case relays would be the best option.
I created my automation wiring pcb
It would be interesting to be able to add an ethernet shield to monitor online charge cycle and voltage from the batteries
ICSP connection between Arduino and Ethernet shield is necessary?
https://dl.dropboxusercontent.com/u/167251214/arduinochargerauto.png
Merry Christmas!
Hi, what sort of batteries are you charging, if they are GelCel type it might be worth monitoring their temperature.
As they age and their efficiency drops and that inefficiency is produced as heat, this causes them to dry out and eventually fail.
If you can monitor their temp while charging then you can lengthen their life.
I have removed GelCel batts that were stacked side by side and they were dry, 12V cell was 2 to 3v no load, and they had stuck together and melted. When on charger they showed full charge ,trickle current and lots of heat.
Battery spec should tell you what their charging temp should be.
I'm not sure how much programming and electronics experience you have but this is a good arduino project to do, simple requirements and something everybody understands.
Once you get it working you can expand it with a digital readout and indicator lights to show you the state of the charger.
Like the PCB, decent sized tracks.
Tom....
I use the 500A 24V lead acid batteries. Want to attach an ethernet shield my project to monitor temperature and battery voltage.