[posted] SchmickBike: Teensy based motorcycle instruments and telemetry

thebigg

Well-known member
SchmickBike is a Teensy based platform for motorcycle instruments and telemetry.

Controller.
3D printed enclosure permanently installed under the seat of the bike. Houses a custom PCB with Teensy 3.5, CANbus transceiver, GPS and Bluetooth modules, power management, various discrete components to handle connections to bike electronics and connectors for bike, display and external sensors (IMU, ultrasonic distance sensors to measure suspension compression, tyre temperature monitor). Connects to bike CANbus, fuel injectors and power. Teensy 3.5 @120MHz is easily able to refresh the screen at 60Hz but faster than 10Hz is basically pointless. Uses 5x serial ports and 2x i2c busses. The code currently occupies just under 50% of available flash with all options enabled.

IMG_20200105_125602.jpg

Display
3D printed weather resistant enclosure permanently attached to bike handlebars. Houses 5inch 800x480 LCD serial display (4DSystems), ambient light sensor (to automatically adjust screen brightness / display colour scheme), configurable status RGB LED, ambient temperature sensor and user input (either handlebar mounted joystick or momentary pushbuttons - have experimented with touchscreen but not ideal or safe on a moving motorcycle). Has approx 20 different screens - numerous different dashboards, comprehensive real time fuel consumption calculators and setup/monitor/configuration screens. Connects to controller via ribbon cable. With some shielding and careful routing through the electrically noisy motorcycle able to reliably update the screen at 625 kbit/s.

IMG_20200224_110730.jpg

Here are some sample screens in both day and night colour schemes.
SHOT0007.png SHOT0012.png

SHOT0015.png SHOT0020.png

Android app.
Receives stream of data (50+ live variables: GPS location, speed, RPM, gear, temperature, lean angles, ECU status etc etc) from controller. Handles upload of data stream to cloud database for real time monitoring of bike remotely. Has multiple different dashboard layouts if you prefer to use a handlebar mounted phone/tablet for display. Can transmit music player status to the controller if you are using the phone to stream music to a helmet mounted bluetooth headset. Can transmit portions of txt messages received while riding to the controller so you can decide whether to pull over and respond. Connects to controller via Bluetooth. Optional.

androidapp.png
 
Last edited:
How accurate and how fast is the update for the ultrasonic sensors for the suspension? I have built a data logger for my track bike and adding tire temp and suspension is on my list for this season. For suspension I have been looking into making my own string-potentiometer type of setup. Would like to get around 100hz logging rate for the suspension.

What bike do you have it connected to? I know many don't have CAN bus.

Neat project, Jeff
 
Hi Jeff

The bike is 2014 Triumph Speed Triple. Uses the same CANbus enabled ECU as KTM, Aprilia, Ducati, Moto Guzzi.

The ultrasonic sensors I am using need at least 60ms between pulses.
 
motorcycle and CANbus must never be mentioned in one sentence, nor in one text :p all electronics should keep at least 3 meters distance from a motorcycle. it is already a compromise that water came close to engines...
 
Thanks for the post Paul.

In the years since this was originally posted, I have ported the controller to use a Teensy 4.1, respun the PCB a couple of times and added a bunch a "touring" features to the code. Currently running the T4.1 CPU at 396K as a nice tradeoff between speed and temperature.

Lots of space left for more features:
Code:
teensy_size: Memory Usage on Teensy 4.1:
teensy_size:   FLASH: code:340448, data:80684, headers:8652   free for files:7696680
teensy_size:    RAM1: variables:72000, code:337528, padding:22920   free for local variables:91840
teensy_size:    RAM2: variables:1632  free for malloc/new:522656
 
Back
Top