Wednesday, July 13, 2011

Stuck on Steering

Well, as usual it appears that I've been to hasty in my robot building and have made a few mistakes. I met up with one of my mechanical engineering friends the last weekend, and after examining the chassis together we discovered the reason why the force required to turn is so high. Because the aluminum bars are so tight on the chassis structure, they're causing a great deal of friction when the front wheels are rotated. Worse yet, if I file out the inside of the aluminum crossbars, it'll decrease the friction, but the chassis will become more unstable. The two of us deliberated on several different methods of overcoming this solution.

Tons o' Torque:
I could get a motor with a ton of torque, such as a window motor, and just have it overpower the friction.

These are the motors that lift and drop automatic car windows. I have experience using them in robots for the FIRST Robotics Competition. They're strong enough to handle moderately heavy loads, though maybe not strong enough to steer the robot with all of the frame's friction.

While this may have been the easiest solution, requiring that I only purchase a window motor and possibly gear it down, using brute force would merely cover up the problem instead of actually solving it.

Reverse Tricycle:
I could modify the frame and turn it into a reverse tricycle design, much like a K'NEX robot I built to mess around with a while back,

K'NEX are a phenomenal prototyping (and in some cases, build) material.  I made this robot as a simple test bed for project ideas.  It's driven by two K'NEX motors in the front.

My friend and I actually discussed this option for a while. There were a lot of benefits to switching to this system.

  • Having only one wheel in the back would greatly increase the mobility of the robot
  • The rear wheel could be used as a sort of rudder to direct the steering of the robot, but by turning the wheel perpendicular to the front wheels, differential drive could be used on the two front wheels, greatly increasing the mobility of the robot
  • Front wheel drive is generally more controllable in cars
  • Three points are always guaranteed to be in the same plane, meaning that each wheel of the robot would always be on the ground, eliminating any "wobble"
  • A triangle is the most inherently stable shape, and therefore the frame would also be very stable, at least in the plane of the base.
As ideal as the reverse trike design seems to be, I decided not to go with it due to several reasons, most having to do with the third, unpowered wheel. For starters, the back wheel of the robot would either have to be a type of caster (a wheel that follows the direction it's pulled in), an omniwheel (wheel that can roll in any direction) or a steerable "rudder" type of wheel.

Right off the bat the first two options can be eliminated due to availability. Power Wheels Jeeps are known for their "offroad" capabilities, which I would like to extend to the robot. However, most casters and omniwheels are small and made for smooth surfaces, meaning I would have to build my own for either option. In addition to this major reason, casters are more difficult to use because, as anyone who had those plastic unpowered cars when they were a kid will know, they make turning more difficult. For example, if the robot is going forward, the caster will be following this direction with it trailing behind its axle. However, if the robot were to move in reverse suddenly, the caster would need time to swivel around so it was trailing in front of its axle. While this isn't too much of a problem for small casters, the larger the wheel gets the larger the radius that the wheel has to swivel at, and the more difficult changing direction becomes.

As for the steerable rudder option, the turning of the rear will would still take a decent amount of torque to turn, especially since one less wheel means the weight that the fourth wheel was holding is placed on the other three. Because of this required torque, I would still need to get a window motor and possibly even gear it down, resulting in a robot that has to wait for the rear wheel to rotate before it can make any significant turns.

Differential Drive:

And last but certainly not least, I could spend a bunch of money on a set of two more Power Wheels motors and gearboxes, hope that they run the same speed as the set I already have, and change the robot from car steering to differential steering.

Differential steering is when the wheels on the left side and the wheels on the right side are independent from one another and can either work together or with one another to steer. For example, if the left wheels are moving backwards and the right wheels are moving forwards, the robot will steer to the left, and vice versa. In addition to running in opposite directions, one set of wheels running at a higher or lower speed than the other set will have a similar, but smaller, effect, a useful idea that can be used for slight adjustments in direction.

While this is certainly one of the more expensive risky solutions to the steering problem, I'm confident that it's the best option at this point in time, mostly due to the great maneuverability of differential steering. Differential steering provides the smallest turning radius of all steering methods. The turning radius of a vehicle is actually the diameter of the circle that is created when making a turn.

For example, the turning radius of a car is proportional to the amount that the steering wheel is turned. The more turn on the wheel, the sharper the turn and the smaller the turning radius. A smaller turning radius means more maneuverability because the vehicle requires a smaller amount of space to turn or change direction.

Differential steering, on the other hand, can have a turning radius the size of the robot itself! If the wheels are moving in opposing directions at the same speed, the center of the robot body becomes the pivot point and the robot can turn in place. This results in the robot having the maximum amount of maneuverability possible, because it only needs a circle the size of its length to turn around; especially handy if it gets caught in a tight spot!

As for the detriments of setting up differential steering, I managed to find a pair of Power Wheels motors and gearboxes online for $75. In the event that the two sets I have don't run at the same speed, I could always do some slight modifications to solve this problem, such as varying the voltage to the faster motor to make it run slower, or increasing the wheel radius of the slower motor so it covers more distance with each turn. While neither of these solutions are elegant, there's still a chance they won't even be needed and it is certainly worth the risk to increase the maneuverability of the robot (I also never really liked the idea of car steering, kinda stupid and ugly for a robot, in my opinion).

However, it'll be about a week before the motors arrive for me to work on, at which point I'll need to figure out how to couple them with the wheels, build an axle, possibly rework the chassis, etc. In the mean time, it's time to take a welcomed break from the mechanical engineering and start back to work on some of the embedded systems I've been working on.

Monday, July 4, 2011

Classy Chassis

While the original Power Wheels Jeep covering was nice and all (sexy flame decals!), I got around to thinking that it was due for an upgrade.  The heavy mass of plastic weighed down the 'bot a good deal and really limited the placement options for various parts I've been hoping to add.  And so, two weeks ago some friends of mine came over to take a look at my pet project and we managed to pry off the plastic body of the Jeep.  It actually came off surprisingly easy.  It was only held on by four or so small washers underneath some plastic pieces.  Once those are pried off you only have to disconnect the steering shaft from the front wheel steering bar and the plastic just pops right off.  Here are some pics of the newly liberated frame.

Bare bones frame (Notice the four vertical poles, one at each wheel)

Torn off plastic from the Jeep

My old roomate(left) and MechE friend(right) standing over the remains of the Jeep

The workshop is no place for a woman!  Kidding of course, my girlfriend actually helped a fair bit with some soldering

The only problem with this frame the way it is is the fact that there's no support from the center, and no bracing, which basically means that while the frame should basically be a rectangle, any force from the side can shift it, causing it to take on the shape of a parallelogram.  And so I figured I'd buy some cheap aluminum, drill some easy holes, and get a fairly effective cross bracing system working.

1.5"x1/16"/6' Aluminum, about $10 from Lowes

Measuring and drilling the holes for the four vertical support poles on the frame proved to be far more difficult than I had anticipated.  Turns out that the poles had a lot of play, and this shifting made it very difficult to properly measure the distances between them.  It also turned out to be very difficult to widen the holes without any metal files so I had to use a drill instead.

Pictures of the two side braces in place.  These served mostly to add extra support to the cross braces and  the foam board layer that goes on top.

Here are some pictures of the cross braces once they had been put in.  However, after four hours of filing with a drill bit, I had pretty much had enough and gave up on doing side braces to make a rectangle.  They're also not really necessary since the frame came with some nice steel ones.

I also soldered some longer wires onto the motors to make them easier to access and plug into the batteries.

I cut out two layers of foam core board in the shape of the robot

The foam board mounted onto the robot.

Here's the junction between the top board and the frame.  Depending on how rough it handles while it's driving, I might install some springs at this junction to act as a sort of suspension system.  This will make the on board components, electronics, and especially my computer, less prone to wear and tear from vibrations and sudden jolts and movement.

So while this probably won't be the final frame design for the robot, it's at least a good prototype to work off of for now.  I'm currently in the process of figuring out a method of steering.

Thursday, June 23, 2011

At last! Productivity!

Well I most certainly did not get anything done that week! However, the semester is over, I survived finals, I have a job at home, and I finally have a bit of time to work on the robot. Actually, I managed to get the drive motors working when I got out of school 3 weeks ago. I copped out on using the MOSFETs, though. I figured I'd try a quick and dirty solution to get it working first, and then work out a much nicer and more efficient motor controller later. The following schematic is the one I used, and the one that was suggested to me on the All About Circuits forums.

As you may or may not be able to tell, the above circuit uses relays, rather than MOSFETs. A relay works using the principle that current generates a magnetic field around a wire. A wire can be coiled in order to increase the strength of this created magnetic field. A relay has a coil of wire inside that creates a magnetic field when activated, and this magnetic field attracts a magnetic switch towards it, closing a circuit. The schematic symbol for relays pretty accurately depicts this concept. The relays I used are called Single Pole Double Throw (SPDT) meaning that there is only one switch, but it can close two different circuits. These relays have a normally open (NO) side and a normally close (NC) side that describes which way is a closed switch and which is an open if there is no current activating the relay.

The circuit above has the NC part of the switch bringing both motor leads to ground. This way, when the motor is running, and suddenly told to stop, the current generated by the magnetic field of the motor not wanting to collapse can be sent to ground, allowing the magnetic field to collapse in a much more gentle fashion. Then, when the left relay is activated, the left side of the motor is set to the positive voltage, and the motor runs one way, and if the right one is activated, with the left side being inactivated, the motor runs the other way. And due to the nature of SPDT relays, it is impossible to activate the high and low of one side of the H bridge and create a short circuit.

All in all, the relay h bridge is a quick and dirty solution to the motor controller problem. However, this design does have the following cons:

  • Relays take more energy - The activation coil requires current to turn the relay on so it requires a small amount of current to keep the motors going. This small amount adds up over time and drains the batteries quicker.
  • Relays don't allow for PWM and speed adjustment - Relays are either on or off and so don't have the capacity for scaling and speed control like MOSFETs do.
  • Relays are bulky - As you see in the picture above, relays are fairly sizable beasts and take up a lot of room. MOSFETs, on the other hand, are much more compact and can fit in smaller spaces.
  • Relays are less durable - They are only rated for a certain number of on and off cycles. The contacts inside break down over time due to the sparks that inevitably occur when current is abruptly allowed or stopped.
So basically while relays are nice and convenient, they're not an efficient or elegant way to make a motor controller. Sometime in the future when I actually have time I'll have to work on remaking the motor controller. In the mean time, however, this will certainly work well enough to make the robot move. I'd include some videos of it in action, but the robot isn't actually capable of movement at the moment for reasons I'll disclose in the next blog post. Once it's up and running, however, I'll be sure to throw a video in here!

Tuesday, March 8, 2011

Getting Up to Date

So the last few of these blog posts have been recap of what has happened, as far as the project is concerned, in the past couple of weeks.  This post will be my attempt at getting all caught up so I can start to enforce a development schedule.

The current status of the project is as follows.  My roommate and I wired up the robot using electrical tape so that it can be directly connected to the four batteries wired in parallel.  The motors are also tied directly together and share current from the 6V super battery.  We then wired it through an old analog multimeter so that we could gauge the current drawn by the motors.  This way, we don't have to listen to questionable data sheets and motor curves.  Here are the results of our weight testing for both motors.

The peak current is the current required to get the motor started, and the steady current is how much it takes to move steadily along.

The current direction with the robot is as follows:

  1. We will be using all four batteries in parallel to provide 6V to both motors.  This puts less strain on the motors, extending their life, although it will mean less speed.
  2. The motors will be wired together in parallel as well, which means both motors will always turn in the same direction.  While differential steering would be easier to maneuver, using the already provided steering will will make the robot's movements more realistic and applicable to actual cars if the project ever expands that far.  The elegance in this lies in the fact that if appropriate hardware and mechanics are provided, the same software could work identically on many different machines.

Things required to do to finish compiling data are:

  1. Get a force measurement of some sort of how much force is required to turn the steering wheel.  This will probably be similar to the graph above with a weight vs. force graph.  With this data, it is then possible to buy a adequately rated servo to turn the wheel and drive the robot.
  2. The stall current of the two motors.  I tried testing this when my roommate and I were doing load testing, but the current spiked past 20A which was the maximum current of the multimeter.  This data would be good to know when taking into consideration protecting the motor controller from overcurrent.  Stall current will cause damage to the motors so when it is detected, the motor controller can be shut off.
Things that will require doing to make the robot functional:
  1. Research and decide on an effective method of getting the robot to steer.  The only two options so far appear to be using a motor to slowly steer the robot, or buy servo to do the steering.  The motor would be cheaper, but it would require switches and types of control to monitor how far the wheel is turned.  A servo would have this functionality built in, but would be much more expensive.
  2. Finally design and build the motor controller.  Because I still have 8 MOSFETs of proper rating left over, all that is required is for me to design a schematic and finally solder together the controller on a PCB board.
So that's what's left that needs doing and where the rUD2 project is currently.  Hopefully I can get something done this week and finally get the ball rolling.

Friday, March 4, 2011

5-6 Wrong FET Specs and Poor heat dissipation.

So basically the previous four instances of me screwing up have snowballed up into one massive snafu ending in one, charred H Bridge.  At the risk of sounding redundant, reading the datasheets is EXTREMELY important.  For example, when I looked up the MOSFETs I was going to use, I read that they were rated for 150A, which was the peak current for 12V on the supposedly accurate fisher price motor curve graphs.  So I figured that it was fine, didn't care about any of the other confusing terms on the datasheet, and went ahead and soldered it all together.  This, however, is not the case.  If you don't RTFM, you won't learn things such as, while the FET's silicon may be able to handle 150A, the actual leads of the package that it is inside of will actually melt at 75A.  So that's pretty misleading, but whatever.

Next is the issue of heat dissipation.  Now I'm not the best at math, but basically what's required is to use the Rtheta factors on the data sheet to calculate the amount of heat the package can dissipate without melting.  As I've stated before, since I know I'm not the best at explaining things, here's a link (this will be a common thing, me linking you to helpful sites) that will help a great deal and walk you through the steps of calculating how much it current a FET can ACTUALLY handle.

I've found it to be very helpful, and realized that the FETs I was using could only handle about 20A before melting.  Read through it a couple of times to absorb everything.

Wednesday, March 2, 2011

2-4. Didn't Correctly Read Motor Curves and Crappy Soldering

So basically I misread the motor curves spreadsheet that I posted earlier in this blog.  I believed that the motors would run at 15A usually, however, little did I know that this was at the most efficient running of the motors.  As we all know, life is far less than peak efficiency and so it was more likely that the motor would run at 50A at times.  So long story short, RTFM.  Read the datasheets veeeerrrry carefully.

Second part which pretty much illegitimises the first part.  Forums are a spectacular place, especially engineering forums.  Odds are there's always someone who has done what you're doing and can help you a great deal.  That being said, there are also a lot of unhelpful people who make relatively meaningless posts. Nonetheless, it's still very important to carefully and fully read any threads that you may be looking at or that may be related to your project.  This was the case for the datasheet.  It is contained within a robotics forum, and only the first post.  The posts later in that thread, which I neglected to read until my first H Bridge had gone up in smoke, discussed the unlikeliness of much of the data that the motor curves showed.  It showed that the motor peaks at 150A which is a HUGE amount of current.  I eventually proved this illegitimacy to be true, as will come in a later blog post, but the reality is that the current drawn is far less than that.

In addition to reading through datasheets and forums, it's also a good idea to use your own judgement most of the time.  For one, the fuses on the stock power wheels batteries where 30A.  That alone should tell me that even the stall current (peak current) would be less than that.  And two, 150A running through the stock 14AWG wire would definitely start melting some things.  Considering that this is a children's toy, these dangerous conditions and amounts of current should have thrown up a read flag in my head, telling my that these were unlikely.  All in all, it's a good idea to make sure that your research is thorough so you don't make stupid mistakes like I do.

As for soldering, my circuit board is ugly, as most of you can see.  I used a knife to widen the holes so I could fit in a bigger gauge wire, in addition to an overall poor job of soldering with an old and very worn down iron.  A good soldering job takes time and a lot of practice.  Beautiful solder joints also show professionalism.  Since I am not qualified to show a soldering tutorial by any means, I'll just post a link to a very nice tutorial by the people over at sparkfun.

They have a nice soldering tutorial in the bite sized primers section, in addition to many other good tutorials on basic electronics knowledge.  And now that I've gone over more of my faults as an electrical engineer, it's time to go study for a test.

Tuesday, March 1, 2011

1. Not turning on a MOSFET completely

Let me now address the first of my numerous and amateur mistakes in my first H Bridge design.  If you already read the All About Circuits forum post I put up, then this will just be a recap.  Essentially, what an N Channel MOSFET does, is compare its Gate voltage to its Source voltage.  For the ones I bought, the required voltage to fully turn on is 5V with respect to ground.

For the lower two FETs, this works out fine because the Source pin is tied to ground, and 5V, with respect to ground, is sent to the Gate, making the total difference 5V.  So these two FETs then have no problem turning on.  The real issue, however, arises with the upper two FETs.  Initially, the bottom two FETs turn on fine, and the 0V from ground propagates through the motor and to the Source pin of the upper FETs.  That way, when the top FET Gates receive a signal of 5V, they start to turn on.  However, since the motor in the bridge wants as much of the voltage as it can manage, this means that the Source pin of the FETs is going to increase in voltage and apply that voltage across the motor.  So eventually, the 5V difference between the Gate and Source pins will continue to get smaller and smaller.


When that happens the MOSFETs don't turn on all of the way, and the resistance will be far too high.  With power equaling resistance * current squared, the power being dissipated by the MOSFETs will shoot up.  Those suckers aren't made to take very much dissipation, and so they'll either melt or explode, like mine did, and release a ton of smoke!

To turn fully on, the MOSFETs need a high voltage, 5V, or whatever the recommended Gate voltage is, with respect to the source pin.  Since I'll be running my motors at 6V, that means the source pin will be about 6V for the upper FETs, assuming I use the same MOSFETs, which is unlikely, and 6V + 5V means that I'll need 11V at the Gate to get a 5V differential.

Two types of circuits that would work for a high side driver are listed below.

The top image shows the Gate of the Power FET hooked up to a pull down resistor.  Q1 is a regular transistor.  If a current is not fed into the transistor from the microcontroller pin, then the Gate sees the 0V of ground through the resistor.  However, when the MCU pin is set High, then the transistor turns on, and the current goes through the transistor, causing the 11V across the resistor, and charging the Gate of the FET, turning it on.  Due to the pull down resistor, The motor would then be normally off.

The bottom image shows the Gate hooked up to a pull up resistor.  When the transistor is off, the 11V would go through the resistor, charging the Gate.  However, when the transistor is turned on, the Voltage would all be dissipated through the resistor, causing 0V after the resistor which would then drain the Gate and then turn off the FET.  And so with the pull up resistor, the motor would normally be on.

These are my two options for the high side drivers of the H Bridge.  Now, all I have to decide is whether or not I want my motors to be normally off or normally on, though odds are I'll want them normally off so that the robot stops by default and won't try and run away if it decides to break.

Thursday, February 24, 2011

Managing MOSFETs

So as a continuation from the last post, I'm going to explain the usage (and then the proper usage) of Metal Oxide Semiconductor Field Effect Transistors, or MOSFETs.

For those of you not familiar with transistors, it is essentially a gate controlled by electricity.  It has three pins, the collector, the base, and the emitter.  As the names would imply, current goes into the collector and out of the emitter.  However, it is normally closed, allowing no electricity to run through it.  You open it up and therefore allow current to flow by pushing current into the base.  The common analogy is a water faucet.  The cool thing here is, you can control larger currents with smaller ones.  So if you 1/100th of an amp into the base, you could control 1A with it.  Cool right?

Now MOSFETs are a special type of transistor.  They are controlled with an electric field rather than a current.  So rather than having to constantly supply a current to the base, also called the Gate on the MOSFET, you apply a voltage to it which charges an internal capacitor in the FET and the resulting electric field allows much larger currents to flow through the MOSFET.  Because you only need to supply enough current to charge the internal capacitor instead of a constant one, MOSFETs can be more power efficient in the long run.  They also have the capability to control much larger currents than normal transistors.

I'll be honest, I didn't know much about MOSFETs when I went into this project, but, being the persistent little bugger that I am, I decided to forge ahead anyway.  (I bet you can see where this story is going already)  Anyways, I used a lot to figure out what exactly I was doing.  It's very helpful and tells you a lot of detailed stuff that most other h-bridge explanations won't go into.  Since I'm not nearly as eloquent as the H Bridge website, and since I'm generally busy, I won't go into a detailed explanation of the H Bridge here.  Suffice to say it's a way to control the direction of a motor.  It generally consists of 4 switches, in my case MOSFETs, and by turning on two at a time you can control which way the motor travels.  He's a picture from the H Bridge Secrets website.

If Q1 and Q4 are on, the motor goes one way, and if Q3 and Q2 are on, the motor goes the other way.  I'll from here on out refer to them as upper left and right, and lower left and right.

Now as for the types of MOSFETs I could use, there are P Channel and N Channel MOSFETs.  The differences are that P FET is closed and allows no current through (from the Source pin to the Drain pin) when the Gate pin is held low, and an N FET allows no current through (from Drain to Source this time) when the Gate pin is high.  Due to the fact that N FETs are easier to produce, have a lower resistance, more on that later, and are plain cheaper, I'll be using four of those.

Probably the most important thing to keep in mind when designing an H Bridge is the current draw of the motors you are using.  For the first revision of my bridge, I used the Fisher Price Motor spec spreadsheet found at the following link.

I then decided to use the 12V graph on the second page of that spreadsheet.  So if you look at the general information listings you can see that the stall current of the motor is 148A approximated to 150A.  This means that when the motor is forced to stop turning, like when jeep hits a wall, that's the amount of current that the motors draw.  I wanted to build an H Bridge capable of handling this current and so I searched for the necessary parts.  Looking through them all, I settled on buying 10 IRL7833's so that I would have enough for two H Bridges and then two spares in case something went wrong.  Little did I know things would end very poorly.

I won't go into much detail about how I designed and built the H Bridge, because I didn't put much thought into it and it did not end well.  It was basically scrapped together using an old perforated PCB board, some old romex wire, and a ton of solder.  Here are some pictures.

If you look closely you can see how that the wire is pretty burnt and two of the MOSFETs burst.  There was a lot of smoke and my basement smelled for a while.

Having read several pages on H Bridges, I assumed that the old wire was the problem and went to Radioshack and bought two spools of 12AWG wire.  Only when I couldn't fit the wire into the holes of the PCB board did I decide to post onto a forum and ask for help.

The forum is actually a very nice place, and having recently joined, I decided to post my questions there.  Since I have no shame and already feel really stupid for having made so many mistakes, I'll post the direct link to my thread right here.  I'm Gumbercules, btw.

Essentially I made a boatload of errors, and the very helpful people on the forums had no lack of advice to give me.  To name a few things I did wrong, I:

  1. Didn't turn on the upper MOSFET's all the way
  2. Misread the motor curves on the spreadsheet
  3. Didn't read all of the way through the thread from which I received the spreadsheet
  4. Probably did an awful job of soldering things
  5. Used improperly rated MOSFET's
I'll try and address each of these issues in the next few posts.

Wednesday, February 16, 2011

Procuring Parts and Batteries

My apologies for the lack of posts recently.  I've spent these past few weeks essentially working to earn more money for this project, moving back to my dorm room at school, homework for classes, and searching the vastness of the interwebs for parts that I need.

Basically, the rundown of what I needed is as follows:

  • Batteries:  High capacity sealed lead acid batteries to power the motors of the robot
  • Power MOSFETs to control the motors of the robot
  • Tools to make sure I don't kill myself or start a fire
So with respect with batteries,  one would think this would be easy to accomplish.  You just go out to radioshack, buy some AA's, or even splurge on a lantern battery, and hook it up right?  Not even close!  Batteries are incredibly complex demons and can be very costly.  The jeep I received came with the stock two Fisher Price batteries.  However, since these were dead and wouldn't take a charge, I had to go out and search for more.

Now the things to keep in mind when purchasing batteries are price, weight, ease of use, and capacity.  The lightest and most energy dense batteries are generally Lithion Ion batteries, like the ones used in cell phones or computers.  However, the problem is in order to get the required amount of these batteries, you would have to buy hundreds of dollars worth.  So, instead I decided to go with the classic Lead Acid batteries.  These are generally a little cheaper, as they are used all around in things such as cars, wheelchairs, or other high power applications.  They are also the same type of batteries that come with standard Power Wheels vehicles.  For more detailed comparison of types of batteries, Wikipedia is a great resource.  A general overview can be found here
and from there you can go to each battery technology wiki page to see a more in depth description.

**NOTE:  Do NOT use car batteries to power your project.  They are generally normal lead acid batteries, not sealed, and if not maintained carefully, charging them can produce hydrogen and oxygen gas, which are extremely explosive.  Seeing your robot explode and having sulfuric acid fly everywhere is not fun.  Car batteries are also made to deliver high amperage loads over a short period of time, using it for a steady stream of current can damage the batteries internal plates and greatly decrease the life of the battery.

So now that I've decided to use Lead Acid batteries, it's time to look up their suggested use and handling.

There are two types that can be used in this application, Wet Cell batteries and AGM/Dry Cell batteries.  Wet Cells require a decent amount of maintenance and are not sealed, meaning there is still the danger of hydrogen explosions.  They can also require the occasional refilling of the battery with water.  Both of these are reasons why I opted for the Sealed AGM style battery.  Because it is sealed, it requires less maintenance, and the way it is produced causes it to be more efficient than the Wet Cells, with the trade off being that it costs a little more.

For optimum number of battery cycles, meaning the number of times it can be charged and discharged, this battery should never be drained below 50% capacity.  Another general rule to remember for all Lead Acid Batteries is that they should never be left sitting alone for long periods of time.  Over time, the battery discharges itself, and if left alone for too long, they will lose the ability to take a charge.  It's a good rule of thumb to charge them to full capacity once every month or so.  You can check the overall charge of a battery by checking the voltage.  While the specs for a battery may say 6V, it usually means that it is more like 6.3V when fully charged and 5.8V when fully discharged.

Something I almost forgot to mention was how to determine battery capacity!  Battery capacity is measured in ampere hours, or Ah.  I'll explain with an example.  Say you have a 5Ah battery, and want to see how long you can provide 5A to a load.  Just take the capacity and divide by the number of amperes you're supplying, so 5Ah/5A means 1 hour of battery life, and 5Ah for a 1A load means 5 hours of battery life.

Because I'm not an expert on these things by any means, I went on the Internet and found most of my information from this site.
They go far more in depth than I do, and even have a handy table that lists voltages compared to the charge level of the battery.

As for finding and purchasing the batteries, I searched eBay for Sealed Lead Acid, or SLA batteries and managed to find some good prices.  I ended up buying 4 UB670 6V 7Ah SLA AGM batteries for a total of $42.  Not too bad of a price for a decent amount of capacity.  If I run the robot at 6V, this means I can put all four batteries in parallel and have a total of 28Ah capacity.

And after some waiting...

I've taped them together into two 6V modules.  This is because at first I wasn't sure if I was running the Jeep on 6V, 12V, or both, but for reasons I will explain in the MOSFET post....  I went with 6V

I cut the connectors off of the old batteries and soldered them onto the new batteries using some old Romex wire

Here's the solder joint between the wire and the battery itself.  The wire didn't fit well so I had to widen the hole a little bit to fit it, which explains the metal shavings.

And so here are the battery modules.  Since I'm not sure how much the motors are actually going to draw, I can't calculate how long they're going to last, but I feel as if I'm probably going to need to buy some more at some point.  So please!  Tell your friends about this site!  Every person who visits helps to fund our project!

Tuesday, January 18, 2011

Basic Robot Rundown

So for this robot, I've broken the entire thing into four separate, but complementary systems.  I'll start at the bottom level and work my way up.

  1. The first level of the robot, and in my opinion the simplest (sorry MechE's!), is the mechanical level. It's comprised of the wheels, chassis, motors, etc.  Essentially I was lucky enough to get this level as one complete set, as the Power Wheels Jeep supports my every need.  The motors, while mainly mechanical, bridge us over to the next level.
  2. The electronics are the blood and guts of the robot.  They bring power throughout the entire thing, giving it life and movement.  Batteries pump power through the entire system, sending energy to the brains, motors, cameras, and any other electronics in the robotic system.
  3. Firmware is the third level and is right in between pure software and the electronics.  It's the set of commands that tell the hardware what to do, usually by passing a command given to it by the software.  The firmware usually resides, as it does in this 'bot, in a microcontroller.  A microcontroller/MCU/uC is essentially a very small computer.  The basic controller can be purchased for under $5, or an augmented one, which is easier to work with, will cost between $20-$100.
  4. Lastly is the pure software.  This is generally a nonexistent level on most amateur robots.  However, since I have no little voice in my head that tells me I'm biting off more than I can chew, I've decided to dream big, and will be installing an old laptop inside of the 'bot which will run the whole show.  While a microcontroller is fully capable of controlling the robot's lower functions, such as movement, tracking, and obstacle avoidance, the laptop will provide the robot with the potential of even greater possibilities!  I'm talking about grand things such as computer vision to keep track of particular people, environment mapping so the robot knows where it is, and voice recognition so it can here my commands of world domination (cue evil laughter).
So that's a basic rundown of how most robots tend to work, although level 4 can certainly be omitted.  However, I do understand that I'm terrible at explaining things, so if you have any questions, either ask in the comments or take a look at this fantastic website, where I learned most of what I know.

Monday, January 17, 2011

From the Ground Up

For starters on this project, let me show just what I'm starting out with.  Here are pictures of the Jeep in its current condition:

Here's the back axle of the jeep with the two presumably working motors and some sort of switch used to change gears.

This is the bar on the back of Jeep with two fake lights that I found impossible to get back on.  This bar looks like a really good place to add sensors such as sonic distance sensors or even stereoscopic vision!

This is the back of the Jeep.  The two things coming out of it are the seatbelts.  Safety first!

Here are the two 6V 9Ah batteries that came with the jeep.  They're very very old and even though I had hoped they still worked, they turned out to be duds.  As shown on the multimeter, they only display 2.8V after days of attempted charging.

The scary caution sticker!  It says here the Jeep is made to carry 130 lbs.  This gives me an upper limit to work with on everything I'll be adding, though I can't imagine everything will weigh over 50 lbs.

The inner dashboard of the car.

The front view of the Jeep.  Gotta love those flames!!!

The jeep with the trunk popped.  This is where the batteries were housed.  You can see the connector used to hook them up.

A side view of the car.  I wonder if I should add doors.

And finally the front steering system for the car.  The steering wheel is attached to that metal hook which in turn moves the long metal plate and steers the wheels.

Laying Down the Data

So just the other day, I was fortunate enough to receive a Power Wheels Jeep from my good friend, Ian.  Being the avid robotics fan that I am, I have since decided that I am going to use this Jeep as a robotics platform that I can build upon to form a fully functioning, autonomous vehicle.  I have named this project rUD2, a play off of R2D2, and after the University of Delaware which I am currently attending as a Computer Engineering and Computer Science sophomore.  I plan on using the robot to represent the ECE Department in the hope that I might get some funding from them.

My goals for this project include the following:

  1. To write this blog as a helpful tutorial for beginner through advanced roboticists interested in medium scale mobile robotics
  2. Use this robot as a platform for experimental technologies including non-lethal self defense, computer vision, gps tracking, self charging, artificial intelligence, full automation, and general bad-assery
  3. Develop the project to the point where it becomes a University backed robotics project that students who have a passion for robotics can participate in