Shop OBEX P1 Docs P2 Docs Learn Events
sampling automotive VSS — Parallax Forums

sampling automotive VSS

AJMAJM Posts: 171
edited 2009-06-10 15:20 in General Discussion
Hi Everyone,

I am looking to count the cycles off of the vehicle speed sensor in my car using the propeller. I am assuming I can do this using positive/negative edge detection.

It seems like powering a microcontroller on automotive voltages has been covered recently so I won't bring that back up. For now I will be powering the system with batteries which brings up my question.

Since the propeller and the VSS are grounded to different power sources, I need to understand how to connect the propeller in order to sample the sensor's signal. From what I understand the logic signal from the sensor may be too high/low because of the different ground references.

Can I simply create a single point ground between the two circuits? I hope this makes sense and someone may be able to help me better understand the situation.

Thanks again,

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-09 16:54
    You could use a common ground. A much better solution would be to use a fast, sensitive optoiolator, such as the H11L1. (It has an open-collector output, so be sure to use a pullup resistor.) This will elminate any potential problems that may come from a direct connect your your car's electrical system.

    -Phil
  • AJMAJM Posts: 171
    edited 2009-06-09 17:19
    Thanks Phil, that's a great idea. I appreciate the input

    -AJ
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-06-09 20:19
    Phil, unless you can prove otherwise, I would respectfully disagree with putting an optoisolator on the vss, unless you can limit your ma to less than 1. Most VSS signals use a pull up resistor that the sensor pulls down, if I understand the workings. I would recommend something down the line of a npn and pullup, and use a 200k or so pullup on the input to bias the transistor enough so that it is putting a slightly positive signal on line, rather than sucking juice out of the system to run the led.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-06-10 15:20
    What Phil described is commonly used to interface logic and microcontroller systems to other noisy and/or high-power electrical systems. I have used this scheme in automotive use myself having created an entire digital dash and electronic control system for a 1980 Pontiac Grand Prix. The opto is nothing more than an LED and an NPN transistor. When interfacing two systems together with this method both sides are electrically isolated and work via light. From the perspective of the microcontroller activating something on a vehicle using an opto, the microcontroller would essentially be lighting an LED. On the other side the NPN transistor is referenced to the car ground (VSS) and pulled high via a 100K resistor on the collector side. The collector then could be fed into a P-Channel FET wired to some lighting circuit. Now, when the car system has power by default the lights are off. But when the microcontroller lights the LED in the opto the transistor pulls that line LOW, effectively turning on the lights. This is a simple explanation however it illustrates the point.

    From the perspective of sensing when something is on/off on the car…if the hot line you’re testing goes through the proper resistor value into the anode of the LED and the cathode goes to the car VSS, then when the car system is on, the LED will be on. On the microcontroller side this would be detected as a low on the collector (which has been pulled high otherwise). Optical isolation is very useful in automotive and industrial interfacing. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.