Trouble powering multiple circuits from a single battery

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Hi,

I'm having trouble when powering multiple motors from a single SLA battery. I've attached a drawing to better illustrate my setup.
.
In the first circuit I connect to the battery I have 2 identical 12v motors (A & B in my drawing), both individually connected to a driver which is then connected to an Arduino Uno. The Uno is running a PID controller which maintains the speed of both motors, the setpoint for motor A & B is controlled via each pot - (there is an IR speed sensor on both motor shafts).

The second circuit has a small 12v gearmotor, connected to a driver and another arduino. The speed of the gearmotor is directly controlled via the potentiometer.

When I power each circuit individually I don't have any problems. However, when I power both of them from the SLA battery, motors A & B start to randomly pulse - as if the power was being intermittently cut. If I turn the pot connected to Gearmotor C down to 0v, the problem goes away.

Is the problem I'm seeing due to the voltage drop from the battery, when both circuits are turned on? if so, would a DC-DC Step down/Step up regulator connected to each motor from the battery solve the problem?

Any help would be greatly appreciated.

Thanks

Michael
 

Attachments

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks for the reply crutschow, you'll have to bare with me as I'm quite new to this. I tried reading the voltage across the charged battery, it read just over 13v. When motor A & B were turned on it dropped to 12.82 volts. With gearmotor C turned on additionally, it dropped to 12.77 volts. Does that help at all?

Michael
 

ebp

Joined Feb 8, 2018
2,332
You connections all look good, if you've done them the way you have shown, with each motor with power wires directly back to the battery. It is always good practice to twist the power wires together (i.e. as a pair to each board) to help reduce inductance and EMI/RFI radiation.

Are you using the same USB source to power the processor boards? I suspect there may be an issue there ("ground loop"), and suggest trying to power the gear motor board with a completely separate power supply.

It looks like all of the motor boards have an electrolytic capacitor which I assume is across the power input connection. This helps to reduce problems with transient currents on the power connections to the battery. If that isn't what the caps are doing, then adding such caps near the motor boards may help.
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks for the help on this everyone.

Ebp, i'll try powering the gearmotor circuit with a different laptop to see if that makes a difference. Should the power cables coming from the motors be twisted together and also where they go back to the battery from the driver board? For motors A & B in the drawing, they're 14 awg wire gauge.

Something strange, with the gearmotor C circuit connected to the battery terminals, the power switch turns that circuit on as it should. However, when I connect motor A or B to the same battery terminals, suddenly the power switch for the gearmotor circuit doesn't work and the circuit just stays on regardless of the switch position.

Michael
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Hi everyone,

I'm struggling with this. I've tried changing the power source of the Arduino Uno for the Gearmotor C circuit. Firstly I tried using another laptop USB power source and then connecting it to the SLA battery with the 5V Pololu step down voltage regulator I intend to use in the final build. It doesn't seem to make a difference though. When I turn the Gearmotor C arduino on, motors A & B immediately pulse once, this happens again when gearmotor C is turned on - even if the pot is turned right down so Gearmotor C isn't turning. When I turn the pot up, motors A & B start intermittently pulsing again. I don't seem to have this problem when I power the circuits on their own from the SLA battery.

Could anyone advise me on what else I could try to stop this happening? I've attached an updated drawing to help explain my setup.

Many thanks,

Michael
 

Attachments

BobaMosfet

Joined Jul 1, 2009
2,082
IMHO, I think folks need to back up a little bit here. This is a high-current (relatively) application. As such, current, not voltage, is the main consideration here. If the Arduino's cannot handle the current the pseudo-schematic suggests might be going through them (I have no specs on the motors, but the pic makes them look beefy if that's right), it may be trying to protect itself which causes it to keep shutting off. Alternatively, if the motors together draw too much current from the battery, voltage will collapse, or could also create some overload condition somewhere that is tripping an overload safety on the Arduino. Inductive feedback from the motors, Inrush current issues, etc.

Link to PDF for Arduino needs provided.
Link to PDF for motor need provided, so spec's can be examined
Link to Battery needs provided.
 

ebp

Joined Feb 8, 2018
2,332
I think we need some photos of the actual arrangement that clearly shows how everything is connected - battery, motors, driver boards, Arduino boards, potentiometers.

You may be getting noise coupling into the potentiometers one way or another. If the code simply reads the ADC input once and then sets the PWM output based on that reading, repeating this continuously, any noise coupling to the ADC input will almost certainly cause problems. One way to try to diagnose this is to write zero to the PWMs for the motors that are misbehaving (i.e. ignore the ADC value and simply write 0 instead). If the motors then stay still in the circumstances that previously caused problems, it is very likely ADC input noise is at fault. You could also experiment with fixed low values other than zero.
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks for everyone’s help on this. The board in the top right is the LM393 speed sensor modules I’m using for motors A & B.

A bit more information on the motors if it's useful:

Motors A & B

12V 6000RPM. Calculated stall torque 44A. The motors came with ferrite rings on the leads – see pic.
Both motors speed is controlled with PWM by the PID on the Arduino, each motor has a pot for adjusting the setpoint.
At each motor shaft I have a single slotted disc which is read by an LM393 IR speed sensor module. Essentially it measures the time it takes to do 1 revolution in microseconds. The pots set a time in microseconds for the setpoint of each motor, e.g 30000μs.

Gearmotor C details:

Cytron 12V 24RPM 210oz-in spur gearmotor.
Stall current 3.8A. 37mm diameter, 78mm length
Gearmotor C speed controlled with a potentiometer connected to another arduino Uno which simply reads and writes a PWM to the motor.

Just to note again, the circuit with motors A & B work fine when the gearmotor C circuit isn’t attached to the SLA battery.

If I simply write a fixed PWM value to Motors A & B, without the speed sensors or PID code, I can run both motors A & B and the Gearmotor C circuit together with no problems. This remains the same when I adjust the code to use both pots to read and write a PWM to each motor A & B.

If I try adding back in the code for both A & B ISR speed sensors, I notice through printing 'revMicros' in the serial print that I start to get problems, even with no pots and a fixed PWM being written to motor A & B. The moment I turn on the other Arduino for Gearmotor C, I get an erratic reading in the serial print for a split second with both motors, then it returns to normal. If I turn the pot up from 0V for gearmotor C the reading in the serial print for A & B go crazy again, is this messing with the PID for each motor?

I tried eliminating the pot from the gearmotor C circuit and just writing a fixed PWM but I have the same problem, the serial print speed sensor readings for A & B go crazy again.

I can add photos of the full circuit, but it might be better to also add a full drawing of the setup which would be clearer. I thought I should share this first, in case it rings any bells for anyone, and what I could try next.

Many thanks,

Michael
 

Attachments

Thread Starter

mikeoz

Joined Sep 25, 2017
86
As requested, I've attached photos of my setup and both motor circuits.

There might be some glaring mistakes in the circuits as I'm new to electronics. The cables are currently longer than needed because I didn't want to cut them too short before I had some advice on where I should position the various boards and route sensor cables etc. As you can see in photo 3, there isn't a great deal of space to work with.

As already stated, both circuits work ok when they are on there own, the problem is when they are run together. From my last post I'm thinking the problem is some kind of noise interference from the Gearmotor C circuit which is affecting motors A & B speed sensor readings & having a knock on effect to the PID which controls them.

Please could someone walk me through the steps I could take to try and resolve this problem?

Thanks,

Michael
 

Attachments

Last edited:

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Does anybody have any thoughts on this?

I've been reading about dealing with motor noise from the Pololu website so I've ordered some ceramic 0.1uf capacitors to try one across the gearmotor terminals. Should I try some ferrite beads on the gearmotor leads too?

Any help would be welcome,

Thanks

Michael
 

BobaMosfet

Joined Jul 1, 2009
2,082
Looking at your new info; there's quite a bit to evaluate. An actual schematic would be nice. Something lacking here is more evaluative information- Getting volt and amp readings from various places while testing this. If you want to know what's happening, you first have to know what/where the energy is going on the wire and in what quantity.

One thing you mentioned if I got this right, was that the problem only seemed to show up in a large way with the ISR sensors... let me pull a datasheet for the LM393 and see if anything is glaring there.
 

BobaMosfet

Joined Jul 1, 2009
2,082
Need a schematic. Chasing multicolor wires on drawings where not everything can e in the image, or there are obstructions to things-- its not for these old eyes. I haven't seen yet, what you're using to interrupt your speed sensors. You need something on the motor shaft that rotates and cuts the beam.
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks for your help with this.

The wheels have a single slotted disc mounted to each one which is read by the IR speed sensors.

What I've found is, when I run the gearmotor C circuit together with motors A & B, I think I'm getting some kind of interference in the IR speed sensors this then messes with the PID which maintains their speed. Without gearmotor C running I don't have any problems.

For testing purposes, I've tried removing the PID from the motors A & B Arduino. If I Serial.print information from the speed sensors, I notice the readings go crazy when I turn the gearmotor C on, which makes me think it's some sort of noise problem.

I've added a full drawing which shows all the connections for both circuits connected to the battery.

Hope this helps.

Thanks,

Michael
 

Attachments

Top