PDA

View Full Version : [Question(s)] ArbotiX- Lipo power supply...



altwolf
01-05-2010, 11:27 PM
Hello.

I received an ArbotiX microcontroller from Trossen for X-mas.

I purchased an 11.1v Lipoly battery and a snazzy charger as was recommended somewhere, however Lipoly makes me nervous and I would like to get a low-voltage protection unit for it (the battery). Unfortunately, all I find are units that are intended for R/C airplanes that need to be connected to throttles and ESC's and whatnot (I don't even know what ESC is..).

Does anyone know of some sort of small, more generic, module that cuts the power to protect the Lipo battery from under voltage conditions?

How do other's with ArbotiX controllers do it?

lnxfergy
01-05-2010, 11:59 PM
I've not yet found a hard-cutoff that I like. I know that I, and several others are currently using software-based cutoffs:



/*
* Example of how to soft-monitor your lipos
*/

#include <ax12.h>
#include <BioloidController.h>
#include "nuke.h"

#define SERVO_COUNT 12

float volts;
int temps[SERVO_COUNT];
int servo; // which servo to measure

void setup(){
// setup IK
setupIK();
gaitSelect(RIPPLE);
// setup serial
Serial.begin(38400);

// wait, then check the voltage (LiPO safety)
delay (1000);
float volts = (ax12GetRegister (1, AX_PRESENT_VOLTAGE, 1)) / 10.0;
Serial.print ("System Voltage: ");
Serial.print (volts);
Serial.println (" volts.");
if(volts < 10.0)
while(1);

// stand up slowly
bioloid.poseSize = SERVO_COUNT;
bioloid.readPose();
doIK();
bioloid.interpolateSetup(1000);
while(bioloid.interpolating > 0){
bioloid.interpolateStep();
delay(3);
}
}

void loop(){
// Whatever code here to control the bot

// update IK if needed
if(bioloid.interpolating == 0){
// setup our next move
doIK();
bioloid.interpolateSetup(tranTime);
// get voltage, we use a small amount of filtering here
volts = (0.8*volts)+(0.2*((ax12GetRegister(1+servo,AX_PRES ENT_VOLTAGE,1)/10.0)));
// and temperatures
temps[servo] = ax12GetRegister(1+servo,AX_PRESENT_TEMPERATURE,1);
servo++;
// finished looping? if so, output our data
if(servo == 12){
Serial.print("Volts:");
Serial.println(volts);
for(servo=0;servo<12;servo++){
Serial.print("S");
Serial.print(servo+1);
Serial.print(":");
Serial.println(temps[servo]);
}
servo = 0;
if(volts < 9.6){
// battery depleted, turn off servo torque.
int i;
for(i =1; i<=SERVO_COUNT;i++)
Relax(i);
while(1);
}
}
}

// update joints
bioloid.interpolateStep();
}
It's not entirely ideal, I typically run a high threshold at startup (like 10V), and then stop at something like 9.6V during run time. I haven't had a problem with the batteries, but YMMV, as always, pay attention when using LiPOs, it's not fun to burn your house down. EDIT: You can download a text version of this sketch from our robocontroller google group (http://robocontroller.googlegroups.com/web/VoltTempMonitoring.pde?gsc=JT16YBYAAABKX0rokxtGhqz kpiGr8T7yGoGK_5p_OafYrMU8tWhKsg).

Occasionally, Issy will slump over prematurely, when his load rises too much, so further filtering may help. This example uses NUKE, and also shows how to collect servo temperatures as well.

I'd be interested to know of any hardware cut-offs that people like for such a job.

-Fergs

altwolf
01-06-2010, 12:58 AM
Thanks for the sketch and info, Fergs. That will help a lot.
It just occurred to me - Doesn't the Bioloid Premium Kit come with a Lipoly battery pack? I wonder if that has some sort of built-in hardware protection? If it does, that might make it the ideal pack for the Arbotix too. It might be useful just to look at how they do it, at any rate.

mallster
01-06-2010, 02:11 AM
I was looking for the same bit of hardware and found (see link) a promising tutorial on Society of Robots but do not feel confident enough to put it all together (safely). It does sound promising as it is a total cut-off.

http://www.societyofrobots.com/member_tutorials/node/302

I ended up purchasing the following item. Maximum discharge of only 5A.
http://www.batteryjunction.com/pcbfor7li181.html

I would still feel a lot better if there was solution that has been tested and give confidence in being a good fit for robotics.

Zenta
01-06-2010, 04:38 AM
A cheap (4$) and small solution is to use a 3S battery monitor (http://www.unitedhobbies.com/UNITEDHOBBIES/store/uh_viewItem.asp?idProduct=7223&Product_Name=Hobby_King_Battery_Monitor_3S). It start beeping when the voltage drops below 9v. Not perfect or 100&#37; safe but you'll get a warning though.

Maybe replacing the buzzer (or in addition to the buzzer) with a little electronic circuit and a relay for complete cut-off? Just a thought..



-Zenta

Adam
01-07-2010, 08:23 AM
A cheap (4$) and small solution is to use a 3S battery monitor (http://www.unitedhobbies.com/UNITEDHOBBIES/store/uh_viewItem.asp?idProduct=7223&Product_Name=Hobby_King_Battery_Monitor_3S). It start beeping when the voltage drops below 9v. Not perfect or 100% safe but you'll get a warning though.


9v would be too low IMHO. Many lipo chargers won't even charge a battery that is under 3v per cell, including the Triton2.

One of the reviewers of the monitor wrote this:


Good product! Slowly flashed blue LED when voltage is <11V, sound signaled and flashed blue LED + red LED when voltage <10V and sound alarm + red LED flashed when voltage <9.5V

I would hope that is correct, as 9.5v is a much better time to get an alarm. For $4, it's worth picking up couple and test.

JonHylands
01-07-2010, 09:43 AM
If I made it a little bigger, I could incorporate a full warning/cutoff into my upcoming Bioloid power board... It uses a pair of MOSFETs to connect/disconnect the batteries, and it wouldn't be hard to add a really small microcontroller that sensed battery voltage (using a resistor divider) and cut them off at an adjustable voltage level.

- Jon

Adam
01-07-2010, 11:34 AM
If I made it a little bigger, I could incorporate a full warning/cutoff into my upcoming Bioloid power board... It uses a pair of MOSFETs to connect/disconnect the batteries, and it wouldn't be hard to add a really small microcontroller that sensed battery voltage (using a resistor divider) and cut them off at an adjustable voltage level.

- Jon

Do it. I'll buy it ... I already have all your other products. :D

ScuD
01-08-2010, 04:37 AM
Might be just one of my phobia's, but i'm not too keen on software handling power cut-off for lipo's.
Unless there's some sort of auto shut-off in case of problems (i.e. power is only turned on by the controller, it's off by default if the microcontroller pin is low, in combination with a WDT).

Besides that, it seems easy enough (and cheaper!) to just do cut-off in hardware. If you need a simple hard on/off, a small comparator with a voltage reference and a FET should do. You could still adjust reference voltage, albeit not in software..

JonHylands
01-08-2010, 07:05 AM
Might be just one of my phobia's, but i'm not too keen on software handling power cut-off for lipo's.
Unless there's some sort of auto shut-off in case of problems (i.e. power is only turned on by the controller, it's off by default if the microcontroller pin is low, in combination with a WDT).

Besides that, it seems easy enough (and cheaper!) to just do cut-off in hardware. If you need a simple hard on/off, a small comparator with a voltage reference and a FET should do. You could still adjust reference voltage, albeit not in software..

It might be simpler for someone who has a good deep practical understanding of electronics, but I'm not that person. I personally feel much more comfortable with a software solution, because software is something I understand at the deepest level.

I haven't been able to get the LTC4412 work the way it is supposed to - when you pull wall power, there's enough of a power blip to reset my gumstix. At this point, I'm seriously considering replacing it with a small micro-controller, and since I want one onboard anyways to handle the Lipo cutoff, I'm just going to use one.

- Jon

lnxfergy
01-08-2010, 09:18 AM
Might be just one of my phobia's, but i'm not too keen on software handling power cut-off for lipo's.
Unless there's some sort of auto shut-off in case of problems (i.e. power is only turned on by the controller, it's off by default if the microcontroller pin is low, in combination with a WDT).

Besides that, it seems easy enough (and cheaper!) to just do cut-off in hardware. If you need a simple hard on/off, a small comparator with a voltage reference and a FET should do. You could still adjust reference voltage, albeit not in software..

Scud,

I agree, the software solution isn't optimal -- and really needs to be replaced. However, it works for the moment because walking bots like this are very experimental (they get hung up on things so frequently, that you aren't just gonna let it free roam), and the shut-down code is in the same loop that runs the walking engine. If the main loop craps out, so does the walking, and the bot will just stand there -- which should prompt the owner to ask "What the...?"

-Fergs

ScuD
01-10-2010, 06:14 AM
I didn't mean to offend either you or Inxfergy, Jon, I just wanted to state my concern. Apologies if it came across that way, to both of you!
It's just that I've witnessed a lot of lipo and li-ion failiures in my previous job, although they were on purpose (safety and endurance tests) they showed me to really be wary of these potential bombs :-)

Jon, if you want a sofware solution, maybe you could use a FET that's turned on by the controller to allow power into the system. A simple pushbutton could be put 'in parallel' with the FET, only supplying power to the micro that controls the lipo protection. First thing it does on power-up is check battery voltage, and if high enough, turns a pin high, which rolls on the FET, thus supplying power to the rest of the system.

A simple WDT routine should provide plenty of security for anything that goes wrong, you never know if user error puts a big enough glitch in the power line to make the controller act erratically for a while.


That being said, I do agree that people will usually turn off power when they notice something's off, like I said it's probably just a phobia of mine :p

JonHylands
01-10-2010, 09:36 AM
The microcontroller will have full control of switching on and off the batteries, and of course it will have different color LEDs to show status. Certainly if you try and power it up with the battery voltage too low (and no wall power), it will not enable power to the rest of the system.

Once I get the logistics worked out, I'll do another post here describing how it will all work.

- Jon

altwolf
01-14-2010, 03:03 PM
Ok, on the topic of Arbotix board and power, I have a new question:

I have a small Propeller/LCD module that I would like to incorporate into my bot, along with the Arbotix controller. I am using a 11.1v Lipo battery for the Arbotix at the moment.

I would like to power the Propeller board with the same power supply, if possible, to save space. The Prop board needs 5 volts.

Does the Arbotix board provide a 5v line that I can use to power the Prop? I don't really see one. If not, then does anyone have any advice on providing a SMALL power source for the Prop?

Power supplies are the hardest part of these projects for me. I live in fear that I will fry everything. :(

JonHylands
01-14-2010, 03:13 PM
It really depends on how much power the Propeller/LCD draws. I typically just throw on a Dimension Engineering switching regulator if its anything under half an amp.

You probably don't want to run anything major off the Arbotix regulator - its already pretty hot just powering what it does.

- Jon

jes1510
01-14-2010, 10:17 PM
I have a couple of these little boards and they work quite well. 5v at 1A switcher for around $7 assembled.

http://www.futurlec.com/Mini_Power.shtml

ScuD
01-15-2010, 01:52 AM
7805 with a couple decoupling caps would do the trick. Downside is it's just burning excess power, upside is that it doesn't introduce any switching transients on the power lines.
Doesn't get much smaller than that, if you take the SMT part.

altwolf
01-15-2010, 12:12 PM
You guys are great. Thanks for the info. I think I am going to try out the Futurlec product. It just seems simple and plug-n-play like. If it doesn't work out on this bot, it will be useful for other projects.

Thanks JonH for the lead on Dimension Engineering. Their "Beginners Guide to Switching Regulators" was very informative. BTW, my Honey also got me a set of your Bioloid foot sensors for X-mas. They are going into this bot as well. Its going to be awesome! :P