Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Picking Electronic Hobbyist's (or workers) Brains!

    Scheduled Pinned Locked Moved
    Off Topic
    5
    10
    417
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DocTruckerundefined
      DocTrucker
      last edited by

      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!

      Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

      deckingmanundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • DocTruckerundefined
        DocTrucker
        last edited by

        Is this about as complicated as it need be?

        https://www.electricaltechnology.org/2019/11/simple-overvoltage-protection-circuit-using-zener-diode.html

        Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

        1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • deckingmanundefined
            deckingman @DocTrucker
            last edited by deckingman

            @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

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/@deckingman

            1 Reply Last reply Reply Quote 0
            • jens55undefined
              jens55
              last edited by

              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.

              DocTruckerundefined 1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @DocTrucker
                last edited by dc42

                @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.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                1 Reply Last reply Reply Quote 0
                • DocTruckerundefined
                  DocTrucker @jens55
                  last edited by

                  @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.

                  Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                  jens55undefined 1 Reply Last reply Reply Quote 0
                  • DocTruckerundefined
                    DocTrucker
                    last edited by

                    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!

                    Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                    1 Reply Last reply Reply Quote 0
                    • jens55undefined
                      jens55 @DocTrucker
                      last edited by

                      @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!

                      DocTruckerundefined 1 Reply Last reply Reply Quote 0
                      • DocTruckerundefined
                        DocTrucker @jens55
                        last edited by

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

                        Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA