Carb motorcycle computer

Hi everyone from Italy. I didn’t really know where to start but I did. I’m using an Hitachi t6963c glcd hooked in parallel to a mega arduino. Now I want to realize a tachometer speedometer odometer with temperature (external) and water temp if possible using stock motorcycle sensor. I want a tilt sensor to say the lean angle and store it as well as max speed and engine max temp. The motorcycle is a cbr900rr sc28 92’ so no canbus. So far I built my own rtc clock retrieved from a blood analyzing machine with ds1307, but it doesn’t work so I’m software emulating it for now. I want 2 different screens 1 is the normal one with all the values, the other is with maximum values. I’m using u8glib and I don’t really understand the picture loop. I’m attaching a photo of the current status with temp and date/time. Now the question is which kind of speed sensor should I use for a good precision and speed of data flowing onto the screen? I saw a npn inductor sensor that can count sprocket teeth and it seems more precise than an hall sensor. How can I calculate the speed? And what about the rpm of the motor? Can I use the stock rpm output? Thanks so much. Last question is there a tidier programming possibility with u8glib than throwing everything in a single draw loop? Is there any way to store for example km like on an odometer? I would be able to use also an sdcard or an eeprom.

break down your project into individual tasks. do one task at a time.
as you get more advanced, you can make multiple loops, or state machines. pretty easy .

as for speed, you have a drive sprocket that will tell you wheel RPM. you have a front wheel that, unless it is not in contact with the road, will tell you forward speed.

if you spin the back wheel or do wheelies, you should not count on accurate information.

Thats why I want to use the sprocket with that inductive sensor or something that does the same. Please explain multiple loops and state machine. Thank you.

Hi, today I made a little bit of research. I found a npn inductive sensor that may be useful. I want to count front sprocket teeth and it has 16 of this. With some calculation its 0,37 meter per revolution and 1,3 meter every 2,68 revolution so everything is mathematically possible. Now can this sensor stand so many inputs? At 250 kmh it would be like 53 revolution of the sprocket and 16*53=almost 850 inputs in a second. Can this kind of sensor stand that? And can arduino do samplings every 250 ms and print the output every 0,4 s? Otherwise is there any other sensor I can use? I would be glad for some info. Thank you

This is the sensor

A little news...i structured the splash screen but I can't understand how to show it only once and after a delay show my screen with u8glib, anyone has some suggestion?


anyone has some suggestion?

Hi,I have an excellent suggestion for you: read this especially points 11, 14 & 15.

Thank you Paul, that's helpful !