Motorcycle Temp/Information Display Unit

A while back I built up a temperature monitoring project for my motorcycle. The idea was to add a small LCD screen somewhere on the bike that would display cylinder head temperature to help give an idea if anything was amiss. It worked ok, but proved too bulky to really mount anywhere, was too hard to read in sunlight, and was ultimately too ugly to really make use of. Since then I’ve been gradually accumulating parts to create version 2.0. It’s not installed yet but its starting to resemble something that could be installed:

2016-10-21-09-43-01

To break down whats in that photo, in the aluminium box at the top there is

  • Raspberry pi Zero
  • DC-DC Step down power supply to take 12v down to 5Vdc for the Pi

Attached to the box via the black connectors, from left to right:

When its installed, that aluminium box will be hidden somewhere on the frame of the bike and the various sensors will be installed in appropriate locations so they can see or feel what they’re supposed to.

Enough stuff has been swapped out that it’s an entirely different project from the last one. The Netduino has been replaced with a Raspberry Pi zero. The difference this makes is pretty enormous. Before, the board I had built could read temperatures and write them to a screen. With the new board I can read temperatures and write them to a screen, save them to a MySQL database, host an http server that can plot the saved data, host a WiFi access point so I can connect with my phone and view that data, and all this in addition to GPS data or any other data I like. It’s really staggering the processing power you can get for under 20$ these days.

The old 6100 LCD has been replaced with a tiny (and I mean tiny) I2C OLED module that I’ve put in a plastic enclosure that is small enough to be cleanly zip tied to my handle bar. A thought that occurred somewhat late was that it would be nice to have multiple display modes (readout mode, graph mode, clock mode, etc) however I hadn’t planned in any way to switch between modes. The 4 conductor I2C wire going into the LCD box didn’t have any spare wires for a GPIO, and I wasn’t going to run any more, and I didn’t like the idea of trying to find a place on the bike for a single mode change button all by itself. Turns out I2C really is a great thing, because I was able to squeeze a tiny ADS1115 module and a button into this matchbox sized enclosure, and that gave me the ability to add a button without running any additional wires. Sweet!oled_pic

With the GPS and the Mysql database on board it makes for some really interesting data mapping potential. I have yet to make a fully automated version of this, but with with some manual steps I’ve been able to make use of output files and the tools at http://www.gpsvisualizer.com/ to draw gps tracks colourised by temperature data. In time I’m hoping to build this into a one click view. tempmap

At the moment it can only be viewed once I get back home and the bike connects up with the home wifi, but with some configuring it may also be possible to have it connect to my phone as an internet hotspot and view it while out and about.

The Accelerometer/Gyro module and the LED ring are both items that got added without really knowing why. The LED ring seemed like it could make a neat light up gauge, but I’m not sure where to mount it, or what to display. Something to mull over for the winter I suppose.

With winter coming this whole thing won’t likely be installed on the bike any time soon, potentially it never will because I have a feeling the ignition noise generated by my old Kawi will wreak havoc on all of these sensitive 3.3v data lines, but it’s been an endless supply of learning and entertainment putting the thing together.

Code for the project is up at https://github.com/rhasbury/MotorcycleMU At the time of writing this code is functional but oh so ugly… It grew out of an old application I hacked together quickly for saving sensor data to MySQL , and there’s alot of stuff in it that needs to be cleaned out. But it’s up for anyone that wants to have a look. Who knows, there might be something useful to you in there.

Tags: , , , , ,

Leave a comment