Gas station without pumps

2017 November 8

Gearhead motors for mechatronics

Filed under: Robotics — gasstationwithoutpumps @ 14:05
Tags: , , ,

I have already selected and purchased the gear motors I plan to use for the robot in the mechatronics course.  They come with shaft encoders, metal mounting brackets, and wheels, and cost me $25.51 for two motors with shipping from AliExpress.  The specs sounded very promising:

Wheel diameter: approx. 65mm
Shaft diameter: approx. 4mm
Voltage: DC 6V
Speed: 210 rpm
Encoder motor end: 11 signals
Rated voltage: DC 6V
No-load speed: 210RPM 0.13A
Max efficiency: 2.0kg.cm/170rpm/2.0W/0.60A
Max power: 5.2kg.cm/110rpm/3.1W/1.10A
Stall torque: 10kg.cm 3.2A
Retarder reduction ratio: 1 : 34
Hall resolution: hall x ratio 34.02 = 341.2PPR

I did some testing on the motors earlier and found that they do not meet the specs given on the web site at all.

The gear ratio is 2 (11/5)^3 = 21.296, determined both by comparing turns of the shaft to encoder counts and by counting teeth on the gears, not 34. I was a bit leery about disassembling the gearbox, but I managed to take it apart and put it back together without mishap.

The encoders do give 11 pulses per motor shaft revolution, but that translates to 234.256 pulses per output shaft rotation, not 341.2. With four edges in the quadrature encoding, I could, theoretically, measure rotation with a resolution of 0.384°.

At 5.99V, the no-load current is 64mA and the shaft speed is 189.4 rpm (determined from the gear ratio and the frequency of the encoder ticks).

I did not measure stall torque, but stall current was 1.3A at 5.72V, for a resistance of 4.4Ω, which would be about 1.36A at 6V, not 3.2A.  I should be able to estimate the torque, if I assume a gearhead efficiency of about 50%, which seems to be typical for cheap gearhead motors. Using natural units (Nm/A or V s/radian) for the motor coefficients, I have Ke≈0.3 Vs/radian, so Kt≈0.15 Nm/A, which would provide a maximum torque of about 0.2Nm (28 oz in or 2 kg cm) at 1.36A. I refined this estimate a little using gnuplot (still with the 50% efficiency assumption).

The stall torque was not measured, but was estimated at 0.1 Nm (1.9 kg.cm) assuming a 50% gearhead efficiency.

Since I plan to run my motors at 6V, not 12V, this motor is near the middle of the current range that Gabriel Elkaim suggested in class, though I’m near the high end for rpm, so torque may be less than desirable for moving the robot.

I have thought about two ways of installing the motors:

Here is a view of motors mounted on MDF, assuming that the motors will be on top of the board. The MDF has about 8~mm of clearance from the floor.

An alternative mounting scheme with the motors below the MDF.

I believe that I will install the motors above the MDF, since that would put optical sensors for tape very close to the floor (improving signal-to-noise ratio) and allow me to mount battery and other power electronics on the same level as the motors, keeping the center of gravity low.

If the motors are placed between the wheels as close together as possible while staying coaxial, the space between the tires is about 13.5cm and the outside edges of the tires are about 19cm apart. If the wheels are not outboard, then 3.5cm by 6.5cm wheel wells will need to be cut in the MDF, with 13cm between the inner edges of the wells.

2013 June 30

Robots in physics

Filed under: Robotics — gasstationwithoutpumps @ 13:34
Tags: , , ,

I just watched the Global Physics Department of Matt Greenwolfe showing his use of Scribbler 2 robots as physics education tools.  See also Matt Greenwolfe’s blog, starting with The Robot Lab (formerly known as the Buggy Lab). It may be easier to get the content from the Matt’s blog posts than from the Global Physics Department recording, which had a lot of technical difficulties.

Scribbler 2 robot.  Picture copied from the Parallax web site that sells the robot.

Scribbler 2 robot. Picture copied from the Parallax web site that sells the robot.

He did some modifications to the code for the Scribbler 2 to provide precise control of the robots (1 mm/sec velocity and 1 mm/sec/sec acceleration accuracy) and made some nice graphical interfaces for students to control the robots with x vs. t, v vs. t, and a vs.t plots (plus one interface that does 2D motion).

One big problem with the Scribbler 2 was the limitation to about 18.5 cm/s velocity, which is pretty slow. The cool thing about them is that they have wheel encoders that allow 0.491 mm resolution with 507.4 counts per revolution. One limitation that is a complete deal killer for me is that the Scribbler 2 library is only available for Windows machines, so porting to a Mac platform would be a major effort.

I was looking to see whether one could easily build such a robot from easily available parts. One cool new part is an integrated wheel, motor, controller, and shaft encoder called the HUB-ee (available for $35 from SparkFun):

The HUB-ee is a type of robot servo but designed for wheels, in fact it is a wheel, but it is also a motor, a sensor and a motor controller. What’s that? Did we just blow your mind?
When you want to add wheels to your robot you would normally start with a whole collection of parts: The motor and gearbox, a motor driver board, and maybe some sensors for measuring wheel speed and a controller to count revolutions or provide closed loop speed control. Well, the folks over at Creative Robotics thought it would be handy if you could just buy a wheel that had all of those things built in, so they designed HUB-ee – just bolt it onto a chassis, apply power and away you go!
The HUB-ee is easy to mount, too! There are two threaded inserts for M3 bolts built in, there’s also a right angle bracket included for situations when you can’t go horizontal into the chassis. The mounting holes are even LEGO® lug compatible!! HUB-ee uses Micro-MaTch connectors to keep electrical connections tight and easily changed, check out the related items for mating connectors.

HUB-ee wheel picture copied from Sparkfun web page

HUB-ee wheel picture copied from Sparkfun web page, which says that images are licensed by CC BY-NC-SA 3.0.

The HUB-ee has a resolution of 128 counts per revolution of the wheel (1.473 mm resolution, 3× the step size of the Scribbler 2). The HUB-ee runs at 120rpm no load at 7v, which would be 37.7 cm/s, about twice the speed Matt reports for the Scribbler 2.

Although Matt reports 18.5 cm/s, the Parallax spec for the Scribbler 2 claims up to 80RPM, which would be 33.2 cm/sec, but that is probably with a 12V power source, rather than 6AA batteries. I suspect that Matt’s need for very precise control and operation with batteries limited the top speed he could use.  He does say that he would have liked a voltage controller (which would have added a $3–15 part cost to the robot, so a $7–40 increase in retail cost, based on the designs by TI’s WebBench tool or the PTN78000W module from TI) in order to have better speed control without having to worry so much about keeping the batteries fully charged.

The Hub-EE takes up several pins on a microcontroller (1 PWM pin, 2 output pins to control direction, 2 input pins for the quadrature encoder feedback) in addition to power and ground.  Two HUB-ee wheels would cost $70 and use 10 pins on a microcontroller—doable with an Arduino, but not leaving a lot of pins for other functions like sensor inputs.  There aren’t enough interrupt pins on the standard Arduinos to have all 4 wheel encoder pins triggering interrupts (which would be the highest-precision way to use the feedback information to get precise motor control).

Internally, the HUB-ee wheels use a Toshiba TB6593FNG motor controller, an H-bridge designed to work with 1.0A average current, with an on-resistance of about 0.35Ω for the output low.  The Toshiba data sheet doesn’t give the on-resistance of for high voltages directly, but if I’m interpreting their “Vsat” parameter directly, the on-resistance for each leg is about 0.5Ω, about a sixth that of the popular L293D H-bridges.  At under $3 a H-bridge (in single units), the TB6593FNG does not look like a bad choice for a small H-bridge.

Of course, to use the HUB-ee, one would have to build the rest of the robot (chassis, microcontroller, battery, … ). The Hub-EE is designed to mount to Lego beams, which could make chassis building easy, at least for prototyping.

I wonder whether, in a couple of years, we’ll be seeing integrated wheel units like the HUB-ee with an SPI interface, with registers that say how many steps to make, with specified velocity and acceleration curves.  That would provide very simple interfacing with fewer wires and could allow much tighter servo loops, at the price of putting a microcontroller at each wheel (probably adding $10 to the retail price of the wheels).

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.

BaneBots wheel system

The BaneBots wheel system has wheels that are 0.4″ or 0.8″ wide with hexagonal hubs that are 0.5″ or 0.75″. For example to drive a 2 7/8″ (73mm?) wheel from a 4mm motor shaft could be done with a 0.4″-wide 1/2″ hex hub for a 4mm shaft  ($4), then a 2.875″D 0.4″ wide wheel ($3).  To hold the wheels on the hubs requires a snap ring (included with the hubs), which means buying some snap-ring pliers ($5) as well.

Here is the description from the RobotShop web pages (Trossen Robotics has a nice summary of the BaneBots system with pictures, but their prices are not as good as Robot Shop):

The BaneBots Wheels were conceived for absolute versatility. They are constructed with a thermoplastic rubber tread bonded to a black polypropylene core making them light weight and durable while providing excellent traction. The variety of sizes and mounting options make it easy to find the wheel (or combination of wheels) that meets your needs. These wheels offer a low cost solution that is durable enough for a combat robot yet still light enough to be practical. These wheels can be used both indoors and outdoors and are maintenance free.

Wheels are available in various tread durometers (hardness):

Green Rubber tread: 30 Shore A (soft and “semi flexible”)
Orange Rubber tread: 40 Shore A (medium)
Blue Rubber tread: 50 Shore A (hard and “stiff”)

Standard low profile hubs and bushings are available supporting shaft sizes from 2mm up to 1/2″ in both drive wheel and caster applications. Wheels can be mounted one, two, or even three wide. Mounting two or three wheels to the same hub gives the flexibility of creating wider tread or mixing different durometers. The hubs and bushings offer even more versatility, allowing you to connect to metric (2mm, 3mm, 4mm, 6mm) and imperial (1/8”, ¼”, 3/8”, ½”) shaft sizes.

0.4″ Wide x Diameter:

Diameter: 1-3/8″ 1-5/8″ 1-7/8″ 2-3/8″ 2-7/8″
Green ½” Hex ½” Hex ½” Hex ½” Hex ½” Hex
Orange ½” Hex ½” Hex ½” Hex ½” Hex ½” Hex
Blue ½” Hex ½” Hex ½” Hex ½” Hex ½” Hex

2-7/8″ Diameter x 0.8″ Wide:

Green ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished
Orange ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished
Blue ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished

3-7/8″ Diameter x 0.8″ Wide:

Green ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished
Orange ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished
Blue ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished

4-7/8″ Diameter x 0.8″ Wide:

Green ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished
Orange ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished
Blue ½” Hex ¾” Hex 3/8” Key ½” Key 3/4” Bushing Unfinished

Lynxmotion wheels

The Lynxmotion wheel system also consists of hubs and wheels, but in a smaller variety than the BaneBots system. They also sell all their hubs and tires in pairs, so we’d be buying 2 hubs and 2 tires. Lynxmotion has 3 hub styles: universal hub (for 4 of their wheel types), 12mm hex hub (for one truck wheel), and mounting hub (for 7 of their wheel types). All the hubs are $8 for a pair of hubs.

I believe that we would be most interested in the cheapest and most versatile of their systems: the mounting hubs (which are for 3mm, 4mm, or 6mm shafts) and NFT-01 through NFT-07 neoprene foam tires.  The tire diameters are 1.5″ ($3.87/pair), 1.75″ ($4.10/pair), 2.25″ ($4.64/pair),  2.5″ ($4.86/pair), 2.75″ ($5.13/pair), 3″ ($5.36/pair).  Both the BaneBots and the Lynxmotion systems come to about $7 a wheel for the larger sizes (around 3″), but Lynxmotion requires buying in pairs.

The universal hubs (which are used with their more expensive wheels) are interesting in their own right, since they provide 4 tapped screw holes in the aluminum hub, to which anything could be mounted with the 2–4  4-40 screws.  They even include 2 5/8″×4-40 screws for each hub and an Allen wrench that fits them. The universal hubs come in 3 shaft sizes: 4mm, 6mm, and 1/4″.

If the robotics club decided that they wanted a 6″ diameter wheel, they could turn one on the lathe and mount it with universal hub.  Better, they could mount the hub to the rough blank then turn that on the lathe, to make sure that the wheel is properly centered.  Of course, to do any of this we’d first have to clear all the clutter around the lathe (which I haven’t used for 20 years), and I’d have to get a headstock mount drill chuck ($30) and an adapter ($15), since my lathe has a 3/4″ × 10tpi headstock and most lathe accessories now expect 1″ × 8 tpi.

Solarbotics wheels

Solarbotics makes 2-5/8″ diameter wheels for $4 that fit on 3 mm D-shaped shaft and on their double-flat 3mm shaft that is the output of their gearboxes.  It seems to be cheaper to get the wheels from Pololu ($3.50).  Pololu also makes gearboxes that can drive the wheels that are a bit cheaper than the Solarbotics gearboxes.  Unfortunately, neither Pololu nor Solarbotics goes in for 12v motors, and their little 3V motors and gearboxes may not be suitable for this application.  I’ve not seen any adapters for mounting the Solarbotics wheels on larger shafts.

Tamiya wheels

Tamiya, best known for their wide selection of toy gearbox kits, also makes wheels.  The wheels are cheap, but only fit on the Tamiya 3mm hex shafts.

Pololu wheels

Pololu sells wheels that fit their 3mm D shafts and onto the outputs of Solarbotics gear motors.  The wheels come in 3.2cm ($7/2), 6cm ($8/2), 7cm ($8.50/2), 8cm ($9.25/2), and 9cm ($10/2) diameters.

Pololu also makes universal hubs with 4-40 tapped holes, for 3mm ($6/2), 4mm ($7/2), 5mm ($7.50/2), and 6mm ($8/2) shafts.  This looks like a slightly cheaper way to get a universal hub than the Lynxmotion ones. The 6cm and larger wheels have 2 holes that can be mated with the holes in these universal hubs, so the Pololu wheels can be put on other shaft sizes for $7–9 a wheel, depending on wheel and shaft size (similar to the prices for BaneBots and Lynxmotion wheel systems).

Bottom line

It looks like we can get wheels for 3mm, 4mm, 5mm, and 6mm shafts with diameters from 3.5cm to 90cm for $7–9 a wheel.  We can also use universal hubs to mount home-made wheels onto those shaft sizes.

%d bloggers like this: