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 >
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: February 12, 2014 at 2:53 AM / IP Logged  
To pull a voltage you first have to convert it into doll form...
Sorry - wrong forum... resistor based door triggers - Page 3 -- posted image. resistor based door triggers - Page 3 -- posted image. resistor based door triggers - Page 3 -- posted image.
I re-read this thread to see if I have understood correctly and noticed your " I couldn't diode isolate all 4 doors into one input on the LM339...". That's where you'd use the circuit I posted on page 1. Each door goes to one resistor (ie, A, B, C, or D).
Assume the Ref signal is set correctly near the 'normal' door outputs - ie, with all doors closed there is a certain voltage at the 339's + input.
When one door opens, it lowers the voltage to the 339's + which is enough to flip the 339's output.
Forget the detail for now - even I don't know if + has to be greater than - for the output to be on, or off... I'd have to research that - ie, re-read what I wrote earlier. The point is the principle. (IMO get the high-level aka concept right, then you merely work out or drill down into the details. That's how I used to do the impossible like electronic Haldas, dim fluorescent lights, impossible software tasks, faster than light travel (anti-grav), etc.)
The concept here is:
- you know diode isolating 4 doors to ONE point means the highest voltage overrides...
- but connecting each door thru a diode to one of the ABCD 100k resistors is NOT the same point...
- and (intuitively?) if all inputs are 7V then 339 + is 7V but if ONE of those drops to 3V then so too will the 339's + input.
I used 7V & 3V to approximate whatever your door voltages are (details... merely details) and to make this next line easier:
If one input goes low, the 339 + will be 6V.
If 2, it's 5V. 3 => 4V.
And if all 4 doors are 3V, then 339 + is 3V.
Anyhow, hence you'd set the Ref voltage (339 -) to 6.5V.
And if I've confused the 339 + & - then swap those inputs in the above. (Mere details - but you said you had to swap... but that might have been based another circuit... Ah, details!)
BTW - diodes would not be required for the page 1 circuit/diagram since the doors are joined via 100k resistors (hence 200k between 2 doors) and that 100k is much bigger than the door's max resistance of 1.8k. (IOW the current thru the 100k's are negligible compared to the 1.8k etc.)
Diodes would be used if the resistances were of similar magnitude, or diodes could be used to ensure isolation. They'd be nice to omit for calculation purposes, but since the REF voltage would be adjustable via a trimpot (variable resistor aka TRIMable POTentiometer), it's no big deal.
And you can usually change 'a high voltage overriding lower' to 'a low voltage overriding higher' by changing diode direction, and maybe pull up-or-down resistors etc. But lets forget such details for now. (Or rather, let ME forget about them!)
Ok, I digressed.
But for the sake of readdressing a missed issue, or pointing out the minor yet major difference between OR-ing aka diode-joining into ONE point as opposed to joining via different inputs, or alternatively joining via resistors to a single point...
But I'll adjourn here and address the lost power problem in my next reply.
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: February 12, 2014 at 3:28 AM / IP Logged  
So the BCM shuts off the voltage to the doors. Hence you cannot 'sense' using the 339 etc.
I therefore wonder how the vehicle/BCM senses when the door opens, but let's (or let me) not worry about that for now.
[ Apologies. Tho heavy headed this morning, I now seem to be in a non-thinking state of mind - ie, a refusal to think. That may be a reflection of locals and their reaction to recent political actions, fires, and general ongoing moronics. I then tend to go into shutdown mode - I get sick of repeating the same decades old lines to the same old audience. ]
My initial thought - series diode between the BCM and each of the doors to isolate the BCM. You supply power via a diode and resistor to each door to continue using the 339 approach.
Issues:
Will the diode effect the BCM's measurement of the doors?
Ans: Maybe or probably not if the BCM has a typically wide tolerance for the voltages measured, or if Schottky diodes are used (ie, a 0.3V drop instead of 0.6-0.7V)
What resistor do you use?
Ans: I had inconsistencies when calculating the resistance used by the BCM to the doors. But that could be solved with more info - ie, what system voltage was used for the Service Manual's statements? (ie, 'The voltage measured will be approximately 4.1V when the breaker is made, and approximately 7.4V when open...', or BCM circuit, or a proper solution to various simultaneous equations...
Djävla SAABs! (That's Swedish for bluddy SAABs. More accurately doggamned SAABs (or statanic, devilish, etc).)   
Of course maybe I could blame GM if they are the true designers of the bluddy SAAB.
Now if it was a SAAB Viggen I'm sure I'd be more enthusiastic. After all and plane that is laughed at by NATO et al but is later copied by many, and can shot down SR-71 Blackbirds, outmaneuver MIGs, etc...
I guess I'm just thinking aloud. (And whinging a-very-loud.)
And giving you some electronics (conceptual) theory for the heck of it.
Can't you just buy and old 3-cylider 2-stroke SAAB? resistor based door triggers - Page 3 -- posted image.
Till next...
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: February 12, 2014 at 6:51 AM / IP Logged  
Lol!
It's a 2009 9-3 Aero V6 6-spd. It's the best car I've ever owned IMO. It's fun to drive, sporty, but a wiring nightmare. xD
In regards to the diode isolation, allow me to explain what I meant. Each door signal would come in to the circuit and immediately hit a diode to isolate the BCM. From the diode, each signal would go to their respective input on the LM339. After the diode and before the input, a resistor would pull +12V to the signal wire when the BCM turns the power off. Is this how it works? Similar to pulling the signal to ground in the first circuit on page 1.
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 12, 2014 at 9:32 AM / IP Logged  
To paraphrase:
From BCM thru a diode with line end towards door (ie, 1.8k & 620R to GND.
"Your" resistor from +12V to line-end/door-resistors.
So your resistor needs to be similar to the BCM's internal resistance, AND its +12V is only on when the BCM turns off. (Ah - we need a comparator to sense when the BCM is off...)
And your +12V should be whatever voltage the BCM uses internally (maybe 10.2V?), but that might not matter if the REF voltage can be set to a suitable value.
Have you ever heard of a PICAXE - specifically (say) the 08M2? They are like a self-contained microprocessor circuit but all on one chip.
The 08M2 has 8 pins and has timers, counters, analog to digital converters (ADCs), a DAC (digital to analog coverter), programming space for ~2,000 instructions, etc. About $3. Consumes 14uA (or was it 14nA?) in standby mode, blah blah blah. Programmable via a serial port (legacy PC stuff or via USB-serial converter).
Usually all PICAXE pins - EXCEPT the +V & 0V supply pins and one dedicated input - can be configured as inputs or outputs.   Hence the 08M2 can have 5 inputs and 1 output, or 4 inputs & 2 outputs etc.
Minimum config is a 78L05 5V voltage regulator plus 2 programming resistors; then add whatever input and output circuitry is needed.
Programming tools are free and there are heaps of open source projects & programs (see picaxeforum.co.uk).
The problem is the learning curve for programming etc, tho much can often be cut&paste with a few modifications. (Programs are often much the same - it's merely what they input and output that varies. Programs can often be thought of as a collection of building blocks (program segments or modules) that are put together in different orders to achieve a goal).
But I have been surprised how some have adopted the 08M2 (or bigger/more_complex equivalents) to substitute tricky or complex circuitry, and done so with apparent ease. (I've suggested it a few times on mp3car.com and been impressed by its uptake. FYI - I've been meaning to use PICs etc for 20 30 years & finally bought a few maybe 5 years ago, but have yet to actually use one!)
I'm thinking that the PIC could be programmed along the lines of "if I see 7V or 4V, then... but if I don't see that...".
If not the expected 7V or 4V, then maybe 'your' external resistor of say 10k** supplies the door voltage (which will then be much smaller than with the BCM - eg, 0.7V & 0.4V).
Sir PIC Esq then works like:
- if 7V or 4V or in between the BCM is on and hence the doors are closed, or one is open etc.
- if 0.7V or 0.4V or between, then the BCM is off (not that I care) and hence doors are closed or one open etc.
The "in between" voltages will be similar to that A, B, C, D input comparator circuit if all combined to one input, tho you could combine 2 into 1 input (hence 2 PIC inputs for 4 doors), or use one PIC input per door. (Tho the latter might require 4 ADCs and I think the 08M2 only has 3, but hey, they're mere details.)
** The 10k or whatever resistor is reasonably larger than the BCM's resistance so it does not effect the BCM/door voltages - and hence no diode/s needed (unless the BCM is so sensitive that that low current could wreck its inputs when it is powered off).    
Sir PIC also has the error routines like if 12V or 10.2V then something is wrong and same too for 0V (tho in practice 0V should always be programmed as "less than z Volts" where Z is lower than what we work with (eg, 0.4V) but high enough to allow for noise and wiring resistance etc - eg, Zero Volts is less than 0.2V.
Incidentally, the voltages I mention above are our real world voltages - ie, the actual door voltages.
These will be lower for the PIC because the PIC only handles voltages up to its own voltage supply (ie, 5V with a 7805 regulator, but can be down to ~2V) and we therefore scale down our voltages which will be up to 10.2V or 12V or 12.7V or maybe 14.4V etc.
Scaling down is a techy way of saying a two resistor voltage divider. (IE, it's easy in reality.)   
But anything is possible. Maybe Sir 08M2 turns on the door supply if it senses that the BCM is off. (Hence one output for that.)
Maybe it alerts you in case of a fault if the BCM etc does not do that (it should!).
Or add your hood switch; maybe a boot/trunk switch.
The beauty of uPCs and PICs etc is that once you have the interfacing (input & output circuitry) it is simply (LOL?) a matter of programming.
You reprogram changes to voltage set points etc - there is no trim-potting or component changes.
You might start by using 4 PIC inputs but then add stuff that requires more inputs or outputs. You might then combine the 4 inputs - move the other 3 inputs to the one and modify you program. (That assumes each input (door) has its own series resistor, but a design should probably have that for various electrical reasons but especially so that a capacitor can be added to filter out any noise on each input [an RC filter is much easier than software solutions].)
And a PIC can operate with negligible current (uA) so it can be on all the time.
Does any or all of that make sense?
Or do you want to stick with the analog solution for now?
I reckon we might be close to the analog/339 solution, but if it does get too complex...
But it's bed time. My alarm will show no mercy in less then 6 hours...
PS - there are various considerations for the 08M2 like choice of inputs - eg, might be able to have 5 inputs but there are only (maybe?) 3 ADCs), but they all have solutions (like maybe digital inputs but they'd only be good for sensing if eg IGN was on or off, not if 7V or 4V... unless a zenor circuit was used... resistor based door triggers - Page 3 -- posted image. ...)
Details. Mere details. (Did I mention the learning curve...? resistor based door triggers - Page 3 -- posted image. )
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: February 12, 2014 at 10:40 AM / IP Logged  
It actually makes perfect sense! I'm a web developer by trade, so hopefully it'll be easy enough to learn a new language resistor based door triggers - Page 3 -- posted image.
I will take a look into the PICAXE this afternoon to see what I'm getting into.
I almost feel like the analog solution is something 'simple'. If we could just 'disregard' any voltage less than 3V or somewhere around there, it'd be perfect! Or, set a 'default voltage' if that's even possible.
So to answer a question about the BCM. The service manual doesn't go into detail about a regulated voltage or anything like that. Metering while the car is off will yield the reference voltages (4.1 - open, 7.4 - closed, ±0.3V depending on the battery charge). I haven't tried metering these with the car running, so I don't know if these values increase as the battery is charging. But the voltage hangs around 14.0V when the engine is running. About 12.5 with the engine off.
This actually caused an issue with the original circuit, and I had to add another 2.2k resistor to lower the threshold more. At 14V, it pushed the threshold voltage too high and set the alarm off every time, thinking that 7.4V was a door opening.
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 12, 2014 at 4:02 PM / IP Logged  
Ahh - then you know how easy it is to get a program right. resistor based door triggers - Page 3 -- posted image. resistor based door triggers - Page 3 -- posted image.
(Man I am using those emoticons in this thread. I rarely use those - probably a legacy of my IT experience. Where was it I said something about shutting off from involvement? Hmmm...)
(Actually I just realised - I usually work high level & drill down..., but for uPCs I preferred assembler. And oddly enough my coding was largely bug free - ie, well past power-up and well into functionality before a problem might show.)
Tho the PIC etc might be the way, I'd still like to 339 it. Probably because you already have the stuff - and have done so excellently well** - and I feel it has such an easy solution.
{ ** not meaning to patronise etc, but you said <whatever> yet have done so much so well. I think we work alike. Everything is the same, just different. However, you actually do & achieve things. resistor based door triggers - Page 3 -- posted image. )
The charging voltage issue is solved with a voltage regulator for the 339. And it seems to confirm that the BCM is regulated (if I understood correctly), tho the ±0.3V depending on the battery charge doesn't. (Is the BCM off with the engine running? In simple theory cranking batteries vary from 12.7V to ~12.4V (20% discharged) but in practice from ~13.5V (surface charge) to ~11.5V (dead flat) and lower (under heavy loading - cranking etc).)
I might have another crack at those calculations. (I think I ended up iterating because I kept getting negative (resistance) values - hence something wrong with my calcs.)
Download the 3 intro refs to PICAXEs from picaxe.com, namely PICAXE Manuals.
OMG - they've added a 4th "Using Flowcharts". Who the heck would use them (except post-design for documentation for others)? Tho PICAXES may be different in that the flowcharting tools can translate into programs. Or maybe that can be done now for all languages?? (NB. I'm Oldspark = OldFart.)
Anyhow, work calls....
freqsounds 
Copper - Posts: 289
Copper spacespace
Joined: October 17, 2008
Location: Virginia, United States
Posted: February 12, 2014 at 4:39 PM / IP Logged  
Haha! As long as I know you're not mad at me for trying!
I have that drive where I can't take 'no' for an answer, especially when it's something that I really want to see done. I'm always willing to learn and explore new areas. I'm no expert, I don't have a 'specialty', but I try to get at least a little experience in everything. I appreciate the compliment!
I would like to see the 339 work too, just because it seems so simple, and this 'roadblock' can't be the only thing to hold the project back! resistor based door triggers - Page 3 -- posted image.
The BCM stays on while the engine is running. I don't know if it temporarily shuts off during starting. I'm not even sure how I'd test that (during starting) other than metering the wires while cranking.
The battery charge I speak of is from having the car 'awake' too long. I think the last time I had 3.9V with a door open from repetitively opening and closing doors. So the car might be regulating the voltage, but I'm not entirely sure, and I'm not sure who might know. resistor based door triggers - Page 3 -- posted image.
I haven't had a chance to look up the PICAXEs yet. But I will take a look at those links this evening.
I've heard of Flowchart programming -- Microsoft Visio can translate a flowchart into simple code. It can generate database scripts based from a database diagram as well. So it might be something they're introducing so the 12 year old kids have something to do haha! resistor based door triggers - Page 3 -- posted image.
I have two installs tonight, and hopefully afterward, I can pull the circuit and play around with it. It's snowing here, but I should be able to get out there as long as I have my torpedo heater!
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 12, 2014 at 8:03 PM / IP Logged  
Alright, so I took the circuit out, used a 10k resistor on the door signal inputs, and the light goes out. But this only works if the inputs aren't grounded. So if the BCM 'floats' these trigger wires, this might work. Using a potentiometer, taking the voltage less than 3.1V will turn the light off.
Now, if the BCM does ground these wires (wouldn't surprise me), can I use a diode to block that ground? I think (you might know for sure!) it would just pull it to 12V.
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 12, 2014 at 8:05 PM / IP Logged  
Oh, and I was testing the circuit using 8xAA batteries to test the circuit @11.89V with this configuration. At 14V, would it act the same?
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 2:25 PM / IP Logged  
Sorry - I missed your last...
Your unregulated circuit will definitely change - ie, the voltage REF point will vary, tho it might not matter (ie, if it's far enough between 2 values or sufficiently under or above a single value).
As to the BCM I don't know.
Their quoted voltages should have a 'system' voltage stated - eg, 12.5V or 12.7V or 14.2V etc - otherwise it might mean it uses a regulated voltage.
If the BCM uses uPCs (PICs etc) for this sensing, then it should be regulated (since uPCs are usually 5V) but changing sensor voltages could also be handled by software (ie, senses system voltage and scales down thru software).
If it uses discretes whether non-regulated digital chips or analog circuitry, then it need not be regulated since all REFs and voltages will remain the same relative to each other - ie, vary in proportion to the system voltage.
Does that make sense?
Paraphrasing:
If a BCM is regulated then most likely so too are its sensor voltages.
Hence 'your' circuit also need to be regulated UNLESS the varying voltages do not cross the REF voltages (ie, REF is 5.5V and is still between the 7V swing from 6-8V and 4V swing from 3-5V).
Cool?
Keep in mind the voltages above are examples only. And they are the 'actual' voltages - not what might be scaled in your circuit. (EG - if using a 5V uPC or PICAXE, you'd scale the voltages down. But you might do that anyhow even on an unregulated 339 circuit...)
BTW - kick me if I fail to respond to your replies, or my promises! (ie, BUMP else PM)
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