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.
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.
- IMG_0693.jpeg (156.45 KiB) Viewed 1053 times