Lab 3 – Cyclometer

3. Elcano Speedometer / Odometer

The MegaShieldTrio board has two jacks, X2 and X3, for cyclometer input. Only one cyclometer (X3) is currently used.

The WheelClick signal (CLICK1 aka odometer click) goes to digital pin 2 of the C6 Arduino Mega, where it generates Interrupt 0. The interrupt handler logs the time of the click, which is later converted to a speed and a distance. This signal is the inner (tip) wire on the input jack. The outer jack wire goes to ground, along with the input wire shielding. The jack is connector X3 on the schematic MegaShieldTrio.sch. It is the jack that is farther from the corner. The CLICK1 signal is connected through a 4.7K pull-up resistor to 5V.

The CLICK1 signal is also routed to pin 21 of the 25 pin X1 connector. When connector MegaShieldTrio X1 is attached to the X2 connector of the MegaShieldDB, pin 21 is digital pin 3 of the C2 Arduino Mega, which can produce interrupt 1. This signal (Wheel Revolution) is also pulled up to 5V on the MegaShieldDB. It is thus possible to process the cyclometer signal on C2, even when the MegaShieldTrio board is not populated with Arduino C6. Jumper block 9 on the MegaShieldDB board allows one to use digital pin 3 for other signals; if this is done, make sure that it does not conflict with the CLICK1 signal.

A second cyclometer signal (CLICK2) goes to digital pin 3 of the C6 Arduino Mega and interrupt 1, and is similar to CLICK1. The CLICK2 signal is on jack X2, which is closer to the board corner. It goes to pin 14 of the 25 pin X1 connector. On the MegaShieldDB board, pin 14 goes to Jumper block 9 where it could be routed to

  • D0 (RX0) of C2 Arduino

  • Wireless Extra output of the power transistor

  • Reserved pin of the wireless receiver

Electronics

The system uses a standard cyclometer, such as the Cateye velo 9. This unit has a magnet on a spoke, which is a few millimeters from a reed switch wired to the device. The reed switch will be opened or closed when it is close to the magnet. There are two reed switches on the vehicle. One goes to a standard cyclometer, which is calibrated for the appropriate wheel size. The other reed switch plugs into X3. An edge transition triggers an interrupt, and the Arduino mimics the processing done by the cyclometer. The Arduino displays its results on the serial monitor, where they can be compared against the cyclometer.

MegaShieldTrio
The MegaShieldTrio houses three Arduinos and routes pins between them. It includes the C6 Navigator (Arduino Mega), C4 Path Planner (Arduino Nano) and C3 Pilot (Arduino Nano). It allows connecting a shield (typically GPS and SD card) to C6 and a shield (SD card with map) to C4. The MegaShieldTrio also has connections to sensors.

Software

Status (4/2/14): Operational. Cyclometer and two reed switches installed on vehicle #1. Reed switch wires are soldered to plug to X3. Software has been tested and verified. Lab also has two bike wheels with magnets and reed switches to plugs, but these wheels do not have a second cyclometer for verification.

Software is WheelRev

ClickSpeeds

Open Source Autonomy