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: February 18, 2014 at 8:17 PM / IP Logged  
You're back! Thought you forgot about this simple yet impossible rig. resistor based door triggers - Page 4 -- posted image.
That does make sense, and I was going to ask you about the door inputs as well -- the 7.4V will fry a PICAXE from what I read.
So if we staged down the voltage, would the variation between the voltages be too close to detect? What I mean is, lets say a door closed is 4 volts, and an open door is 3 (after staging down). Is it sensitive enough to detect the difference? I had this problem with the LM339 after using a resistor to pull down a (+) voltage.
By the way, I took my chances and tried the circuit with what I discussed in my last post, and it failed. The circuit didn't work at all whether the door was open or closed.
I've been doing quite a bit of other research, too. The car uses the CAN Bus, and the GMLAN. As a programmer, my thoughts are that statuses are the same across the board. A left front door open in a Saab is the same data sent over the CAN as a Chevrolet with its left front door open.... right?? My theory is if I use an ADS-ALCA, I can try to read from the CAN or GMLAN with a GM firmware. It's a shot in the dark, but what are your thoughts on trying this?
I noticed something the other day. Courtesy lighting. On the bottom of the door. It only comes on when the door is open, and it comes on every time. BUT, I have to get through a molex connector to get to it, which means adding pins to the existing connector. Finding these connectors is about as easy as building a circuit to monitor the door triggers! lol, but the connectors are $40 for a 10 piece set, so I have to be sure it'll work before I spend the money!
These lights are powered by the door latch. A wire runs from the door latch to a courtesy light in the bottom of the door. When the door is opened, the light comes on. All I would have to do is monitor the wire -- I think. With the BCM turning off, it might have the same effect as the trigger wires that go to the BCM. I can meter the wires when the BCM shuts off to check for this.
So, if this fixes my door and trunk issues, the last thing I would need a solution for is the hood pin. It's set up the same way, only there isn't a light under the hood. With the hood open, the pin rests at GND. Once the hood is closed, it gets a short burst of +12V, then goes back to GND. This car has me completely baffled, and I'm surprised the damn thing even works. resistor based door triggers - Page 4 -- posted image.
Regardless, I am enjoying every second of figuring this out. Once the procedure is done, I will be the first to have successfully install an alarm/remote start in this particular model. After being tortured on SaabCentral, I'll finally have a pile of crap to rub in their faces! Saab enthusiasts are a unique, insulting, and bitter community, especially if you're a noob. resistor based door triggers - Page 4 -- posted image.
No question is stupid or not worth asking. You were once a noob, right? :)
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: February 18, 2014 at 8:38 PM / IP Logged  
Lets just keep replying and see how many pages we can get! xD
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: February 18, 2014 at 10:58 PM / IP Logged  
What - you think I am one to waste energy and screen-estate by simply rambling on?
You newish Copper members are certainly wising up!
What you said about the door lighting gets back to what I said before - door switches. That's different to a lock/unlock or similar circuit.
But also as I said, the BCM might detect individual door openings and control the appropriate light.
The scaling has essentially no effect on whether it can be done. It's a case of whether the low voltage range overlaps with the high voltage range (ie, if open voltages overlap with closed).
Provided they do NOT overlap and set point (REF) can be set in that non-overlapping range (typically its mid point) then there should be no problems.
But such overlap can be solved by having your circuit use a regulated voltage so it does not vary.
IE, if all circuits are non regulated they should all remain the same relative to each other.
If one circuit is voltage regulated, then its associated circuits (eg, yours) should also be regulated. Hence they never vary.
I did cover that (unless I'm confusing various threads!) so maybe re-read and see if that now makes sense.
I might check too before my next reply...
KPierson 
Platinum - Posts: 3,527
Platinum spaceThis member consistently provides reliable informationspace
Joined: April 14, 2005
Location: Ohio, United States
Posted: February 19, 2014 at 10:35 AM / IP Logged  
The ability of the picaxe to detect differences in voltages is based completely on the resolution of the ADC. I am not familiary with the picaxe but with the microcontrollers I use they have a 10 bit ADC. 10 bits is 1024 different possibilities giving you a voltage resolution of around 0.05vdc. In practice though, I wouldn't go that low I would most likely use the 8MSB to provide filtering leaving you with 256 steps which leaves you at about 0.02 vdc resolution.
So if you scale down the voltages by 3 you should have no issues determining open/close status. I would recommend using a voltage follower in between the car and the voltage divider circuit just so you don't load down the OEM circuit and cause issues with the BCM.
Kevin Pierson
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: February 19, 2014 at 3:32 PM / IP Logged  
Thanks KP - that was something I didn't cover.
The 08M2 also uses 10 bit ADC (four channels).
KPierson 
Platinum - Posts: 3,527
Platinum spaceThis member consistently provides reliable informationspace
Joined: April 14, 2005
Location: Ohio, United States
Posted: February 19, 2014 at 7:43 PM / IP Logged  
Oldspark what would you think about running the voltage for each door through a very big resistor (1 meg +) and then using a 5v zener diode on it? With the very large resistor it should have a very negligible effect on the OEM circuit and with the zener it would protect the input.
Since anything over 5vdc indicates that the door is closed you could just program the ADC to look at a small window around the "door open" voltage. When the voltages is in that range fire the output indicate a door is open.
The zener would eliminate the need to scale voltages.
Thoughts?
Kevin Pierson
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: February 20, 2014 at 4:36 AM / IP Logged  
I think good as a way to turn on a transistor etc - provided the doors do not vary voltage with system voltage - but otherwise a resistive divider.
It's 2 resistors versus one zenor and a resistor, so reliability & cost wise, 2 resistors wins. Plus no zenor non-linearities (with temp, or current tho that should remain fixed) - not that that matters as a mere on/off or maybe above/below determination.   
Or, it's a scaling versus determination of what the post-zenore output is (manufactured tolerance, current thru zenor, and temperature variations).
IMO resistors are far more stable, and reliable.
And if underscaling is a concern (ie, you have a voltage higher than the ADC tolerance and blow the chip), then add a reverse polarity diode to +V (1N914 small signal or 1N400x or a Schottky) to clamp the excess voltage.
IMO the best input is via a resistor to the uPC/PIC etc input which has clamping diodes to both +V & GND to protect against voltage extremes. You add a resistor to GND is voltage dividing (scaling) us required. And a cap if filtering is required. (For filtaring the zenor, a series resistor is still needed.)
I hope that makes sense - ie, the "universal" hardened & scalable input template = voltage divider + cap + 2 diodes.
And if the voltage changes, change a resistor or substitute a trimpot - probably easier than getting another zener.
Plus with the 2-resistor voltage divider it is easy to calculate the output voltage (eg, Vout = Vin x 0.3) so it is easy determine what the ADC sees and hence program set points.
Do you agree? (Sorry about my poorly organised reply - maybe I should review & restate?)
IMO zeners are good for simple low current regulators or crowbar circuits, or as a simple way to turn on a device (transistor or logic circuit) once an input exceeds a certain value.
But otherwise, or if using an ADC, why not use a voltage divider and have the option of having multiple set points (eg, if 2V < Vin < 4V then...)?
KPierson 
Platinum - Posts: 3,527
Platinum spaceThis member consistently provides reliable informationspace
Joined: April 14, 2005
Location: Ohio, United States
Posted: February 20, 2014 at 3:42 PM / IP Logged  
My main concern was loading the OEM circuit and thus changing the values. However, my initial thought of using a very large resistor to restrict current draw could be used for the voltage divider circuit as well.
However, you may run in to issues with tolerances with very large resistor (for instance a 1.5 meg resistor with a 5% tolerance could range anywhere from 1,425,000 to 1,675,000 ohms. When you do this for all four door circuits it may drastically reduce the accuracy of the total system. Of course caution could be taken to match the resistors I guess. The zener, to me, seems like a valid application as you maintain the original headroom (somewhat) between the different states.
Kevin Pierson
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: February 20, 2014 at 6:39 PM / IP Logged  
Ahh - Cool! (Or to mock politicians and other fakers - "I'm glad you asked me that!".)
To me it's implicit that there is no loading of the OEM circuit - otherwise use a voltage follower etc (an op-amp type buffer circuit that mimics input without loading).
In this case with its 1.8k resistors etc, I'd want at least 10x the resistance, preferably 100x. Hence the 1.8k equivalent being >18k or pref 180k. Hence maybe 100k.
On the other side, we can't have too high an impedance/resistance for the PIC/uPC etc. But since these are usually quite high - eg, requiring mere nA else mA - that usually isn't a problem.
Before I mention skewing, re resistor tolerances...
Yes - resistors and all components have a tolerance. Now while therefore you might use 1% resistors if 1-2% accuracy is required, it may not matter....
VIZ - those tolerances represent the max difference between its marked or intended manufacture value and its actual value. Those tolerances do not indicate the natural variation of a component (due to temperature or arbitrary drift etc).
IE - an actual 1.005 meg resistor is the same whether it be a 1% or 5% or 10% tolerance.
The point being that using two 5% tolerance resistors might give an output that deviates up to 10% from your ideal calculated values, but that deviation remains fixed - eg 4% higher or 2% lower. And that is just a matter of recalibration.
Hence trimpots etc in analog circuits, and for digital - a reprogrammed REF value or a programmable scaler to modify whatever REF values or maps are used.
In some cases calibration isn't necessary - eg, in this case we may need to detect a ~60% swing (4V versus 7V) or a 20% swing (that 3V difference between 4V & 7V relative to a supply of up to 15V).
Hence 10% tolerance resistors might do (not that they exist anymore), but 5% should be fine. 1% or 2% would be overkill (but not as expensive as they used to be??).
[ Incidentally, in ye olde days one could almost guarantee that in a batch of 5% tolerance resistors you would never find any within 1% or 2% because that had been removed to supply as 1% & 2% resistors respectively. I'm not sure about manufacturing these days - I'd suspect all are manufactured as 1% and merely arbitrarily marked as 1% & 5% etc.   Just as all 1N400x diodes might be 1N4007s. ]
So component tolerance is more a question of whether you can calibrate the final product (trimpot or a software/firmware variable).
Back to skew (for want of a better or correct term)...
Except where the aforementioned loading of the OEM circuit effects OEM operation, any skew caused by parallel (linear) components is similar to the component tolerance issue.
EG - if our resistance is so high that the uPC's input affects the voltage divider's output, it may not matter - we simply recalibrate. (Alas constant current inputs are more complex but that only matters if wanting a continuous output like a temp or volt display etc instead of a simple REF point or two.)
How'z that sound? Yep, I've been there & done that...
Hence MY 'glad you asked that' because I do know the answer(s) - unlike most politicians and others that use that phrase (IMO it's a dead giveaway!).
Of course I'm even gladder if you see a flaw in my arguments or come up with something I haven't considered.
BTW - I too often thought of zeners etc as a linear drop-down device but came to the conclusion it's only good as a drop down of [level - eg, a 46V to 47V swing to 1-2V etc, aka an expanded scale.
But if that level changes, or the swing is too high eg 46-54V is 8V which is too high for a 5V or 3.3V ADC etc.
Or if the zener drop is too variable with temperature, or the zener is too unreliable or costly.
And zenors have their tolerance too - and vary with current.
So given the cheapness and simplicity of a voltage divider; the greater selection of resistors; and that it's the same circuit/PCB configuration but to which filter caps are easily added...
Hence my standard 2 resistor (+ cap + 2 diode) PCB input design. Any zenor drops would be external to that - eg, maybe to drop 450VDC CDI supplies to reasonable voltages.
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: February 24, 2014 at 8:56 AM / IP Logged  
You guys lost me again, haha!
Would it be feasible at this point to just us a 12V micro SPST relay to kick the circuit on when the BCM is awake? I can use the GWA wire to allow the circuit to only turn on when the system is armed.
This could be easier than inventing a new wheel. resistor based door triggers - Page 4 -- posted image. Although I'd like to get the circuit working, I might do it this way temporarily until we can figure it out.
No question is stupid or not worth asking. You were once a noob, right? :)
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 26, 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