Trail Tracer
The Trail Tracer adds self-driving to any normal R/C vehicle, opening up an entirely new way to build, race, and play. Create your own courses, watch your car navigate on its own, and push your builds in ways never thought possible. It’s not just a new feature for R/C cars, it’s a whole new hobby.
The Trail Tracer guides the vehicle along a loop of wire that can be buried in the ground or laid across the surface. The basic set is easy to install and gives the vehicle the ability to follow the wire autonomously, or in a semi-manual “cruise control” mode.
Automatic battery charging can be added with the Charge Port (CP) board and a DIY charging station. Build plans and instructions are in the Advanced Setup tutorial video (in progress). This lets the vehicle drive autonomously 24/7.
Additional capabilities such as multi-vehicle collision avoidance and automatic speed changes can be triggered with the addition of Beacon Transmitter (BTx) boards.
How It Works
How does a car see a wire? Here is the hunch this whole guide runs on. A wire carrying a known signal ought to be visible, somehow, to the right kind of receiver. It is. The receiver never sees the wire itself. It sees two numbers, one from each coil on the front bumper, and from the driver’s seat those two numbers are enough to tell you where to drive.
By the end of this guide you will be able to look at those two numbers and see the wire the way the receiver does: which side it is on, how far away it is, and why the car steers the way it does. Getting there takes some physics about currents and magnetic fields, and some geometry about two coils set at right angles. None of it needs a formula. Where the guide skips something, it says so.
Hardware Summary
Wire
The wire is a closed loop of ordinary insulated wire. It carries a current from the transmitter, and that current creates a magnetic field along the whole wire. The magnetic field is what guides the vehicle. The route the loop takes is the track, and the track can be any shape with a couple restrictions. A vehicle can follow the wire, stay inside it as a boundary, or use it as a landmark. The receiver software decides how the vehicle uses the wire.
Transmitter
The transmitter drives a current onto the wire. It holds the current at a steady strength by adjusting its output voltage, so the field is the same for any track up to about 100 m (300 ft) long. The current is a sine wave with a precise frequency. The transmitter can use any of five frequencies, called channels, so that several tracks can run near or even on top of each other.
Sensor
A sensor is a pair of coils. Each coil is a flat winding of wire that turns a changing magnetic field into a small voltage, the coil signal. The coils are tuned to a band of frequencies that covers all five transmitter channels. A coil only responds to the part of the field that passes through its face, so the two coils are interlocked in an “X”, 90° apart. When one coil sees little of the field, the other sees most of it.
Receiver
The receiver measures the coil signals from each sensor and turns them into a position: where the wire is relative to the vehicle. It also reads up to four servo inputs from a normal R/C receiver and drives up to four servo outputs, all under software control, to steer the vehicle.
Charge Port
The charge port is only used in systems with a charging station. It lets the receiver sense and control charging.
Beacon Transmitter
The beacon transmitter is a small transmitter with its own coil on the same board. It creates a short-range magnetic field at its own frequency. The receiver can sense it and use it to trigger features such as speed changes. In this case, the coil is used to create a field, not measure one, kindof like a tiny track that loops over itself a lot.
System Summary
The receiver reads the wire out to 1.2 m (4 ft). Beyond that it declares the wire lost. It reports the position in millimeters, and near the wire the reading is within ±10 mm of the truth. Noise in the reading grows with distance, so the reading gets rougher the farther the sensor is from the wire. The position updates up to 100 times a second (100 Hz).
A single sensor only gives a correct position when the vehicle is upright and pointed along the wire. The receiver assumes both at startup and whenever the wire comes back into range. If the vehicle rolls, the position reading changes a little even though the vehicle has not moved sideways, because a sensor cannot tell rolling from moving. The physics section explains why.
Physics Explanation
Two facts about electricity and magnetism make the Trail Tracer work:
- A current in a wire creates a magnetic field around the wire.
- A magnetic field that changes creates a voltage in any coil it passes through.
Creating a Magnetic Field
The transmitter drives current through the wire, and the current creates a magnetic field along the whole track. The track can be any shape. Zoom in anywhere along it, to the scale of the vehicle, and the stretch of wire under the vehicle is close enough to a straight line. The sensor only ever sees that short stretch, so from here on the wire is drawn straight.
A long straight wire carrying current creates a magnetic field that wraps around the wire in circles. The field is strongest right at the wire and gets weaker with distance: twice as far away, half as strong. The field also has a direction.
Look along the wire with the current flowing away from you, and the field circles clockwise around the wire. The direction matters later, when the sensor uses it to tell which side of the wire it is on.
If the current changes, the field strength changes in step with it. If the current reverses, the field reverses. This animation shows what the field does along the whole track as the current swings back and forth.
Measuring a Magnetic Field
When the magnetic field passing through a coil changes, a voltage appears in the coil. Direction matters: the voltage is largest when the field points straight through the coil’s face. One way to picture it is with light and shadows. Say the field points straight down, like light from directly overhead, and picture the coil as a flat disk. Held flat, the disk casts a full round shadow. Tilted, the shadow shrinks to an oval. Turned edge-on, the shadow shrinks to a thin line. The light the disk catches is exactly the shadow it casts: a smaller shadow means more light went past the disk. What matters is how much of the disk’s area faces the light, and it is the same for a coil. What matters is how much of the coil’s area faces the field.
A coil facing the field squarely gets the full coil signal. A coil edge-on gets none. In between, the coil signal fades smoothly: full strength at no tilt, about 70% at 45°, and zero at 90°. A stronger field gives a stronger coil signal, the same way a brighter light puts more light on the disk.
A steady field creates no voltage at all, as long as nothing moves. Only a changing field does. Say we ramp the current up at a steady rate. The field grows at a steady rate, and the coil gives a steady voltage for as long as the ramp lasts. But a ramp cannot last forever, the current would have to grow without limit, so at some point the ramp has to stop. The moment it stops, the coil signal drops to zero. Ramp the current back down and the coil signal reappears, reversed. The coil signal only responds to change: it follows the rate of change of the current, not the current itself.
The Trail Tracer uses a sine wave current. A sine wave never stops changing, so the coil signal never stops either. It turns out to be a sine wave too, at the same frequency, shifted a quarter of a cycle in time. That is the reason for choosing a sine wave: one fixed frequency in, the same fixed frequency out. The next section shows why that makes everything downstream simpler.
Now watch the coil signal as the coil tilts and as it moves. Tilt the coil and the coil signal fades, reaching zero when the coil is edge-on to the field.