devnull1232
Posts: 10
Joined: Wed Aug 01, 2018 12:23 am

Battery powered Pi car is having power issues.

Wed Aug 01, 2018 3:16 am

I'm fairly new when it comes to tinkering with electronics. I'm building a raspbery pi powered car, right now I'm just trying to get running, I intend to add a camera and make it a first person view car. The problem is right now when the motors engage, the power light on the raspberry pi goes super dim, maybe off. Sometimes my pi crashes when this happens.

What I have is a 4 pack of AA NiMh batteries (5.6 volts) connected to 2 voltage regulators (one set to 5v, the other 12v). The 12v runs to a dc motor driver board, the other goes into a micro-usb cable I spliced to power the pi 3.

For the DC to DC boost converters I'm using 2 XL6009
https://www.openimpulse.com/blog/wp-con ... asheet.pdf

For the motor driver I'm using L289N, I can't find a data sheet for this exact module but here is the amazon link to it.
https://www.amazon.com/gp/product/B06XR ... UTF8&psc=1

Is there anything I can do to run this thing off of a single battery pack?

Image

W. H. Heydt
Posts: 10995
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Battery powered Pi car is having power issues.

Wed Aug 01, 2018 5:08 am

1. Which model of Pi are you using? You may need to provide up to 2.5A at 5v.

2. With the batteries in series (so that the individual cell voltages are added togehter), how much current can a single battery (cell, really) provide? The current, when wired this way does not add.

In short, one battery pack can be used, but I'm dubious that AA cells are going to be able to provide enough current for everything. At least, not for very long.

User avatar
Imperf3kt
Posts: 2871
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery powered Pi car is having power issues.

Wed Aug 01, 2018 5:30 am

Check your voltages again. NiMh batteries are 1.2v. 4 times 1.2 should be 4.8v

AA (LR06) batteries won't cut it, you are asking for way too much current they they cannot provide. I expect them to be getting warm.
55:55:44:44:4C
52:4C:52:42:41

mosespi
Posts: 508
Joined: Mon May 12, 2014 3:35 pm
Location: 34,-118
Contact: Website

Re: Battery powered Pi car is having power issues.

Wed Aug 01, 2018 5:31 am

What Heydt said. Most AA NiMH cells start dropping off fast after about 2A or so. If you have a fast multi-meter, you may be able to see the momentary voltage drop on the pack when under heavy load. Some options to consider..

- Upgrade to C cells, they are capable of providing higher current.
- Switch to a 6xAA or 8xAA NiMH (or C/D cell) pack and use a buck converter for the 5v Pi and boost converter for your 12v
- Switch to 10xAA NiMH pack and use a buck converter for the 5v and the direct 12v nominal battery voltage (1.2v x 10) for your motors. Note: NiMH useful voltage goes from about 1.4v per cell to about 1.0v per cell.. so you will have a 10-14v battery pack, should work fine for most 12v motors.

Regards,
-Moses
Power problems? MoPower UPS for the Pi
http://www.allspectrum.com/mopower/

devnull1232
Posts: 10
Joined: Wed Aug 01, 2018 12:23 am

Re: Battery powered Pi car is having power issues.

Thu Aug 02, 2018 12:27 am

I'm using a Pi 3 Model B v1.2.

I'm pretty green when it comes to electrical circuits.

I'm honestly not sure *what* voltage these dc motors are meant to be ran at, I cannibalized a cheap RC car. Which ran off of 4 AA's. I really only had my voltage regulator set that high because this motor driver module can supply 5v out when it's getting more than 12v in, I was hoping to run the Pi off of that 5v out but I think it's meant for an arduino, it wasn't putting out enough juice to power the Pi.

That's why I put in a second voltage regulator, to power the Pi.

So perhaps these motors are actually lower voltage, would lowering my voltage regulator, or only using a regulator for the Pi and going straight from battery pack to the motor driver module possibly decrease my current draw?

I don't have enough room for C's, plus I'd have to acquire a NiMh C sized charger. I can possibly find a spot to put a second AA pack. Would I want the two separate packs to run parallel (This would give me higher capacity right)?

What about a larger Li-Po? I wouldn't mind picking up a sparkfun Li-Po charger and getting a higher capacity Li-Po battery. I do intend, when I get what I have working, to add a small servo and a camera mounted on the servo. The servo would require another motor driver module.

Am I aiming for too much to reasonably run off of battery power?

Thanks for the help so far, I didn't suspect I was overwhelming what my battery pack could do!

User avatar
Imperf3kt
Posts: 2871
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery powered Pi car is having power issues.

Thu Aug 02, 2018 2:01 am

I would definitely recommend a large LiPo cell, somewhere around 5 or 6 thousand mA should fit in the battery cavity. I haven't personally attempted controlling motors with a Pi, but I hear it is a good idea to use separate batteries.

If you ripped the motors out of a toy RC car powered by 4 AA batteries, then chances are the motors are 4.5v

The exact voltage isn't crucial to a motor, more voltage will mean more RPM. What does matter, is where the windings use too thin copper.


To sum it up (as I see it), your AA battery setup is unable to provide the current required by both regulators, the Pi and the motors.
55:55:44:44:4C
52:4C:52:42:41

devnull1232
Posts: 10
Joined: Wed Aug 01, 2018 12:23 am

Re: Battery powered Pi car is having power issues.

Thu Aug 02, 2018 2:26 am

My motor driver module takes care of back emf from the motors. It has diods that prevents the ripple from coming back out of it.

I will look at 5,000mAh to 6,000mAh Li-Po batteries. Maybe I'll get a Pi Zero W too, I really don't need all of my Pi 3's power for this.

Thanks for the help!

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Battery powered Pi car is having power issues.

Thu Aug 02, 2018 5:43 am

I would definitely recommend a large LiPo cell, somewhere around 5 or 6 thousand mA should fit in the battery cavity.
I use Lipo batteries for all my motor projects. What matters is that it can supply the needed amps so you must use the correct battary to get the correct amps. Lipo batteries designed to run a tablet will only be rated for very small current/amps were as a battery desinged for a RC Hobby car will be designed to supply very high amps. These batteries have what is called a "C" rating, this is how many amps can be supplied per amp/hour capacity i.e a 1C battery with 1000mah capacity can supply 1 amp current. Most RC hobby Lipo battery are rated at least 20C so a bettery with capacity of 2000mah at 20C can supply 40amps where as a Lipo battery for a tablet is usually 1C so the same capacity battery will only be able to supply 2amps.

I word of warning if you using a RC hobby battery with rating of 20C at 2000mah that can supply 40amps be careful not to short it out because at 40 amps things will glow red very fast.

User avatar
Imperf3kt
Posts: 2871
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery powered Pi car is having power issues.

Thu Aug 02, 2018 6:00 am

Yes, C rating matters, however if OP gets a 5Ah cell or higher, the C rating will not matter (a 1C 5Ah battery is capable of 5A - wiring and boost module permitting)
55:55:44:44:4C
52:4C:52:42:41

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Battery powered Pi car is having power issues.

Thu Aug 02, 2018 9:20 pm

Yes, C rating matters, however if OP gets a 5Ah cell or higher, the C rating will not matter (a 1C 5Ah battery is capable of 5A - wiring and boost module permitting)
Usually in engineering you would identify the problem then look for a solution to the underlying problem.

The OP didn't have a problem of not enough capacity but rather had a problem of not being able to supply enough current. So the best solution is to use a battery that is capable of supplying more current i.e a battery with a higher C rating.

RC hobby batteries are designed to drive motors that require high current where as batteries designed to for low power devices like tables and phones are designed for very low current output.

User avatar
Imperf3kt
Posts: 2871
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery powered Pi car is having power issues.

Thu Aug 02, 2018 9:25 pm

OutoftheBOTS wrote:
Thu Aug 02, 2018 9:20 pm
Yes, C rating matters, however if OP gets a 5Ah cell or higher, the C rating will not matter (a 1C 5Ah battery is capable of 5A - wiring and boost module permitting)
Usually in engineering you would identify the problem then look for a solution to the underlying problem.

The OP didn't have a problem of not enough capacity but rather had a problem of not being able to supply enough current. So the best solution is to use a battery that is capable of supplying more current i.e a battery with a higher C rating.

RC hobby batteries are designed to drive motors that require high current where as batteries designed to for low power devices like tables and phones are designed for very low current output.
Op is driving motors originally driven off four AA batteries. In addition, they also want to power a Pi. There is no need for a 100Amp capable hobby-grade RC LiPo pack.
4.5A should be sufficient, based on the info provided.
55:55:44:44:4C
52:4C:52:42:41

mosespi
Posts: 508
Joined: Mon May 12, 2014 3:35 pm
Location: 34,-118
Contact: Website

Re: Battery powered Pi car is having power issues.

Thu Aug 02, 2018 9:42 pm

He seems to be running a 5/6v motor with 12v as well. The draw will be much greater and likely bad for the motors. These motors might be fine running direct off his 4AA pack (which is what the toy that it came from used?) and that might be the root of his problem all this time.

Devnull1232, swap the motor power supply to your 4AA pack without the 12v boost converter, see how that works then go from there. You are working with some unknown variables (like your motor current draw) so you just have to try a few things to see if they work.

Regards,
-Moses
Power problems? MoPower UPS for the Pi
http://www.allspectrum.com/mopower/

devnull1232
Posts: 10
Joined: Wed Aug 01, 2018 12:23 am

Re: Battery powered Pi car is having power issues.

Fri Aug 03, 2018 12:59 am

Well I dropped the voltage down to 5.3v on the booster to the motors (these boosters are variable, there's a little screw I can use to adjust the voltage), I was getting much the same issue, although it took a bit longer to crash I could tell the motors were really struggling to engage. I took the battery pack out and they were fairly warm.

Then to experiment I slapped 4 alkalines in there just running the Pi 3 (boosters were both hooked up and so was the motor board, just never engaged the motors), running

Code: Select all

watch -n 60 uptime
. It got to 1:33 before I just needed to get to sleep, so I shut it down and it crashed during the shutdown. I'm guessing the i/o or cpu activity pushed it over the edge.

For reference I've had this running in the past with 4 AA's straight to the motor drive board, and a 2,400mAh cell phone pack running the Pi, and it worked splendidly, but it was awkward. I'd rather glue a Li-Po into the battery cavity if it will work.


A second question, I've been browsing LiPo packs, what's a recommended way to charge them?

User avatar
Imperf3kt
Posts: 2871
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery powered Pi car is having power issues.

Fri Aug 03, 2018 5:51 am

devnull1232 wrote:
Fri Aug 03, 2018 12:59 am
A second question, I've been browsing LiPo packs, what's a recommended way to charge them?
The ONLY way I would recomment to charge a LiPo pack, would be with a proper charger designed for such use (i.e. remove it from your Pi, plug it into the charger)
If its just a single Cell, you can buy several different makes of LiPo charging circuits ranging from next to nothing, to more than your Pi cost. Be sure whatever you get, has overcharge protection and the other usual protections.
I was going to say more, but I got distracted and now cannot remember it :/
55:55:44:44:4C
52:4C:52:42:41

Return to “Automation, sensing and robotics”