Stall current issue maybe

Hi,

I built the robot you can see on the picture. It’s quite simple, an arduino nano, a vl53l0x sensor, two gear motors driven by an l9110s H-bridge.

The arduino nano and the H-bridge is powered directly from the battery, VL53l0x is powered by the arduino, because it’s a sensitive stuff.

The whole setup was fine until I connected the motors to the H bridge.

First I just set both motors to digitalwrite HIGH. The arduino couldn’t handle it and it restarted again and again with the L led flashing.

After that, I started to turn the motors on slowly by using analogWrite, and it worked, but in half of the cases it’s still too much for the arduino and restarts.

  • The issue is only present when I run everything on the battery.
  • When I power the arduino from the usb, the performance is very bad but the arduino is never resetting.
  • When I use both the battery and the USB it works so powerful like hell.

Could you give me some advice how to deal with the issue?
Thanks.

No doubt that the motor current draw is causing a excessive voltage drop, and the Arduino to reset. It is usually best to power the motors and Arduino separately, with the grounds connected.

Post links to the data sheets for the motors and the driver.

I uploaded some photos into the attachments.

My driver:

https://www.ebay.com/itm/New-L9110S-H-bridge-Dual-DC-Stepper-Motor-Driver-Controller-Board-for-Arduino/181307927681?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Motors:

jremington:
No doubt that the motor current draw is causing a excessive voltage drop, and the Arduino to reset. It is usually best to power the motors and Arduino separately, with the grounds connected.

Post links to the data sheets for the motors and the driver.

BTW what is strange to me that the driver is even powered when the Arduino is plugged into the usb and there is no battery at all. However according to my little knowledge, it shouldn't. (Check the schema I attached)

Would this help?

BTW what is strange to me that the driver is even powered when the Arduino is plugged into the usb and there is no battery at all.

This is a bad state of affairs. Neither USB nor the Arduino 5V output can safely power those motors.

Please post a hand drawn (not Fritzing) schematic diagram showing how everything is wired.

Please do not follow Adafruit's bad advice. Servos should NEVER be powered from the Arduino.

The driver is powered from the battery and not from Arduino.

Adafruit’s advice is to use a 470uF capacitor to solve the voltage drop at motor start. Is that a good idea?

Using a 470 uF cap does not solve the problem caused by following Adafruit's extremely bad advice to power a servo from the Arduino.

jremington:
Using a 470 uF cap does not solve the problem caused by following Adafruit's extremely bad advice to power a servo from the Arduino.

As I already mentioned and as you can see the graphics, I do not power my motors from Arduino.

If the driver is powered by the battery, does a 470uF capacitor solve my problem?

Please explain this comment:

BTW what is strange to me that the driver is even powered when the Arduino is plugged into the usb and there is no battery at all.

jremington:
Please explain this comment:

Probably I don't understand arduio's power management:

Battery + goes into Arduino's VIN
Battery + goes into the driver's VCC. (so the driver is not supplied by Arduino's 5V).
They share a common GND which goes to Battery -.

If the battery is not connected at all, but the arduino is plugged into the USB, I assumed that VIN will not "feed back" anything, but it seems that it does, that's where my confusion comes from.

It is also hard to believe that I would need two separate power sources for a tiny robot like that. There must be an easier solution to deal with the voltage drop at motor start, and so far capacitors made the most sense.

A bigger battery that is more capable of delivering current. Also, it’s hard to tell from your pictures but if you are using extremely small wires (like the DuPont jumper cables that come with most arduino kits) that can cause voltage drop as well..

You can certainly try the capacitor idea. Try 4700 uF as well.

But the idea is that if the motors are powered separately from the Arduino, the Arduino is completely unaffected by whatever the motors and motor batteries are doing. So, no resets.

jremington:
You can certainly try the capacitor idea. Try 4700 uF as well.

Thanks, I'll let you know the result. I saw a lot of posts about the topic, but nobody confirmed if it works or not (maybe it's too obvious)

Qdeathstar:
A bigger battery that is more capable of delivering current. Also, it’s hard to tell from your pictures but if you are using extremely small wires (like the DuPont jumper cables that come with most arduino kits) that can cause voltage drop as well..

I'm CNC-ing my own boarding the wires are also quite strong, that should not be an issue. The strength of 4 AA batteries in serial can be an issue, but so far when the wheels started to spin, they were quite OK, that's why I thought that capacitors should be enough to manage shorter stalls, like engine start or smaller obstacles.

BTW what is strange to me that the driver is even powered when the Arduino is plugged into the usb and there is no battery at all. However according to my little knowledge, it shouldn't. (Check the schema I attached)

Yes, that's how many small motor drivers seem to work(*), and it means you should never power
up only the Arduino if the motors are in circuit - always have motor power present.

(*) this puts lots of current though parts of the IC that are not designed for high current.

Soo I added a 25V 470uF capacitor to the circuit. So now this happens when I plug the 6V battery in:
-voltage drops to 2.5V
-arduino starts to heat up insanely (and does not turn on of course).

(Idid not even try to connect anything else to the circuit after this, so in this experiment I just had the battery, the capacitor and the arduino in the circuit).

Probably I should have used a 6v capacitor...

I would be thankful for any help.

That sounds like CMOS latchup - are you injecting current into any of the Arduino inputs? You mustn't do that,
all inputs must stay within the supply rails of the Arduino chip at all times.

Its not directly to do with the capacitor, it may be to do with a slower voltage ramp on one of the rails allowing
the other rail to be higher than it.

Its not realistic to use capacitors to handle motor peak loads, the currents involved are too big - only a supercap
can handle this, and those bring even more problems with voltage ramping at start up... The capacitance
in a motor circuit is purely to handle decoupling at the PWM frequency, not making up for an inadequate
supply current.

MarkT:
That sounds like CMOS latchup - are you injecting current into any of the Arduino inputs? You mustn’t do that,
all inputs must stay within the supply rails of the Arduino chip at all times.

Its not directly to do with the capacitor, it may be to do with a slower voltage ramp on one of the rails allowing
the other rail to be higher than it.

Its not realistic to use capacitors to handle motor peak loads, the currents involved are too big - only a supercap
can handle this, and those bring even more problems with voltage ramping at start up… The capacitance
in a motor circuit is purely to handle decoupling at the PWM frequency, not making up for an inadequate
supply current.

This is how my circuit looks right now, without the sensor and the driver, this is howI get the issue (attachment)

The component what seems to heat up is the SOT-223 -like thingy on the bottom side of the Arduino nano.

Is it not an issue that the capacitor is 25V however the battery is 6V?

IMG_4231.jpg

I had a shortcut, it seems that I messed up something during soldering...

But now I have an other issue, I need to check it