battery box supplying 4 different voltages?

I'd like to make one battery box for the bot I'm working on, that will simultaneously supply 3V, 6V, 9V, and 12V. The first version of this box will get its juice from eight D cells.

What I don't understand is: how can I wire this up so that it has terminals at those four different voltages, but no matter how loads are applied to them in any combination, the eight batteries drain evenly? (I want to avoid the situation where I need to change different batteries at different times, just because that would be a nuisance.)

My guess is that to do this, I need to wire all eight D-cells in series, and then from this 12V supply, hang three DC-DC voltage converters in parallel for the 3V, 6V, and 9V outputs. (And the 12V output goes directly out.) Does this make you experienced roboticists recoil in horror for some reason? Is there a more elegant solution?

Thanks,

- Joe

Reply to
Joe Strout
Loading thread data ...

The 3 DC-DC converters approach is the best way to get the batteries to drain evenly. As for recoiling in horror, it depends on what you are going to hang on the different outputs. If motors are on any of them, it would make me pretty nervous. Motors are electrically noisy and can have really high transient loads. The transient loads can cause voltage dips that cause problems for the other regulators. The high frequency noise will go right through switching regulators and cause trouble, especially with logic. With good filtering and good luck, you can do this but be prepared to spend some time messing with it.

Proper grounding design will also be needed. Remember that as much current and voltage drop occurs on the ground path as the +V paths. Star or single-point grounding with the common point as close to the battery negative or bulk filtering capacitors as possible will help.

Good Luck, Bob

Reply to
BobH

You generally don't want to go the tap route, for reasons Bob mentions. Switching regulators are pretty cheap these days. You're better off providing one 12V source, and switch regulate the other voltages. If the current demand is low for some of the voltages (on the other of tens of milliamps), and tight regulation is not required, you might get away with a simple zener arrangement. Or a simple resistor voltage divider when no regulation is needed.

Bob makes a very good point about noise. I find it's far less a hassle to provide a second set of batteries for the motor than to worry about all the EFI noise and EMI transients. The separate batteries makes the design easier especially if you're not familiar with DC electronics.

-- Gordon

Reply to
Gordon McComb

OK, this is good feedback. On other bots I've tried it both ways, and did indeed find (especially on my servo-driven bots) that it was easier to just have separate motor and logic batteries. But in this case, I have plenty of room and weight allowance, and I'm willing to invest more time in getting this battery module now so I spend less time switching batteries later.

OK. I'm planning to have a power bus running the length of the bot, with the idea that anything that needs power can tap into the nearest

3V, 6V, 9V, or 12V line as needed. If I understand you correctly, I should have eight conductors on this bus, rather than five, so that each voltage can have its own ground line. Then tie the four ground lines together in the battery box, right next to the batteries or caps.

So the whole thing would look something like this?

formatting link
...where the boxes are switching regulators of four different ratings? And the capacitors would be sized bigger for the 12V line and smaller for the lower voltages?

Thanks,

- Joe

Reply to
Joe Strout

Joe:

Even if you are familiar with DC electronics, dealing with motor brush noise is not easy. The following URL contains the slides from our most recent Home Brew Robotic Club talk on DC motors:

Somewhere around page 39, the graphs of the kind of noise DC motors like to generate are shown. It is really easy for that brush noise to get from your motors to the rest of your electronics, unless you are really very careful. It manifests itself as spurious processor resets and just general flakiness. It can really take all the fun out of debugging your robot.

I have become a convert of complete opto-isolation between the motor bus and everything else. Two battery packs with opto isolation to the motor H-bridges really makes for a robust robot that just *works*. Here are some circuits that show how to do the optoisoation:

Opto isolators are cheap. A second battery back is cheap. In addition, soldering a small capactior across the motor leads is cheap. Even better, putting a couple of ferrite beads in series with the motor leads is an even better idea. Small capacitors and ferrite beads are cheap.

-Wayne

Reply to
Wayne C. Gramlich

Gordon and Joe's feedback is the best advice on this, but if your budget = supports it, this company may have something close to what you are = looking for. I stumbled across them a while back when I went looking for = the same thing:

formatting link
I have = yet to buy one & use it but it's still nice to know a canned solution = does exist if that's the route you want to go.

Look down the page at their "RGi-PowerCommander Triple Step-Down = Programmable Power Supply".

Best of luck ! JCD

Reply to
Pogo

I dig that. The problem is, I'm trying to make a general power-supply module, and I don't know what voltage the motors might need. Motors that take 12V, 6V, and 3V are all pretty common, and I've seen people run servos at 9V. Clients of my power supply module could be using any or all of these, in any combination.

But. Maybe I can provide a 12V-ish unregulated, high-current, noise-is-OK bus, optically isolated from a low-noise power bus (probably

5V). Then declare that client modules, if they want something less than 12V, will have to do the step-down conversion themselves. This just doesn't seem quite as elegant to me -- voltage conversion and regulation is a PITA to do well, and it seems like the sort of thing the power module ought to do for any clients that need it. (It also looks likely to cost $10-$15, which I can easily spare in the power module, but would be hard to cram into the other modules and still meet my per-module cost goals.)

Hm. Well, in any case, I can see that this will take me multiple iterations (and years) to get right, so I should focus initially on whatever's simplest and most reliable. Thanks to all for your insight.

Best,

- Joe

Reply to
Joe Strout

Correcting a typo ... "Gordon and BOB's feedback is the best advice on this, but if your = budget supports it, this company may have something close to what you = are looking for. I stumbled across them a while back when I went looking = for the same thing:

formatting link
I = have yet to buy one & use it but it's still nice to know a canned = solution does exist if that's the route you want to go."

Look down the page at their "RGi-PowerCommander Triple Step-Down = Programmable Power Supply".

Best of luck ! JCD

Reply to
Pogo

But a lot of people run the motors through an H-bridge, and most of these have a voltage drop. A 3V supply would not be practically useful in most instances, the exception being motor control using relays. Motors seldom need regulation, and within reason can tolerate voltages higher or lower than what is stamped on their case. OTOH, electronics do need regulation, and these are typically 3.3 or 5 volts. Neither of those are provided on your battery power supply.

-- Gordon

Reply to
Gordon McComb

Separate motor and logic batteries makes things simpler. Especially if you use the optoisolators Wayne mentioned.

Yes. The low current voltages can have smaller buses, but definitely separate the high current return from the low current and or logic returns.

The capacitors get sized more for transient load current than voltage (other than needing caps rated for the voltage you are using). If you think about power distribution buses without capacitors, short term heavy loads will require the heavy load current be supplied from the battery. Every wire has resistance and inductance and pulling those short term heavy loads through your whole distribution system causes voltage drops across the resistances and inductances. Large capacitors act as local reservoirs to supply the large currents locally, so you don't get all the voltage drops throughout your power distribution system. You need heavy enough buses to handle the average current, but the caps supply the peaks.

I have sketched out and scanned a couple of drawings, but I don't have a good place to post them. If you want, I will email them to you and we can discuss from there. If you post them like your schematic, other people can comment as well.

Regards, Bob

Reply to
BobH

OK, now we're getting some problem definition. But not enough. What does "high current" mean? 1A? 10A? 100A?

Getting tens of watts of clean power from a noisy source is well-understood and isn't all that hard. There are lots of power supplies sold for automotive applications that do it. Here are some examples:

formatting link
John Nagle

Reply to
John Nagle

All DC motors really care about the maximum current that is pushed through them. They care much less about voltage. If you are using an H-Bridge to control your motor, as long as the H-Bridge is pulsed at a rate that keeps the motor current under "maximum", it will run fine.

If you have a 6 volt motor, it will run just fine off of a 12 volt battery just so long as the H-bridge is not pulsed greater than 50% (approximately) duty cycle. Indeed the 6 volt motor will accellerate faster with the 12 volt supply.

For stepper motors used in CNC mills, 80 volt supplies driving a 5V stepper motor are quite common. The increased voltage makes the steppers really accellerate quickly. The circuitry that drives the stepper motors ensures that the maximum current through the motor is not exceeded.

DC motors will run just fine off an unregulated battery.

12 volts is just fine for most hobby robots. Indeed motorized wheel chairs run off of 12 volts.

There are some devices which are nasty, that also need regulatated voltage. The Sharp GP2D12's are an excellent example. They need 5V regulated voltage. They idle at ~5mA, but they have shorty nasty current spikes up to 240mA. For these, you want them running on the noisy 12 volt bus. A simple 7805 voltage regualtor with a couple of filter caps is all you need (cheap!). The 7805 works just fine on 12 volts and probably won't even need a heat sink.

Having another bus that drives your logic devices can run off of a 6 volt battery. A single 5 volt low drop-out voltage regulator (LM2940-5) will work for the rest.

The last issue that you haven't even mentioned is the wire gauge needed for you bus. Wires thick enough to run DC motors tend not to be very "bus" friendly.

Read it and weep. The DC motors for your robot will probably want to be directly connected to your 12 volt battery via some nice thick wire. For a 3.5A H-bridge, technically, AWG16 wire is required. I usually use something like AWG20 or AWG22 and get away with it since I rarely run maximum current through my motors.

To sum it all up:

1) Have one 12 volt battery bus unregulated for small DC motors and the like. 2) The larger DC motor H-bridges are connected directly to the battery, not through the bus due to current restrictions on bus wiring. 3) Have one 6 volt battery regulated down to 5 volts to drive your 5 volt logic. Another 3.3 volt regulator is used for 3.3 volt logic. 3.3 volt rgulators are both small and cheap. 4) There is no shared ground between the 12-volt and 6 volt buses.

By the way, this is what the RoboBricks2 bus uses:

My 3.5 Amp optically isolated H-bridge does not grab power from the 12-volt bus, it requires a direct connection to the 12 volt battery.

There is no reason to spend years figuring this stuff out. Just keep asking questions.

-Wayne

Reply to
Wayne C. Gramlich

Thanks, that's good to know.

And, just to be sure I understand: this is OK because the 240mA current spikes are a very small percentage of the total time. The rest of the time, even though the 7805 is dropping 7 volts, the amount of current is so small that the total power dissipated is quite small. Right?

I'm having a little trouble parsing this. Are you suggesting that the power bus for the logic devices run off a 6 volt battery (e.g. 4 alkaline AA's), run through a LM2940-5 to bring it down to 5V?

I was also considering using a 9V battery for the logic power, perhaps also run through a simple linear regulator, on the theory that the logic devices won't be pulling all that much current anyway.

Yes, I didn't mention it but I was planning that the power "bus" be a separate cable, probably on the other side of the robot from the ribbon cable that carries signals, using thick wire. Now I'm thinking of having a simple two-conductor cable for the 12V power, and putting the

5V (regulated) logic power in the ribbon cable along with everything else.

Good to know. I was planning AWG20, but I do want it to be robust (even in the case of abuse -- since I'm likely to abuse it sooner or later), so I might go even lower.

I can't do that; "no direct connections" is a design constraint. I'll just have to make sure the power bus is beefy enough.

This is nice and clear, thanks. But I may let any modules needing 3.3V do their own regulation, drawing from the 5V bus -- as you say, that's simple and cheap.

This is a really interesting point. I'm not sure I can do that, because I think the motor controller I use connects them itself. But I can try. I'll also be sure to put hefty capacitors on the 12V line, both at the source and (to a smaller extent) on the batteries, which should help filter out the noise.

You're too kind! I'll do that, and I'm reading as much as I can too. But realistically I'm sure there are lessons that have to be learned the hard way.

Best,

- Joe

Reply to
Joe Strout

1 or 2 A. Maybe as much as 3, but I wouldn't expect higher than that. This isn't a combat machine, it's a rolling trash can. :)

Best,

- Joe

Reply to
Joe Strout

Well, the electronics I've used so far (mostly Pololu boards) have not been so fussy about the supply voltage (perhaps because they have their own linear regulators onboard). 6V would do fine for them, I think. But I'll certainly check this and see what they accept and recommend.

My thinking on this issue has evolved a bit over the weekend (thanks to helpful input from you all) -- I'm now thinking of a 12V unregulated supply for motors and the like, and a regulated 5V supply for electronics. Any module that needs 3.3V should be able to draw from the

5V supply through its own regulator.

My only remaining question is whether to use separate batteries for the

5V supply, or draw from the 12V supply through either a switching or linear regulator. I know switching regulator circuits are a little more complex and expensive, but they don't look all that bad -- and I'd only need one of them. OTOH, if the current draw on this line is low enough, maybe a linear would be good enough (defined as, in actual use the motors are going to drain the batteries way faster than the waste through the linear regulator, so that this waste hardly makes any difference).

I just hate changing batteries, and having two sets of batteries, needing changed at different times, sounds unpleasant.

Best,

- Joe

Reply to
Joe Strout

Thanks, that's very kind and I'd be happy to post them. However, I've simplified my goals quite a bit since then -- I think I now want a single 5V regulated supply, plus a 12V unregulated one. I'd still like to get them both from a single set of batteries though, if you think the noise problems can be confidently handled.

Best,

- Joe

Reply to
Joe Strout

For a battery-operated device you want to limit unnecessary power drain, and the waste heat in linear regulating 12V to 5V with any kind of amperage isn't a good design practice. While it may be so that most electronics will not pull high currents, the emphasis should be on the fact that it's a battery-operated device, where you want to reduce unnecessary recharge cycles. This is especially true when using sensors like the IR units, which draw quite a bit of transitory current each time they are triggered. The current draw tends to be higher than you think.

Given that switching regulators are cheap and fairly easy to add that should be your goal. Personally, for a "universal" system I'd do a parallel 5V buss (two regulators, A and B). Reduces possibility of brown-outs and (IMO) is a little easier to design than one high-capacity regulator.

If you're worried about the dual batteries why not create for yourself a wiring harness with a 4-prong outlet using a DIN plug and custom power charger that's basically two wall-warts. You can recharge the batteries in circuit, or drop them out of circuit with a DPDT switch, which is only slightly more expensive than a SPST switch. The batteries never need to come out.

(On my stuff, the batteries are made to come out because, well, I'm cheap. Good batteries are expensive, and I like to reuse them for different projects.)

-- Gordon

Reply to
Gordon McComb

That is correct. A graph of the current draw is shown on page 24 of the August 2004 issue of Servo. I don't know if you have that issue, but maybe somebody in your robotics club does.

Yes. The "Low Drop Out" means that the batteries can run down to 5.25V and the voltage regulator will still work. Regulators that are not "low drop out", like the 7805, need at least 1.25 volts above the regulated voltage to work. Thus a LM2940-5 can work down to 5.25 volts whereas a 7805 works down to 6.25 volts.

That will work, but you are throwing away battery power needlessly. The equation to think about is:

P = I * V (Power = Current * Voltage)

For a 9Volt battery being pulled at 250mA, the regulator is wasting 250mA * (9V - 5V) = .25A * 4V = 1 Watt. For a 6Volt battery being pulled at 250mA, the regulator is wasting 250mA * (6V - 5V) = .25A * 1V = .25 Watt. But a 9 volt battery is a small convenient package, so it may still be the right thing for your application.

That would work reasonably well. You might want to double up the wires on the 5 volt side (i.e. 2 logic ground and

2 5V lines.) That 28 gauge wire used for ribbon cable tends to be wimpy in the current carrying department.

A constraint is a constraint. ;-)

That's what I meant; sorry 'bout the lack of clarity. Little 3.3V regulators come in TO-92 packages or smaller. They take up very little board space.

It turns out that it is the high frequency stuff that causes all the problems. Big hefty capacitors tend to let the high frequencies stuff right through. This is because real life capacitors also have a resistance and inductance component. A big hefty theoretical "perfect" capacitor would nuke the high frequency stuff too, but they are made out of unobtainium, so they tend to be pretty expensive.

To work on the high frequencies, put a couple of ferrite beads on each of your motor leads as close to the motor as possible. Also, put a small .1uF capacitor directly across the motor leads. This should really help reduce the motor brush noise. Also, put a .1uF capacitor across the power and ground lead of every IC in your robot.

If you still have problems, buy or build an opto-isolated motor controller.

There are always hard lessons to be learned, but one can always try to learn from the mistakes of others. I'm a relative new-comer to the opto-isolator religion myself. Other people told me to do it, but I just didn't listen. Shame on me. ;-)

-Wayne

Reply to
Wayne C. Gramlich

I'll buy that.

How do you decide which bus to plug any particular device into? Do you dedicate one to noiser applications than the other? Or just try to balance their usage?

I'd like to get there eventually, but that sounds pretty far beyond my abilities at this point. I'm still stuck pretty firmly in the era of alkaline batteries -- or at best, rechargeables in the standard alkaline form-factor, which I pull out and stick in a wall charger (cursing every time I do it because it's such a nuisance, and because the rechargeables drain so much more quickly than the alkalines).

Eventually this will annoy me enough to build a proper in-circuit-rechargeable battery module. But I know that will take quite a bit of investment, and it'll be much more rewarding to do it when the rest of the bot is already up and running, rather than doing it up front. But this is part of the reason why I'm so strictly chopping my bot into modules, and fussing about the interfaces between them. I just know that probably every module (and certainly the power one!) will be rebuilt from the ground up at least once, and probably multiple times.

(Ultimately, my goal would be for my robot to realize that its batteries are getting low, and navigate on its own from wherever it is to its charging station until it is full again, and then resume exploring. But... baby steps...)

Hear hear!

Best,

- Joe

Reply to
Joe Strout

I think you can do it, possibly with some messing with. How variable are the loads going to be? This is where you will get into trouble I think. You may get one configuration working well and then change motors or up the battery voltage and have to mess with it again.

Everybody has had good comments here. Good heavy wiring for the unregulated supplies. Big caps near the batteries and near the loads. Small caps .1uF or .01uF near noise sources. Star grounding. Even with star grounding, the optos make some sense going into the motor controller, as the grounds will have noise on them and the optos mean that does not translate to wierd currents or noise on the control inputs.

Don't underestimate the stall currents a motor can draw. Measure the DC resistance of the motor when stopped. Turn the motor slightly, looking for the lowest DC resistance when you are not turning it. The DC supply voltage divided by this resistance will be a pretty good approximation of the stall current. 5X your operating current is not unrealistic at all.

Good Luck, Bob

Reply to
BobH

PolyTech Forum 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.