Supplying servos and microprocessor from single battery

Hi,

I'm trying to supply my biped robot from a single 7.4V Li-Ion battery. I cannot use two batteries as there are no space for them.

My problem is, that the microprocessor resets whenever I turn on the servos (the large current draw pulls the voltage below 4V - I need 5V). I have tried putting a diode between the servo supply and the microprocessor and adding a capacitor to deliver current to the microprocessor when the supply current is low. My microprocessor draws

500mA. The schematic is as follows:

Battery ---o----------------------- Servo Supply | | \ Diode ---->|----o---------- Microprocessor supply | === Capacitor | --- Ground

The idea is that the diode should let the current from the capacitor supply only the microprocessor. I am currently using a 3000uF electrolytic capacitor, but am considering using a 0.2 F gold capacitor for the temporary supply.

My question is if this is the way to do it, or if anyone have a better suggestion?

Regards, Nikolaj Fogh

Reply to
Nikolaj Fogh
Loading thread data ...

Yeah. I have quite a lot of auxiliary boards for the microprocessor which draws some current. The drop is about 25ms where the voltage drops from 6V to 4V. I hope that a 0.2F capacitor is enough. Is there a way to calculate the size of capacitor to use. Maybe modelling the circuit as an RC circuit, and keeping the voltage above some threshold?

Reply to
Nikolaj Fogh

Basicaly yes thats the way but 500mA is an awfull lot of current for a micro to take. Capacitor size depends on current draw and duration of the drop.

Reply to
cbarn24050

model it as a capacitor and a constant current, the math is much easier.

Bye. Jasen

Reply to
jasen

A 3000uF cap could supply the micro for only 14mS (assuming a 2.5 voltage drop and dt = cdV/I ) I suspect the servos my create longer duration spikes than that.

Where are you measuring that voltage drop? At the micro? What happens to the voltage at the battery terminals? It might be as simple as running seperate power wires from the battery to the servo and the micro (eg star connection rather than daisy chain). Fatter wires might also help.

If you are seeing a large voltage drop _at the battery_ then you may have a problem with the ESR of the battery. The only solution might be to use higher capacity cells or possibly switch to NiCAD or NiMH cells.

Whats your battery spec (Dimensions and capacity)?

Reply to
CWatters

CWatters skrev:

The batteries should be able to supply 20amps. I measured the voltage at the microprocessor. I will try to measure it at the terminals and then get back to you.

Reply to
Nikolaj Fogh

--
You can use:

         IdT
     C= -----
         dV


Where C is the required Capacitance, in farads
      I is the current into the load, in amperes
      dT is the time the battery will dip below your 5V limit, and
      dV is the drop in voltage you can tolerate

But there's some confusion.

I'm assuming you're using a regulator of some sort between the
battery and the logic, and  say you're starting out with a 7.4V
battery and that the target voltage for your logic is 5V, but then
later on you say that the voltage drops from 6V to 4V for 25ms when
you turn the servos on.

Where did the 6V come from?
Reply to
John Fields

John Fields skrev:

Oh, yeah. I have a voltage regulator as well, didn't think it mattered. The full circuit is:

7.4V 6V Battery --o~o-- Regulator --o---- Servo Supply | | \ 5.8V 5V -->|--o-- Regulator --o---- Vcc | | === Cap === Cap | 10000uF | 100uF --- ---

Gnd Gnd

So the 6V is actually 5.8V. The 100uF and the second regulator is on the microcontroller board. As of now, the large cap is 10000uF. I am still waiting for a larger 0.2F gold cap.

Reply to
Nikolaj Fogh

--- If that 6V is going to 4V on startup, then that means the servo regulator is going out of regulation. You've only got 1.4V of headroom there, so that may be part of the problem, along with the fact that both the servos and the logic are loading it.

More of the problem might be that you don't have enough headroom for the 5V regulator to work properly. If it's not LDO you'll need about 2 to 2.5V, and with that 5.8V coming in all you've got is

0.8V. That means that you've only got a 0.2V drop across the diode, which also sounds a little fishy. What kinds of regulators (part numbers) are you using?

If it's a 7805 or something like that on the logic side, here's what I'd do:

7.4V 6V Battery --o~o-+-- Regulator --o---- Servo Supply | | | 5V +-----o-- Regulator --o---- Vcc | | === Cap === Cap | 10000uF | 100uF --- --- Gnd Gnd

You said the logic draws about 500mA, so that means the regulator will be dropping 2.4V and dissipating about 1.2 watts. Not bad, but if it runs hot you might want to think about increasing the area of its heat sink. Also, doing it this way should allow you to get rid of the diode and the 10000µF cap and replace it with something much smaller since you won't need a reservoir any more.

-- JF

Reply to
John Fields

The diode is a schottky diode, so it only has about a 0.2V voltage drop. The regulator is a LDO type. It drops about 0.5V, so I have 0.3V headroom (not much, I know). One problem is that it doesn't have a heatsink and gets rather warm. There is no space for adding a heatsink, so I like to have the external regulator to take most of the voltage.

Reply to
Nikolaj Fogh

Do yoy need to run the servos off 6V? If they are model car/aircraft types they normally work fine from 4 Nicad cells or 4.8V. It's only necessary to run them off higher voltages if you want them to be fast. If the speed isn't really critical you could use two 5V regulators in parallel (one for servos and one for the micro).

Reply to
CWatters

--
OK, so when it's running normally your circuit looks like this:

     7.2V             6V
     /               /    
    +-------[REG]---+-------+
    |               |       |
    |       5.8V [DIODE]    |
    |+      /       |       |
  [BAT]    +--------+   [SERVOS]
    |      |        |       |
    |      |    [REGULATOR] |
    |      |        |       |
    |      |        +--5V   |
    |      |+       |       |
    |    [BFC]   [LOGIC]    |
    |      |        |       |
    +------+--------+-------+

but on startup it looks like this:


     7.2V             4
     /               /    
    +-------[REG]---+-------+
    |               |       |
    |       3.8V [DIODE]    |
    |+      /       |       |
  [BAT]    +--------+   [SERVOS]
    |      |        |       |
    |      |    [REGULATOR] |
    |      |        |       |
    |      |        +--??V  |
    |      |+       |       |
    |    [BFC]   [LOGIC]    |
    |      |        |       |
    +------+--------+-------+

If it works OK with 5.8V on the regulator and it can go to 5.5
before the regulator goes out of regulation, then the BFC can only
bleed down 0.3V during the 25ms transient, so:



          Idt     0.5A * 0.025s
     C = ----- = --------------- = 0.4166...F
          dV          0.3V


Assuming that supercaps are +/- 20% beasts means that it might be
20% below that 0.417F, so you really need to specify it as 0.5F.
Reply to
John Fields

Isnt that 0.04166 F, so 0.05 F ?

Reply to
Nikolaj Fogh

Before you mess with super caps I suggest you check what happes to the battery voltage. Start at the battery and work through the circuit to see exactly what's working and where the voltage drop is occuring. Is the battery solid at 7.2V? Are there losses in the wires to the regulators, are the regulators coming out of regulation etc Don't start adding bits until you know where the problem really is.

Reply to
CWatters

--
Oops...

Yup, thanks. :-)

Another Oops...

To get the final value of the cap I increased the value of the
required capacitance by 20%, which was the wrong way to do it. 

The right way to do it is to find what value of capacitance which,
when decreased by 20%, will yield the target capacitance.  That is:


     0.8x = 0.0417F


So, dividing both sides through by 0.8:


     0.8x    0.0417F
    ----- = --------- 
     0.8      0.8 


yields:


         0.0417F
    x = --------- = 0.052F
           0.8
Reply to
John Fields

the

ll

p=2E

-------

I think instead of trying supercaps, it would be better to try the circuit suggested by JF --

But since you see that the regulator-2 (for MCU) gets too hot, and you want to drop some voltage externally- how about using 2 diodes (general 1A rated) before regulator, and taking their input directly from battery.

I think taking the MPU supply chain directly from battery is better than taking it from regulator-1 (6V).

-- Vivek

Reply to
fuzzyviv

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.