I'm thinking about buying LEGO Mindstorms and start programming robots. I'm a software engineer and LEGO fan since I was a child so this sounds like the perfect combination of my dearest hobbies.

But some questions come into my mind that I simply can't find out on the LEGO website:

  • Is is possible to programmatically check the battery charge status?
  • How is the NXT 2.0 block, where the power for all those motors and sensors come from, charged
  • Is there a possibility to build some kind of charging station where my robot can drive in to get recharged?

The point of this is, I would love to have a robot that's driving around doing stuff, and when the batteries are almost empty (let's say < 10%). it would drive to the recharging station on its own — and when it's full again (> 95%), get out of the station again and continue doing other stuff.

  • 1
    For the 'charging station', I'll say it is impractical, unless you plan to leave your NXT on all the time. (Which I don't recommend doing, in case the battery fails or something.) It is a better idea to buy a backup battery. Commented Oct 27, 2011 at 2:43

5 Answers 5


As a software engineer, you would probably be more at home in NXC, a C-like language compatible with the standard firmware. You can then use BatteryLevel().

If you want to use the standard programming environment, use this custom block.

  • @Dori I had the exact same edit, but I hadn't clicked 'Save Edits'. :) Commented Oct 27, 2011 at 2:40
  1. Yes, it is possible to check the battery level. I am a software engineer, too and i have already done that in different environments (leJOS, NXC).

  2. It is not charged. It uses standard AA batteries. There is a really handy rechargable battery pack, though.

  3. A recharging-station could probably be built with this, but it might be quite tricky to do. As far as I know, there are no "wireless" charging possibilities like those some mobile phones are using (using magnetic fields to transfer energy or something). You would need to drive the robot towards the plug, but i assume that that's possible.

  • The battery pack uses the LEGO train transformer for recharging, it has a 5.5mm plug. To me it looks feasible to plug it in automatically, but it will need some fiddling.
    – starblue
    Commented Oct 27, 2011 at 11:35
  • @starblue: Exactly. That is what i was trying to say.
    – jwueller
    Commented Oct 27, 2011 at 11:39
  • +1 thanks for your answer - sadly i can only choose one as accepted so i let the votes decide
    – oezi
    Commented Oct 27, 2011 at 14:33

For the recharing part, keep in mind noone said you must use AA batteries or the rechargeable pack. You can build your own charging adapter, which means you can also equip it with a different (more powerful?) battery of your own, and have charging contacts which are more easy to access for a recharging station. (Or use wireless charging if you know how).

This may require some electrical knowledge, but it will be easier to automate than trying to plug the charger in the rechargeable battery. That said, you can combine both, use the rechargable battery, and use a cut power supply cable to connect it to large recharger contact plates or something.

  • +1 thanks for your answer - sadly i can only choose one as accepted so i let the votes decide
    – oezi
    Commented Oct 27, 2011 at 14:33
  • No problem, since you asked more than one question and I answered only one of them, my answer shouldn't be the accepted one anyway.
    – Joubarc
    Commented Oct 27, 2011 at 17:26
  • 2
    I think a wireless hamster wheel induction recharging station is in order! Simple to make, fun to watch. Commented Nov 6, 2011 at 23:19

What you need is a Wireless Power Charger with a Voltage and current suitable for charging your Robot

here is a link to an instructable that will show you how to build a generic wireless charger. You will need to adapt it to your own needs. i.e. adjust the receiver voltage to charge the power pack


With this circuit, you should be able to build a charging station that the BOT simply needs to get near to recharge itself. (a small pad with the transmitter in the base and a homing signal The robot can track)


Lego NXT vacuum cleaner project included charging station http://www.plastibots.com/index.php/2010/11/13/pulito-featuring-dflex/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.