Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Project idea: Advanced dashboard for Motorcycle

Status
Not open for further replies.

Menticol

Active Member
Hello Guys!

Recently I've acquired a motorcycle with a basic dashboard: Tachometer, Speedometer, Odometer, couple of warning lights, and neutral gear light. I'm not saying it's a bad panel, but I would like to make a better, customized one.

After studying maintenance manuals I found that all the signals are electrically fed into the panel, so there's potential to work with.

First challenge is getting more data: that would require a temperature sensor on the engine cowling, a direct connection to the battery (to monitor voltage), and a mechanical sensor for the actual gear. It will require some work, but is not impossible.

Now that the data is collected, what to do next? First idea: a small 2 row LCD screen, powered by a PIC. It would make simple calculations and show messages like "Warning: 50 Km left for next oil change" "Warning: Engine Overheating". That would be outstanding.

But suddenly... I found this panel... and this one :eek:

Motorcycle-Apps.jpg

Brammo-Empulse-electric-motorcycle-preview-speedometer-dashboard.jpg

digital-lcd-gauges-md3.jpg

I guess that level of graphic detail would require a small computer, not a PIC, to work. That's good news for me, because my ability with C# and Visual Basic is decent. In contrast, my experience with micro-controllers is close to zero.

However I have no practical experience with mobile computers for automotive use a.k.a. "Carputers", other than the data shown on their datasheet.

Would they survive the vibrations and the fluctuating power from the motorcycle electrical system? Do you think is a viable option for this application? Do you have any experience with one of this systems, i.e. in your car?

Or if the carputer is an overkill, do you know good literature about Proteus? That would help building my path on the PIC road, and the humble (but not less awesome) 2 row LCD screen.

Thank you so much
 
Last edited:
Thank you very much ClydeCrashKop. Your solution seems much more easier to implement. I'm googling it right now.

PS: You will laugh, but I didn't checked Arduino before because most of my art-inclined classmates -and now colleges- used it as a snob-instrument.

I remember them with their hipster-like glasses and outfits, proud of their "ultra-advanced" Arduino driven blinking LEDs while reciting (with the corresponding hand gestures):

"-Our final project proposal is an artistic installation, based on electronically powered device to explore the duality concept behind the plastic form and the shape of the natural mindset, as an alternative of fossil fuels, to drive a change in the paradigm of the actual Design..."

Poor Arduino. I ended hating it for no just reason!
 
You are right. I can see why!
 
Well, things are getting serious now. Today I've received my Arduino Uno (suspectfully cheap, from a equally suspectfull seller) . I have also ordered a small LCD screen / menu push-buttons combo to communicate it with the outside world. The screen is great, but it occupies all the Arduino's analog pins . I have no idea where I am going to wire the tachometer, speedometer, fuel gauge and the other signals :facepalm: but let's solve that little problem later.

IMG_4100.JPG IMG_4101.JPG IMG_4103.JPG

By the way, on the right side of the picture is my beloved Pickit 2 clone, armed with a virgin PIC16F628A. I bought it some months ago but never used it. I asked multiple people about what's the best software to start programming it. A couple of engineers at my work told me that PIC was very outdated and better, easier platforms are available today. Meh! I don't believe too much on them. If you can give me some hints (and hence drag me away from the Arduino's Dark Side!) it would be great.

Next stop is determining the type and voltages expected from the motorcycle wiring harness.

TACHOMETER:

According to the service manual, the signal for the dashboard comes directly from the ignition circuit. I think is incorrectly labelled as speedometer, as I can't see any relation between the ignition circuit and the speedo. Not even inhibiting it, because speedo still works with the engine off.

(Sorry by the low quality image, I tried to remove that ugly watermark to make the figure less painful to read.)

Untitled-1.png

SPEEDOMETER:

Located on the front wheel. Still not sure what type of sensor I'm dealing it. Maybe a magnetic pickup?

Untitled2.png

GEARBOX POSITION:

Only a Neutral gear indicator light is provided. To detect the other gears I guess I'll have to install a couple of reed switches on the gear shifting pedal. I've read that the current gear can be calculated computing the speed and rpm's of the engine, but I have no idea about how it hows. Do you know something about it?

ENGINE TEMP:

Thinking about a LM35 temperature sensor. Not sure about how valid is a reading taking on the engine cowling, insted of i.e. the cylinder head. It's an air cooled engine.

BATTERY VOLTAGE

Direct connection to the battery.

PS: Last but lot least: To other partners who's also toddlers (or fetus, like me!) on the microcontroller world, I've some useful links for you:

Very good book:
McGraw-Hill - PIC Microcontroller Project Book by John Lovin

A nice tutorial of what's Proteus, and how to simulate circuits and coding with it. A word of warning, they don't teach you how to code your microcontroller, you have to learn that somewhere else.

https://www.theengineeringprojects....tutorial-on-how-to-use-proteus-isis-ares.html

A somewhat basic yet very nice online Arduino simulation.
https://123d.circuits.io/

The Arduino's tutorials
https://arduino.cc/en/Tutorial/HomePage
 
Hello again guys!

I think I nailed the tachometer and fuel gauge signal thanks to this very good diagram.

apache rtr 160 electrical 3.jpg

However, in the case of the speed sensor I don't know what kind of signal should I expect from the 3 wire device. One of the terminals goes to ground, and the other two go to the dashboard.

Do you have any experience with this type of sensor? What is is? A commutator? a hall effect switch? If you could give me some light before I start poking the wires, I will really appreciate it.
 
It does say digital. Best case scenario is that one of those wires is +5 volts with the key on and the other is pre-conditioned +5v pulses that increase with speed.
 
Hello again Clyde and guys!

First of all, Merry Christmas and (almost) happy new year for everyone. :)

I'm sorry for taking so long updating the thread, on the place where I work the concept of "holidays" is non-existent.

First thing on the list was the LCD occupying all the free pins. I checked the link that you suggested to buy another one, but importing stuff to Colombia during this time of year is a nightmare. Luckily I found that my existing LCD just took the pins as mechanical support, and are not electrically connected. (Edit: My LCD looks like a rip-off and hence it doesn't include the extensions found on the original dfrobot LCD keypad shield)

The solution was hence very easy, just extending pins 5-11. I wrote a small program to show the needed stuff "Speed, RPM, Fuel and Temp" and the Arduino was ready to test.

IMG_4526.JPG

Second step was getting the signals. The best site to intercept the wiring harness was the existing dashboard. An ice tray cube is very useful to keep track of where the screws came for.

IMG_4356.JPG
IMG_4359.JPG

Some colors of the harness didn't match the schematic that I found (included on previous post) so I had to find the signals by hand.
I've added a new wire harness for the Arduino and temporarily reinstalled the panel.

IMG_4362.JPG
IMG_4372.JPG

Now Speaking of signals, this is what I found:

Speedometer: Your guess is correct Clyde, the Sensor is feed with +5v and 0v coming from the dashboard. The signal fluctuates from 0v to 5v when the wheel is spinning forward and vice versa. The method to determine the number of pulses per wheel revolution was somewhat archaic but worked: exactly 8.

IMG_4383.JPG

RPM:
The signal comes from the TCI engine unit. It was somewhat proportional to the RPM shown on the dashboard, but I couldn't find the exact proportion because the frequency varied wildly even when the engine RPM were constant. For example: Tachometer: 1200 RPM, Signal: 150-350 Hz. Probably instrument error, I used my multimeter cheap frequency counter. Maybe I need some filtering? Please, Any ideas here are welcome.

IMG_4390.JPG

FUEL GAUGUE:
Is a variable resistor, the value ranges on tens of ohms. It shows error under fully open and closed circuit conditions.

But here's my second and biggest intrigue. On the Arduino example, they use a voltage divider between 5 and 0 volts. Works great.

AnalogReadSerial_sch.png

But the fuel sensor is just a resistor shorted to ground

indicador.jpg
I though about using a known-value resistor shorted to +5v to create my own voltage divider for the arduino. But I'm afraid that this may damage the existing dashboard indicator when the variable resistor value gets too low. What do you think?

Thank you!
 
Last edited:
That looks great. You’ve made a lot of progress.

Your existing fuel gage may have a resistor in line already or it would draw a lot of amps when close to grounded. Do you get a varying voltage on that wire with everything hooked up at different fuel levels? Maybe you could filter that to be Arduino compatible. This thread may help: https://www.electro-tech-online.com/threads/converting-adc-readings-to-degrees.138402/

There are many topics here on liquid level gages. There are also some on motorcycle gear shift indicators.
 
Last edited:
I though about using a known-value resistor shorted to +5v to create my own voltage divider for the arduino. But I'm afraid that this may damage the existing dashboard indicator when the variable resistor value gets too low. What do you think?

I’m sure you realize, but that pull up resistor shouldn't pass enough current to get the tank sender hot.
 
Hello again Clyde!

That looks great. You’ve made a lot of progress.

Your existing fuel gage may have a resistor in line already or it would draw a lot of amps when close to grounded. Do you get a varying voltage on that wire with everything hooked up at different fuel levels? Maybe you could filter that to be Arduino compatible.

I nailed it! And you were right (again)

First step was measuring the sensor wires, it showed no voltage whatsoever. That confirmed that the sensor was shorted to ground.

Then I tried to trick the dashboard with a trimmer potentiometer to see what resistance values it would respond to. I failed because the resistance between "Full tank" and "Closed circuit Error" was too small, smaller than any potentiometer on my bench at least.

Tired of an hour fighting with the sensor, I just rode the bike to spend the last bit of remaining fuel and took the resistance measurement.

IMG_4411.JPG

Next step was finding an appropriate resistor to build a new voltage divider. My worries were overheating the tank sensor, or changing the value displayed on the OEM dashboard.

Then I remembered your comment and it was like a self-kick in the ass!!!

I’m sure you realize, but that pull up resistor shouldn't pass enough current to get the tank sender hot.

No, I didn't realized that! :facepalm: An even more: a new voltage divider isn't required at all, because there should be an existing pull up resistor already installed for the OEM sensor!!

I just connected the Arduino analog input in series with the existing sensor, and it worked flawlessly. Thanks Clyde.

Recovering from my shame, I proceeded to install an LM7805 voltage regulator and decent automotivewiring.

IMG_4404.JPG IMG_4406.JPG

Then it was time to prepare the computer for its first ride

IMG_4414.JPG IMG_4418.JPG
All the measurements were coherent. The DIY speedometer and Tachometer are more accurate than the OEM dashboard!

IMG_4417.JPG IMG_4416.JPG

Now I have raw data to work with! While I write this post I'm programming the consumed Fuel Gallons vs.Km and hence Autonomy calculations.

There are many topics here on liquid level gages. There are also some on motorcycle gear shift indicators.

I'll be checking them, because that's exactly the new intrigue I have: I have my doubts if this floater based fuel sensor have enough resolution to detect the consumption over a reasonable amount of time. I fear I will need a more high-tech fuel flow sensor.

Another headache is the units. The Volkswagen computer shows kilometres per gallon. However this motorcycle engine is very small (160cc) and will take at least a hundred Km to consume 1 gallon (total fuel capacity including reserve = 4.22 gal). Taking so much to make the measurement is impractical.

My plan is converting it to litres, not very useful because colombian gas stations use gallons but at least it gives more digits to work with (13.51 Liters).


This is going to be extremely useful for the engine temperature readings

Thank you so much Clyde
 
Last edited:
Well, for anyone who's following this thread or if you as a reader want to attempt this very same project, I have good and bad news after some research here at ETO:

Boncuk (RIP) already pointed out something I was suspicious of:

Fuel tanks in vehicles are never uniform in horizontal and vertical dimensions.

In cars they are fitted in the vicinity of the rear axle and differential gear and change cross section with every centimeter of heigth.

The fuel gauges built into cars and motor bikes are just "estimators" which becomes obvious when a fully refueled car doesn't seem to consume gasoline the first 100 to 150km and then rapidly decreases in tank indication.

To get an accurate readout about the actual fuel amount in the tank you will have to remove the tank and fill it up liter by liter and measure fuel level height. Thereafter you might calculate for tank content.

Using air pressure inside the tank will lead to misreadings when the fuel level gets low and you are driving hard turns exposing the pressure hose to air before the tank is empty.

Better use the float connected to a variable resistor for that purpose. The software should evaluate "readings" at certain time intervals to make sure the fuel reaches highest and lowest level to compensate for errors when driving curves.

Boncuk

Boncuk

This is specially evident when the motorcycle leans to the sides and the tank is just half or less than half filled.

Now, If the motorcycle is fuel-injected there's hope for you:

Yes there is I looked into it. I built a dash guage system for my car I looked into mpg but didnt fancy the maths. Most cars have obd connectors, you can get data from this, they call them pid's, you request a pid and the ecu returns it, one of the pids is engine load, this directly tells you the amount of air is entering the engine, at the same time you can get the pid for the lamda, this tells you the air/fuel ratio, knowing these 2 pieces of info you can calculate the amount of fuel entering the engine, eg a 2 litre engine at wide open throttle will use 1 litre of air per rev, at perfect fuel/air ratio of 14.7:1 the amount of fuel would be 1/14.7 about 0.06l (at less than wide open throttle you multiply the maximum amount of air by the load %), from the obd you can also get the rpm and road speed pids for the car, then you can work out the mpg.
You could just ignore the fuel/air ratio and assume its 14.7:1, most engines are pretty good now, or you could go the other way and take air temp (density) and fuel temp into consideration. This is how manufacturers do it to get dashboard mpg. I might have got a couple of details wrong there its a while since I looked into it but the gist is correct. Or you could always fork out 40 quid and buy yourself a digi dash which does this and a whole load of other things from the obd connector.

Hence, the only way to get a decent measurement on a caruburator-powered bike is using a flow sensor. On another forum a member with my same problem mentioned this unit

https://www.mpja.com/Flow-Sensor-1-5L_min-Used/productinfo/31430 HD

And here's the datasheet

https://www.mpja.com/download/31430hd.pdf

But I don't know if .1 Liters/min is enough sensing range for a 160 cc 1 cylinder, 4 stroke engine.

Edit: Another problem is, I'm not sure if this little meter is capable of handling flammable solvents like gasoline :eek:

If any mechanical-oriented member could give me a hint, I will be very grateful
 
2016 Pulse/liter looks like pretty good resolution. For that price, I would try it.

If the 1.2mm Internal orifice is too small, it looks like you could take it apart to drill it bigger.
 
Unless its an alky burner it very unlikely to burn more than .1 L/min
 
Nice project, I was thinking about doing something similar (My bike came with no dashboard at all)
To calculate instant consumption that would be easy if the bike has EFI. (The injector is driven by PWM, if you can read the duty cycle with the arduino that gives an acurate reading of the fuel being injected)
If your bike uses a carburettor that would be much harder, that kind of bike doesn't usually have a fuel pump, relying on gravity to feed fuel to the carb. If you use some kind of flow meter between the tank and the carb that can critically lower your fuel pressure (if you are willing to try experiment for example if that doesn't lower you top speed)
 
Very nice project. I was looking around to try something similar and found your thread very useful.

Is there any update on your project. Did you manage to get it working ? please provide some update here. Some closure needed :)
 
Nice project menticol.
I m also doing ths same project on same bike,, but i am having difficulty in taking data from my bike.
I want to know about wiring harness pins that which pin is used for what purpose
Untitled.jpg
and i also want to know how u get those data like speed, rpm and fuel.
please help me..
 
I just scanned the thread and couldn't find a mention of the make/model of motorcycle, but I didn't look very hard either. There are usually PDF versions of service manuals online on motorcycle forums. You would have more luck looking for those, or asking on a forum that is specific to the motorcycle.

Feel bad I missed this post last year. I had to make a new display for my motorcycle in 2013. Unfortunately a lot of data on my bike comes over an undocumented can bus.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top