# Gas station without pumps

## 2012 August 1

### Robot motors and gears

Filed under: Robotics — gasstationwithoutpumps @ 21:41
Tags: , , , , , ,

In yesterday’s post Robot wheels, I talked about the wheels I’d found that might be useful for the panning mechanism of the robotics club’s automated foam-dart shooter, and promised to type up my notes on motors and gears today.

I already started talking about the two 12v motors we have on hand:

Mitsumi M38E-3SC
I’ve been unable to find any specifications, other than the 2400RPM and 12V on the label. I did find bunch of specs for other motors on Mitsumi’s web site, but this motor has apparently been discontinued.
We measured the stalling torque by taping a string to ta 5cm diameter wheel and measuring the force on the string needed to stall the motor.  We measured about 0.7N, so the stalling torque was about 0.0175±0.003 Nm (about 0.15 in-lb, 2.5 oz-in, or 180 g cm using an online calculator for the unit conversion). The stall current is about 0.65A.
Johnson Pump Motor 500
A bilge-pump motor with a 1/8″ (3.2mm) shaft for which even the no-load RPM is not reported (intended as a drop-in replacement for a 500GPH bilge pump).
I measured the no-load speed last night with a Fairchild QRE1113reflectance sensor—the flat on the shaft of the motor changes the reflectance enough  to get a good pulse holding  the rotating shaft about 1mm from the sensor. I used a 5v power source (4 NiMH AA cells) and a 180Ω series resistor for the infrared emitter (to get about 21 mA of current).  I used a 2.7kΩ resistor in series with the phototransistor, to get about a 1.3v swing with bright paper very close to the sensor, and about 0.01v with the paper a centimeter away.

The reflectance sensor is a bit of a pain to work with, because the leads are not on the standard 0.1″ spacing and are made out of much thinner metal than usual for through-hole parts. I managed to shoehorn it into the breadboard without breaking any leads, but if I want students to use this part, I should have them solder it to a breakout board.

The pin numbering does not follow that of DIP packages, running counter-clockwise from the bottom left corner, rather than the top left (or, equivalently bottom right).

With the motor shaft about 1mm away from the sensor (which required steady hands) there was a clear pulse on the oscilloscope, and the pulse was strong enough that my Fluke 8060A multimeter could measure the frequency as 126.5±0.1Hz, which translates to 7590 RPM, for the motor running at 12.94v and 0.5A with no load.

The reflectometer is pretty easy to use (but I’d want to make a small breakout board for it, since it is a pain to work with on a breadboard). It might be worthwhile using one to detect the spokes of a wheel to get some feedback from the wheel.  (My son points out that he’d rather have an absolute angle output sensor at the pivot for the pan head, since wheel slippage makes wheel-based feedback potentially misleading.)

I tried measuring the stall torque by attaching a lever arm to the motor with an 3.2mm collet adapter.

Bilge pump motor with plastic arm having 5mm holes at 5cm intervals. (Actually the holes are 13/64″, as I didn’t have a 5mm drill bit.)

The collet does not hold the plastic very firmly—holding the collet still, the arm slips at about 0.3 Nm of torque (2N at 15cm).  This doesn’t limit the measurement though, because the motor stalls with about 1.6N of force on a 5cm lever, so about 0.08 Nm of torque (820 g-cm, 11 oz-in, 0.7 in-lb), when running at 12.94V and 5.5A.

Of course, what I really want to know about a motor is neither the no-load speed nor the stalling torque, but the rated speed and torque, where the motor is running with maximum efficiency. Manufacturers provide such data to their OEM customers, but the retailers of motors often don’t get the information or don’t pass it on to their customers. I found that Lynxmotion does, which is a strong argument for buying their motors.

This is the speed vs. torque plot (also the input current, output power, and efficiency curves) for Lynxmotion’s PGHM-1 motor, taken from their data sheet.

Note that the speed goes down almost linearly with the torque load, which I understand is pretty typical of these small brushed motors.  So we can model the speed  $\omega$ as a function of the torque $\tau$ with $\omega(\tau) = \omega_0 (1- \tau/\tau_m)$, with just two parameters: the no-load speed $\omega_0$ and the stall torque $\tau_m$.  It is this simplification that allows manufacturers to get away with reporting just two numbers.  Note that the output power curve can be computed from the product of torque (in N m, not kgf cm) and angular velocity (in radians/sec, not RPM). A straight line for the speed-torque curve would give a parabola for the power curve:  $P_{out}( \tau ) = \tau\omega_0 (1 - \tau / \tau_m )$ , with the maximum power output at half the no-load speed and half the stalling torque.

Note also that the current (for a fixed drive voltage) goes up roughly linearly with the load, so we can get a formula for the power input also: $P_{in}(\tau)= V A_m \tau /\tau_m$ .  Dividing the output power by the input power gives us the efficiency $\eta(\tau) = \frac{\omega_0 (\tau_m- \tau)}{V A_m}$ , which would be maximized at no load.  This doesn’t quite work, because the input power doesn’t go to zero with no load.  Adding a small offset for the no-load current gives us an input power of $P_{in}(\tau)= V ((A_m-A_0) \tau/\tau_m +A_0)$ and an efficiency of  $\eta(\tau) = \frac{\omega_0 \tau (\tau_m- \tau)}{V (A_m\tau -A_0 \tau + A_0 \tau_m)}$.  This would have a maximum at $\tau = \tau_m\frac{\sqrt{A_0 A_m} - A_0}{A_m-A_0} = \frac{ \tau_m}{1+\sqrt{A_m/A_0}}$ .

So we can get a decent estimate of the ideal load for the motor using the ratio of the stall current to the no-load current $A_m/A_0$.  For the PGMH-1 motor the parameters are 294 RPM no load, 157 mA no-load current, max torque ≈8.6 kg cm, stall current ≈3.3A, which would suggest a rated load of  $0.179 \tau_m$ or 1.54 kg cm.  The actual rated load, where the efficiency peaks, is 1.12 kg cm at 252 RPM, so our crude estimate using just straight line approximations is off by about 40%.  Still, that may be good enough for figuring out whether a motor for which we don’t have full specs is usable.

For the bilge pump motor, the optimum efficiency is probably at about $0.23 \tau_m$, or about 18.5 N mm (0.16 in lb, 2.6 oz in, 0.19 kgf cm) at a speed of about 1760 RPM.  It is estimated to be about 19% more powerful than the PGHM-1 motor at its rated load.  Given the uncertainty in the approximation, they are probably quite comparable in power. Is either powerful enough? (I’m still hoping my son will estimate the moment of inertia and power needed for the panning mechanism.)

They students in the robotics club wanted a panning speed of about 180°/sec with a wheel at the end of a 60cm arm moving about 190 cm/sec (75 in/sec). With the PGHM-1 at 252 RPM, the wheel size would need to be about 14.4 cm (using Lynxmotion’s wheel-speed calculator), but none of the wheels in yesterday’s post are that large.  With the bilge pump motor, the wheel size would need to be 0.8″, which is too small (particular if irregular terrain is considered).  The bilge pump motor could be geared down 15:4 to get about 470 RPM, which would be suitable for a 3″ wheel.  So now we need to look at what motors and gears are available.

# Motors

There are a lot of surplus motors on the market for low prices, but they often come with no specs at all (like the Mitsumi motors I have).  I’d like to have some assurance that whatever motor we buy has enough power for the job, but is small enough to be run by the HexMotor board.  (In a pinch, we could use an H-bridge on the HexMotor board to drive a pair of relays to get unmodulated forward-backward control of more powerful motors.)

### Johnson Bilge Pump Motor

Our measurements of the Motor 500 indicate a stall torque of 0.08 Nm  (820 g-cm, 11 oz-in, 0.7 in-lb) at 12.9V and 5.5A, a no-load RPM of 7590 RPM at 0.5A, and a probable rating of 18.5 N mm (0.16 in lb, 2.6 oz in, 0.19 kgf cm) at a speed of about 1760 RPM.  The motor weighs 7.4 oz and costs about $21 (including shipping). For about$6 more you can buy the bilge pump and throw the pump away, keeping just the motor.

Because the bilge pumps only run in one direction, it is possible that the motor is not designed symmetrically. We should measure speed and torque in both directions, to see if there is a difference.

There are other bilge pump motors in the same series (750, 1000, 1250) all for under $30. The numbers correspond to the gallons per hour of the pumps they are intended for, so should be linearly related to the power of the pumps. That is, I would expect the Motor 100 to have twice the power and require twice the current of the Motor 500. I don’t know whether the impellers are bigger for the bigger pumps (which would require more torque), they just spin faster, or they have both more torque and more speed. Since the stall current is already near the limit of the H-bridges for the 500, the larger motors would probably have to be used with relays. ### Lynxmotion I like the Lynxmotion gear motors, because they provide such nice data sheets on the motors. Most of their motors have 6mm shaft with a long flat on them, and they say that the motors are designed to be balanced to have equal performance in both directions. (A couple of the motors have 4mm shafts.) They have 5 planetary gear motors with max speeds from 14 to 300 RPM. We’ve already looked at the curves for the PGHM-1, which is the fastest of those motors, costs$37, and weighs 8.23 oz.

They also have 4 12v spur gear motors with max speeds from 120 to 253 RPM.  The fastest of these is the GHM-12 at $30, which has a rated load of 1.04 kgf cm at 224 RPM (about 17% lower than the PGHM-1) and weighs 7.26 oz. The Lynxmotion motors are particularly nice if you need low speeds. For example, if the motor were mounted directly driving the pan head, 180°/sec is 30 RPM, and the PGHM-04 at$32 with an optimum efficiency at 46.8 RPM and 9.28 kgf-cm looks promising (that’s more powerful than the Johnson bilge pump motor, I think).  It only weighs 3.59 oz. At maximum power it is still pretty efficient: 38.7 RPM, 12.73  kgf-cm, 1.83  AMP, 5.18 watts output,  24.11% efficiency.

Gear motors have to be stopped before reversing, but that shouldn’t be a problem in this application, I think, except, perhaps for fine positioning,

Batteryspace sells 3 12v gear motors, each for $12. They all use the same motor, but with different gear heads. Unfortunately, the Batteryspace.com specs for the motors are inconsistent, and I • 50 RPM no load with 0.12 oz-in (0.008 kgf cm) stall torque. • 200 RPM no load with 3.3 in-lb (3.8 kgf cm) stall torque. • 600 RPM no load with 0.7 in-lb (0.8 kgf cm) stall torque. With the same motor and different gear heads, the torque times speed should be roughly constant, but the 50 RPM specs are way out of line with the other two. Even the 600 RPM and 200 RPM specs differ by 60% in power. I don’t know which (if any) of these specs to believe, though it might be worth getting one of the motors ans testing it, since the price is lower than the other 12V gear motors I’ve looked at. ### Pololu and Solarbotics Pololu and Solarbotics each have some cute gear motors, but they are 3v motors, not 12v motors and so not desired for this project. They are probably also too low power. ### American Science and Surplus American Science and Surplus has two motors that we first noticed in their print catalog: • a 2500 RPM motor 1.3A no load, stalls at approx 9.5A. No torque information given, but the power consumption suggests about twice the power of the Johnson Motor 500. “Output is through 1/8″ sq x 5/8″ deep ports at the front and back of the housing (we’ll include (2) short, square shafts to get you started).” The motor is a bit bigger than the others we’ve looked at, being 5″ long. It only costs$12.50 (plus shipping).  The square shaft might be difficult to connect things to—all the pinions I’ve seen so far expect round shafts with a flat.
• a 190RPM motor

• draw 1.5A no load, and stall at approx 25A.
• Threaded shaft is at a right angle and is 4-1/8″ x 7/16″. Shaft thread is non-standard, so treat it as a smooth shaft and mount pulley or gear with a setscrew.
• Measures 5-5/8″ x 2-1/2″ x 2-1/2″ overall, not counting the shaft, and has power terminals opposite the gearbox with (2) 1/4″ mounting holes opposite the shaft.

That shaft is pretty big and we might have a hard time finding something that would fit it.

# Gears

If they decide to use the bilge pump motor, it will need to be geared down a lot (more than 3:1).  The simplest way to do this is with a pair of gears.  A pinion gear is mounted on the motor shaft with a set screw, and a larger spur gear is attached to the wheel.  Note: this seems to be the terminology used in the online catalogs, though so far as I can tell “pinion” properly refers to function of a gear as a driving gear and “spur” refers to the teeth being parallel to the axis of the shaft (and not slanted, as would be used with a worm gear drive).

There are some real cheap gears on Amazon (24 gears for $8, 6 each of 40, 30, 20, and 12 teeth), but these are plastic gears to press onto a 2mm shaft, and would be difficult to use on the larger shafts of the motors we are looking at. They probably also couldn’t handle the torques. If you were doing something with the sort of 1.5–3V motors that Radio Shack sells, they might be quite suitable, as those motors have 2mm shafts. The Tamiya gearbox kits are cool and cheap, but they have built-in 3v motors and are unlikely to be sturdy enough for this application, even if they could be modified to accept a bigger motor. Tower Hobbies has a wide selection of pinion gears in 32P and 48P pitches. The pitch is the number of teeth on the gear divided by the gear diameter in inches, so a 16-tooth (16T) 32P pinion would have a diameter of 0.5″. (Note: metric sizes use “module” numbers instead, which are the diameter in mm divided by the number of teeth. 32P would be module 0.7938, so the closest metric size is module 0.8.) The 32P gears are sturdier, so let’s look at them. The Robinson Racing pinions are the cheapest at$3.69 each and they come in every size from 9T to 21T (here is the link for the 15T pinion). They are spec’ed as 1/8″ (3mm), so should fit on the bilge pump motor’s 1/8″ shaft.  Going directly to Robinson Racing gets a wider selection at slightly lower prices ($3.50 for the unhardened pinions 9T–22T,$4.95 for the hardened pinions 9T–23T).

Tower Hobbies also has pinions for 5mm shafts, if we need them.

Tower Hobbies has 32P spur gears in sizes from 48T to 72T (though not every size, unlike the pinion gears).  The plastic spur gears run about $2.80 (for the Traxxas brand) to$6.79 (for the RJ Speed brand) and have holes for attaching them to wheels, but different spur gears have different hole patterns.  Steel spur gears are available, but only in a few sizes and at about $24 apiece. The Kimbrough Racing Products 32P spur gears come in every even size from 44T to 54T, 60T to 66T, and 64T to 72T, costing$6 each.  The hole patterns look like they could fit a number of different wheel styles, but no specs are given on the hole pattern, so some guessing or measuring from photos may be needed to see if they would fit wheels other than the rather expensive ones they are designed for.

# Bottom line

The bilge-pump motors are looking like a surprisingly good deal.

## 2012 July 31

### Robot wheels

Filed under: Robotics — gasstationwithoutpumps @ 22:46
Tags: , , ,

The robotics club has continued building their automated foam-dart shooter (which I won’t call a Nerf gun any more—not because I fear trademark infringement, but because it won’t take Nerf-brand foam darts, needing the ones for the NXT generation crossbow).  After getting a Lego prototype of their pan-tilt mechanism working, they’ve been building a sturdier one out of PVC and plywood.  For the pan mechanism they wanted a wheel that was runnable off the 12v battery and controlled by the HexMotor board. Initially they built something using a small 12v motor I had (a Mitsumi M38E-3SC) for which I’ve been unable to find any specifications, other than the 2400RPM and 12V on the label. I did find bunch of specs for other motors on Mitsumi’s web site, but this motor has apparently been discontinued, and the manufacturer has no interest in keeping historical specs on their website.  (I wish more manufacturers would, since it makes it easier to find out the specs for surplus and recycled parts, which in turn allows finding the closest currently manufactured model.)

They mounted the motor with the pulley on the shaft rubbing against a caster wheel, which spun nicely with no load.  Unfortunately, even the weight of the motor pressing the caster wheel against the floor was enough to stall the motor.  (Based on the other Mitsumi motors, I’m guessing that the motor has under 80 mNm of torque.)  We need to get a more powerful motor, but how powerful and how fast a motor?  Today we looked at the design from first principles and started trying to spec the motor and wheel.

They decided that they wanted a panning speed of about 180°/sec.  They’re panning to do this by mounting a wheel at the end of a 60cm arm, so the wheel needs to move at about 190 cm/sec (75 in/sec).  With a 3″ diameter wheel, that  would require a shaft turning at about 470 RPM (a 1″ wheel would need about 1420RPM). If you have any trouble with this easy calculator computation, you could use Lynxmotion’s wheel-speed calculator. They could either get a faster motor and gear it down, or buy a gear motor that has about the right speed and is already geared down.  There are a lot of hobbyist motors and gear motors on the market, but a lot of them are made for RC vehicles, and so run at 6v or 7.2v instead of 12v, or for kid’s toys and run off 3v.  The 12V motors tend to be marketed for the automotive and marine market and are heftier and pricier (except for oddities, like the surplus Mitsumi motors).

How much torque do we need?  We tried pulling on the arm with a force gauge to see what it took to move it, but we couldn’t measure forces that low (under 0.1 N).  Of course, moving it at speed will require more torque—I should probably set my son the task of estimating the moment of inertia and determining how much torque would be needed to swing the mechanism from motionless in one position to motionless 180° away in a second.

Obviously we need more torque than we can get from the Mitsumi M38E-3SC, but how much is that?  We measured the stalling torque by taping a string to the caster wheel and measuring the force with the motor stalled but pulling on the string.  We measured about 0.7N and the wheel had a 5cm diameter, so the stalling torque was about 0.0175±0.003 Nm.  Unfortunately, very few motors have their torques reported in SI units.  Instead, weird units like in-lb, oz-in, and kg-cm are used.  Translating, the stalling torque for the motor is about 0.15 in-lb, 2.5 oz-in, or 180 g cm. (Rather than remember or look up all the conversion factors, I used an online calculator for the unit conversion.)

Any motor with less than 5 times that much torque (0.88 Nm, 0.75 in-lb, 12 oz-in, 900 g cm) is probably unusable, and we may need a much higher torque.  Keep in mind that the torque when the motor is stalled is usually much higher than torque at the rated load (which is typically at the maximum efficiency point for the motor).

I looked for wheels, gears, and motors for several hours today, in order to give the students in the robotics club some reasonable choices to consider.  In this post I’ll just discuss the wheels, not gears or motors.

# Motors

I said I wouldn’t discuss motors, but I’ve already made one exception for the Mitsumi motor that stalled.  We also currently have a spare 12v bilge-pump motor with a 1/8″ (3.2mm) shaft which is intended for a 500 GPH bilge pump.  I have no idea what torque it is capable of nor what speed it runs at.

We should be able to measure the speed with a light and a photodiode—this might be a good time to use a Fairchild QRE1113 reflectance sensor (I bought a couple for an idea I had for the circuits course, but that idea is not currently looking too promising).  I think that the flat on the shaft of the motor should change the reflectance enough that we should be able to get a good pulse out of holding the reflectance sensor a couple of millimeters from the rotating shaft.

Measuring the torque is harder (says the ex-computer engineer—electronics is always easier than anything mechanical!).  We’ve got some 3.2mm collet adapters which could give us a 5mm shaft to tape a string to and the outside collar of the collet has a 1.2 cm diameter.   I suppose if we need a longer lever arm to reduce the force, we could drill a 5mm hole in something and clamp it on with the adapter.  We certainly have plenty of spring force gauges, so we should be able to find one that has a reasonable range.

# Wheels

There are a lot of pre-made wheels on the market, and there are some wheel systems that allow robot designers to match their needs for shaft size and wheel size with a standard hub in the middle.

## 2012 May 7

### Kids on Campus

Filed under: Robotics — gasstationwithoutpumps @ 12:25
Tags: , , , ,

Our local community college each year has a number of programs for kids (some for kids as young as 10 years old:  Kids on Campus – Cabrillo College Extension.

My son has outgrown these courses, and his 4 weeks of theater summer camp will make it difficult for him to register for any of the regular Cabrillo college courses.  He did take one of them several years ago: a Lego Robotics course using Logo and the old Lego Dacta serial interface board.  The same course appears to be offered this summer, with the same teacher.  Neither he nor I can remember now whether he had one week or two of using the serial interface—he does not even remember programming in Logo for controlling Lego motors.  I thought at the time that it was a pretty good course, and a nice variant on the mainly visual programming languages then available for Lego robotics.  (He has used a couple of those languages and NQC for programming Lego robots, though now he does most of his robotics programming in C++ on the Arduino, with Python and PySerial to communicate from a laptop.)

So far as I know, UCSC has not attempted to do much with education for children, other than the Seymour Center at the Long Marine Lab and the COSMOS program for high schoolers (which I discussed in a blog post about improving the science fair participation by high schoolers).  There are a lot of summer camps for kids on the UCSC campus, but most of these are from 3rd-party providers (like most campuses, they try to get money out of the dorms on a year-round basis).

## 2012 May 5

### Busy week(s)

My son and I have just finished a busy week, and he has another busy week coming up.

Last weekend (April 28 & 29) he had 3 performances of a “Fringe Show” with his teen acting class. The Fringe show consisted of 13 pieces selected or written by the students.  He was in three pieces: a deadpan rendition of “Sexy and I know it” as if it were an academic lecture (which some audience members told me was the funniest piece in the show), the father in Shel Silverstein’s The Best Daddy (which he also directed), and a non-speaking role as a hallucination in a short play written by one of the other students [Correction: he also had an off-stage voice part in that play].  This performance was just one week after an improv show that he (and several of the other cast members) was also in, so he’s been pretty busy with theater lately. I don’t have pictures from the shows up on his theater page yet—I’ve not had time to select, crop, and edit them.

The fringe show was unusual in that the cast on stage had six male and six female actors—locally there are usually far more girls interested in acting than boys, so the gender parity was notable for its rarity. It was also one of the best teen shows I’ve seen (though West Performing Arts has put on several good teen productions).

Right after the Sunday matinée, we had to hurry home to get a ride to the airport, to fly to Los Angeles for the California State Science Fair.  I already blogged about CSSF this year, and I don’t have much to add.  We missed the awards ceremony on Tuesday, but competition was stiff enough in his category that he didn’t get an award this year anyway.

The reason that we missed the awards ceremony was that we had to catch a plane to Oregon, to join his dramatic literature class’s trip to the Oregon Shakespeare Festival in Ashland.  I’ll do a separate post on the workshops, plays, and other activities later, when I’m more awake.  Suffice it to say that Wednesday through Friday we had 4 workshops, 4 plays, 4 “prologues”, a couple of meetings with actors, and the 8–9-hour bus ride home.

Today, we caught up a little on sleep in the morning, then spent 3 hours with the robotics club at the Simpkins Swim Center trying to get the underwater ROV to work, because the regional MATE competition is next week.  Tomorrow will be another robotics club meeting, for “dry dock” work on the ROV.  I also have to empty about half my garage, so that the garage door can have its hardware replaced on Wednesday.

Next week he has a return to Spanish class (catching up on the missed week), a meeting with the consultant teacher, 2 AP tests (Calculus BC and Physics C:Mechanics), the last meeting of his dramatic literature class, his home-school physics class, and the MATE underwater ROV competition. I’ll be doing the meeting with the consultant teacher, the physics AP exam, the physics class, and coaching the ROV team, plus an oral exam for a grad student and perhaps a couple of other meetings.

After that, things calm down a little, with him having just Spanish, physics, and finishing up the writing assignments for the dramatic literature class, and me being able to get back to my research.

## 2012 April 13

### Busy weekend coming up

Filed under: Uncategorized — gasstationwithoutpumps @ 15:36
Tags: , ,

There is a very busy weekend coming up 2012 April 21–22.  There is no way that we can do all the things that we might want to that weekend.  Here are a few of the things that appear on my calendar:

• Robogames all weekend in San Mateo.  In addition to the well-known “combot” robot fights, there are lots of other design competitions (soccer, stair climbing, robo sumo, weight lifting, …)
• Stanford Splash: “Hundreds of volunteer Stanford students and community members get together for a single weekend to teach anything they want to students from all over California.”  It looks like they have a couple hundred classes in 9 different fields:
• Dinosaur Prom Improv. This is the teen troupe my son performs with. They have a show about every 6 weeks at the Broadway Playhouse. Their show is 6pm on Sunday 22 April.
• Santa Cruz Robotics Club.  This is the team of 10th and 8th grade students I’m coaching for the MATE underwater remotely operated vehicle competition. They are doing some real robotics: putting in feedback loops for control of depth, pitch, and heading, with an Arduino in a dry box on the vehicle.  The club meets in my living room (which looks more like a basement workshop at the moment)—they’re getting close to deadline, so I don’t think that we can skip a meeting.
Next Page »