Gas station without pumps

2017 November 20

Track-wire detector sensitivity

Filed under: Robotics — gasstationwithoutpumps @ 20:52
Tags: ,

I tried out different inductors today, and found that I got the best signals with an RLB1314-103KL 10mH inductor (better than the RLB0812-103KL 10mH inductors that came with the class parts kit).  The difference is mainly in the ferrite core—the RLB1314-103KL is rated for 135mA instead of 34mA, though the DC resistances are not very different (32Ω vs. 39Ω).

Both larger inductors (100mH) and smaller ones (100µH) produced less signal in tuned tanks, and the 100mH inductor needed such small capacitors that it was very sensitive to detuning from parasitic capacitances.  It also picked up a lot of noise when it was not close to the track wire.

With a tuned tank circuit, I got the following signal as a function of distance from a track wire that had 180mA pulses at 25kHz:

The inductor was oriented so that the turns of the coil were parallel to the track wire, with the near edge of the coil at the specified distance from the track wire.

I expect to have the track-wire detector about 10cm from the track wire about 3″ high (centered on the 6″ length of the track wire), which means that I can expect signals to reach a maximum of about ±55mV.  If the robot is 3cm closer, then the signal would increase to ±97mV.

I plan to amplify just the positive excursions, to avoid having to have a virtual ground circuit and to avoid recentering .  So my amplifier should have a gain of around 30 at 25kHz, to get sufficient signal for a good SNR into the ADC without clipping.  That’s a bit too much to ask of a single stage of an op amp with a gain-bandwidth product of only 1MHz, so I’ll do two stages.  The first stage needs to be non-inverting, to avoid loading the tank.

I can increase the Q of the amplifier by using a (shielded) LC tank for one of the feedback elements, though I need to measure the impedance at 25kHz in order to set the gain appropriately.  A 100uH inductor in parallel with a 470nF capacitor peaks at only 655Ω, but a 1mH inductor in parallel with a 39.6nF capacitor (33nF||6.8nF) peaks at 3.07kΩ.  If I try to get a gain of 10 in that stage, I’d need a resistor to ground of about 300Ω.  The second stage could have an adjustable gain of 1 to 6, by using a 10kΩ potentiometer as feedback and a 2kΩ resistor to ground.

Possible schematic for track-wire detector, using a shielded tank circuit in the feedback of the first stage to get more noise rejection.

I’ll have to breadboard and then solder up this detector, leaving L1 not permanently connected until I’ve got locations for the board and the inductor—I’ll probably be putting the inductor near the edge of the robot just below whatever firing mechanism I use for the AT-M6 targets.


2017 November 19

Track wire sensor

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

In Large inductor revisited, I suggested that using a 100mH inductor should produce larger signals than a 10mH inductor, based on my tests with a heavy 370mH inductor.  I got a couple of 100mH inductors  (RLB1014-104KL) on Friday and tried playing with them last night.  The inductors are specified to be 100mH±10% and 300Ω max, but the one I measured appeared to be only 80mH (though the 300Ω seemed accurate enough).  I measured it two ways:

  • Using the Analog Discovery 2 impedance meter with a 0.1% resistor as a reference impedance.
  • By making a tank circuit with a capacitor and fitting a model to the observed magnitude of impedance.

Over the frequency range we are interested in, the inductance was a pretty consistent 80mH.

The tank circuit was also best fit by about 80mH, even when the fitting was started with L=100mH and C=400pF.

I’m wondering whether the lower-than-expected inductance means I was saturating the ferrite core.  I was testing with a ±1V sine wave, which translates to about ±3mA, and the inductor is supposed to saturate at about 40mA, so a 20% reduction in inductance seems a bit much.

As can be seen in the plot of the tank impedance, I tuned the LC resonator pretty close to 25kHz. To my chagrin, this inductor did not seem to work any better at detecting the track wire than a similarly tuned 10mH inductor (which I already had 3 of).  I probably should redo the tests with careful measurements—if the magnetic near-field drops as 1/r2, then small differences in distance matter a lot.

So why did my test with the heavy 370mH inductor seem to work better?  My conjecture now is that the number of turns of wire and the self-inductance are not really the deciding factor in determining how big the signal is. Perhaps the increased resistance of the larger inductor cancels the expected increase in voltage.

Perhaps the shape magnetic field as determined by the shape of the core is most important.  The 10mH and the (nominally) 100mH inductors both have drum cores:

The drum shape is designed to bring the field lines close to each other to reduce radiation from the inductor.  Other core shapes do a better job of this (toroidal cores and cores that encase the inductor), but the drum shape is the cheapest to wind.  But that is the opposite of what I want, as I’m using the inductor to pick up the magnetic field from the 25kHz track wire.  I’m not interested in maximizing the self-inductance of the coil, but the mutual inductance between the coil and the track wire.

I’m now wondering if a longer hand-wound air-core inductor would give me a good signal at a larger distance, since it would not be concentrating the field lines so closely.  There is no way that I’m hand-winding a 100mH inductor (1000s of turns), but a 100µH inductor seems feasible (60–300 turns, depending on the size of the bobbin I wind it on).   I could easily build a resonant circuit with a 100µH inductor and about 400nF of capacitance—I could even get away with only 10µH.  But I still believe that a larger inductor should give me more current at a given distance from the track wire, and I’m not sure that 100µH is going to give me enough mutual inductance.

I do have a 100µH inductor with a similar ferrite core to the 10mH inductor I used, so I could do a test to see whether I get very different signals from the 10mH and the 100µH inductor (each tuned to resonate around 25kHz).

I don’t know whether I’ll bother winding a coil—it would only be for my own learning/amusement, as it would not advance the construction of the robot at all.  In fact it would be fastest just to rebuild the circuit I made for the track-wire detector of Lab 1 (perhaps adding a shielded LC tank for one of the feedback elements to increase the Q).

2017 November 18

Four tape sensors made

Filed under: Robotics — gasstationwithoutpumps @ 15:01
Tags: , ,

I decided to make the tape sensors be as simple as possible, without switching the IR emitter on and off.

The tape-sensor boards have three ports: power, ground, and voltage output. The 220Ω resistor means that about 10mA is used at 3.3V and 18mA at 5V.

I soldered up four copies of this design today (all the TCRT5000L parts I had—I’ve ordered more that should be here early next week).

The three ports are color-coded male header pins on the top of the board. The TCRT5000L is mounted on the reverse side of the board.

I drilled holes for M3 bolts in the corners (the perfboard came with M2 holes) on the corners of  a 0.5″ by 9″ rectangle. M3 may be a bit big, but I only thought of that after drilling one of the boards.  I have both M2 and M3 bolts, and I also have M2 screws, which I’ll be using for fastening servo horns to MSF—I could have used M2 screws for mounting the tape sensors also.

The initial design was a little bit smaller, as I have 22kΩ resistors that are the same size as the 220Ω resistors here, but I had to squeeze in the larger 10kΩ resistor on the first prototype I made when the 22kΩ resistors proved to have too much gain at some distances from black electrical tape, so I ended making the whole thing be longer than necessary.  The boards are about 20mm by 34mm, but I could trim them down if needed to about 14mm by 28mm (and cut off the corners that don’t have mounting holes).

I tested the boards after soldering them, and they all seem to be working.  This design is only good for robots that run very close to the floor—the working distance for sensors as digital sensors is less than about 1.4cm.  (Analog sensors with synchronous sensing could probably go to 5cm or more, using one of the designs in Tape sensors).

Checking out the new gearmotors

Filed under: Robotics — gasstationwithoutpumps @ 09:07
Tags: , ,

Last night I did some quick checks of the new 210 rpm and 300rpm motors (one of each).  The new 210rpm motor seems to be substantially the same as the ones that came with the wheels, but the 300rpm motor is indeed faster.  I assumed that the difference in speed would come from a difference in the gear box (same motor but different gear ratio), but instead it seems to come from a different motor on the same gearbox.  The 300rpm motors have a lower DC resistance and so take more current at the same voltage.  That shifts the speed-vs-torque line upward, giving more free-running speed and more stall torque.  The cost, of course, is that they take more current to provide the extra torque.

It may be worthwhile for me to use these beefier motors in my robot, since I can PWM to lower speeds, and the torque-per-amp seems to be about the same for the two motors (assuming that the gearhead efficiency is the same).  One of these days I’ll have to build myself a stand for testing running torque and stall torque on my motors and characterize them properly—but probably not until after mechatronics is done, as the details of the motors are not on the critical path for completion.

2017 November 17

Hardware obtained today

Filed under: Robotics — gasstationwithoutpumps @ 19:56
Tags: , , ,

In addition to working on the circuits for the tape sensors, I went to the hardware store to get some threaded rod for clamping the layers of my robot together.  I found an old pice of 8-32 threaded rod around the house (left over from the days of the robotics club 5–6 years ago), and I realized that ¼” rod was way bigger than I needed, so I’m redesigning around 8-32 threaded rod instead.  I only had 3 feet of the rod, so I went to the hardware store to get more 8-32 threaded rod and some acorn nuts to go on the ends.  While I was there I also got some M10 nuts and E clips, for keeping the ballpoint set screws in place.

It turns out that 8-32 acorn nuts are only 6.5mm high, so there should be enough clearance under the robot for the acorn nuts.  I could probably have used them (or slightly larger 10-24 acorn nuts) as skids rather than the $6.01 M10 ball-end set screws, but I’ve got the set screws, so I might as well use them.

When I got the rod home, I cut the old one and part of the new one into 11″ pieces with bolt cutters, then ground the ends smooth and slightly rounded with a wet wheel.  I checked the length of each one with acorn nuts on the end, to make sure it was a couple of millimeters short of 11″, so that when mounted on the bot, the tips of the acorn nuts on top should just be at at 11″.  I had to grind a mm or two off of some of the rods to make them the right length—cutting with bolt cutters is not very precise, as it squishes a few mm of the rod, which then gets ground off.

Here are the 8-32 rods with the nuts on them. The hex nuts will sit above the top layer of the robot, clamping the layers together (I may add washers to spread out the force a bit).

You may notice that there are only 7 acorn nuts, not 8.  I bought the right number, but one of them was not threaded all the way to the end, so I’ll have to go back to the hardware store tomorrow to replace it.  While I’m there, I’ll also buy a box of 8-32 hex nuts, because I only had 8 left of my last box of 100, and I’ll need them for the robot, as shown on the rods here.

Here are the set screws with an E clip and a jam nut. I’m thinking of putting an E clip below the MDF and one or two jam nuts above the MDF, but this plan may need adjustment, depending how well the E clip works.

In other hardware news, I got four packages in the mail today:

  • a Digikey order with 100mH inductor to make a more sensitive passive track-wire detector (and some smaller shielded inductors, if I want to increase the Q of the amplifier with an LC tank for feedback).
  • another pair of gearmotors with encoders, wheels, and motor mounts for $25.53 with shipping.  These were spares I ordered on Nov 2 from AliExpress, and I didn’t expect them to arrive for a month—two weeks is pretty fast for cheap shipping from China.
  • four spare gear motors with encoders, but without wheels or motor mounts, also ordered from Ali Express on Nov 2 for $8.89 each (2 @210 rpm and 2 @300rpm)  These motors have the same part number (JGA25-370, DC 6V 210RPM) as the ones that came with the wheels, but the label is different, so I need to check—maybe these really are 210 RPM motors. The JGA25-370 number just refers to the shape of the gearmotor, not to gear ratio.  If my robot is too slow, I could try replacing the 210 rpm motors with the 300 rpm ones.
  • 10 roller microswitches from Amazon for $6.99.  These are tiny, low-quality switches, but I think they’ll work ok for the bumper switches.  It turns out that after I ordered these, I found a bag of 5 tiny microswitches (the same form factor, but different levers) at the back of my drawer of switches.  I’m not sure when and where I got the set in my drawer.  I’ll probably try both sets of switches and see which work better with the bumpers.

I also ordered today the multiplexer that I had omitted from my previous Digi-key order and some more of the TCRT5000L reflectance sensors.  My current robot design calls for 5, and I only have 4 in the parts kit for the course.  The usual team of 3 people would have 12, which is an ample supply, but 4 is probably not enough for the robot this year.

I’ve started thinking some more about the bumper design.  Originally, I was going to use stainless-steel wire to make whiskers that turn a rotary microswitch, but the rotary microswitches are expensive and large (particularly compared to the tiny ones I now plan to use).  I could still use whiskers, but I’m now thinking of a rounded bumper sticking out about 2mm from the front of the robot, pushed forward by the two switches, and retained by a couple of screws in slots.  I’ll have to sketch out the design, then laser-cut it to see whether it works.  I’ll probably be ready to laser-cut everything for my first two layers on Tuesday.


Next Page »

Create a free website or blog at

%d bloggers like this: