Go Down

Topic: Why does the DMM make this circuit "work" ? (Power issues : servo & bluetooth) (Read 790 times) previous topic - next topic

BabyGeezer

First off, i have concluded that Bluetooth (v2) is quite power hungry and am probably going to end up abandoning it and switching to using the nRF24L01 modules.

However, i encountered a weird situation re powering the circuit and that is the main reason for this question.

The issue is at the power supply end, i don't think there is anything amiss elsewhere but the whole setup looks like this;


FWIW: the setup works with power from the PC-USB through a 3v3 USB-to-TTL adaptor.

But when i try alternative power supplies, it fails - my conclusion is insufficient current for (or because of) the HC-05 - which is why i will switch to the nRF24 option.

The following are the various options that i had tried just for completeness sake, but the key point is the last one, #5 ; and of course #1 as reference point of what did work.


FYI, i break the circuit (for current-measuring) at the top-left part of the schematic - ie. where the power supply goes to the power rail.

Why is the circuit "stable" (ie. servo does not jitter) when i'm measuring the current ?
(Is the DMM acting like some kind of buffering capacitor - i had already tried a 10uF and even 1000uF which didn't make a difference, well - slightly less of a jitter)

EDIT:
just to clarify further - *when i'm measuring* - means the servo jitters when the circuit is left alone, but when it is broken and the DMM is inserted (to measure the current) the servo doesn't jitter anymore - what is happening here ?

EDIT2:
forgot to add that Servo ground *is* also tied.
Attach your images to be viewed directly - THIS WAY;
https://forum.arduino.cc/index.php?topic=519037.0

Grumpy_Mike

Quote
Why is the circuit "stable" (ie. servo does not jitter) when i'm measuring the current ?
You have inadequate power supply decoupling in the circuit and the meter is acting as an inductor. See the last circuit on this page
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
Servos do generate a lot of interference and an inductor along with a capacitor does cut this down. The most effective place for a Pi circuit like this is in the supply to the servos. The inductor suppresses sudden spikes which it looks like you are getting into the control circuit.
For the most effect you could have a Pi circuit like this on each servo.

BabyGeezer

ahh, i see - while the supply was separated, it was a matter of insufficient current to the control circuit, but then when i combined/shared the supply (to something beefier) - it became a different problem - ie. "over current" due to spiking - i did see the numbers surge briefly.

so; even if i had switched over to the nRF24, i would have faced the exact same problem !
(Thanks for saving me from going through that ! :) )

i guess one simple solution would be to just maintain separate power supplies.



Quote
For the most effect you could have a Pi circuit like this on each servo.
hmm, i'm not sure how to set that up since it's using a "servo controller" module.
(i'd have to setup a whole PCB of support circuitry next to the PCA9685 module)

although, i just had a look at the datasheet for the PCA9685 and it's really meant for PWM-ing LEDs and not really servos.

i'm hoping that using 9g micro servos will still be okay though.

is this number '400mA' (ISS) from the datasheet the maximum current that the module can withstand (on it's driving outputs) ?



Attach your images to be viewed directly - THIS WAY;
https://forum.arduino.cc/index.php?topic=519037.0

Paul__B

so; even if i had switched over to the nRF24, i would have faced the exact same problem !
Frequently the case.

If it doesn't work and you don't know why, well, trying "something else" is not so smart.  :smiley-roll:

BabyGeezer

Frequently the case.

If it doesn't work and you don't know why, well, trying "something else" is not so smart.  :smiley-roll:
ehm... isn't that the basis of the scientific method ? :P
you don't know - but you guess* what it is, and then that guess is either validated or proven wrong, at which point you will then DO know (something).

* = educated one, conjecture or theory...
Attach your images to be viewed directly - THIS WAY;
https://forum.arduino.cc/index.php?topic=519037.0

Qdeathstar

I agree, try something else till it works is OK, especially for hobbiest.  It's not efficient but it is certainly an acceptable method for learning.
 
A creaking creeping shadow
stiff against the freezing fog
glares at a tickless watch.

Time has failed him -- all things shall pass.

BabyGeezer

...try something else till it works is OK,...
 
i don't mean just trying other things until it sticks - i still want to find out *why* the previous attempt did NOT work. (that is how you DO learn)

the 50+mA for the HC-05 was still a shock to me though, so i would be making that change (to nRF24) nonetheless.
Attach your images to be viewed directly - THIS WAY;
https://forum.arduino.cc/index.php?topic=519037.0

wvmarle

ehm... isn't that the basis of the scientific method ? :P
you don't know - but you guess* what it is, and then that guess is either validated or proven wrong, at which point you will then DO know (something).

* = educated one, conjecture or theory...
Close. The scientific method is more like: propose a theory, design experiments that can test it. Definitely not "just try something". Repeatability is part of this.

In your case, you concluded "not enough power due to the BT module". The simplest experiment to prove/disprove this would be to remove the BT module from the circuit, see if the jitter goes away. That's an experiment I don't see in your power supply tests. I expect it won't make a difference, if only because BT is designed to be low power, secondly because the power requirement of a BT (or NRF24) module is far less than that of a typical servo.

Your PCA9685 should be perfectly fine as it just provides the signal for the servo, not the power (unless you wire it totally wrong). If used with LEDs it can probably drive LEDs directly. An LED takes 10-20mA typically, a signal ideally no current, in reality maybe a few µA, should be <1mA. No problem there.

Pi filters work well. I'm using them mostly on the MCU side, to keep the noise of the motors out. That's when using a 12V circuit supplying power to a number of motors and projects. 12V supply, diode (Schottky for lower voltage drop but a 1N400x will do just fine), then Pi filter before the 12V-5V buck converter. The diode is to prevent back flow, really helps in my case even though I'm using 1.5 mm2 wires.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

BabyGeezer

Close. The scientific method is more like: propose a theory, design experiments that can test it. Definitely not "just try something". Repeatability is part of this.

In your case, you concluded "not enough power due to the BT module". The simplest experiment to prove/disprove this would be to remove the BT module from the circuit, see if the jitter goes away. That's an experiment I don't see in your power supply tests. I expect it won't make a difference, if only because BT is designed to be low power, secondly because the power requirement of a BT (or NRF24) module is far less than that of a typical servo.
yeah, okay - my method of conclusion was suspect - but that was when using separate supply, and i did measure current draw of the control circuit with and without the HC-05 under the "working" situation, so there was no jittering in that setup.

i failed to take into consideration the new factors when i then combined the supply, because the symptoms looked the same.


Your PCA9685 should be perfectly fine as it just provides the signal for the servo, not the power (unless you wire it totally wrong). If used with LEDs it can probably drive LEDs directly. An LED takes 10-20mA typically, a signal ideally no current, in reality maybe a few µA, should be <1mA. No problem there.
okay, thanks for the confirmation - i did think that the PCA9685 would "just" be dealing with the signalling currents and so surmised the servo (power) currents themselves wouldn't be catered to in that datasheet.


Pi filters work well. I'm using them mostly on the MCU side, to keep the noise of the motors out. That's when using a 12V circuit supplying power to a number of motors and projects. 12V supply, diode (Schottky for lower voltage drop but a 1N400x will do just fine), then Pi filter before the 12V-5V buck converter. The diode is to prevent back flow, really helps in my case even though I'm using 1.5 mm2 wires.
i guess i should make one then - if not Mike's ideal suggestion of one per servo, at least one for the control circuit as a whole.

will have to start learning how to make my own choke (air-core coils) and set up a proper power circuit for the project from a single supply.

i think the PCA9685 can't handle V+ above 6V and i probably don't want to run the SG90s with more than that anyway - which doesn't leave much room for a series(back flow) diode (drop) and then the LD1117A(3v3) also.
Attach your images to be viewed directly - THIS WAY;
https://forum.arduino.cc/index.php?topic=519037.0

wvmarle

That series diode is absolutely not needed for motors, or in most situations really. But when running nearly a dozen water pumps (brushless DC) and a handful of air pumps (probably brushed DC) on the same power supply you do get to see quite some noise.

Don't bother making your own coils, not worth your time. Basic inductors are really cheap. Ferrite core is far more efficient, you're not looking for perfection in this application - air coils are for things like HiFi sound applications.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Grumpy_Mike

hmm, i'm not sure how to set that up since it's using a "servo controller" module.
(i'd have to setup a whole PCB of support circuitry next to the PCA9685 module)
Using a servo control module is irrelevant. It is the power feed to the servos not the signal that need decoupling. So:-
power supply -> Pi circuit 1 ->  +ve of servo 1
power supply -> Pi circuit 2 ->  +ve of servo 2
power supply -> Pi circuit 3->  +ve of servo 3
power supply -> Pi circuit 4->  +ve of servo 4
and so on.

Quote
although, i just had a look at the datasheet for the PCA9685 and it's really meant for PWM-ing LEDs and not really servos.
Again irrelevant it is equally suited to servos as it is to LEDs or anything else that needs PWM. Incidentally you can't set up the chip so that you can do LEDs on some channels and servos on others. It is a bit of a long winded explanation not worth going into but just stick to servos or LEDs per chip.

BabyGeezer

That series diode is absolutely not needed for motors, or in most situations really. But when running nearly a dozen water pumps (brushless DC) and a handful of air pumps (probably brushed DC) on the same power supply you do get to see quite some noise.
i see, i had another thread on a simple 2-wheel vehicle with BJTs running DC motors and a series diode was suggested on the (shared) power supply to the Pro Mini to prevent potential brownout if the motors tried to draw more current.


Don't bother making your own coils, not worth your time. Basic inductors are really cheap. Ferrite core is far more efficient, you're not looking for perfection in this application - air coils are for things like HiFi sound applications.
well, certainly not as a habit, but i think it would be at least worth the learning experience and calculating values from first principles - plus, if i had to buy them it would take a while to arrive, and i do have some enamel wire on hand for experimentation. (also for mucking about with Joule Thiefs :) )

and even if only just to see the above circuit "improve" as per the effect with the insertion of the DMM.

Using a servo control module is irrelevant. It is the power feed to the servos not the signal that need decoupling. So:-
power supply -> Pi circuit 1 ->  +ve of servo 1
power supply -> Pi circuit 2 ->  +ve of servo 2
power supply -> Pi circuit 3->  +ve of servo 3
power supply -> Pi circuit 4->  +ve of servo 4
and so on.
thing is the PCA9685 module handles the V+ (for each servo) as well, so i'd have to breakout the 3-pin male headers just to insert a Pi circuit for each.


Again irrelevant it is equally suited to servos as it is to LEDs or anything else that needs PWM. Incidentally you can't set up the chip so that you can do LEDs on some channels and servos on others. It is a bit of a long winded explanation not worth going into but just stick to servos or LEDs per chip.
yes, read that part in the datasheet.

again, i got side-tracked with thinking of the servo power consumption, whereas i should just be thinking servo signal only.

now, if it were PWM-ing a DC motor for speed control, that would be a different matter right ?
seeing there's a limit of 10mA per pin in the datasheet - and i'm guessing that a flyback diode would also be necessary.
no, just use a MOSFET...
Attach your images to be viewed directly - THIS WAY;
https://forum.arduino.cc/index.php?topic=519037.0

wvmarle

The main problem of Pi filters is the size. Big inductor, big capacitors. Especially if you use 2,200µF ones on the output side as I usually do (220µF was just not enough...)
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Grumpy_Mike

Quote
thing is the PCA9685 module handles the V+ (for each servo)
No it dosn't.

Quote
The main problem of Pi filters is the size. Big inductor, big capacitors.
No you can use small inductors and small capacitors. I do it all the time.

Southpark

ehm... isn't that the basis of the scientific method ? :P
you don't know - but you guess* what it is, and then that guess is either validated or proven wrong, at which point you will then DO know (something).

* = educated one, conjecture or theory...
Science is about explaining and predicting observed/observable/measurable phenomena - coming up with plausible/backable theories to explain the mechanisms behind the observations. It is built-up on accumulated scientific knowledge - (math, gathered data, physics, chemistry etc).

Switching over to something else (eg. nrf24L01) when the existing device (hc-05) is expected to be workable is certainly an option. But, naturally - it is definitely advantageous to find out the reason(s) for a particular approach being currently unable to achieve your objective ----- which is why you asked about it, and which is good. This enters the area of electronics/electronic engineering, and working towards improving electronics knowledge and skills.

Go Up