Old RemoteControl
Contents
Historic Systems
The Elcano system can run autonomously or by remote control. There have been four systems built for manual or remote control.
Joystick
The first system used an APEM 9000 joystick. The part has five wires: 5V power, ground, and three analog lines. The joystick has two axes. The vertical axis is used for throttle (up) and brakes (down). The third analog signal is the voltage of the joystick when centered. The joystick was used in 2014 and is described in http://www.elcanoproject.org/tutorial/lab2.php. The Low-level code may still contain inputs and processing for an analog joystick.
Bluetooth
In 2015 students built a control system using a Bluetooth receiver to the Arduino. The transmitter was a TI Sitara running Android.
Amplitude Shift Keying (ASK) RC Controller
Elcano project used a custom-built radio control system with two arduinos, one in the remote control that collects manual inputs and transmits them with a 433MHz ASK radio transmitter, and one on the Elcano vehicle which receives the information sent over radio and converts it into an ElcanoSerial drive packet which is transmitted to C2 over ElcanoSerial. This information is used to manually drive the trike, begin an autonomous routine, or activate the emergency brake and stop the trike. The RH_ASK system was limited to 40 feet (12 meters) in practice and was never use to drive the vehicle.
CAN Bus and SAMD21
The RC transceiver board can be built five different ways:
- Transmitter using Bluetooth
- Receiver using Bluetooth
- Transmitter using radio (RFM69HCW)
- Receiver using radio (RFM69HCW)
- Receiver using 5 or 6 channel radio control (RC)
When configured as a receiver it is mounted on the vehicle and communicates drive commands over CAN bus.
CAN is documented on Communication
As a transmitter, it is packaged in a remote box with joysticks and switches. Functions and pins are explained in TranceiverPins_1_6.docx on https://github.com/elcano/Transceiver/tree/master/Transceiver%20Documents.
The processor is an Arduino ARM SAMD21 mini dev board, which requires some special steps to install. These are detailed on https://learn.sparkfun.com/tutorials/samd21-minidev-breakout-hookup-guide/setting-up-arduino
Reset requires two quick taps of the reset button. After a reset, the blue LED on the board will pulse slowly for a few seconds. If the board is unresponsive, try resetting this way first.
Setting up SAMD21
Follow the instructions on https://learn.sparkfun.com/tutorials/samd21-minidev-breakout-hookup-guide/setting-up-arduino
Tools > Board > Boards Manager … Then find an entry for Arduino SAMD Boards (32-bits ARM Cortex-M0+). Select it, and install.
Next, open your Arduino preferences (File > Preferences). Then find the Additional Board Manager URLs text box, and paste the below link in:
Then hit "OK", and travel back to the Board Manager menu. Find a new entry for SparkFun SAMD Boards. Once the board is installed, you should see new entries in your Tools > Board list. Select SparkFun SAMD21 Mini Breakout.
Next step is to find the needed files.
- include <RH_RF69.h> // External; documented at
http://www.airspayce.com/mikem/arduino/RadioHead/classRH__RF69.html
Download the file from http://www.airspayce.com/mikem/arduino/RadioHead/RadioHead-1.97.zip
Follow https://www.arduino.cc/en/Guide/Libraries to add the library. From Sketch > Include Libraries select Add Zip Library and navigate to the right file. You should then see RadioHead in the list of included libraries.
- include <mcp_can_dfs.h> // <---- Import from another library: Seed-Studio/CAN-BUS-Shield
- include <mcp_can.h> // (install Library from Arduino, search for "Can-Bus-Shield")
Download zip from
https://github.com/Seeed-Studio/CAN_BUS_Shield
From Sketch > Include Libraries select Add Zip Library and navigate to the right file. You should see CAN_BUS-Shield-master in the Include Libraries.