Arduino Bedini Charger

 

 

Project:

Battery Monitoring and Controlling (Charge/Discharge/Resting ),
logging voltages 12.00-14.50V with datetime,
start charging bedini style, reaching 14.50V,
1 hour resting,
discharge till 12.00 V,
1hour resting,
charge again..
20complete runs…
take voltage measures every 15 minutes..

Hardware:
Arduino MEGA 2560 rev3
+ EthernetShield rev3(+SDcard, SPI)
+ RTC DS3243 (SPI)
+ joystick, 2axis, 1 button,
+ LCD display (I2C)
+ 3 relais, type: bistabil relais 2coils
+ attopilot current power sensor 50V/90A
+ 12bit ADC MCP3208
+ LM3940, voltage converter 5V into 3.3V as Vref for ADC MCP3208

using Arduino software 1.01

problems:
libs Time and TimeAlarm came with lib for simpe RTC real time clock DS1307,
but i used a DS3234..
so i copied the DS1307 lib, renamed everything into DS3234,
and commented out function by function, and added euqal named functions with SPI code to set and read from DS3234,
if errors occur, the DS3234 was reseted into wrong dateteime and had to be set ones again to correct value..
at the end i decided to set every 1sec the internal arduino clock with the fresh value from the DS3234,
the lib TimeAlarm works on that arduino internal time…
so far it works for me.. 1 minute resolution is enough for my project…

the relais were no problem, digital HIGH and LOW to push 5V, current to relais for a small fraction of time, time enough that the coil is energized, making *click*..
to set the relais back, i used the other coil, making digital HIGH and LOW, so i dont need to think about changing polarity of a single coil..to switch in one and opposite direction

writing to miniSD card was simple, the SDcard was a SPI device, the DS3234 also SPI,
and the DS3234 code had to be changed to set the typical DS3234 SPI comminucation settings before acting!

i wanted to use the ethernet shield to read minSD card data.. but i didnt got it to work..
so i have to use the USB cable and get rid of the automatic reset of arduino mega with a resistor between….

joystick and LCD display where simple, no problems

ADC big problem:
– you have to use an extra power supply, the 5V usb power isnt stable enough
– disconnect everything, while you test your ADC.. because i realized that my LCD display, an I2C device, was jamming the ADC.. every x seconds the ADC showed lower values as expected… i have to disconnect power from LCD while reading analog values or use only highest ADC readings
– first i used voltage divider, later i used the attopilot voltage current sensor, that translates max 50V into max 3.3V, used as analog input for analog readings
– i decided to use LM3940 to use arduino 5V board Vcc to convert into 3.3V as Vref of the ADC MCP3208 (LM3940  needs caps! i used two elkos 47mikroF/25V)
– i added a big elko cap into breadboard power rails.. to smooth again a little bit the Arduino board power..

so far, everything fine

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.