Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: [posted] SchmickBike: Teensy based motorcycle instruments and telemetry

  1. #1
    Senior Member
    Join Date
    Aug 2018
    Brisbane, Australia

    [posted] SchmickBike: Teensy based motorcycle instruments and telemetry

    SchmickBike is a Teensy based platform for motorcycle instruments and telemetry.

    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.

    Click image for larger version. 

Name:	IMG_20200105_125602.jpg 
Views:	172 
Size:	110.2 KB 
ID:	19151

    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.

    Click image for larger version. 

Name:	IMG_20200224_110730.jpg 
Views:	187 
Size:	170.6 KB 
ID:	19152

    Here are some sample screens in both day and night colour schemes.
    Click image for larger version. 

Name:	SHOT0007.png 
Views:	155 
Size:	11.6 KB 
ID:	19153 Click image for larger version. 

Name:	SHOT0012.png 
Views:	160 
Size:	15.0 KB 
ID:	19154

    Click image for larger version. 

Name:	SHOT0015.png 
Views:	150 
Size:	10.8 KB 
ID:	19155 Click image for larger version. 

Name:	SHOT0020.png 
Views:	142 
Size:	11.2 KB 
ID:	19156

    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.

    Click image for larger version. 

Name:	androidapp.png 
Views:	169 
Size:	131.8 KB 
ID:	19157
    Last edited by thebigg; 02-24-2020 at 12:38 AM. Reason: Format screenshots

  2. #2
    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

  3. #3
    Senior Member
    Join Date
    Aug 2018
    Brisbane, Australia
    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.

  4. #4
    Join Date
    Sep 2017
    motorcycle and CANbus must never be mentioned in one sentence, nor in one text all electronics should keep at least 3 meters distance from a motorcycle. it is already a compromise that water came close to engines...

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    This was posted on the PJRC website. Here's the link.

  6. #6
    Senior Member
    Join Date
    Aug 2018
    Brisbane, Australia
    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:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts