Page 1 of 1

Battery consumption

Posted: 06 Mar 2014, 17:55
by mehaj
Hello,
I'm new to robotics development. I have the LEGO MINDSTORMS NXT 2.0 and I would like to know if there is a proportional relationship between velocity and battery cosumption of the robot and relationship between bluetooth communication and battery consumption.
Could you please advise me how can I do this, which NXT Programming Software should i use to make test.
Thanks

Re: Battery consumption

Posted: 08 Mar 2014, 14:20
by tabbycatrobots
Hi,
Not knowing what languages you're familiar, but if you are familiar with 'C', I'd recommend NXC and the
books LEGO Mindstorms NXT Power Programming by John Hansen and Creating Cool Mindstorms NXT Robots
by Daniele Benedettelli. These two books explain the language well and have good examples. Below is my
code for measuring and displaying battery voltage. Battery voltage will give you some indication of power
consumption. I watch the voltage to know when to recharge the battery. And just some seat of the pants
impressions - motor load has more of an effect on power consumption than velocity. And blue tooth does
use noticeable power. I haven't measured this in controlled experiments, just based on how often I need to
recharge different robots.

unsigned short Bat_Lev;
TextOut(0, LCD_LINE1, "Volts = ", DRAW_OPT_CLEAR_WHOLE_SCREEN);
Bat_Lev = BatteryLevel();
NumOut((6 * StrLen("Volts = ")), LCD_LINE1, Bat_Lev);