markersniffen
Junior Member
With a long overdue streetfighter conversion starting to take shape in my head, I had idea to create a custom instrument cluster using an Arduino and an LED Panel.
I wanted something that would stand out, that would allow me to design a simple, pretty, and effective way of showing the critical (to me) info that I wanted well riding. (Speed, RPM, Fuel, turn signals, highbeam, neutral, and the evil orange "something's broken" light)
I liked the idea of a low resolution LED display, so I decided on using two 8x8 RGB LED panels, creating an effective resolution of 16x8.
I started with designing the look digitally, I attached one of the renders to this post. I have an Arduino UNO that is running the show, however I may look into the nano because it is smaller. The LED panels I purchased are ridiculously bright, and are very easy to control via an Arduino:
Adafruit NeoPixel NeoMatrix 8x8 - 64 RGB LED Pixel Matrix ID: 1487 - $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits
I've written most of the code to display the info, the biggest task for me will be getting the data from the bike into the Arduino. Having very little experience with circuits and electronics, I have a couple questions, and I'm hoping there's an electrical engineer around who might be able to help.
For starters, I gleaned a lot of knowledge from [MENTION=3100]Se7enLC[/MENTION] 's similar project:
http://www.600riders.com/forum/fz6-mods/46298-custom-dash-display-panel-arduino-lcd.html
Reading through his thread I learned a lot, and I learned that I need to learn a lot.
So for today, we'll just start with the RPM. The goal is to 'read' the crank position sensor (CPS) and feed that into the Arduino. I borrowed an oscilloscope from work and lifted the tank and starting testing things. (I also spent way too long trying to make sense of the electrial diagram from the service manual)
According to my testing, the CPS spits out an ac sine wave, of which I captured via the o-scope at two RPMs: ~1400 and ~5000 (see attached images)
To make this work, the wave needs to be squared (make it readable by Arduino), the negative voltages removed (protect Arduino), and the positive voltage regulated (down to 5v, also to protect Arduino).
From what I understand, resistors can bring the voltage down, zener diode will restrict the flow and remove negative voltages, and a schmitt trigger will square the wave. (Thanks Se7enLC!)
The one thing I'm unsure of is regarding the fact that the voltage changes as the RPM changes. If I am reading the scope correctly, at ~1400 RPM the voltage peaks around 12v...at ~5000 RPM the voltage peaks around 30v...? First off, 30v seems high...keep in mind I have a very primitive understanding of electrical theory...anyway my point is that if I do the math and set up a resistor divider network (thank you wikipedia) for the 12v signal, the math will be off for the 30v signal...and who knows what voltage comes out at 14,000 RPM, right? My best guess is that I should set up the resistors for the highest voltage, but this means the peak voltage for the lower RPM's will be very low, which makes me wonder if the Schmitt trigger will actually pick up those waves. Am I confusing anyone yet? Because I am confusing myself....
Here's the parts I have:
Zener Diode - https://www.jameco.com/webapp/wcs/s...storeId=10001&catalogId=10001&productId=36097
Schmitt Trigger - https://www.jameco.com/webapp/wcs/s...toreId=10001&catalogId=10001&productId=283792
I also attached a simple schematic I drew up for interpreting a 5v square wave AND a 12v AC wave...any glaring issues? My other question was regarding ground...I assume I would be grounding to the bike and not back into the Arduino for these circuits?
Thanks in advance! :rockon:
I wanted something that would stand out, that would allow me to design a simple, pretty, and effective way of showing the critical (to me) info that I wanted well riding. (Speed, RPM, Fuel, turn signals, highbeam, neutral, and the evil orange "something's broken" light)
I liked the idea of a low resolution LED display, so I decided on using two 8x8 RGB LED panels, creating an effective resolution of 16x8.
I started with designing the look digitally, I attached one of the renders to this post. I have an Arduino UNO that is running the show, however I may look into the nano because it is smaller. The LED panels I purchased are ridiculously bright, and are very easy to control via an Arduino:
Adafruit NeoPixel NeoMatrix 8x8 - 64 RGB LED Pixel Matrix ID: 1487 - $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits
I've written most of the code to display the info, the biggest task for me will be getting the data from the bike into the Arduino. Having very little experience with circuits and electronics, I have a couple questions, and I'm hoping there's an electrical engineer around who might be able to help.
For starters, I gleaned a lot of knowledge from [MENTION=3100]Se7enLC[/MENTION] 's similar project:
http://www.600riders.com/forum/fz6-mods/46298-custom-dash-display-panel-arduino-lcd.html
Reading through his thread I learned a lot, and I learned that I need to learn a lot.
So for today, we'll just start with the RPM. The goal is to 'read' the crank position sensor (CPS) and feed that into the Arduino. I borrowed an oscilloscope from work and lifted the tank and starting testing things. (I also spent way too long trying to make sense of the electrial diagram from the service manual)
According to my testing, the CPS spits out an ac sine wave, of which I captured via the o-scope at two RPMs: ~1400 and ~5000 (see attached images)
To make this work, the wave needs to be squared (make it readable by Arduino), the negative voltages removed (protect Arduino), and the positive voltage regulated (down to 5v, also to protect Arduino).
From what I understand, resistors can bring the voltage down, zener diode will restrict the flow and remove negative voltages, and a schmitt trigger will square the wave. (Thanks Se7enLC!)
The one thing I'm unsure of is regarding the fact that the voltage changes as the RPM changes. If I am reading the scope correctly, at ~1400 RPM the voltage peaks around 12v...at ~5000 RPM the voltage peaks around 30v...? First off, 30v seems high...keep in mind I have a very primitive understanding of electrical theory...anyway my point is that if I do the math and set up a resistor divider network (thank you wikipedia) for the 12v signal, the math will be off for the 30v signal...and who knows what voltage comes out at 14,000 RPM, right? My best guess is that I should set up the resistors for the highest voltage, but this means the peak voltage for the lower RPM's will be very low, which makes me wonder if the Schmitt trigger will actually pick up those waves. Am I confusing anyone yet? Because I am confusing myself....
Here's the parts I have:
Zener Diode - https://www.jameco.com/webapp/wcs/s...storeId=10001&catalogId=10001&productId=36097
Schmitt Trigger - https://www.jameco.com/webapp/wcs/s...toreId=10001&catalogId=10001&productId=283792
I also attached a simple schematic I drew up for interpreting a 5v square wave AND a 12v AC wave...any glaring issues? My other question was regarding ground...I assume I would be grounding to the bike and not back into the Arduino for these circuits?
Thanks in advance! :rockon: