Gas station without pumps

2017 November 22

Change to track-wire amplifier

Filed under: Uncategorized — gasstationwithoutpumps @ 20:32
Tags: ,

I decided not to use the track-wire amplifier in Track-wire detector sensitivity, without even building it.  I looked at the impedance of the tank circuit I was planning to use as a feedback element, and realized that the phase change was large enough that I would have less than 5° of phase margin when the gain of the amplifier dropped to 1 (possibly much less than 5°).  That is too close to being an oscillator for my taste, so I decided to not bother with filtering other than the resonant tank of the detector itself.

Here is the circuit that I breadboarded and tested today. It has no filtering other than the resonant tank of the detector itself.

Here is the response of the amplifier (with gain set near the middle) to a 3ms 25kHz burst.

The ripple is about 7% of the signal, so I’ll need at least 10% hysteresis in the software. I’ve still not decided whether finding the targets will just look for a big enough signal or will try to find the maximum signal as I roll past the target.

Another approach I’ve considered, though probably won’t implement, is to use a pair of inductors at right angles, and look for a large signal in one with a very small signal in the other—the null at the end of inductor is much sharper than then maximum out the side of the inductor.  Because this amplifier only uses 2 op amps, I could easily wire up another amplifier on the same MCP6004 op-amp chip.

I still have to solder up this amplifier—I’ve delayed a little bit, because I’m undecided about putting a 3.3V regulator on the board or take 3.3V from the Teensy board.  It may be better to use a regulator, so that the 3.3V power does not have long wire runs to pick up noise.  I’m also thinking that I should check out how much electrical noise I get from the current-limitation PWM of the MAX14870 H-bridges—I may need to add RC filtering to track-wire amplifier if the there is too much noise.

In the mail today I got more reflective sensors, so I need to solder up another board or two of them also.  The 8:1 mux also arrived, so I need to make the board that will communicate the tape sensor signals to the processor and write code to test it.

I’ve been trying to diagnose why my robot building is going so slowly.  I’ve come up with the following partial reasons:

  • I’m spending a lot of time creating the graphs and pictures and writing up these blog posts.  Almost half my mechatronics time is spent on documentation.
  • I’m still very slow with SolidWorks, so mechanical modeling takes a long time.
  • I’m not very comfortable with mechanical design in general—I can’t visualize stuff very well in my head, and I can’t sketch well enough to clarify designs, so I either need to use SolidWorks (which takes forever) or I need to build things (which also takes forever).

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).

%d bloggers like this: