Author Topic: $50 Robot switching to two batteries  (Read 1042 times)

0 Members and 1 Guest are viewing this topic.

Offline richiereynoldsTopic starter

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
$50 Robot switching to two batteries
« on: February 18, 2010, 04:46:36 AM »
Hello, some questions regarding power.

My $50 robot now has 4 servos, 4 photoresistors, 2 IR scanners (one digital and one analogue) and a 16x2 parallel LCD with a backlight. Hence, I'm looking to stop my batteries draining so quickly. I originally did the single 6v battery design but am switching to two batteries.

First question - any reason I can't just use two 6V battery packs? (rather than the 4.8V and 9V mentioned in the tutorial).

Second question - I thought the big cap was to smooth the low frequency noise on the servo bus. This is also borne out by the "two power source" wiring diagram here: http://www.societyofrobots.com/robotforum/index.php?action=dlattach;topic=3292.0;attach=1304
However, on the $50 tutorial itself it states "DO NOT connect the battery + end of the capacitor to the battery + end of 4.8V battery!!!!" Which is exactly the opposite of what is shown on the digram. Which is correct?

Third question - do i need a cap on the microcontroller/sensor bus? other than the ceramic cap that's already between AVCC and Gnd on the microcontroller (and a cap that I've installed on the analogue IR scanner).

Fourth question - I have a switch on the regulated microcontroller/sensor power bus but none on the servo one, will the cap/servos drain any power from my batteries when they're not running?

Thanks! Richard.
« Last Edit: February 18, 2010, 04:48:27 AM by richiereynolds »

Offline cyberfish

  • Robot Overlord
  • ****
  • Posts: 163
  • Helpful? 3
Re: $50 Robot switching to two batteries
« Reply #1 on: February 18, 2010, 02:16:27 PM »
I think (may be wrong) the reason he used 2 batteries is to separate the power source for the microcontroller from the power source for the servos. This way, when servos draw big current on startup/change direction and the voltage drops, it won't upset the microcontroller.

I am planning to use a single 6V, too, but after thinking about it some more, it may not be a good idea.

As for 4.8V and 9V, the reason for using 9V for the digital stuff is that the microcontroller draws very little power, so you can pretty much just connect a 9V battery and forget about it for a few months. Also, the microcontroller input voltage needs to be regulated to 5V (I am assuming you are regulating your 6V down to 5V using a SMPS or LDO?), and with a 9V input you can just use a good old LM7805.

Using two 6Vs will be fine (assuming you regulate it to 5V for the microcontroller), but you will have to charge both often (since NiMH has pretty bad self-discharge).

Offline richiereynoldsTopic starter

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
Re: $50 Robot switching to two batteries
« Reply #2 on: February 25, 2010, 04:14:58 AM »
Ok, got all the info now so I'll answer my own questions in case anyone finds it useful -

First question - any reason I can't just use two 6V battery packs? (rather than the 4.8V and 9V mentioned in the tutorial).

Not really, in this circuit, it'll be fine.

Second question - I thought the big cap was to smooth the low frequency noise on the servo bus. This is also borne out by the "two power source" wiring diagram here: http://www.societyofrobots.com/robotforum/index.php?action=dlattach;topic=3292.0;attach=1304
However, on the $50 tutorial itself it states "DO NOT connect the battery + end of the capacitor to the battery + end of 4.8V battery!!!!" Which is exactly the opposite of what is shown on the digram. Which is correct?

The tutorial is wrong, the diagram is correct. However, see the answer to question 3.

Third question - do i need a cap on the microcontroller/sensor bus? other than the ceramic cap that's already between AVCC and Gnd on the microcontroller (and a cap that I've installed on the analogue IR scanner).

I ended up putting 2 caps (same as the ones on the unregulated power circuit) on either side of the regulator too, just for fun ... and to level out any power disturbances as best I could on the microcontroller bus, especially since I had 2 IR scanners on there, even though they have their own caps too.

Fourth question - I have a switch on the regulated microcontroller/sensor power bus but none on the servo one, will the cap/servos drain any power from my batteries when they're not running?

Doesn't seem to.

The changes worked great, much smoother power, no microcontroller resetting when the batteries start to drain a bit. A jumper might be nice too to switch from 2 power sources to one, might do that.

Offline cyberfish

  • Robot Overlord
  • ****
  • Posts: 163
  • Helpful? 3
Re: $50 Robot switching to two batteries
« Reply #3 on: February 25, 2010, 12:47:22 PM »
How are you regulating 6V down to 5V?

Offline richiereynoldsTopic starter

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
Re: $50 Robot switching to two batteries
« Reply #4 on: February 25, 2010, 05:46:18 PM »
Exactly the same way the single battery circuit regulates 6V down to 5V, with an L7805CV +5V 1A VOLTAGE REGULATOR (ST) RC, except the circuit now has its own battery so it should work better.

Dropout voltage - "the minimum difference between input voltage and output voltage for which the regulator can still supply the specified current."

Dropout voltage on specified as 2V but
1. I'm unlikely to need 1A of current, and if I do in a spike I've got caps each side of the regulator to help out.
2. 6V battery well charged will give me about 7.5V
3. The original $50 robot (single battery) circuit does this with a 6V battery for powering everything, including the servos so what I've got is an improvement on that whatever way you look at it.
4. It works!

I could add another cell into that pack and use 7.2V but I'll probably just be wasting loads in heat, though it might last a little longer charge wise.

Offline cyberfish

  • Robot Overlord
  • ****
  • Posts: 163
  • Helpful? 3
Re: $50 Robot switching to two batteries
« Reply #5 on: February 25, 2010, 06:32:24 PM »
From my observations, even if you have no load, the 7805 will drop ~1.5-2V. Did you check the output on a multimeter?

I actually started a thread about this a few days ago -
http://www.societyofrobots.com/robotforum/index.php?topic=10328.0

7805 did not work for me. I ended up using a low-drop out regulator.

Offline richiereynoldsTopic starter

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
Re: $50 Robot switching to two batteries
« Reply #6 on: February 26, 2010, 10:27:20 AM »
Strange that it didn't work for you, given that it works fine on the original $50 robot design where everything is run off a single 6V battery.
Plus it's worked for me both on the original and my 2 power source version, in fact, I can switch between the single and 2 power souce versions using a jumper and both work ok.
I can only think there must be some other factor involved, I take it you're using 5xNIMH cells to get your 6V? I bought one battery pack and made the other myself, both will work in either situation.
I'll measure the voltage after the regulator and let you know what I get.

Offline touchstone

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: $50 Robot switching to two batteries
« Reply #7 on: March 01, 2010, 11:05:28 PM »
I'm having a similar problem.  I'm running off of 4AA batteries, but when I test the voltage coming out of my regulator I get 4.5V which causes restarts when the servos are also attached.  What really confuses me is that I have a Boe Bot from Parallax and when I use the same batteries in their controller the voltage coming out of the regulator is 5V.  What can be causing this difference?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 Robot switching to two batteries
« Reply #8 on: March 02, 2010, 12:07:24 AM »
The lm7805 needs approx 7v to output 5v, very inefficient!
Hence why admin suggested the 9v for the regulator and 4.8-6v for the servos.
Howdy

 


Get Your Ad Here