0
$\begingroup$

I am making a self balancing scooter which runs off 2 x 12V SLA batteries connected in series to make 24V. Everything works as expected except for the power supply which makes me pull most of the hair in my head for 2 weeks now. Hope someone could help.

The 2 24V motors run off the batteries directly. Now for my scooter, I need a +12V line for the half bridge drivers, and a +5V line for the signal part. For +12V I am using a LM2576-12 hooked to the batteries (+24) and for the +5V signal I am using a LM2596 ADJ, also hooked directly to the batteries (or is it supposed to be hooked to the output of LM2576-12 for better performance??).

The problem is that, when the motors are under load this power supply system makes the microcontroller hang (or reset I am not too sure, since everytime I have to try to turn off the power switch immediately, because the motor keeps running with whatever value they are fed with right before this happens), usually within 1 minute of riding, which is very dangerous when someone is onboard.

I have read and re-read the datasheet of LM2576 and LM2596 many times, and have tried many settings, from recommended to different values of capacitor and inductor. For the diode, I am using the SS34.

I guess its not because of electromagnetic interference, since while I do have the PCB located near the motors, the PCB is actually put inside a homemade Faraday cage which is grounded (Battery -), and the motor cases are also grounded. Plus that the microcontroller only hangs when motors are under load (i.e. me on board), especially when I go from forward to backward.

The motor controller is self made, using 8 x AUIRF2804S MOSFETs. I also put 4 x 1000uF caps between the motors and the +24V.

Would anyone be so kind to throw some light. What would a power supply for this kind of application is supposed to be?

$\endgroup$
  • $\begingroup$ Can you provide some detail on the current draw of your motors and the rest of the system? Also, when the motors droop the power bus, how low does the voltage go? Additionally, your motor drivers should be fail-safe so that when you loose power, the H-bridge goes into a brake, or coast state. $\endgroup$ – Ben Nov 5 '14 at 14:44
  • $\begingroup$ Hi Ben, the 2 motors are rated 16.5A each. With no load (no one on board) the system draws around 1A more or less moving itself back & forth. With me on board, when riding slowly the system draws about 2-3A. And at the time it hangs it doesn't exceed 4A. I notice that it usually hangs when I am on board and trying to change direction (forward to backward) swiftly. Voltage drop just about 1V. In the code that if voltage drops to less than 22.5V then the scooter will slowly come to a stop. The fail-safe is good advice, thanks but for now the microcontroller hangs and ceases to receive commands. $\endgroup$ – Dave Nov 6 '14 at 13:30
  • $\begingroup$ I have also just tried the following in vail: 1. Moved the PCB outside the case so it is farther away from the motors 2. Hooked the 5V buck converter (LM2596 ADJ) to the output of the 12V line (LM2576-12) instead of to the batteries. I am at my wits end since it seems no other DIY self balancing scooter has this problem. I have an oscilloscope but its hard to diagnose since the scooter must be under load, moving and it happens very suddenly. $\endgroup$ – Dave Nov 6 '14 at 13:37
1
$\begingroup$

It sounds like the main problem is that you are powering your control electronics and power electronics off the same battery. The battery voltage will drop when it's under load, and that drop seems to be browning out the control circuitry.

It's not impossible to power both pieces from the same power source, but it would be a very good idea to isolate the root cause of your issue before you go about trying to fix that.

$\endgroup$
  • $\begingroup$ Yup, two batteries with a common ground sounds like a good solution to me. $\endgroup$ – Ben Nov 7 '14 at 1:18
  • $\begingroup$ I also believe two separate power supply units may solve the problem. But implementation would add much weight and complexity. What is bugging me is that I have seen a few DIY segway clones online which uses only 1 LM2576 or 2596 for the entire control electronics, so I am clueless where I went wrong. I built the PCB myself, with the FETs and power on the left and control part on the right. Microcontroller is about 3cm from nearest power line. Any chance PCB layout contribute to the problem? Since I am just a hobby PCB designer without much experience. $\endgroup$ – Dave Nov 7 '14 at 3:49
  • $\begingroup$ Thinking about it over, the noise must come from the motors in the form of current ripples, or EMI, or in the worst case, both. Reviewing everything, I see that I am using a H-bridge switching frequency of around 16KHz. Will increase to 20-25Khz and see how it goes. Any advice on this is highly appreciated. $\endgroup$ – Dave Nov 7 '14 at 9:42
  • $\begingroup$ Your first step is to characterize the problem... after that's done, you can start worrying about the solution. $\endgroup$ – Ian Nov 7 '14 at 19:37
  • $\begingroup$ Ian, I think you are right...It's not the regulation that is the problem, but rather it's the regenerative current that should be the culprit. I will post another more relevant question. Thanks all for all your help! $\endgroup$ – Dave Nov 15 '14 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.