the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
icon

resistor based door triggers


Post ReplyPost New Topic
< Prev Topic Next Topic >
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: January 12, 2014 at 2:20 PM / IP Logged  
Hello,
Sorry if this is in the wrong place, but I'm not sure where else would qualify this question. I am doing a remote start in a car, but the door triggers change a resistance value on ground. I'm trying to figure out how to detect this, because using diode isolation supplies only 7 volts.
From the service manual for the car, it states:
"The switch contains a single pole breaker and 2 resistors. When the door is closed, the breaker is open and the resistance is 1.8 ohms. When the door is opened, the breaker makes and a resistance of 620 ohms is connected in parallel with the original resistance. The total resistance then drops to 460 ohms. The voltage measured will be approximately 4.1V when the breaker is made, and approximately 7.4V when open. If the control module sees 10.2V or 0V, it will be interpreted as an error in the circuit."
So I'm assuming I would have to create a circuit to detect this, but what could I use to detect the difference in resistance?
No question is stupid or not worth asking. You were once a noob, right? :)
cutter122 
Member - Posts: 16
Member spacespace
Joined: January 08, 2014
Location: Quebec, Canada
Posted: January 12, 2014 at 2:30 PM / IP Logged  
whitch car model?
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: January 12, 2014 at 2:34 PM / IP Logged  
It's a 2009 Saab 9-3. The wire is gray, but it doesn't break the ground.
No question is stupid or not worth asking. You were once a noob, right? :)
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: January 12, 2014 at 3:43 PM / IP Logged  
A voltage comparator circuit using eg an LM339.
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: January 12, 2014 at 4:07 PM / IP Logged  
oldspark wrote:
A voltage comparator circuit using eg an LM339.
Thanks for that! Is there a sample schematic out there that would help? I'm limited with my knowledge of chips!
No question is stupid or not worth asking. You were once a noob, right? :)
KPierson 
Platinum - Posts: 3,527
Platinum spaceThis member consistently provides reliable informationspace
Joined: April 14, 2005
Location: Ohio, United States
Posted: January 13, 2014 at 12:02 AM / IP Logged  
Are you sure you didn't mean a 1.8K resistor instead of a 1.8 resistor? When you parallel two resistors together the resulting resistance is always less then the smallest resistor. Therefore, if you paralleled a 1.8 ohm resistor with a 620 ohm resistor the resistance would be less then 1.8 ohms.
If you parallel a 1,800 ohm resistor with a 620 ohm resistor you would get about 460 ohms.
You will need to find out which case you are looking for 4.1 or 7.4. If it were me I would set a comparator up at 5.7 volts and either look for anything above or below depending on which case I am interested in. I would not take the fault conditions in to consideration.
Kevin Pierson
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: January 13, 2014 at 6:24 AM / IP Logged  
I agree with KP - your "1.8 ohms" should be 1.8K = 1.8 kilo-ohms - ie, 620 Ohms in parallel with 1800 Ohms = 460 Ohms.
For circuits maybe look at R. Paisley's Comparators (especially "Comparator Operation" & the following "Input Vs. Output Results") or 1. Basic Comparator Circuit (about 2/3rds down the page).
The rule for a comparator is that its output is ON when its - input is HIGHER than its + input.
And for the LM339, ON means GND - ie, it can sink up to ~15mA to 0V aka GND depending on which manufacturer). (The LM339 has an Open Collector output - ie, it is floating (not connected) when OFF, and connected to GND when ON.)
So, using KP's suggested 5.7V as a reference voltage and assuming a supply +V of 12.6V, a 10k & 12k resistor should do...
IE: 12k from +12.6V to LM339 pin 5 (+) and 10k from pin 5 to 0V (GND) means pin 5 will be 12.6V * 10k/(10k + 12k) = 12.6 * 10/22 = 12.6 * 0.45 = 5.72V.
Pin4 (-) goes to the 1.8k resistor side of the breaker.
When pin 4 exceeds 5.72V, the pin 2 output will connect to 0V/GND (18mA max).
When pin 4 is less than 5.72V, output pin 2 will "float" - ie, connect a 10k resistor between pin 2 and +V to pull it to +V (eg, +12.6V).
Note that the 10k resistor from +V to the output pin 2 means 1.45mA with +V = 14.5V (the typical max voltage of a 12V system).
Don't forget to supply power to the LM339 - ie, +V to pin 3 (Vcc) and 0V/GND to pin 12 (GND).
And all (input) pins of unused comparators should be tied to 0V/GND to prevent spurious triggering of unused comparators (the LM339 is a quad comparator, hence 4 comparators in the one 14 pin package; but there are 8-pin dual comparator equivalents).
The LM339 handles Vcc supply voltages over 30V so a vehicle's 12V system is no problem. But you might want some filtering (capacitors)...
I'd suggest connecting pin 2 (the sensing input) thru a 10k resistor (or 12k etc) to the door circuit (ie, the breaker & its 1800 Ohm resistor).
A 0.1uF cap could then be added (pin 2 to GND) for some filtering if needed.
And if the door circuit has spikes (which is doubtful since it will go to an electronic circuit and not to relay coils etc), diodes could be added to protect the LM339 input(s). (IE - reverse biased diodes from the input pin to each rail (GND & +V) with diodes lines (cathodes) towards +ve; any diode - small signal 1N4148, 1N914 etc, or power diodes 1N400x etc).
Sorry if that's a bit much, but it covers several circuit basics (Google LM339 or 'comparator" applications & circuits).
Of course if you prefer simpler electronic circuitry and programming, there is always the PICAXE 08 (08M2) - an 8-pin 08M2 with a 5V regulator & a similar input circuit (voltage divider = 2 resistors, a cap and protection diodes) and output buffer (transistor or MOSFET to control high current devices) and you the program all behavior instead of changing comparator circuit values.
And dare I mention that by my rough calcs, that door circuit has another resistor and a maybe certain supply voltage (eg - a 620 Ohm resistor with its +V = 10V) whereas the comparator circuit varies its reference voltage (5.7V) depending on its +V - not that that should be a problem in this case (ie, discriminating an alleged 7.4V from 4.1V - not that the documentation specifies what the supply voltage is or if that circuit has a regulated supply...?)...
Ah, Hallowed be the Ori PICAXEs...
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: January 13, 2014 at 7:45 PM / IP Logged  
oldspark wrote:
I agree with KP - your "1.8 ohms" should be 1.8K = 1.8 kilo-ohms - ie, 620 Ohms in parallel with 1800 Ohms = 460 Ohms.
For circuits maybe look at R. Paisley's Comparators (especially "Comparator Operation" & the following "Input Vs. Output Results") or 1. Basic Comparator Circuit (about 2/3rds down the page).
The rule for a comparator is that its output is ON when its - input is HIGHER than its + input.
And for the LM339, ON means GND - ie, it can sink up to ~15mA to 0V aka GND depending on which manufacturer). (The LM339 has an Open Collector output - ie, it is floating (not connected) when OFF, and connected to GND when ON.)
So, using KP's suggested 5.7V as a reference voltage and assuming a supply +V of 12.6V, a 10k & 12k resistor should do...
IE: 12k from +12.6V to LM339 pin 5 (+) and 10k from pin 5 to 0V (GND) means pin 5 will be 12.6V * 10k/(10k + 12k) = 12.6 * 10/22 = 12.6 * 0.45 = 5.72V.
Pin4 (-) goes to the 1.8k resistor side of the breaker.
When pin 4 exceeds 5.72V, the pin 2 output will connect to 0V/GND (18mA max).
When pin 4 is less than 5.72V, output pin 2 will "float" - ie, connect a 10k resistor between pin 2 and +V to pull it to +V (eg, +12.6V).
Note that the 10k resistor from +V to the output pin 2 means 1.45mA with +V = 14.5V (the typical max voltage of a 12V system).
Don't forget to supply power to the LM339 - ie, +V to pin 3 (Vcc) and 0V/GND to pin 12 (GND).
And all (input) pins of unused comparators should be tied to 0V/GND to prevent spurious triggering of unused comparators (the LM339 is a quad comparator, hence 4 comparators in the one 14 pin package; but there are 8-pin dual comparator equivalents).
The LM339 handles Vcc supply voltages over 30V so a vehicle's 12V system is no problem. But you might want some filtering (capacitors)...
I'd suggest connecting pin 2 (the sensing input) thru a 10k resistor (or 12k etc) to the door circuit (ie, the breaker & its 1800 Ohm resistor).
A 0.1uF cap could then be added (pin 2 to GND) for some filtering if needed.
And if the door circuit has spikes (which is doubtful since it will go to an electronic circuit and not to relay coils etc), diodes could be added to protect the LM339 input(s). (IE - reverse biased diodes from the input pin to each rail (GND & +V) with diodes lines (cathodes) towards +ve; any diode - small signal 1N4148, 1N914 etc, or power diodes 1N400x etc).
Sorry if that's a bit much, but it covers several circuit basics (Google LM339 or 'comparator" applications & circuits).
Of course if you prefer simpler electronic circuitry and programming, there is always the PICAXE 08 (08M2) - an 8-pin 08M2 with a 5V regulator & a similar input circuit (voltage divider = 2 resistors, a cap and protection diodes) and output buffer (transistor or MOSFET to control high current devices) and you the program all behavior instead of changing comparator circuit values.
And dare I mention that by my rough calcs, that door circuit has another resistor and a maybe certain supply voltage (eg - a 620 Ohm resistor with its +V = 10V) whereas the comparator circuit varies its reference voltage (5.7V) depending on its +V - not that that should be a problem in this case (ie, discriminating an alleged 7.4V from 4.1V - not that the documentation specifies what the supply voltage is or if that circuit has a regulated supply...?)...
Ah, Hallowed be the Ori PICAXEs...
That's correct, sorry about the typo! It's 1.8k ohms. This is pretty intense and almost makes me wonder if I should just put a proximity sensor in the car and be done with it LOL.
I am trying to wrap my head around how all the components work together. I understand what they do, but I don't understand how to mix them together to get them to do what I need it to. Perhaps its because my limited knowledge on integrated circuits. I checked out the site and was overwhelmed! :)
So, if I understand correctly, this can monitor all 4 doors, right? Each door in the car (including the trunk) are set up with the exact same circuit. I would need a 2nd IC for the trunk?
If I were to build a circuit as you described, how would I test it? With my car having sensitive circuits, I'd hate to put my first circuit in the car and fry the BCM by accident!
I am good with schematics and can build a circuit based on one. It just takes me forever to figure out what it does. I built the circuit in this PDF: http://www.treyadcox.com/93/Saab%209-3%20Remote%20Start.pdf to get the remote start to work. I had to consult with someone to figure out what the delay circuit was, but I still can't understand how exactly it works.
I think for this to work, I would have to do some extreme studying and understand the terms and formulas. Is this circuit the only solution for something like this? I have the motivation to learn, but don't have a whole lot of time; I have to get the car back together. :) I truly appreciate everyone's help!
No question is stupid or not worth asking. You were once a noob, right? :)
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: January 13, 2014 at 10:11 PM / IP Logged  
Actually IMO it's easier to do than understand. Or certainly easier than trying to understand my gibberish above. In some ways it may be easier than that SAAB circuit.
All I reckon you need to understand is...
- a comparator is a device (chip, circuit, (gate??) with 2 inputs and an output.
- the output is ON when the comp's '+' input has a lower voltage than its '-' input.
NOTE - that + & - input has nothing to do with +ve or -ve voltage; it's merely the labels used to designate which input, namely non-inverting (+) or inverting (-). That jargon comes from Op Amps (Operational Amplifiers) on which Comparators are based. (Instead of buying quad OpAmp chips/integrated-circuits) and adding components to make them into Comparators, manufacturers have already done that in chips like the LM339.)
- you connect your tested voltage to one input.
- the other input has the 'reference' voltage - ie, the voltage where you want the output to turn on or off (aka change state).
- the Ref voltage is set using a (resistive) voltage divider (see Wiki).
That's basically it.
The other considerations are whether it's to be on or off when the tested/probed voltage is above or below the Ref voltage [that determines if the Ref is a + input or - input and hence tested input is - or + (ie, inverting or non-inverting) respectively] and misc other things...
The Misc's include supplying power to the Comp circuit (ie, the chip) and whether the output can handle the load.
Also voltage supply & ranges but that's not an issue since the LM339 etc uses a "single supply" (eg, +12V & GND, not +12V, 0V/GND and -12V) and your sampled voltage falls within its 0V to +12V range. (When I say +12V, I really mean whatever voltage the car is - eg, 10V to 14.4V etc.)
Then there are esoteric misc's like spike protection, noise filtering, tested voltage variation (from what the book said) etc. That's also called bluddy OldFart's rambling and is probably not an issue in this case. Or to paraphrase, an LM399 is cheap enough to suck and see and then worry about that esoteric crap if required (or if going into production...).
So yet again I have added extra ramble to a mere 'simple understanding', but maybe it will now be clearer.
BTW - my replies often take several reads - ie, a bit at a time. And my parentheses denote extra or incidental info that may not be needed but may pre-empt future questions or make readers aware of possible issues or alternatives.
Re one Comp per door hence one "quad pack" LM399 for 4 doors - yes, BUT...
It may be possible to do all (or 2) with a single comparator.
EG - from the National LM339 Datasheet page 5 is the following "OR" circuit - ie, output f is OFF if A or B or C are high.
resistor based door triggers -- posted image.
- with thanks to National Semiconductor
Firstly, that circuit is merely an example. You would use different resistor values and have a different Ref voltage.
Secondly, merely to explain how it behaves (without going into the resistive voltage divider Voltages that appear), I've written the following.
NOTE - I thought the circuit was wrong but even I got confused about "ON" versus "high" or "low". Don't worry about such "[Logic" issues - they'll blow my your brain. Suffice to say it is all easy to change later if you get confused (ie, swap + & - inputs).
If output f is OFF, the 3k resistor to V+ pulls f high (aka Logic 1), ie...
If any of inputs A or B or C go high to V+, then the + input voltage is higher than the Ref - input voltage (+0.075V in that circuit) and hence the output is off (high).
If no inputs are high, then the inverting (-) input's voltage is higher than the non-inverting (+) input thereby turning the output (transistor) on which pulls output f low to GND.
(So yes oldfart, that circuit is correct. Of course it is - it's National!)
The point being that if you only want one output if any door is open (or closed, whatever), then you could use that circuit.
It's the same if you only want to combine 2 doors so you only need one chip (LM339) for the lot.   
Or combine more so that you have spare comparators to invert or buffer the output... (that's another story!)
And now your brain should well and truly be fried! As if circuitry isn't bad enough, you have also been introduced to Logic circuits where low & high and 0 & 1 and off or on are totally arbitrary and depend on what you call "active" (eg, high, or 1, or 1 but low, or.... resistor based door triggers -- posted image.
Oh yeah, just as these comparators are almost infinitely configurable, so too there are almost infinite ways to do this.
However IMO it's either something DIY like this, or DIY using a PIC 08M2 etc, or more expensive circuits whether commercial & processor or analog based etc.
PS - IMO there no need to include the previous reply in your reply. Of course that's merely my view (I like to save screen space, bytes, & paper).
If I do, I usually only quote the relevant lines(s) else delete and use dots ... to replace the bulk between the first & last lines.
KPierson 
Platinum - Posts: 3,527
Platinum spaceThis member consistently provides reliable informationspace
Joined: April 14, 2005
Location: Ohio, United States
Posted: January 13, 2014 at 10:40 PM / IP Logged  
Can you just monitor a dome light?
Kevin Pierson
Page of 5

  Printable version Printable version Post ReplyPost New Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

  •  
Search the12volt.com
Follow the12volt.com Follow the12volt.com on Facebook
Friday, April 19, 2024 • Copyright © 1999-2024 the12volt.com, All Rights Reserved Privacy Policy & Use of Cookies
Disclaimer: *All information on this site ( the12volt.com ) is provided "as is" without any warranty of any kind, either expressed or implied, including but not limited to fitness for a particular use. Any user assumes the entire risk as to the accuracy and use of this information. Please verify all wire colors and diagrams before applying any information.

Secured by Sectigo
the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
Support the12volt.com
Top
the12volt.com spacer
the12volt.com spacer