[Solved] Powering a project with LiPo in accordance with standard practice

Hello everyone,

I have a project in mind but I'm not a master in microelectronics (I'm a programmer only): A robot cleaner.
At the moment I think about:

  • 2 x DC motor 6V & 0.8A (35:1 Pololu motor): Used for powering the two wheels
  • 1 x motor (An unknown recovered motor from a hand cleaner, its circuit was powered by 3.6V NiCd, I need a battery for my ammeter to know how much it draws (I will suppose it is below 0.8A)): Used for suction
  • An arduino Uno 5V ?A (I want to use switch regulators so it shouldn't be good to use the linear one of the arduino but tell me if I'm wrong): Needs to power an xbee module, sensors and maybe one servomotor

So the problem is how to well connect all these things. I like well-done work but I don't really know how to do because my education is lacking in microelectronics (and electronics). I love learning so If you've got some good lectures (still not done watching free lectures from Josh Hug - University of Berkeley) or webpage, feel free to tell it to me. :slight_smile:
I have been looking and learning some basics from two weeks at least but I'm losing my main focus (to program the robot cleaner) and I don't want to :confused: even if I'm learning usefull stuff in this process.

With that being said, I've read that a LiPo battery is better than NiMh because they provide a more stable voltage. (If I re-find the document, I'll link it) That's why I choose LiPo.
However it looks like LiPo battery needs a safe way to charge/discharge. I haven't deeply looked into that, it seems to exist devices to manage that but maybe I can do it myself safely with the arduino? :-\

So let's talk about my main problem here: Voltage division.
Considering the wheel motors can draw 0.8A and requires 6V, I think build every in parallel is fine.
LiPo battery exists in 7.4V or 11.1V. Not knowing exactly which one to choose taking in account price and capacity - I want my robot to be able to work for 1 hour (I would say at least ::slight_smile: ) - I still need to know how to correctly lower the voltage.

Switch regulators seems to be the thing I need ("well-done work" and not loosing too much energy into heat). Now it seems to exist built packages (around 20$, for example) but if I need three of these (3.6V motor, 2 x 6V motor plus 5V arduino)... it is kind of costly.
Why not making it? It seems it is explained how to do this here. But I'm progressing very slowly those last days in understanding how to "just" divide the voltage properly, that's why I come here asking for some help finally.

Eventually, am I going the wrong way? Are you seing something obviously not "well-done work" here?
If you need extra-info or maybe pictures, I'm there.

Thank you so much for your time!

Rayope

PS: Remember I'm very new to electronics but I want to learn the proper way to build an electrical device and stop that misunderstanding from myself.

LiPo chargers are cheap and plentiful and mass production for the toy car industry makes them cheap. I doubt very much that you could buy the parts you need cheaper than buying the whole thing.

Ok thanks Michinyon! I'm going to get a LiPo charger, I've seen one for 15$.

That's fine for the charge but for the discharge, I should need some embedded circuit to check whether the battery cells are not going too low or it's fine to end cleaning my room :o

I have seen that discarging these too much kills them so I'm not very exited about buying LiPos every week :stuck_out_tongue: Have you got any advice for this? Maybe I can read these cells value with the Arduino but I'm not sure if this is what I want because it will take 2 (2 cells in 7.4V) or 3 (3 cells in 11.1V) analog input in my Arduino and it is very possible that I will need them for sexier stuff like reading an IR sensor :stuck_out_tongue:

You can buy LiPo cells and packs with built-in battery protection ("battery protection circuit" or "BPC"). That will prevent overcharge/undervoltage and also limit current drain in the event of a short or such. You can also buy the BPC boards separately -- they're quite inexpensive.

It seems LiPo packs with buit-in battery protection are not that common but it's fine for a separated board. I've been struggling finding a nice Low Voltage Cut-off board (with some low voltage cut-off configurations -- Being able to choose between 3.2V or 3.5V for example) but I've finally find a buzzer one. It should be fine for some time -- I will be around my robot during the development period. Moreover I should be able to tweak it with a relay to upgrade it into a cut-off version like this later on.

Thanks to you guys, I should be able to safely charge/disarge a LiPo battery! :slight_smile:

The big other problem I have is how to lower the voltage for each device. I should need (Tell me if I'm wrong) 3 branches in parallel:

  • 3.6V for the suction motor
  • 6V 1.6A for the wheel motors
  • 5V for the Arduino (Is it useless to prefer a switch regulator instead of the linear one of the Arduino?)

So I should use 3 swith regulator, right? But damn those I'v seen cost around 20$ and as I understand the principle... It is just a little controller that charges a capacitor and delivers the desired voltage. Is it a misconception? (I've read it needs to refine the output because micro-cuts are not good for devices)
Couldn't I make three cheaper than buying 3 * 20$?

Oh yeah There is no reason for me to take a 11.1V instead of a 7.4V right? (The only thing it will do is that I will loose more energy into heat right?)

Edit: Oh well I have just found this for under 10$. But I am skeptic about the potentiometer... Is it accurate? Can we prevent it from moving? I surely don't want it to "vibrate" and modify randomly the output voltage =-/

stepdown switching regulator boards on eBay are $1 or about that. They use two capacitors, an inductor
and a switching MOSFET to down-convert, but various protection circuits are needed hence you never
build your own from scratch, but use an appropriate IC (LM2596 modules are the common ones on eBay,
for instance http://www.ebay.co.uk/itm/like/331534527920?hlpht=true&hlpv=2&rlsatarget=&adtype=pla&ff3=1&lpid=122&ul_noapp=true&limghlpsr=true&device=c&chn=ps&crdt=0&ff12=67&ff11=ICEP3.0.0-L&ff14=122&viphx=1&ops=true&ff13=80).

The 10-turn cermet preset on these boards won't shake about.

OK, the first thing you need to understand is you don't need a regulator to power the motors. Motors can run from unregulated power. If your battery is 7.4v then you have some wires and plugs there will be voltage drops and your motor won't get all 7.4v. Depending on how much current the motor is drawing, that voltage that it sees will always change. For you looking at it from the outside, you won't be able to see any difference in motor performance if the motor has 6v or 6.5v.

But you don't want to burn up your motor with too much power. Obviously connecting a 6v motor directly to a 7.4v battery is outside its specification and it could fail. But you will have a motor controller between the two. You can program your Arduino to only use 90% power instead of full power. Your motor will be able to run at its full rated capacity with 6v on the motor terminals, even if there's some voltage drop between the battery and the motor controller.

I would also run the 3.6v motor with a 7.4v input to its motor controller, just with a lower limit on the analogWrite() values. Even if you make a mistake in your program and put full power on the motor, it will survive 10-20 seconds of over-current while you are considering your mistake and trying urgently to unplug the battery.

The Arduino will work quite well with 7.4v input to its onboard voltage regulator. This is really the perfect voltage for an Arduino.

MarkT:

Damn prices! Ok a stepdown switching regulator is not that expensive ;D
Now I almost well understand these regulators and MorganS has reminded me that there is one thing I misunderstand:

How can it be possible to power a motor with a higher voltage than needed thanks to the PWM?
Example: A 3V motor powered by a 200V source pulse width modulated to make an average voltage equal to 3V.

I think there is something I don't get there. For me it is like saying: " I'm cold, I can warm me up with a 1000 °C source for very little period of time..." I should burn with that source even if it is for 0.0001ms, shouldn't I? Or at least it will create some side effects, no? I have tried to look for an answer on the web, unsuccessfully though :frowning:
Hopefully you guys will help me answering this question :slight_smile:

MorganS:

If I properly understand the solution you suggest to me, it is like replacing the job of the MOSFET, am I right?
If it is so I should need to add capacitors and inductors to reduce noises from the PWM, shouldn't I?

And last but not least, I have read that LiPo batteries have a voltage that vary over discharge ( Unlike what was saying a pdf somewhere on the web: The fact that LiPos are good for a stable voltage... So... What? :sleeping: ). I don't have the accurate values there but let's say a charged 2S LiPo begins at 8.2V and ends at 7V. So I would need to take that in account to set the PWM maximum value to not burn the motor, maybe with a voltage reader.

Eventually considering the low cost of regulators mentioned above, it must be profitable to me to use them instead of making the job with the Arduino (and some capacitors/inductors), no? ::slight_smile:

For the 7.4V input to the Arduino, it is all about efficiency (Arduino linear voltage regulator versus a switching regulator) and heat, right?

An umpteenth question, just to be sure: A battery capacity of 3000 Ah will basically provide me 2400 Ah (I have read that there is around 20% to not use for battery safetyness). Hence my robot will be able to run for one hour considering:

  • 2 x motors at 0.8A = 1.6A
  • 1 x motor at 0.4A
  • 1 x Arduino at 0.4A (Ramdom value... I think it depends on the added electronics It will power)

The sum is equal to 2.4A --> 2400Ah --> One hour. Not wrong there?

Again, thanks for your time and answers! It is greatly appreciated! :wink:

Nb: Unfortunately, I add a lot of question tags... Hope it doesn't bother you too much :confused: It just underlines my uncertainty. I don't like leaving doubts :frowning: Although I spend time looking on the web before asking here, it is not enough :frowning:

Rayope:
MarkT:

Damn prices! Ok a stepdown switching regulator is not that expensive ;D
Now I almost well understand these regulators and MorganS has reminded me that there is one thing I misunderstand:

How can it be possible to power a motor with a higher voltage than needed thanks to the PWM?
Example: A 3V motor powered by a 200V source pulse width modulated to make an average voltage equal to 3V.

I think there is something I don't get there. For me it is like saying: " I'm cold, I can warm me up with a 1000 °C source for very little period of time..." I should burn with that source even if it is for 0.0001ms, shouldn't I? Or at least it will create some side effects, no? I have tried to look for an answer on the web, unsuccessfully though :frowning:
Hopefully you guys will help me answering this question :slight_smile:

MorganS:

If I properly understand the solution you suggest to me, it is like replacing the job of the MOSFET, am I right?
If it is so I should need to add capacitors and inductors to reduce noises from the PWM, shouldn't I?

And last but not least, I have read that LiPo batteries have a voltage that vary over discharge ( Unlike what was saying a pdf somewhere on the web: The fact that LiPos are good for a stable voltage... So... What? :sleeping: ). I don't have the accurate values there but let's say a charged 2S LiPo begins at 8.2V and ends at 7V. So I would need to take that in account to set the PWM maximum value to not burn the motor, maybe with a voltage reader.

Eventually considering the low cost of regulators mentioned above, it must be profitable to me to use them instead of making the job with the Arduino (and some capacitors/inductors), no? ::slight_smile:

For the 7.4V input to the Arduino, it is all about efficiency (Arduino linear voltage regulator versus a switching regulator) and heat, right?

An umpteenth question, just to be sure: A battery capacity of 3000 Ah will basically provide me 2400 Ah (I have read that there is around 20% to not use for battery safetyness). Hence my robot will be able to run for one hour considering:

  • 2 x motors at 0.8A = 1.6A
  • 1 x motor at 0.4A
  • 1 x Arduino at 0.4A (Ramdom value... I think it depends on the added electronics It will power)

The sum is equal to 2.4A --> 2400Ah --> One hour. Not wrong there?

Again, thanks for your time and answers! It is greatly appreciated! :wink:

Nb: Unfortunately, I add a lot of question tags... Hope it doesn't bother you too much :confused: It just underlines my uncertainty. I don't like leaving doubts :frowning: Although I spend time looking on the web before asking here, it is not enough :frowning:

In my experience, a 2S LiPo will start out at 8.4V and be dead at ~6.5V. You can read the voltage with a voltage divider.
BTW, it's 2400mAH. :slight_smile:
Your robot will probably be able to do 1 1/4 hours, because you are probably not going to be using all the motors all the time.

No, you don't power a 3V motor from a 200V source. 200V tends to arc over gaps that would otherwise be perfectly safe at 3v. Like the gap between the motor winding and the motor shell you are holding in your hand.

It's kind of like pedalling a bicycle. Your feet don't push on the pedals all the time - only when one pedal comes around to the front side of its arc. The push you give it is much more than the bike "needs" but you only give it that push for part of the time, so it all evens out. The electric motor has "inductance" which means that it has electrical inertia like your bicycle has mechanical inertia.

Using your "I'm cold" example, have you ever played with an electric stove top? It can heat up a frypan to 200 degrees C pretty easily. But if you switch it on for half a second, off for 20 seconds and you keep repeating this, how hot does it get? You could probably hold your hand directly on the hotplate and you won't get burned.

No, the PWM output from the Arduino should drive a MOSFET to be able to send enough current to the motor. The Arduino output doesn't have enough current capability to drive a motor by itself. Usually you would use a motor shield to do this.

LiPo batteries are actually pretty good with the voltage drop problem. For most projects, the end user cannot tell the difference in motor speed between fully-charged and almost-discharged batteries. If it is really important you can measure the battery voltage with a voltage divider going to a spare analog input and then modify your driver variables based on that reading.

Your power calculations are conservative. Not only do you not run the motors at 100% power 100% of the time, the PWM means that the 0.8A/6V motor will use 0.7A from a 7V supply, for the identical output power.

Isaac96:

From 8.4V to 6.5V: Ok, I think I will make a discharge test in order to register the voltage periodically. Then I will store these values in an array and modify the max PWM to drive the motors during execution instead of taking extra-pins (from the voltage divider) to read them when running.

Yeah 2400 mAh :art: and I understand that my motors won't draw 0.8A all the time. I take these values to be in the worst case. :slight_smile:

MorganS:

Ok thanks for your explanation. I'm getting it! :slight_smile: So the only issue with higher voltages are gaps.
I haven't played with an electric stove top like that but I get the point. :grinning:

I have already driven a motor with a H bridge... the MOSFET is included, right?

For the voltage divider reading, I will use pre-observed values over time. There are not that much pins on the Arduino. ::slight_smile:

the PWM means that the 0.8A/6V motor will use 0.7A from a 7V supply, for the identical output power.

Same power but less amps, is it meaning less torque too?

Power = Volts X Amps
Power = Torque X Speed

Both of these equations are always true. Output power is always equal to input power, minus any losses.

Ok for power equation.

I have a last unexpected question about these conversions... I have just mesured the current drawn by the 3.6V motor... 5.3Amps.

Is it kind of common for a suction motor? :o

And let me know if I'm fine with this:
The motor needs 6.3 * 5.3 = 33.4 W
So with a PWM and the 7.4V source, it will draw: 33.4 / 7.4 = 4.5 A

Eventually, my ending-post questions or affirmative doubts: :confused:

  • a PWM don't reduce voltage but current
  • In the 6V motor documentation, they say "9V or higher voltage couldt start negatively affecting the life of the motor": Are they including PWM trick? (Like a 12V source with a 50% PWM)
  • Is the precedent defined limit (9V or higher) the one where arc over gaps could occur in the motor?
  • Is the output of a PWM over an input of 7.4V like that: [linked file: pwm_output.jpg] ?
  • Is the output of a stepdown switching regulator with an input of 7.4V like that: [linked file: regulator_output.jpg] ?

Thank you very much for your help guys! You are making my project realityl! ;D

pwm_output.jpg

regulator_output.jpg

Rayope:
Ok for power equation.

Is it kind of common for a suction motor? :o

My vacuum cleaner draws 1400 watts.

Be careful with lipos, they are capable of very high discharge currents.
Even a small one can give 50 A when shorted.

Its just one of those applications that demands high power.

  1. Yes, you could look at it like that. It's actually more complex but that is a good place to start.
  2. If you can afford to burn up a motor testing then you can test the 50% scheme yourself. If you cannot, then keep within the limits.
  3. Because of the word choice in your quote "life of the motor" I think they are talking about constant 9v DC with no PWM. Arc gaps is not the problem. Overheating is mor likely to be the issue.
  4. Yes.
  5. Yes.

I wasn't able to answer lately, but here I am now! :slight_smile:

Boardburner2:

Ok, your answer relieves me. I thought it was a bad mesure by me, it should be fine so. :slight_smile: Perhaps a fuse will be added to be safe against shorts circuit.

MorganS:

Right, I will stay within the limits :smiley:
Thanks for the rest!

Unfortunately an unexpected question has risen, my recovered motor caracteristics are 3V and 5.3A in charge (Values taken with a multimeter). The problem is that I struggle to find a h-bridge at 3V and able to deliver 5.3A at least. :frowning:

  • Is it findable?
  • Or considering I haven't the details of this motor within reach (Already tried to google numbers appearing on its side), is it possible to power it with 5V and know by sensing its temperature if it is doable or not?

http://www.robotshop.com/en/10a-dc-motor-driver-arduino-shield.html

Yeah this controller max amp is enough but it is specified:

Support motor voltage ranges from 7V to 15V

And my motor runs at 3V, can I set up the controller such as my motor will receive 3V only? Like MorganS said, with an order of around 40% -- Considering 7V the 100%.

It should work but I'm not very sure :(. From my understanding, the controller can stop the motor lowering the voltage so it is equal to 0% of the input signal (let's say 7V), there the motor will "see" 0V. So with 40%, it should "see" 3V, right?

But my motor needing 5A continuous... With the 40%, shouldn't the controller be running with higher current? -- I've taken the equation Power = Volts X Amps, where volts are reduced (40%) so amps are increased, right or wrong?

I hope this is right so I can stop bothering you... :confused:

If you are using the 3v motor for suction then you do not need an h bridge driver.

H bridges are useful for reversible motors, in your case simple on off is what i think you need and that is do able with one mosfet switch.

Have you tried the hand held device on the surface you want to clean ?

Roomba cleaners use a rotating brush ,its more efficient.

As said my vacuum uses 1400 watts to achieve the same result.

Yeah you are definitely right, I was searching for the h-bridge because it was cheap (low current version) and it was just to play with some kind of economic mode, blower mode (maybe spiting out trash) or whatever but it will eventually just take a mosfet switch ::slight_smile:

Yeah I have tried the hand cleaner, it sucks up through a rectangular hole of 4.5cm by 1.5cm. It does not remove sticky dust but it will be fine for the moment to play with. Maybe some static brushes will help lift up some dust particles but I'll see that later.

Well, let's go with a N-MOSFET, this one should be fine: N-MOSFET

Time to buy all that stuff now :smiley: Thank you all! :grin: Hope this will someday clean something ;D