As someone who doesn't have a whole lot of experience with motors, I wasn't sure what I would need for the drivetrain. Out of the drivetrains I want to prototype, the C-limb design would need six motors, the wheeled design would need four motors, and the walker design would need two motors (according to the tutorial). So right off the bat, I knew I would need to buy six motors.
Next, I investigated what type of motor I should use. Several sites broke down the options into DC motors, servo motors, and stepper motors. According to AboutTech, stepper motors are specialized for positioning (i.e., you can tell it to turn 30° and then stop), but generally provide less speed and torque than servos can. I don't really need precise positioning, and I do need torque and speed, so stepper motors didn't seem like a good fit. At Robotoid.com, I learned that plain DC motors spin very fast, but provide very little torque- to function in a drivetrain, they really need to be geared down. Since I don't currently have the means to make a custom gearbox, DC motors were not a very attractive option either. Finally, I went to Handyboard.com to learn about servos: "The servo motor is actually an assembly of four things: a normal DC motor, a gear reduction unit, a position-sensing device (usually a potentiometer-- a volume control knob), and a control circuit." With their built-in gearboxes, servos were definitely looking better than DC motors. Robotoid.com suggests that a downside of servos is that they have to be modified if you want continuous rotation (their default is usually to rotate back and forth along a 180° span). I found a tutorial on Instructables for how to do this, and it looked feasible, so I decided to go with servos.
That narrowed the space a little. But, being new to the world of motors, I was still a little lost. Motors come with a set of specification to inform users of what they are capable of, but I wasn't very famliar with what they mean or what I needed for my drivetrains. After slogging through sever rather dense explanation of motor specs, I had a little better idea of what they were, but still didn't have much of a feeling for what my robot would require. The main specs for motors are torque and rotation speed, and in general, increasing either of those increases both the cost and how much the robot is capable of. So I needed to figure out the minimum torque and speed required to make my robot work. Luckily, I found an AMAZING tool for exactly that purpose at RobotShop.com.
This calculator is a godsend. |
I assumed that the RobotShop calculator was based on the premise that the robot would be running on a hard surface, like concrete, and I intuitively felt that running on sand would be more difficult (and therefore require more torque). So when putting in the parameters, I wanted to err on the side of overestimating how much torque my motors would need. I played around with the calculator and found that to increase the amount of torque required, you can either increase the mass of the robot, decrease the number of drive motors, increase the radius of the drive wheel, increase the maximum incline the robot will need to climb, and/or increase how quickly the robot will need to accelerate. Here are the parameters I put into the calculator:
- Mass: 15 lbs. The robot will have drive motors, limbs, Arduino and circuit, obstacle sensor, a plastic box to hold and protect the electronics, a search coil, and maybe some PVC structure. Since it'll be small and mostly plastic, I think 15 lbs is a high estimate.
- Number of motors: 4. The wheeled design calls for 4 motors, the C-limb design for 6. Four seemed like an appropriate underestimate, since I can always give the wheeled design six wheels if four doesn't cut it.
- Wheel radius: 3". The wheels I have on hand (from the toy trucks) have radii 1.5" and 2", so 3" is a comfortable overestimate.
- Robot Velocity: 1 ft/s seemed like a fairly quick speed for a metal detector. Velocity has no impact on torque needed, but does affect the rotational velocity needed.
- Maximum incline: 10 degrees. The robot will be moving on a beach, so I don't anticipate that it will need to climb much incline.
- Voltage: 6V. Doesn't affect torque or rotational velocity, so I just guessed.
- Desired acceleration: 0.2 ft/s². If my robot's maximum speed will be 1 ft/s, then accelerating at 0.2 ft/s² would bring it up to full speed within 5 seconds. I can live with that.
- Desired operating time: 1 hs. I would like the robot to run as long as possible, but I can live with changing the battery every hour or so.
- Total efficiency: 65%. I left it at the default.
With those specs in mind, my next step was to look for specific motors that meet them. I looked on Robotshop, Amazon, and eBay; unfortunately, most servos offered between 1 and 2 kg-cm of torque. I was most impressed by the TowerPro SG5010 servos on Amazon, which were $5.17 each. The Amazon description says they take voltage between 3.5 and 8.4 volts, and gave the torque specs as stalling at 8 kg-cm when powered at 4.8V and 11 kg-cm for 6V. That seemed almost too good to be true, since other sellers were offering a lot less torque for a lot more money. I checked the specs for the same motors on another supplier, iMall, who says the operating voltage is 4.8V to 6V and the torque is 5.2 kg-cm to 6.8 kg-cm. Not exactly what was advertised by the Amazon supplier, but luckily still sufficient for this project. I ended up ordering six of them, for a total of $31.02.
The TowerPro SG5010 |
Next, I needed a way to control the motors. One of my friends, who's built an RC car before, warned me that Arduinos can't directly power servos. He recommended using H-bridges, little chips that act as a go-between for the Arduino and the servos. However, I was concerned that between the six servos and the other sensors and things I'm using, the Arduino might not have enough pins available to control all the H-bridges. I started shopping around for motor shields, which would effectively create more pins for the servos to interface with, replacing H-bridges as the middleman. I decided to go with the 16-channel motor shield from Adafruit for $17.50. Since it can control up to 16 motors from one Arduino, it's more than sufficient for this robot, and it should be well-suited for any future project I can come up with.
Runs 16 servos off of two Arduino pins! |
The last piece of the puzzle was finding a battery to power the motors. This Adafruit article recommends using separate power supplies for the Arduino and the motors, so I decided to do that. I won't go into too much detail about how I chose a battery, but after reading a lot of comparisons of different kinds of batteries, I decided to go with LiPo batteries for the motors and 9V Duracells for the Arduino. The motors need a voltage of either between 3.5 and 8.4V, or 4.8 and 6V (depending on whether you believe the Amazon seller or the iMall seller), so I decided a 6V battery would do nicely. LiPo batteries don't come in 6V- the closest you can get is 7.4V, so I decided to go with that, and also ordered some adjustable voltage regulators (LM317T) on Amazon ($6.19 for 10). This will allow me to set up a circuit to lower the voltage across the motors to 6V. The RobotShop motor sizing tool also tells you how much battery capacity ("battery pack") you need to run the robot you describe. Battery capacity is measured on battery descriptions in units of mAh, although the RobotShop tool gives it to you in units of Ah. For the inputs I described above, I need 938 mAh in order to run the robot for 1 hour on a single battery. More mAh means the robot can run longer at those specs, and gives me some wiggle room on my estimates. In the end, I ordered three 7.4V LiPo batteries of varying capacities, and a Tenergy charger from Amazon for $32.88.
If you've never done this kind of project before, hopefully this post has given you some insight into how to begin. In the next few days, I'll be post an update on my progress with metal-detecting.
You rock!
ReplyDelete