Pages: [1] 2   Go Down
Author Topic: 1 battery for powering arduino, motors, and raspberry pi  (Read 3587 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear all,

I am working on my own robot.
It has:
   2 DC motors which are connected to 5 AA bateries.
   a raspberry pi which is connected to a 5v miniusb phonecharcher
   an Arduino, which is connected to/powered by a USB port of the raspberry pi
   a servo which is connected to the same 5 AA bateries as the 2 DC motors.
   a microsonic distance sensor which gets its power from the aruino.

The idea is to have the whole setup running on 1 power source consisting of one or more rechargeable batteries.
 
Now I am a bit of a noob when it comes to electronics.
Can anyone suggest what battery I should use, and maybe give some tips on how to set it up?

At the moment de motors slow down if i use the servo.(because they are on the same 5 aa batteries.) How can I prevent that with the new powersource which will also power the raspberry pi and the arduino?

Even though English is not my 1st language,I hope I made my question clear.

Regards,
Jombo

Logged

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you send us links to the motor and servo data sheets so that we can see the voltage and current needs of them?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i TeslaIaint,
Thanks for answering.

The motor specs can be found here http://iprototype.nl/products/robotics/servo-motors/dc-geared-motor/ (under the head Motor Specificaties:)

                 3V              6V
No-load speed      100 RPM           200 RPM
No-load current            60 mA       71 mA
Stall current       260 mA       470 mA



The servo: http://iprototype.nl/products/robotics/servo-motors/servo
Voltage    4.8V ~ 6V


Let me know if you have more questions.

Regards,
Jombo
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear all,

I am working on my own robot.
It has:
   2 DC motors which are connected to 5 AA bateries.
   a raspberry pi which is connected to a 5v miniusb phonecharcher
   an Arduino, which is connected to/powered by a USB port of the raspberry pi
   a servo which is connected to the same 5 AA bateries as the 2 DC motors.
   a microsonic distance sensor which gets its power from the aruino.

The idea is to have the whole setup running on 1 power source consisting of one or more rechargeable batteries.

At the moment de motors slow down if i use the servo.(because they are on the same 5 aa batteries.)

How can I prevent that with the new powersource which will also power the raspberry pi and the arduino?

You could replace your phone charger with something like this: http://www.ebay.com/sch/i.html?_nkw=5v+usb+boost

Connect it across three of the AA batteries (five is too much input). It should adapt to the power drops.

Be sure to add decoupling capacitors on the output from that board - at least a .1uF ceramic and a bigger electrolytic (for speed+capacity).
Logged

No, I don't answer questions sent in private messages...

Portland, OR
Offline Offline
Sr. Member
****
Karma: 5
Posts: 260
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A Li-ion / LiPo battery would do well, such as this: https://www.sparkfun.com/products/341
Alternatively, a standard alkaline AA or AAA battery, such as this: https://www.sparkfun.com/products/9274

For either of the above, you might of course need to put two or more cells in series so as to get the voltage desired.
« Last Edit: October 19, 2012, 08:20:46 am by giantsfan3 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks all.

 
I'd like one powersupply for the arduino, the raspberry pi and the servo and the motors.
The raspberry pi sends commands like to the arduino. The aruino will interperet these commands and turn the motors or turn the servo.

The raspberry pi needs exactly 5 volts. If i connect a powersupply of 5 volts, it should work.
But what if i then run the motors and the servo from the same powersupply?
Won't that give less power to the raspberry pi and making it crash?  It is not an option to add more batteries and volts, because the Raspberry pi can only handle 5 volts.


As I said, i am a total noob in this area. But I can not find any usefull info on the web.(i just don't know what to google for.)

Regards,
Jombo
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The raspberry pi needs exactly 5 volts. If i connect a powersupply of 5 volts, it should work.
But what if i then run the motors and the servo from the same powersupply?
Won't that give less power to the raspberry pi and making it crash?  It is not an option to add more batteries and volts, because the Raspberry pi can only handle 5 volts.


Did you bother reading my previous reply?

Logged

No, I don't answer questions sent in private messages...

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi fungus,

I did read your previous post. From what I understand I can hook up 3 batteries to the servo and the motors. also have the 3 batteries connected to a USB dc converter. The dc converter will allways power 5 volts to the raspberry pi.
Also I need to put decoupling capacitors between the USB DC converter and the raspberry pi.

Do i have this correct?

Regards
Jombo.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi fungus,

I did read your previous post. From what I understand I can hook up 3 batteries to the servo and the motors. also have the 3 batteries connected to a USB dc converter. The dc converter will allways power 5 volts to the raspberry pi.
Also I need to put decoupling capacitors between the USB DC converter and the raspberry pi.

No...I mean you have five batteries but you should only connect the dc converter across three of them, ie. connect a wire in between battery three and four.

The dc converter will compensate for any voltage drop caused by the motors, it puts out 5V no matter what the input is (so long as it's within range).

Ideally though, you don't want <i>any</i> voltage drop. Rechargable batteries can put out much more current than Alkalines. If you're using Alkalines you should change.


Logged

No, I don't answer questions sent in private messages...

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

jombo,
Check out this site. http://www.amazon.com/Tenergy-Li-Ion-2200mAh-Rechargeable-Battery/dp/B002Y2LJW0
7.4 v Lithium Ion batteries store a pretty good amount of energy, and they are light. They're more expensive than most other rechargeable batteries, but worth it. you might be able to find them cheaper on ebay or something. When you see a number before "mAh", that stands for milli-Amp hours. The higher the number the better. But that also means more cost. I suspect 1000mAh would be sufficient for 30 minutes or so of running your robot, but go as high as you can afford.

 If you use a LM7805 voltage regulator it will drop the 7.4 v Li-Ion battery to 5v and all your devices that you listed can run from the same power rail on your breadboard. They will all get what they need in current and voltage as long as you keep the battery pack charged. Don't forget the common grounds. If you're not familiar with the LM7805 just do a search for it, and you'll find plenty of tutorials. The tutorials will explain why you need decoupling capacitors, etc.

Why are you using a rasberry pi and an arduino? Must be an interesting robot. Can you share? Or is it top secret? haha
« Last Edit: October 19, 2012, 06:21:28 pm by TeslaIaint » Logged

Australia
Offline Offline
Sr. Member
****
Karma: 10
Posts: 393
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree in principal with TeslaIaint with some minor mods.

A LM7805 regulator is rated at 1 amp which may leave you a bit short. Also being a linear regulator it will put out a lot of heat dropping 2.4 volts at 1 amp and run your batteries dwon sooner by shedding the excess power as heat. Try a switched mode regulator such as this for ~$3 more:

http://www.digikey.com/product-detail/en/OKI-78SR-5%2F1.5-W36-C/811-2196-5-ND/2259781

It also gives you an extra 500ma current.

The battery pack in the link is a couple of 18650 LiPo cells, connected in series and sealed into a pack. They cannot be charged individually. When LiPo cells are charged in series they get out of balance over time. On the first charge, because the cells are not exactly the same, one cell gets more charge than the other. The next charge will see the most charged cell gte more of the total charge than the less charged cell. Over time the 'sick' cell will get little charge and the dominant cell will get most of the charge. Eventually the cell pack will effectively deliver the capacity of a single cell as the lesser cell contributes less and less.

Have a look at these LiPo packs:

http://www.hobbyking.com/hobbyking/store/uh_listCategoriesAndProducts.asp?idCategory=86&LiPoConfig=2&sortlist=&CatSortOrder=desc

These have two sets of leads: the thick power out leads and the thinner, multiwire, balanced charging leads. This site also has cheap balancing chargers for LiPo's.

Do not try to charge LiPo's with anything other than a LiPo charger (i.e. not NiMh or NiCad chargers) or they may explode.
   
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes! This is the info I was looking for.
I will go shopping for a switched mode regulator and a lipo pack.
I am looking at this lipopack from a local shop.
http://www.lipogigant.nl/a-147200/turnigy-1600mah-2s-20c/
This one should be ok. Do you agree?

@TeslaIaint:
Why are you using a rasberry pi and an arduino? Must be an interesting robot. Can you share? Or is it top secret? haha
It is just a project of mine. With a raspberry pi(running Debian Linux) connected I open up a whole world of features.
I am thinking of voice control, maybe add a webcam. My desktop-computer unlocks it self by facial recognition. Maybe i can implement something like that on the robot.
I have been programming linux for years now, but the electronics and Arduino stuff is new to me. I am progressing slowly, but ill get there. :-)

I really do appreciate all your support.

Jombo





Logged

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That battery looks fine, and the customer reviews seem to agree with your needs. Hopefully the charger isn't too expensive.

I'd love to learn more about how you plan to implement the facial recognition with the rasberry pi. I'd like to learn about low resolution object detection/recognition with a camera with rasberry pi or some other microcontroller that could handle it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I have a similar situation. However I would like to use 2 batteries.

1 to power the motors/servos
1 to power pi + arduino

After reading the specs, it seems to me that my best bet would be to power the arduino using a 2 or 3 cell lipo giving me 7.4/11.1 V  which is within the allowed range for the arduino. Then wire a min usb plug to the arduino +5 and gnd pins to power the pi.

I'm not an electronics-pert so was wondering if this would work without breaking anything ?

Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 29
Posts: 2239
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a similar situation. However I would like to use 2 batteries.

1 to power the motors/servos
1 to power pi + arduino

After reading the specs, it seems to me that my best bet would be to power the arduino using a 2 or 3 cell lipo giving me 7.4/11.1 V  which is within the allowed range for the arduino. Then wire a min usb plug to the arduino +5 and gnd pins to power the pi.

The regulator on the Arduino is a linear regulator meaning that any battery voltage over 5V is wasted as heat. With a two cell LiPo you'd be wasting 30% of your power or 60% with a three cell. Also, you'd be getting pretty close to the amp limit of the regulator on most Arduinos (~700ma?) where the Pi is ~500ma IIRC.

When you buy the LiPo battery also buy a "BEC" (or "UBEC") with it and make sure it's a switching type (not linear) which will give you around 90% efficiency. Also, it would be best to split the output wires off of the BEC to each of the Arduino and the Pi rather than connecting to the Arduino then to the Pi as you described.
Logged

Pages: [1] 2   Go Up
Jump to: