Robot battery switching

Hi there,

I'm making an arduino robot with 2 identical lipo batteries.  The robot runs off one battery, and when that battery gets too low it will switch to the 2nd (fully charged) battery.  It will then make it's way to base and swap the flat battery with a fully charged one, so it can switch back when the 2nd battery is low.

Can you guys give me some guidance on the best way to go about building something like this.  I'm thinking of use a latching relay to switch between battery 1 and 2, and a voltage level detector to know when to switch.

Is the latching relay the way to go? (I understand that the arduino may temporarily loose power and reset on battery change, but that's ok)  Or is there a smarter way to do this?

Cheers

The Roomba manages this with

The Roomba manages this with one battery.  The battery gets to a certain level and then it goes into a seek mode to find its base to recharge itself.  The disadvantage is sometimes it runs out of juice before it finds its charging station.

You could do it with two batteries.  Run from one battery until it is low and then switch with a relay, solid state relay, mosfet, or transistor.  Depending on load and voltage, probably a mosfet would be the best solution since they have very low resistance so low impact on your battery.  You could connect resistors to your power and then to analog inputs on your controller to monitor voltage.  Figure out what the maximum voltage your batteries at full charge will have and use Ohms’ Law to calculate the right resistor to keep the voltage under 5 or 3.3V depending on what your controller can take.

I built a charging station for exactly the same purpose you have in mind.  I used 3 IR emitters, one at 45, one at 90(in a small pipe to keep the emissionsin a tight band) and one at 135 degree angles.  I then used an Arduino to send 10 ms from the 45 degree angle emitter, 20 ms from the 90 and 30 ms pulses from the 135 degree emitter in a round robin fashion.  Depending on what the robot picked up would indicate where it was.  I put a flat piece of paper just behind the IR receiver so it wouldn’t pick up anything beyond 180 degrees. I would then turn the robot in place one direction until I lost IR information, then I would turn back the other until I lost IR.  So, now I know that halfway between, I am pretty much pointing directly at the charging station.  I would then turn 1/4 or 3/4s of the way back so I am on an intercept (depending on what side I am on from the station).  Then when I hit the center beam and was only picking up 20 ms hits, I would do the same routine.  This time, I would turn back 1/2 way so I would be pointing directly at the station at that point.  If I started to pick up 10 or 30 ms signals, I know which way I need to turn to intercept.  This worked pretty well for getting me close in to the station.  I got sidetracked and never really got this completely working, but the concept is sound.  The problem is that as you get close in, you need to have smaller and smaller corrections to keep you centered (kind of like flying an ILS if you are a pilot).  Without knowing how close in I was, it would overcorrect one way, then over correct the other.  I wanted to use the ultrasonic sensor on the bot to let me know how close I was and then adjust how much to turn based on how close in I was but never wrote the code to do it.

Good luck with your project.  Let us know how you make out.

Regards,

Bill

Hi Bill,Thanks for your

Hi Bill,

Thanks for your reply and thoughts - you make some good points, however here are my reasons for going down the dual battery path:

    * the robot doesn’t have to wait to be charged - it just swaps battery and goes
    * 2 batteries will let the robot swap the “dead” battery under it’s own power
    * 2 identical batteries make power management easier - if it can get from A to B on battery 1, then battery 2 will let it return from B to A.

The robot has many servo’s (15+) so the current draw would be large at times when all servo’s are in use, so I don’t think a transistor will do it, and maybe not even a SSR.

So that’s why I’m still thinking that a latching relay is the best bet - it won’t draw power unless switching over and would let lots of current through. 

My robot is still a couple of months away from completion, but I’ll post a youtube video and a link here when it’s alive :)  I’m hoping to have it ready for my sons birthday in March

Cheers

You know your situation

You know your situation best.  That probably sounds good based on what you have in mind.  It sounds like you have a good handle on your project. 

I have seen MOSFets that are for the automotive industry that are rated 30v at 60 amps which might fill the bill for what you are looking for.  For example, 

https://www.adafruit.com/products/355

although beyond 15 amps you will need a heat sink it says in the description.  I remember looking at some relays once and was surprised at the cost for keeping a big relay engaged that could switch that much power.  It is worth running the numbers is my only point.  Whichever solution takes the least from your power budget would be the winner…

Since you have 15 servos, I am going to assume you are doing a walker of some sort.  My suggestion is to get the thing walking then worry about it finding a charging station and recharging itself.  You might be surprised at how hard it is to get it close to that charging station in a repeatable fashion.

Good luck.  I look forward to seeing the fruits of your labor.  I am sure your son will love it no matter how much you have done by March.

Regards,

Bill 

Really interesting. I worked

Really interesting. I worked on this idea once, but found simply setting the batteries up for longitivity worked better. However, is this set up for adding a security feature so you know when a bat is down? Or a way to do easy charging? The more batteries you add, the heavier the bot is going to be, and batteries are usually one of if not the heaviest part.

One benefit of doing what

One benefit of doing what I’m planning is a security feature to switch batteries - not necessary I know, I can just monitor the voltage level on a single battery.  My main reasons for doing it this way is to:

a) the robot doesn’t have to wait to be charged - it can swap battery and go

b) the robot can swap out it’s own battery without needing to go to a base necessarily.  That way, I can have fully charged batteries at strategic places that it can get to.  Also, it would look cool to see it change it’s own battery

… I know it will be a challenge to do a self-battery-swap, but I like a good challenge :slight_smile:

I’m using small 1300 mAh lipo batteries, so battery weight isn’t an issue - 2 of those are still pretty light.

FYI I’m making a 5 legged walker - why 5? because I ran out of servo’s during the initial prototype building stage and the idea of 5 legs grew on me.  The robot’s body and legs will be perfectly symetrical, so there is no front or back - any leg can take the lead.