Picking Electronic Hobbyist's (or workers) Brains!



  • Hi All,

    Mini project underway for my son's electric ride on toy that was recovered from a scrap heap!

    Looking to add a charge level indicator with a simple arduino circuit reading the battery voltage into an analogue input via a voltage divider to get the voltage within range. As there are a pair of DC motors running off the 12V AGM battery I see the need to put a flyback diode across my voltage divider, and the power input to the arduino. I also think there maybe need to add a reversed diode to protect against overvoltage on the supply. What terms do I need to read up on to enable me to specify and select the right components?

    Cheers!





  • and maybe a TVS (or another zener) on the 12v supply before the buck/ldo.



  • @DocTrucker said in Picking Electronic Hobbyist's (or workers) Brains!:

    .....................Looking to add a charge level indicator with a simple arduino circuit reading the battery voltage into an analogue input via a voltage divider to get the voltage within range..................

    Umm, why not just fit a small 12V DC panel meter? You can pick them up off Ebay for a couple of quid or so.

    e.g, https://www.ebay.co.uk/itm/Motorcycle-Waterproof-DC-12V-24V-Car-LED-Digital-Display-Voltmeter-Socket-Meter/401972913779?hash=item5d9773e673Ⓜmk7nwIVd0lKcgYw46uBkaeA



  • Far be it for me to rain on a parade but ....
    The difference in voltage between full charge and no charge is minimal. What you will end up is a pretty guess-o-meter. If that is acceptable than go ahead.
    If you want anything approaching a real charge meter you will have to go about it a completely different way ...... it becomes complex rather quickly I am afraid.


  • administrators

    @DocTrucker said in Picking Electronic Hobbyist's (or workers) Brains!:

    Looking to add a charge level indicator with a simple arduino circuit reading the battery voltage into an analogue input via a voltage divider to get the voltage within range. As there are a pair of DC motors running off the 12V AGM battery I see the need to put a flyback diode across my voltage divider, and the power input to the arduino.

    I doubt that will be necessary. The Arduino can tolerate up to 20V power input, the only caveat being that using a high input voltage increases power dissipation in the voltage regulator - but you won't be providing 20v constantly anyway. OTOH a simple RC network (e.g. 10 ohm resistor in series with the supply to the Arduino followed by 100uF capacitor to ground) may be a wise precaution, to guard against short transients that might exceed 20V.

    You don't need to protect the Arduino ADC input if you use high value resistors in the voltage divider. For one project that needed to measure the voltage of the 9V battery that powers it, I used two 4M7 resistors in the voltage divider, with a 100nF capacitor between the output of the voltage divider and ground to give a low source impedance to the ADC in order to avoid the high resistor value introducing a sampling error. The reason I used such high resistor values was that the device had no power switch, it just put the microcontroller to sleep when not in use.



  • @jens55 said in Picking Electronic Hobbyist's (or workers) Brains!:

    What you will end up is a pretty guess-o-meter.

    What else would you expect for a toy that was pulled from the scrap heap?

    As per usual I'm using a simple project as a simple intro to open ended topics that I will need to cover at some point in more detail in a homebuild automotive project. From automotive stuff and watching this thing charge I know my measurement range of interest is 12-14V.



  • Thanks for the pointers all, some interesting points there that I will focus in on in more detail before printing and soldering it up. Planning to add a spare ignition lock barrel to kill the power to the motors as the little on had figured out the plug we use to kill it when inside - and guves him some keys to play with!



  • @DocTrucker , it's all good if you are ok with the outcome. You might actually do a bit better than a guess-o-meter with some tweaking. In any case, good luck and have fun!



  • @jens55 another time I'd be interested in the reads about getting a better reading. Would be good for the truck batteries.


Log in to reply