Autonomous robot that returns to charging station when battery runs low

 

 

This Lego autonomous rover just drives around uselessly until the battery drops under a certain level. At that point it wil go look for the charging station. It does this by driving in one direction, using a digital compass. When it hits a wall, it'll turn 90 degrees right until it hits another wall. Then it tries to turn to the first direction again and eventually the rover will pass the charging station (as it is in the back of the room). When it does, it will receive an RC5 IR signal from the charging station and it it knows it is at the charging station. It stops and parks into the charging station.

The charging station (driven by an Arduino Duemilanove) notices the presence of the rover by an distance measurement. When the rover drives into the charging station, the charging station will start a pump that drives a few pneumatic cilinders that make contact with the contact points on the rover. The power of the charger is enabled and the clock will count down for 10 hours.

When 10 hours are passed, the charging station will disconnect the charger by retracting the pneumatic cilinders. At that point the rover notices the voltage drop and comes out of hibernation and starts the autonomous program and the cycle starts over again :)

The rover can also be controlled by an old TV philips remote...

 

Drive around until battery runs low, then it will look for the charging station to get some juice

  • Actuators / output devices: lego motors, lego pneumatic valves
  • Control method: autonomous, TV remote
  • CPU: ATMega 1280 + ATMega 328
  • Power source: 12V Lead Acid
  • Programming language: Arduino
  • Sensors / input devices: infrared distance, infrared RC5
  • Target environment: indoor, the moon :P, Mars :P, Prometheus :P

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/autonomous-robot-that-returns-to-charging-station-when-battery-runs-low

Very entertaining

I loved the dramatisation of this. You have done a fantastic job with the lego. You really are an AlmightyArjen.
; D

my dream

I have always wanted to create a bot,that will return to charge it’s battery automatically. Bravo!!

Man,it looks so cool…!!! That station seems to be from twenty-second century… good work and demonstration.

I love your video, its a

I love your video, its a movie, good background music, the characters are Great Actors !!!   LOL

 

Most seriously, I am building a robot with the battery charging station feature, like you.

My batteries will be a LiPo, need 20 minutes to charge.

 

My question :

How you interact between the Arduino and the Battery charger ?

 

A distance sensor is

A distance sensor is connected to the Arduino of the charging station. This sensor polls if the rover is present or not. If not, it does nothing but sending an IR signal in RC5 codation. Once the rover drives into the station, the distance sensor gives a high value and the charging station knows that it can start the charging procedure.

The pneumatic cilinders are driven by a certain amount of time and after that the charger is activated by a 12V relay that switches the 230V of the charger on. I just a standard charger for lead acid batteries.The average time that my battery of the rover needs to be fully charged is around 10 hours so after 10 hours the Arduino just simply switches the relay again, switching off the charger. So there’s not really a “communication” between the arduino and the charger. I’ve solved it like this since it’s the most easy way. If I wanted it to do more perfectly, I’d screw open the charger and use the signal of the charge LED to tell the Arduino that the battery is charged. But it’s not necassary since the charger switches itself off once the battery is fully loaded.

Are you going to build your own charger or are you going to use a third party charger? Charging LiPo’s is much more complicated than lead acid batteries…

Ditto!

Plus space themed LEGO are my favourite :smiley: Reminds me of my “epic” battles good vs evil… but now with more awesome, and automation :smiley:


The docking routine was surpringly quick (regarding my own expectations) :slight_smile:


And good riddance evil space pirates! :stuck_out_tongue:

Nice work!!I like that

Nice work!!

I like that station :wink:

Very good thinking to use

Very good thinking to use the charger LED !

Shoot, sometime I need to think more !!!

Nice robot and vid!
If you don’t want to open that charger you could put an LDR onto it at the outside watching the led to turn off.

IR Beacon

Could you please provide more details on how the beacon functions, which parts were used and how you track direction? I really like your project :slight_smile:

The charging station emits

The charging station emits always a 38kHz IR beacon. 
Schematic: http://www.robotroom.com/Infrared555.html

The charging station is positioned in a smart place in my living room: the transistion from the living room into the kitchen which is just 1 meter wide. The rover has two modes: drive around avoiding obstacles and looking for the charging station. If the rover passes the charging station while driving around, it picks up the 38kHz signal which generates an interrupt. The rover cannot pass this point to make sure that the rover remains always on one side of the charging station. It will always pick up the signal, since the “corridor” is just 1 meter wide.

When the battery runs low, the rover will go and look for the charging station. It’ll do that by turning into a certain direction using a digital compass. After turning it’ll drive until it hits the wall. If it hits the wall, it knows that it has to go right where the charging station is. In the meantime it keeps looking to the left, making it a wall follower. It could be that the rover has encountered furniture and hasn’t reached the wall yet. So when it detects it can go to the left some more, it will do that and it will turn to the right again to follow it’s path. Soon or later it will pass the small “corridor” between the living room and kitchen and thus the charging station.

It then picks up the 38kHz signal, it turns to a certain direction using the compass and then drives back until it is in the charging station.

Clear? :slight_smile:

Enquiry about the coding

hello there! i’m just asking because we are doing the same project. We have alrd done the sketch but it is not working properly. Could you help us with the coding? We are using the Arduino Leonardo :slight_smile: please, we do appreciate it!

hello, beautiful project, it’s very interesting, would you be willing to release your arduino programs?
I’m willing to pay you, thanks!

Hi can i know the source code that go back to recharge ?