Power issue with my follow along robot (assignment due tomorrow) - Page 1
Forum section: electronics / beginners

author: mowmowbby
author_rank: Newbie
timestamp: June 09, 2022, 01:01:55 pm
content: Hi everyone!I'm a first year design student, and for my interactive design class had to build something that was essentially ran by a microbit.I've made a following robot that usestwo DC motors controlled through a motordriveran ultrasonic sensora microservo (for the puppet head)breadboard to wire everything.My wiring and coding is all good. Everything was actually working perfectly just a day or two ago.However I think I'm now having an issue with voltage droppage? Everything will start up and work fine but then it just like drops power and the ultrasonic sensor won't be reading anything. I know that the ultrasonic sensor does work though because sometimes when the power does pick up it reads as meant to. I've tried replacing all the wires with new one in case any were corrupted, switching to the other side of the breadboard, heck I even got a new battery pack and double checked all the batteries were the right way round. I've attached a picture of the wiring so you can see what it looks like right now.I'm just hoping for maybe some more outside insight into why this damn thing can go from working so smicly to nothing at all? Maybe it's the motordriver grounding spot?I'm still a bit new to all this so experienced advice would be a blessing especially as my tutor is asleep.

author: ledtester
author_rank: Super Contributor
timestamp: June 09, 2022, 01:13:56 pm
content: I would try running the ultrasonic sensor on a separate battery pack - that should help to diagnose the problem.

author: Grandchuck
author_rank: Super Contributor
timestamp: June 09, 2022, 01:16:05 pm
content: Sounds like something is getting hot and shutting down. Many ICs such as regulators have thermal protection built in.

author: mowmowbby
author_rank: Newbie
timestamp: June 09, 2022, 01:26:18 pm
content: Grandchuck I hope I'm replying to you - but you have saved my skin! THank you so much! I got another battery pack on the other side and she's back up and running! Thank you so much!

author: Grandchuck
author_rank: Super Contributor
timestamp: June 09, 2022, 01:38:59 pm
content: ledtester suggested a separate battery pack.

author: mowmowbby
author_rank: Newbie
timestamp: June 09, 2022, 01:52:14 pm
content: You're so right! Sorry it's late where I am and I've been pulling too many late nights on this thing - I'm losing my mind. Thank you ledtester! You're the best! Also still thank you grandchuck - I did check and see if anything was overheating though (it's already happened once in this project - RIP that microbit) but thankfully nothing looked worrying!

author: RoGeorge
author_rank: Super Contributor
timestamp: June 09, 2022, 02:01:06 pm
content: - Having a separate battery for motors only is a common practice with robots. Since you already bought another battery, use the new one to power the motors and the force circuits, and the other battery to power the low power electronics, like the ultrasonic scanner and the microcontroller boards.- use shorter and thicker wires for motors and other high current paths you may have in your circuits, keep all screws and connectors tight (to lower the resistance, so to have low voltage drop), those wires in the photo looks too thin and longer than necessary.- beware of power loops (ground loops), use star wiring, where each board and each motor has its own wires straight to the battery pack, don't "chain" them- check if the motors have a small capacitor (nF range) in parallel, right near their brushes, if not, add one in parallel to each motor, to reduce voltage spikes caused by the brushed motors- another good practice is to have bypass capacitors on the battery pack and near each board, too.Nice robot, by the way!

author: Ian.M
author_rank: Super Contributor
timestamp: June 09, 2022, 02:28:46 pm
content: HC-SR04 Ultrasonic distance sensors are known to work poorly if at all at low supply voltages. They typically require a 5V supply to get anywhere near the maximum range and specified accuracy. If the supply voltage is on the low side, a largish electrolytic capacitor (e.g. 100uF to 470uF, min. 6.3V) fitted in parallel to the HC-SR04's power and ground pins as close to the module as possible can make a major difference.Your H-bridge module looks like a genericL298None, which have the notable issues that the L298 chip has excessive voltage drop for use with low supply voltages (typ. 2.55V @1A motor current), and the usual 78M05 regulator that provides the auxiliary 5V supply is not a LDO and has a rather high dropout voltage, needing up to 2V headroom to stay in regulation. Therefore, even if you are using 3V motors, its unsuitable for use with single cell LiPOs and marginal with 4x AA alkaline packs. A 2S LiPO pack is OK when its fairly fresh, but the 6V safe end of discharge cutoff voltage is too low for the auxiliary 5V supply to stay in regulation if significantly loaded. Similarly even a 6x AA pack will start giving trouble when the voltage drops below 1.1V/cell, well before the usual max. discharge voltage of between 1V and 0.8V per cell. One workaround is to ignore the H-bridge's auxiliary 5V output, and instead fit a separate buck regulator module for the 5V supply, many of which can regulate down to under half a volt headroom.Running motor power or even power for short range radio links through breadboard contacts is a recipe for disappointment. Contact resistance can go as high as a couple of ohms, and if the bad contact is upstream of your sensor or control electronics power or ground tap-off, brownouts are inevitable.The fix for that is to run the battery pack wires direct (or possibly via a master switch) to the power and ground screw terminals of the H-bridge breakout board, and tap off power and ground to the breadboard and to any other high current loads on separate wires from the same terminals. There shouldn't be *ANY* pre-made duPont wires between the batteries and the motors. I *think* you've got the battery wires going direct to the H-bridge, assuming the battery is mounted under the deck, but if not, fix that urgently.Premade DuPont ended jumpers are frequently evil! (or of such low quality that they aren't fit for purpose. I said this three years ago, and the only thing that's changed is its now even harder to get good ones:Quote from: Ian.M on March 09, 2019, 11:08:45 am