Netduino Speedometer?
#1
Posted 23 September 2010 - 10:01 AM
#2
Posted 23 September 2010 - 10:28 AM
Does the vehicle have an (accessible) ODBII connector?My idea is to make a digital speedometer for a vehicle by tapping into the vehicle speed sensor
#3
Posted 23 September 2010 - 10:34 AM
For frequency counter, use an InterruptPort trigerred by one edge (either InterruptEdgeLow or High) and subtract time passed to OnInterrupt handler and previously stored one, averaged over certain number of samples. I have posted a pulse meter code sample, which measures pulse width, so just replace the interrupt mode to get started.What I'm wondering is how would I go about reading the pulses with the Netduino?
Precise measurement can be done using Timer Capture mode, which is not currently available on Netduino (Edit: The microprocessor has it, but the necessary pins are not broken out and there is no software support in the firmware).
Edited by CW2, 23 September 2010 - 10:41 AM.
#4
Posted 23 September 2010 - 04:12 PM
My idea is to make a digital speedometer for a vehicle by tapping into the vehicle speed sensor (VSS) feed from the powertrain control module (PCM) to the instrument cluster. The VSS on the transmission sends a digital signal to the PCM. Most applications vary, but the vehicle I'll be working with has a VSS that sends out 4000 pulses per mile.
Everything since 1993 ? has an ODBII connector, usually under the dash above the driver's right knee. Monitors general Obd-2 data: Fuel system (open/closed loop status), Engine load, Coolant temperature, Manifold Pressure, Engine Rpm, Vehicle speed, Timing advance, Intake air temperature, Intake air flow rate, Throttle position, Secondary air status.
Google OBDII , and you'll find a gaggle of articles and projects about interfacing.
#5
Posted 23 September 2010 - 05:49 PM
Google OBDII , and you'll find a gaggle of articles and projects about interfacing.
There is actually a new gadget coming out soon that lets you interface a LEGO NXT Robotics kit with the ODBII port...
Today LED's, tomorrow, the world!!! Well, OK, maybe servos.
#6
Posted 23 September 2010 - 10:51 PM
Does the vehicle have an (accessible) ODBII connector?
No OBDII. Vehicle is OBDI (which would still work using the OBDI connector to retrieve speed).
For frequency counter, use an InterruptPort trigerred by one edge (either InterruptEdgeLow or High) and subtract time passed to OnInterrupt handler and previously stored one, averaged over certain number of samples. I have posted a pulse meter code sample, which measures pulse width, so just replace the interrupt mode to get started.
Precise measurement can be done using Timer Capture mode, which is not currently available on Netduino (Edit: The microprocessor has it, but the necessary pins are not broken out and there is no software support in the firmware).
Definitely going to give this a look. This might be what I'm looking for.
Everything since 1993 ? has an ODBII connector, usually under the dash above the driver's right knee. Monitors general Obd-2 data: Fuel system (open/closed loop status), Engine load, Coolant temperature, Manifold Pressure, Engine Rpm, Vehicle speed, Timing advance, Intake air temperature, Intake air flow rate, Throttle position, Secondary air status.
Google OBDII , and you'll find a gaggle of articles and projects about interfacing.
Everything since 1996 for sure. Some GM vehicles have the bastardized OBD1.5 which is OBDI with an OBDII connector. The test case is a vehicle from 1989, so definitely OBDI. Don't want to use the ALDL to get the information though since the intended use will be to retrofit an existing digital instrument cluster with a more accurate digital speedometer.
#7
Posted 24 September 2010 - 07:17 AM
For frequency counter, use an InterruptPort trigerred by one edge (either InterruptEdgeLow or High) and subtract time passed to OnInterrupt handler and previously stored one, averaged over certain number of samples. I have posted a pulse meter code sample, which measures pulse width, so just replace the interrupt mode to get started.
Precise measurement can be done using Timer Capture mode, which is not currently available on Netduino (Edit: The microprocessor has it, but the necessary pins are not broken out and there is no software support in the firmware).
Yep that's what I needed. The code should make what I want to do very easy. Thanks CW2! I'll just use an InterruptPort event handler to count the number of pulses received every 500 milliseconds, then perform my calculation to determine MPH.
Thinking about tying into the original cluster's English/Metric button and have it switch from MPH to km/h.
Also eventually want to explore using a small motor to retrofit a cable-driven analog cluster to accept a digital VSS signal. So many options to explore!
#8
Posted 24 September 2010 - 07:43 AM
Nice. Should you have any problems with time period based calculations, please have a look at the Timing measurements thread, where community member phil evaluates Netduino interrupt response time - due to the nature of (the current implementation of) .NET Micro Framework runtime, it takes some time for the interrupt handler to get executed (they are queued) and this time may vary (e.g. garbage collecting can postpone it by several milliseconds). Thus, you may need to ignore certain spike values etc.I'll just use an InterruptPort event handler to count the number of pulses received every 500 milliseconds, then perform my calculation to determine MPH.
#9
Posted 24 September 2010 - 07:53 AM
Take a seat, I'll be right with you.
#10
Posted 24 September 2010 - 06:08 PM
I'm sure I am telling a granny how to suck eggs but...that feed will be 0-12-0 (mine is), an connecting that to your Netduino will cook it. You'll need a voltage divider for it to bring it down to a happy level (3.3 or 5)
You are correct. Don't need to let out the magic smoke inside the Netduino.
#11
Posted 25 September 2010 - 01:01 AM
#12
Posted 04 November 2010 - 05:07 PM
Thinking about this regulator to bring the voltage down to 3.3V: http://www.pololu.co...og/product/2110
That would do fine or do something like an LM7803 with some filtering. I too am interested in doing some playing with the netduino and a car app. Might I suggest the reconsideration of the ODBII, there are even quite a few ODBI scanners available, approach in that you have access to a lot more info that can be displayed. I am sure you are aware of that as well as the fact that current ODBII scanners are some what laggy or slow when compared to what you are looking at.
Just some food for thought add a rpm, speed, temp, etc... gauges would be fairly easy that way and if you want to carry it further you could interface with the CAN-Bus for controlling other items in the vehicle.
I am also looking into using the CAN-Bus shield for the arduino as it should work on the netduino.
#13
Posted 18 March 2011 - 04:58 PM
#14
Posted 19 March 2011 - 04:00 AM
Thinking about this regulator to bring the voltage down to 3.3V: http://www.pololu.co...og/product/2110
Ok, I'm new here and just getting started with micro's, but isn't that regulator a bit of overkill (not to mention a extra $)?
From what I understand the input pin wouldn't sink a whole lot of current so wouldn't a zener for clipping do the job? Maybe with a voltage dividing resistor pair if you really want to get overprotective?
I'd think .30 cents in parts is a better choice than a $15 module, or am I missing something?
Arawn
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users