Posts: 5
Joined: Wed Mar 20, 2019 2:46 am

Motorcycle Dash/Screen

Wed Mar 20, 2019 3:25 am

I'm want to make a screen (similar to those in modern cars) for my motorcycle. It would replace my speedometer/tachometer. It would display my speed, rpm, and the various lights like blinkers. (The bike is a 2005 ZX6R with completely stock electronics)

I found the screen I think I'll use and I'll be using either a Raspberry Pi or an Odroid XU4. I have a few questions.
As far as I'm aware I'd need an Analog to Digital Converter. Would this one work?: ... emEALw_wcB

Next thing I'm unsure about is how the computers power on. Are they completely shut off and then when you turn them on do they power up, or are they in a sort of sleep mode like a phone? If it's the latter should I be concerned about the battery dying? If it's the former, should I go about making a custom OS like Buildroot? Will it be responsive enough to smoothly and accurately display my speed?

Last questions: This whole project probably will cost around $200 which is much cheaper than buying a tablet and making an app for it but will the touchscreen be responsive and the Pi/Odroid be powerful enough to work well? Is the touchscreen's responsiveness more dependent on the screen or the computer? I've never worked with a touchscreen before. I'm thinking of this screen: ... J60551ZPMB

I'm pretty familiar to Raspberry Pi's and very familiar with programming. Any advice would help. I understand this is a pretty big project but I'm willing to take my time and enjoy it and I anticipate that I will learn a lot from it. Thanks

Posts: 600
Joined: Sat Feb 24, 2018 4:09 am
Location: Buffalo, NY, USA

Re: Motorcycle Dash/Screen

Wed Mar 20, 2019 5:20 pm

If you are really planning to replace your speedo/tacho gauge set (rather than mounting your Pi-based screen somewhere adjacent to the existing dials as an auxiliary panel) you should probably first check whether this will involve you in legal complications in your local jurisdiction. I am honestly not sure whether such a modification would pass muster under the construction and use regulations for road vehicles in the US or the UK (the only two jurisdictions about whose laws I have any knowledge), but I suspect not. I also think that this is a very challenging project to attempt for someone who seems not to know a great deal about electronics and SBCs. Programming your solution is likely to be the least of your problems.

Posts: 15523
Joined: Tue Jul 17, 2012 3:02 pm

Re: Motorcycle Dash/Screen

Wed Mar 20, 2019 5:33 pm

Do you have a display to use that is even in bright sunlight?

I don't know about your ZX6R but my old BSA Thunderbolt would kill anything I could build with a Pi in 2 minutes unless I tool a lot of care. Not to mention being out in the elements.

The start up time of A Pi running Raspbian or any Linux might be annoying in this application.

Plan on spending more than 200 dollars. Easily done after tinkering around with various experiments, Pi's, screens, power supplies, failures, etc.

You probably don't need an analog to digital converter for any of this. Speed and tacho can be measured from digital pulses. Interfacing that might challenge your electronics skills.

Is it legal?

Apart from all that, and more, it's quite doable.

I suggest you forget the bike dashboard for a while. Get a Pi, a touch screen, a bunch of sensors and interfaces and start experimenting with them on the bench. It will be fun, you will learn a lot. Then you will be in a better position to judge if you want to go ahead with the bike project.
Memory in C++ is a leaky abstraction .

Posts: 1
Joined: Sat Oct 26, 2019 7:16 pm

Re: Motorcycle Dash/Screen

Sat Oct 26, 2019 7:37 pm

Good day to all,
I've been playing with this idea of doing this on my 2004 Honda hornet for a few years now and started wondering what I would need. Having found this post,I am terrible with programming but designing and practical electrical, electronic and mechanical are my every day routine. Apart from the basic dash display, my idea is to use a 7 or 9 inch touch screen so that I can swap in between the display to rear view by means of a camera. I'm not sure if I can use a tablet interphased with rasberrypi. At this point in time this is just an idea and whether this is possible or not is yet to be discovered. I have to see what is the best, cheapest and easiest setup possibly achievable.
Maybe we can do something by sharing experiences?

Posts: 1
Joined: Fri Jan 03, 2020 12:13 pm

Re: Motorcycle Dash/Screen

Fri Jan 03, 2020 3:51 pm

Hi, I know this is almost a year late, but it looks like you're still working on the project (from your other posts)?

Really interested in your project - I've been working on something similar for the last few years and have had a prototype on a bike for >18 months without issues (2008 XT125R - electrically similar with no CAN bus, 3-pin hall effect wheel speed sensor, and VR crank position sensor). Have attached a photo of one of the (very!) early prototypes - unsealed and used for software debugging.

It is a complex project, > 1 year for sure, and it's pretty multi-disciplinary - you'll have to design a mechanical enclosure with vibration resistance and waterproofing on top of designing all the electronics and writing the code, but it's definitely do-able!

First thing I'd do, would be to determine a 'spec' or scope of your design so you know exactly what you want it to do. Then you can build individual parts of the design back up to the full design, and the outcomes of any engineering decisions that need to be made on the way will by influenced by the spec.

Anyway, onto selecting components...

You say you want to use a Pi but have you considered other options? There are a number of cost-effective development boards out there - e.g. Arduino Mega (Pro Mini), Teensy 3.2/4.0, Adafruit Feather etc...

There are a number of advantages to the Pi (or Pi Zero W) - namely the all-in-one package, massive community, open source software, libraries such as PyQt, commonly available spares & accessories, and the fact it comes with built in WiFi & bluetooth is sweet! On the flip-side, the Pi has a long boot up time (longest I've seen is 30 seconds!), and as it runs an OS, needs to be shutdown carefully - there needs to be a protection circuit to keep the Pi powered on until it shuts down, once the ignition is turned off.

MCUs like Teensy3.2 and Arduino are a bit different - they also have the advantages of being open-source and having widely available resources, they also have quick boot up times, and don't need any special shutdown circuitry. These also have a variety of screens & graphics driver boards available (usually running through the in-built SPI interface) which can handle HD graphics. But there are disadvantages to MCUs as well - the library functions available are generally lower-level and it takes longer to write the code. Arduino only wraps around C++, where Pi can be programmed using any IDE & language available. If you need to add BT or WiFi then these will come as seperate boards which communicate with the MCU.

I had tried an early prototype with the Pi (3B if i remember right) and the pygame library for graphics - it worked well but the boot-up time was the real killer of that idea. You could be halfway up the road and get to a set of traffic lights before the dash turned on. The shutdown circuitry was simple enough, but the shutdown time of ~7s was also a problem - if the ignition was cycled off-on within 7s then the Pi was already in software shutdown, and wouldn't reboot automatically. So I went with a Teensy3.2 and haven;t looked back. Yes it takes longer to write the code, but it results in a more refined and useable dash. The code is manageable as long as you're not expecting to live-stream video or be constantly updating large ares of the display. Your spec will define which processor you use. Don't be scared of learning a new coding language if you're only familiar with Python at the moment.

Screen & graphics driver

This is by far the hardest bit to get right - OEM use high quality displays which turn out to be pretty expensive, especially in small orders (small orders for factories are usually <10,000). These displays are usually custom parts, or standalone TFTs which need a matched graphics driver and SPI interface, amongst other things. Using a display like this will mean designing a custom graphics driver circuit as it's unlikely there will be an off-the-shelf part which suits the application. An affordable example of this type of display is the Mitsubishi AA050MG03. Not sure of prices but if it's not shown on the site then expect it to be expensive. Obviously these are the best screens ~900 nits brightness which is enough to be able to see the display even in direct bright light.

A screen I've had success with is the Adafruit 5" TFT w/touch [ADA1596] - it's reasonably priced, comes with great community support, and is reasonably bright - in direct sunshine and with a high contrast theme (black text on white background) it's still visible, though not as bright as you may like. For the price it may be worth getting one to play with.

The screen alone needs a graphics driver - Ada make a version for the Pi with HDMI->RGB888 driver - the 7" version is [ADA2407]

If using an MCU instead - a driver board w/SPI interface is needed - I used the RA8875 driver board [ADA1590]. This board does what it needs to for a basic dash, though its slow to load BMP images, so it deifnitely won;t be able to handle live-streaming video. It's quick at drawing lines, pixels, and circles - to get around the limitations the code needs to be streamlined so it only draws the pixels that need to change - this keeps the screen refresh rate fast enough to look really smooth (I've got over 120fps running 3 dials + time and all indicator lights, at which point it started to flicker when the frame rate got too fast...). If you go down this route and get this far, DM me and I can send over some example code.

There are probably other options out there which are worth testing, but this works OK for the application...

Voltage regulator & fuses

A clean power supply is important - the processor and boost-converter for the TFT backlight can draw up 1A - 3A at 5V so a powersupply which is rated to at least 15W is key. As the input voltage from the battery varies so much (it could be as low as 10.5V and as high as 15V) linear regulators are out of the questions at these high current draws - there are a couple of switching regulators which fit the bill:

T.I LM2576-5.0 - SMD regulator needs additional components including 3A rated inductor - can supply 3A @ 5V

Tracopower TSR-1-2450 - through hole switching regulator is an all-in-one package. more compact but only supplies 1A @ 5V.

Make sure to fuse the +12V power input - micro blade fuses come in 1,2 & 3A ratings.

Input circuitry

On the input side of things, there needs to be a fair amount of filtering to clean up the signals from the bike. Any digital inputs can just use a simple resistor divider to bring the voltage down to 3.3V. This would be the indicator lights, dip and main beam, oil pressure warning, diagnostic light, engine check light etc.
Fuel level indicator could be either a potentiometer style input, or a simple on/off which needs to be connected to ground. Check the service manual/wiring diagram to work out which type is on your bike.

The analog inputs will be the Speedo, Tacho and Battery level (and maybe fuel level). Fuel level and battery level will only need a voltage divider to bring the voltage down to 3.3V, but the speedo and tacho need a bit more to work properly. The speedo sensor will either be a 2-wire or 3-wire hall effect sensor if its mounted on the front forks. If it's mounted by the front sprocket cover, it could be hall-effect or a pot style input. 2-wire hall effect means it's a current output sensor - to read it you'll either need a current sensor (ACS723 etc.) or a current sense resistor and read the voltage off either side. It'll help to have an op-amp in there to amplify the signal.. 3-wire hall effect means it will output a voltage - this just needs an RC low-pass filter and maybe an op-amp. Pot. style should be easiest to read. To get these inputs to work with a Pi means adding an interim ADC (ADS1115 is fine) - when testing the Pi prototype I just hooked up an Arduino via USB Serial to read the analog inputs.

Tacho speed comes from the CKP sensor which is usually a VR type passive sensor. It outputs an AC wave which the processor can't read. It's possible (but pretty demanding) to convert the AC wave into a DC analog signal using just op-amps and an offset, but luckily there's an IC made for this exact purpose: T.I. LM2907. It only needs a few additional components which are outined in the datasheet. Don't forget to put an RC low pass filter set for around 1KHz on the RPM input to the LM2907! This IC has an in-built amplifier so it outputs an easy-to-read signal for the processor.

Wow, that was longer than I thought it would be - there's a lot more to it than this, but getting the electrical hardware sorted is a decent place to start.

Good luck!
IMG_0693.jpeg (156.45 KiB) Viewed 1053 times

Posts: 1
Joined: Sat May 23, 2020 1:39 pm

Re: Motorcycle Dash/Screen

Sat May 23, 2020 1:43 pm

Anyone thought of using a power commander to communicate between bike & pi?
I’m thinking I’d like to build a motorcycle dashcam with an overlay showing rpm speed lean angle, outside temp, humidity etc

Posts: 5
Joined: Wed Mar 20, 2019 2:46 am

Re: Motorcycle Dash/Screen

Sat May 23, 2020 11:59 pm

Simberu wrote:
Sat May 23, 2020 1:43 pm
Anyone thought of using a power commander to communicate between bike & pi?
I’m thinking I’d like to build a motorcycle dashcam with an overlay showing rpm speed lean angle, outside temp, humidity etc
That’s a good idea. Hadn’t thought of using the power commander. I have mine “working” off the wires that’s plug into the stock gauges but I’ve thought about experimenting with the ECU. I have very little knowledge of the ECU and I have problems getting wire diagrams for my bike so I’m leaving that project for another day. For now the gauge cables and pi sensors give me enough data for my dash.

Return to “General discussion”