Nixie Vintage Dashboard (Gear Indicator)
by decogabry in Circuits > Electronics
199 Views, 0 Favorites, 0 Comments
Nixie Vintage Dashboard (Gear Indicator)
This project is a motorcycle retrofit that calculates the engaged gear using wheel-sensor pulses and RPM read via OBD (ELM327). The system performs automatic gear learning, stores the data in memory, and displays the gear on a real cold-cathode Nixie tube driven with discrete transistors, combining modern electronics with historic elements.
A digital display shows the engine temperature.
The project is designed as an embedded system: automotive signal acquisition, input conditioning, a stable algorithm, and a readable interface in riding conditions.
Supplies
To display the current gear, I chose a cold-cathode Nixie tube a classic technology from the 1950s–1970s, widely used in industrial and scientific instruments. It’s fundamentally different from modern displays and requires a dedicated high voltage driving stage.
In this build I used a Philips ZM1020 Nixie tube, but you’re free to use any equivalent/similar single-digit Nixie tube, along with its matching socket, depending on what you can source.
A motorcycle diagnostic port to OBD adapter is required to connect the Bluetooth OBD module (ELM327) to the motorcycle’s diagnostic connector. Diagnostic port type and pinout vary by manufacturer and model, so a model-specific adapter must be used.
Power & Protection
- DC-DC 12V → 8V
Dedicated step-down regulator for the logic. It isolates the ESP32 from alternator fluctuations (spikes, cranking voltage sag, noise).
- DC-DC 5–12V → 170V
Dedicated module for the Nixie high voltage power supply.
- UF5406 (D1)
- A diode was added specifically to prevent reverse voltage when the board is connected via USB during programming.
Control & Processing
- ESP32 DevKit V1
Chosen for Bluetooth Classic (OBD), computing power, and reliable interrupts for wheel pulses. A single MCU handles logic, learning, UI, and communication.
External Connections
- MOTORCYCLE TO ODB CABLE ADAPTER
To connect the ELM327 module to the motorcycle.
- ELM327 ODB dongle
Interface to read RPM and engine temperature.
- 3-pin connector (male)
Male connector for power / pulse input.
- 3-pin connector (female)
Female connector for the motorcycle wiring harness.
Displays & Indicators
- Philips ZM1020 – Valvola Nixie
Used exclusively to display the gear. Only one digit is active at a time.
- V1-SOCKET
Nixie tube socket for the ZM1020, for protection and easier maintenance.
- TM1637 DISPLAY
4-digit 7-segment display.
Nixie Driving Stage
- MPSA42 (Q1–Q5)
I used discrete transistors instead of an IC driver to reduce cost and complexity.
Passive Components
- Resistenze (10k / 15k / 50k)
Used for: 10k to limit transistor base current, 15k to limit Nixie tube current, and a voltage divider for the wheel-encoder signal.
Mechanical & Assembly
- PCB
Perfboard (protoboard) used as the prototype base.
- Wires, pin headers, heat-shrink
Wiring and insulation.
Downloads
Electrical Schematic and Wiring
The GPIOs connected to the ESP32 are not fixed and can be reassigned depending on the specific hardware layout. However, special care must be taken with certain pins that may cause boot issues, programming failures, or unstable behavior if used incorrectly.
For example, GPIO12 is a strapping pin: if it is forced HIGH or LOW by external circuitry at power-up, it may prevent proper boot or alter the internal flash configuration. Similarly, GPIO0 affects the boot mode and, if held LOW during startup, forces the ESP32 into flashing mode.
Pins GPIO1 (TX0) and GPIO3 (RX0) are used for serial communication and firmware upload; connecting them to displays, transistors, or external signals can block programming or generate unwanted output during boot. Other pins such as GPIO2 and GPIO15 are also involved in the boot sequence and must not be forced into incorrect states at startup.
Finally, GPIO34–39 are input-only pins with no internal pull-up or pull-down resistors: they are suitable for reading signals such as wheel speed pulses, but cannot be used as outputs.
The motorcycle wiring schematic shown in this project is specific to the Benelli TNT 125 and is provided only as a reference example.
Electrical wiring, sensor routing, and signal availability can vary significantly between different motorcycle models and manufacturers. For this reason, on any other motorcycle it is necessary to identify the correct wheel speed sensor pulse wire, ground (GND), and +12V power supply by consulting the service manual or wiring diagram of that specific model.
This project does not rely on proprietary ECU connections and can be adapted to other motorcycles, but the signal pickup points must always be verified on the target vehicle to ensure correct and safe operation.
Engine RPM and coolant temperature are acquired using a Bluetooth OBD interface (ELM327-compatible).
Most motorcycles produced from the mid-2000s onward are equipped with an OBD diagnostic port, although the physical connector and pinout may vary between manufacturers.
The ESP32 communicates with the OBD module via Bluetooth Classic, keeping the system electrically isolated from the ECU and minimizing wiring complexity.
Downloads
Assembly & Soldering
The prototype is assembled on a perfboard using through-hole components.
The layout was kept as compact as possible, while maintaining physical separation between the low-voltage logic section and the high-voltage Nixie circuitry.
This approach allowed fast iteration, easy debugging, and reliable operation.
Test of Power, Display and Nixie Tube
Power, display and Nixie test
First, upload a dedicated Arduino test sketch to the ESP32 that excludes sensors and OBD and is used only to verify power rails and outputs.
Power the circuit and check that the ESP32 boots correctly and that the TM1637 display shows fixed values in a stable way.
Then enable the Nixie high-voltage DC-DC converter and, using the test sketch, turn on one digit at a time by driving the transistors.
Verify that only the correct digit lights up, with no spurious activations or instability, and repeat the test over multiple power cycles.
Multimeter checks
Measure the low-voltage rail to confirm a stable supply for the ESP32 and the display.
Measure the Nixie DC-DC output to verify the correct high voltage and proper isolation from the logic section.
Check ground continuity and verify that high voltage is present only on the active transistor branches, with no voltage appearing on the microcontroller or display pins.
Downloads
How the Firmware Calculates the Gear
This system estimates the engaged gear by comparing:
- Engine RPM read from the ECU via OBD + ELM327
- Wheel speed derived from the pulse signal of the wheel speed sensor
1) Reading RPM from OBD
The ECU replies to OBD command 010C with two bytes (A and B). The firmware converts them using the standard OBD formula:
RPM = ((A × 256) + B) / 4
This provides a reliable engine speed value directly from the ECU.
2) Wheel speed from pulses (measured with micros())
A wheel speed sensor does not output km/h: it outputs a pulse train. Higher speed = more pulses per second.
To keep the measurement stable even at low speed, the firmware measures the time between two pulses using micros() (period measurement), then converts it to frequency:
wheelFreqHz = 1,000,000 / period_us
This is the pulse frequency (not wheel revolutions), but it’s perfectly fine because the project uses the same signal during both learning and normal operation.
To handle real motorcycle noise, the firmware includes:
- Debounce to ignore false / bouncing pulses
- Stale timeout: if no pulses arrive for ~0.9 s, wheel speed is treated as zero
- EMA smoothing to prevent jittery readings
3) Key idea: RPM / wheel speed is gear-dependent
Each gear changes the mechanical ratio between engine and wheel. The firmware computes:
ratio = RPM / wheelFreqHz
In 1st gear the ratio is higher, in higher gears it becomes lower. This ratio acts like a “fingerprint” for each gear.
4) Auto-learning the gears
On first boot the project enters LEARN mode. For each gear (1→5) the rider keeps throttle and speed steady for a few seconds. The firmware:
- waits a short settle time (avoids clutch/transient effects)
- samples multiple ratio values
- accepts the gear only if the ratio stays stable for consecutive readings
The learned values are then saved to EEPROM.
5) Normal operation (RUN mode)
While riding, the firmware keeps computing ratio and compares it to the learned values, choosing the closest match within a tolerance (e.g. ±10%).
If conditions are not valid (clutch pulled, wheel almost stopped, OBD not valid), the firmware turns off the Nixie tube.
Uploading the Firmware
- Open the sketch in Arduino IDE.
- Select the correct board (example: ESP32 Dev Module) and the correct COM port.
- Connect the ESP32 via USB and click Upload.
Important: how to reset wrong gear learning (Erase Flash)
If the gears were learned incorrectly, the values are saved in EEPROM/flash and will be reused at the next boot.
To force a clean re-learning you must erase the flash before uploading:
- In Arduino IDE: Tools → Erase Flash → “All Flash Contents” (or equivalent option)
- Then upload the sketch again
After that, the device will start fresh and will enter LEARN mode again, allowing you to re-teach all gears correctly.
Practical tips (avoids upload problems)
- Disconnect or avoid using ESP32 boot-sensitive pins (especially GPIO0 / GPIO2 / GPIO12 / GPIO15 / GPIO1 / GPIO3) for external hardware that could force levels during boot.
Downloads
Ride and Enjoy
Safety first (read before learning)
- Do not get distracted while riding. Set up everything before moving and keep your eyes on the road.
- Perform the learning process only on a safe, low-traffic road (or private area).
- Disclaimer: this project is provided “as-is”. The author is not responsible for any damage, injury, or legal issues resulting from building or using this device.
How the learning works (quick)
The firmware learns a “fingerprint” for each gear:
ratio = RPM / wheelFreqHz
It stores one stable ratio value for gears 1 → 5 in memory. After learning all gears, it switches to normal mode automatically.
Learning procedure (short tutorial)
- Start the bike and power the dashboard.
- If learning is active, the TM1637 will blink “L” and show the target gear number (1, then 2, etc.). The Nixie will blink the same number.
- Select the shown gear (start from 1st).
- Ride with:
- clutch fully released
- steady throttle
- steady speed (no hard acceleration / engine braking)
- Keep it stable for a few seconds. The sketch waits a short settle time and then checks stability automatically.
- When the gear is captured, the prompt will move to the next gear. Repeat until 5th gear is learned.
If learning goes wrong
If a gear was learned incorrectly, the ratios are stored in flash.
To restart from zero:
- Re-upload the sketch with Tools → Erase Flash → “All Flash Contents”, then upload again.
- The device will re-enter learning mode automatically.
Tips for best results
- Do learning on flat road (avoid big slopes).
- Avoid learning at very low speed (keep wheel pulses above the minimum threshold).
- Keep RPM clearly above idle (smooth mid-range is best).