The R/C controller uses a slightly larger piece of
RadioShack perf board to carry the same components as the fail-safe board, plus 2 LED motor indicators connected to digital output pins 12 and 13,
and a port for the R/C receiver consisting of three
6-pin female headers stacked together.
The control pins from this R/C port connect to
another screw terminal block on the board. I could
have simply used jumper wires to connect the R/C
receiver to power and to the microcontroller, but the
header and screw terminals make the connections
stronger and very easy to reconfigure.
The 6× 3 grid of connector pins on my R/C
receiver are mapped with the first row of pins carrying each channel, the second row all +5V, and the
third row all ground. You want to find 2 channels
that are controlled by up/down movements on your
transmitter, such as the ones used for throttle and
elevation. To do this, go down the line plugging a
servomotor into each channel. Move every control
stick until the servo moves, then write down which
channel is controlled by what stick. Decide which
2 channels to use for the Lawnbot motors.
Connect these 2 channels on the R/C receiver
to pins 4 and 5 of the microcontroller chip (which
function as Arduino digital pins 2 and 3, the only
2. Load and test the code.
Download the code from
rclawnmower and load it onto your Arduino(s).
To check the R/C code from your computer, keep
the Arduino plugged into the USB port, connect
the R/C receiver as in Step 1, turn the transmitter
on, and click on the Serial Monitor button in the
Arduino IDE. Moving the left control stick should
change the reading for your left motor’s channel,
and the right stick should control the right channel.
If not, swap the inputs.
The on-pulse duration readings should range
from 1,000 to 2,000 microseconds, showing 1,500
when the control stick is centered. If not, adjust the
stick’s trim control on the transmitter, or change the
max and min values in the code to match the range
of readings you see in the serial monitor.
If you’re in the field using standalone controller
boards, you can use a multimeter to probe the
Arduino pins’ voltage outputs while moving the control
sticks. Arduino digital pins 5 and 9 (ATmega chip
2 external interrupts). For the receiver’s power,
I jumpered wires over from my Arduino-based R/C
controller’s +5V and Ground pins.
46 Make: Volume 22