Members | Sign In
Chippernut Forums > Shift Light v1
avatar

Calibrating the rpm signal

posted Mar 31, 2015 22:15:56 by Gareth Anderson
Hi there
First of all, great project. Built this for my early impreza sti and at first seemed to work perfectly.
However i notice i am getting approx 70 percent of the actual rpm signal. Any ideas what could cause this or how i could calibrate the sensor signal?
Digital rpm read out isn't that necessary, i have adjusted the rpm activation values to compensate, just want to get it spot on.

Thanks again

Gareth
[Last edited Apr 08, 2015 21:20:08]
page   1
9 replies
avatar
Jonduino said Apr 01, 2015 13:36:36
Hi Gareth,

Thanks!

Can you describe the problem a little more? When you say 70% of the RPM signal, do you mean it's calculating 70% of the actual rpm value (1000rpm = 700rpm)? If so, this is resolved by adjusting the code where it says:

"rpm = 21e6/interval; // CALIBRATED "

It's right at the top of the main loop. I calibrated mine using trial and error. Start by adding one (21e6 to 22e6) and see if this increases or decreases your desired value, then keep adding or subtracting. If you want, you can get really specific by dropping the "e" power notation to 5 and adding another digit (ie: 21e6 to 215e5)

// Normal Running Operations
void loop() {

if (timeoutCounter != 0)
{
--timeoutCounter;

//This calculation will need to be calibrated for each application
//float rpm = 60e6/(float)interval; // ORIGINAL
rpm = 21e6/interval; // CALIBRATED
// Serial.print(rpm);
// matrix.println(rpm);
// matrix.writeDisplay();

}


I hope this helps -- let me know. I am developing a VERSION TWO of the code that will be more universal so you won't have to adjust any numbers. It will be backwards compatible, so when I finish the code you can upload it to your gauge.

Thanks!
- jon
avatar
Gareth Anderson said Apr 02, 2015 13:00:59
Hi Jon
Thanks for the reply. You got it spot on. And yes ticking over I am reading about 700 rpm. I saw the calibration section in the code, but was unsure what needed to be changed to adjust the code and calibrate the signal. Ill give it some adjustment over the weekend, i want to modify my install slightly anyway.
Thanks again, G

P.S Looking forward to the v2 code.
avatar
Gareth Anderson said Apr 02, 2015 13:41:30
Well got a bit impatient, went out and tweaked the code. I got to within about 50 rpm fairly quickly which will do for me. Ill upload vid/pics when i get a chance. I ended up with 33e6 by the way. Just need to finalise where o mount 4 digit display.mIt needs shroud of some sort to shield from sunlight.

Thanks again,G
avatar
Jonduino said Apr 03, 2015 14:33:18
Awesome!!! I'm glad you were able to get it calibrated. Yes, please post pics/videos of your install.

I still haven't found a convenient place for mine, lol. I have it wedged under one of my gauge pods on the center-console.. keeps the reflection down and holds the display in place.

I've search high and low for a bezel or shroud like you mentioned, but haven't found anything yet. Maybe a simple, small project box or enclosure would work with some careful crafting.
avatar
Gareth Anderson said Apr 03, 2015 22:21:40
Hi

I cut and bent some black card for now, does the job. Hoping to get a 3d printer soon, if so i'll try and come up with something, as i have too looked extensively for some kind of case/shroud/hood that will suit

Looking into another project, boost gauge. I have seen a 16x2 lcd project online, but i'm liking neopixels with their flexibility, but still new-ish to the coding. I can take code and tweak or customise it, but nothing complex from scratch. Lets see where i get with it.

Thanks


G
avatar
Jonduino said Apr 06, 2015 14:31:55
You read my mind! I've been holding off on getting a nice boost gauge because I want to DIY one. I just haven't had the time to start that one yet. If you make some progress please feel free to share, I'd be interesting in hearing how you go about it. I have one of these on-hand, I was going to try to use this.

MPX4250AP
Board Mount Pressure / Force Sensors Board Mount Pressure / Force Sensors PRES SEN INTEG 250KPA
http://www.freescale.com/files/sensors/doc/data_sheet/MPX4250A.pdf
avatar
Gareth Anderson said Apr 07, 2015 13:47:04
Hi
I have bought the DP version of that sensor, assuming (correct or not I'm not sure) that one port will measure boost pressure with the other a reference to current atmospheric pressure. I have seen the AP sensors used before, but won't show the - 10 psi my sti pulls on tick over, and also some kind of calibration code is required for avg atmospheric pressure at you're location? I could be wrong in most of that, I haven't had a chance to build anything to test.
I'd hope to use a mini oled, combined with neopixel ring for boost, I've got one but haven't got it working with example code yet, though I'm also looking at a g-meter of some kind. I need more dash board space to fit all this lol.

I'll try and do some kind of intro to b my setup later in the week, just been so busy lately.

Thanks, G
[Last edited Apr 07, 2015 13:47:32]
avatar
Gareth Anderson said Apr 08, 2015 21:26:30
Hi again. Had a thought this morning while driving to work, is there scope for a dimmer in this code, or maybe something on the v2? While it was dark, the leds were very bright, when i dimmed them down they weren't visible in the day light. Perhaps the arduino could pick the headlight on signal usually used for audio head units, (12v with lights on) and dim the current brightness setting by say 60%?
avatar
Jonduino said Apr 10, 2015 13:24:19
Hi Gareth,

I normally keep mine around the middle of the range. But yes, the neopixels are very bright. I highly encourage an enclosure. I built mine for a few dollars out of flexible frosted tube I picked up at a hardware store. That helps a good deal.

Great idea!!
I had intended to put a dimmer option on future iterations - you can adjust the 'daytime' and 'nighttime' brightness levels so it's all automatic. But I haven't implemented the code quite yet.

- jon
Login below to reply: