Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Netduino Speedometer?


  • Please log in to reply
13 replies to this topic

#1 Tosk

Tosk

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationMO, USA

Posted 23 September 2010 - 10:01 AM

Hi folks. Very new to Netduino development and wanted to run a project idea by some of you to see if it's possible, and/or how I'd go about it. 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. I've already decided on using the display here: http://www.sparkfun....roducts_id=9767 What I'm wondering is how would I go about reading the pulses with the Netduino? Are the PWM pins output only? Or can I hook the VSS feed up to one of the PWM pins and read the number of pulses being sent over the line? Thanks for entertaining my noobish question. Have some other ideas for automotive applications, too. Looking forward to getting started with them.

#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 23 September 2010 - 10:28 AM

My idea is to make a digital speedometer for a vehicle by tapping into the vehicle speed sensor

Does the vehicle have an (accessible) ODBII connector?

#3 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 23 September 2010 - 10:34 AM

What I'm wondering is how would I go about reading the pulses with the Netduino?

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).

Edited by CW2, 23 September 2010 - 10:41 AM.


#4 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

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.
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#5 Eric Burdo

Eric Burdo

    Advanced Member

  • Members
  • PipPipPip
  • 130 posts

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...
~ Eric D. Burdo ~ http://brick-labs.com/

Today LED's, tomorrow, the world!!! Well, OK, maybe servos.

#6 Tosk

Tosk

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationMO, USA

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 Tosk

Tosk

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationMO, USA

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 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 24 September 2010 - 07:43 AM

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.

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.

#9 Crispin

Crispin

    Advanced Member

  • Members
  • PipPipPip
  • 65 posts
  • LocationLondon, England, Earth

Posted 24 September 2010 - 07:53 AM

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)
--
Take a seat, I'll be right with you.

#10 Tosk

Tosk

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationMO, USA

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 Tosk

Tosk

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationMO, USA

Posted 25 September 2010 - 01:01 AM

Thinking about this regulator to bring the voltage down to 3.3V: http://www.pololu.co...og/product/2110

#12 rlnthndr

rlnthndr

    New Member

  • Members
  • Pip
  • 1 posts

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 Kilhoffer

Kilhoffer

    New Member

  • Members
  • Pip
  • 3 posts

Posted 18 March 2011 - 04:58 PM

Did you ever get this working? I'm starting an exact project and I'm curious how you went about it. Any info you want to share from your project will help me a ton. Thanks...

#14 Arawn

Arawn

    New Member

  • Members
  • Pip
  • 2 posts

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

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.