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
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.
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.
- Schematic Image
- Board Layout Image
- Board photo: front
Shown without shields but with Arduino Nano. Part of the Arduino Mega is visible.
- Board photo: back
Shown with Arduino Mega, Arduino Nano and UM6-LT Orientation Sensor.
- Eagle Schematic
Connector X1 DB25 goes to MegaShieldDB
Connector X2 jack is for a second cyclometer.
Connector X3 jack goes to the main cyclometer.Connector X4 RJ45 goes to the main sonar mount board.
Connector X5 RJ45 is for a second sonar mount.
- List of Signals
- Status (3/6/14): Operational.
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