Lil' Blackbox

General => General Discussion => Topic started by: jamesstubb on March 23, 2023, 12:06:19 PM

Title: Turbo RPM Gauge
Post by: jamesstubb on March 23, 2023, 12:06:19 PM
Im running a Mega board with some analog sensors into an Android head unit via CAN to display RealDash. RealDash will also be controlling a relay board for LilBB mode control as well as other accessories. What I want to accomplish is sending Turbo RPM into RealDash via my Mega board.

Im pretty new to the coding world, but my thought for simplicity sake is to output Turbo RPM from LilBB as an analog voltage that I can feed into my Mega and decode it that way. This seems like lightest load on the LilBB as well as the easiest way for me to pull data into RealDash.

If this is feasible, how would I connect the standalone to the mega? Im pretty sure I can figure out the code to make it work.
Title: Re: Turbo RPM Gauge
Post by: jamesstubb on March 23, 2023, 12:57:17 PM
After some thought, would it make sense to wire the 4 mode wires straight to digital pins on my MEGA? Low state would trigger mode, correct?
Title: Re: Turbo RPM Gauge
Post by: hakcenter on March 23, 2023, 10:56:56 PM
How about some math ?
1000 rpm per bit ADC out ?

Or maybe 2000 rpm per PWM ?

Never really gave it much thought but you have some pins at your disposal. Could even create a serial interface if you wanted to lose two of the inputs.

All the input pins have a 10k pull up jumper you could just remove and reuse the input as you see fit.

Not sure if the adcs could be used for serial either.
Title: Re: Turbo RPM Gauge
Post by: jamesstubb on March 25, 2023, 04:32:29 PM
Is there a way to get the full sketch so I can add this in?
Title: Re: Turbo RPM Gauge
Post by: hakcenter on March 25, 2023, 08:55:36 PM
Sketches are posted in their respective threads just download and have at it.