Input detection trickery required!

Go To Last Post
48 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm sure I've seen this somewhere, but searching here and Googling hasn't easily found it....

I want to detect three states of high, low and open circuit on one input pin with no other components.

The input will come from a SPDT On-Off-On toggle switch with, it would seem sensible, center to input pin, top to +5v, bottom to Ground.

I'm sure it's to do with something like switching the pull up on and off at the right times and measuring for example:
- that it's definitely low
- that it's definitely open circuit
- or if it's neither then it must be high

I await the 'Freaks assistance! TIA, Martin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi.

Can't you use the AD from the AVR?
I'm sure to dectect the low and high states that you can use the AD but for the open circuit i'm not sure.

Regards,

Bruno Muswieck

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can't you use just 1 x 100..220k resistor ??

If you can then connect it to the avr pin , and ground.
If the pin is floating then tou should be able to pull it up , w. the internal pullup.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Never thought that it would happen, but here it is a link with tips, from Microchip, that will solve your problem. Actually almost all tips in there can be used in AVRs.

http://ww1.microchip.com/downloa...

Felipe Maimon

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can do it with a couple of comparators, some logic probes do it that way. You can probably find a circuit with a bit of Googling.

Leon

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simple put a resistor (e.g. 4.7k) in series from the switch to the pin.

Then set the pin as output low, switch to high impedance and read it.
Then set the pin as output high, switch to high impedance and read it.

If you read low/high, then it was floating
If you read high/high, then the switch was high.
If you read low/low, then the switch was low.

The trick was, that a floating pin hold its previous level for a short time by its own capacitance.

Maybe one or two NOPs may needed after switching to high impedance until reading in.

Disabling interrupts may also be needed, to avoid long time gaps from switching to high impedance until reading.

Peter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Leon
No complex external components please - I'm going for an absolute minimal hardware design!

@fmaimon
Tip #3 looks promising - one external cap might be a good compromise

EDIT:@danni
If it works then looks good - one resistor is cheaper than one capacitor! Have you actually domne this or is this the theory?

I'm sure I've seen a solution somewhere with no external components at all.....

Last Edited: Sun. Oct 8, 2006 - 04:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you're looking for this trick: internal AVR-pullup = 20 ~ 50 k, and turning that on or off is teh trick in switch open.

Sorry I couldn't come up with a componentless trick, but hope this helps.

There is another one, but that needs two input-pins on the AVR

Nard

Edit: just saw that Bingo suggested this .... didn't notice that before.

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nard/Bingo - looks the best so far! No need to worry about parasitic/stray capacitance tricks.

I'm sure (but getting less convinced!) that there's a "no component" solution. Keep thinking chaps and chapesses!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:)

The component-less solution needs two AVR-pins. Is that ok ?

Nard

Edit: added sketch

Attachment(s): 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

'fraid not - I have exactly that solution now and am trying to save a pin!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If there is any potential for noise in your environment, I would not recommend the resistor only solution using the internal pullup, nor would I recommend the zero component approach relying on pin capacitance. Both are high impedance, high bandwidth solutions that will eventually succumb to noise. The method advocated in the PIC appnote is the one I have used reliably for decades.

I do not recommend any approach which does not use an external capacitor. You may also wish to add resistance on the switch side of the capacitor to improve noise immunity, or on the processor side of the capacitor to limit charging current (which could be an issue if your power source has a high impedance).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

@scottkroeger
I don´t see it that critical.
With the AVR´s IOpin you get a capacitiance of about 10pF. Wiring and the switch may easily add another 30pF.
Then you have 40pF.

I recommend a 470kOhms to GND. (so with pullup the voltage can settle to at least 90% Vcc)
* read pin value (without pullup but delayed): if high it really is high. if low:
* switch the AVRpin to pullup - you have to wait some time for the voltage to settle.
45kOhms x 40pF = 1.8us (63%) - use ten times this timing. (bad switch and wiring increases timing)
* read pin value again. if high, then it is highImpedance, if low it is really low.

The worst case is if the switch is OPEN and you use the AVR internal pullup. resistance then is
50kOhms(max. Pullup)||470kOhms = about 45kOhms (max). But then the voltage is about 90% VCC at the pin.
To read a "false low" the noise must drop the pin´s voltage to 30%Vcc this gives 60%VCC noise immunity.
I don´t think you can expect 3V noise on 45kOhms = 67uA. The capacitance additionally generates low pass
filtering. Fc = 88kHz.

I use internall pullups, with pusbuttons next to the AVR (20mm wiring) next to high power switching
(2500V/4000A) and can not remember a false reading of the state.
Edit: added "(without pullup but delayed)" to clarify

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Then you have 40pF.

To what? If you aren't careful with your design, it could be 30pF to noise and 10pf to ground.

I'm glad you are not experiencing hiccups in your product. But leaving I/O pins at high impedance without attention to filtering out noise, or at least characterizing it, is not good design. You have short runs to the buttons, that may not be true of the OP, and as I said in my post, "if there is any potential for noise in your environment".

You can replace the capacitor with a software debounce filter, and that might be a practical solution, but if there is a chance of ESD breakover from the switch handle to the signal line you still have a potential hardware damage problem.

Susceptibility to noise is also proportional to the repetition rate of the sensing software. If it is possible to sense the switch position at a low rate, do it, and debounce the results.

A penny or two for a small cap seems a reasonable price to pay to ensure the design is robust.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
@scottKroeger

Quote:
If you aren't careful with your design, it could be 30pF to noise and 10pf to ground.

You are absolutely right. One must take care of the design.

But for short and good_designed wiring i find 50kOhms is not high impedance.

Quote:
A penny or two for a small cap seems a reasonable price to pay to ensure the design is robust.

Here also i have to agree with you.

When i read the OP´s post, then i remembered a PHILIPS device with "3-state inputs" (low, high, high impedance)
(i don´t think it is a lucky solution, but they saved some input pins and kept pin-compatibility with older versions)
The connections are usually hardwired on the PCB with short traces and are not meant to change.
This may be different to the OP´s design.

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So what would be the best value capacitor and (AVR-side) resistor to use?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no danger for noise, the capacitor must only hold its voltage for less than 1µs until the reading back was done.
After every reading activate the internal pull up to avoid a floating input.

And debouncing must be done for any mechanical switch, so also in this case:

Repeat the set and read procedure e.g. every 2..20ms and if you get the same reading for four consecutive times, then accept it.

Then noise or bouncing was suppressed.

Peter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Quote:
So what would be the best value capacitor and (AVR-side) resistor to use?

You can see it in my discussion with scott: It depends on your design, environment and what you want to do:

* Is it for setup only (never switched)
* If switched, how often?
* what noise sources are around?
* how long is your cable to the switch, and is it shielded (or are other switched or noisy signals near)
* do you expect ESD? how much?

The higher the capacitance, the more reliable, but slow.

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
There is no danger for noise

Famous last words.

We don't know Martin's situation. I've designed monitors that operate in the presence of surgical electrocautery machines. It's not uncommon to find 10VP-P random noise, over a bandwidth 5MHz, on high impedance lines. Debouncing an unfiltered input in this case results in erratic operation. Without knowing the noise environment for design, it is always advisable to reduce your input bandwidth. A capacitor does that, oversampling (debouncing) may not.

MegaUSBFreak,
Be careful, the 88KHz Fc you computed ignores the source impedance of the noise. That's the Fc you are interested in, and it's often difficult to determine.

Martin,
Is your switch on the PCB near the AVR? or at the end of a cable? If it's nearby, a hundred picofarads or more will help. If it's on a cable, put 1K in series with the switch output, at point where the wire meets the PCB, and put the filter cap right there too. That sets your input bandwidth to a maximum of a MHz or so and prevents any high frequency noise from walking across the PCB before it hits the bypass cap.

I'd suggest driving the pin high/low for a few instructions to make sure you've settled the cap voltage before looking at the pin level. Use a scope to make sure the voltage settles in time.

And if I recall correctly, the AVR will start/stop driving the pin at the end of the sbi/cbi instruction, but will sample the pin at the beginning of sbis/sbic instruction. That begs for a NOP or some other instruction in between, even if you use no capacitor at all. A C compiler might not be able to give you back to back set and test instructions, but you should verify that if you code this in C.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK...

Application is in an automotive environment - passenger cell side, not engine bay. Good power supply regulation so can eliminate noise on power lines caused by transients on vehicle supply.

Switch is mounted directly on PCB, probably mo more than 4cm from AVR "as the crow flies". PCB design will be double sided (not yet complete) but will be done "properly"

Switch is operated rarely - once every hour or so of operation.

Will need to debounce - either by capacitor or software debounce. Probably prefer the former as the software is already hugely timer and interrupt-driven and I can't spend time waiting for a few mS before re-reading the switch without yet more task scheduling.

Coding in ASM - none of this C new-fangled stuff (not Coding Wars Round #248)!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You don´t need to wait mS for debounce. You probably have a timer generating an interrupt in a constant time (eg. 1 ms). Every time it does, read the input and see if the value has changed. If it did change, wait until you get a constant read of the new level.
This link has some interrupt driven examples:

http://www.embedded.com/showArti...

Felipe Maimon

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Martin,

Do you have any ESD survival requirements? Those may be more of a worry than noise upsetting your switch sensing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ScottKroeger wrote:

Do you have any ESD survival requirements?

No - and as we appear to be in your comfort zone rather than mine, can you explain more please....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I come from an environment (medical instrumentation) where ElectroStatic Discharge is a concern. In general products must survive at least 10 air discharge or direct contact hits at 15KV with no damage. There are also requirements for an instrument's ability to withstand ESD without temporary malfunction, or if there is a malfunction, it must not threaten the patient's health, and it must be documented. Those tests are performed at 8KV and below.

I don't know if your industry, or your particular application have similar requirements (I don't know if you are making a product for sale, or a one-of). ESD is often the most vexing problem to solve in a design. Once it gets into your system, it seems to go where it wants and do what it wants. After 30 years of trying to outsmart it, I am still humbled now and then.

I usually protect vulnerable signals with current limiting resistors and BAV99 (or where leakage currents are a concern BAV199 diodes) to clamp the line to the power supply rails. Good ground design is a must, as ESD's fast edge rates make it an RF issue. So make sure the path from the ESD entry point to exit point (probably the power terminals on your PCB) doesn't run past anything sensitive, like your AVR's oscillator crystal.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MartinM57 wrote:
OK...

Application is in an automotive environment - passenger cell side, not engine bay. Good power supply regulation so can eliminate noise on power lines caused by transients on vehicle supply.

I have found that the automotive environment can be much harsher than you expect. Ignition wiring is like little transmitters. So, not all your noise will be coming throught the power supply wires, but may be induced in the wiring of the electronic device directly.

I have not stress tested my own devices in an old classic car with no resistor wires (solid copper core), but I will be doing so soon. I expect to find all sorts of issues that are not as obvious on more well behaved (appearing) modern cars.

I would advise designers in an automotive environment to be very careful of noise immunity in all circuits, not just the power input.

-Tony

Addendum: Part of my power supply protection is a TVS. 27V bidirectional, 1500Watt. I just hope that it gives adequate ESD protection. I do not use an inductor on the PCB, but I probably will be using a hefty inductive power line filter outside the instrument in the power line. In other lines that come in from the egnine compartment (from sensors), I use limiting resistors followed by a BAS70 dual diode to the power rails to limit the voltage to rails +/-0.7v max (hopefully).

I have not had any problems with this design so far, and no evidence of noise issues, but, as I said, I have not stress tested the device.

Last Edited: Tue. Oct 10, 2006 - 01:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Interesting - thanks for taking the time to write that up!

I suspect I have no specific ESD requirements - it's a one-off that I hope might see the light of day as a DIY kit some time. It's not associated with the control or safety of the vehicle.

I have various protecton mechanisms in the power supply and on the input signals but I will revisit them in the light of what you say.

I have some transorbs/tranzorbs - 1N6282/1N6283 - in the design. Are these effectively the same functionality as the BAV99/BAV199 which I can't use as they seem to be surface mount?

TIA, Martin
(hijacking my own thread alert!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have to say this has been the most helpful and accurate thread I've seen on here in a long long time. Wonderful discussion by all. Two pages and no name calling! woohoo!

So my 2cents: I've done a bit of design for the automotive environment. I gotta tell ya it is one of the worst electrical environments you can experience. (yes there are much worse but let's not get into that!) With that said I highly recommend that you get your prototype into a real car as soon as you can. In fact put it in multiple cars. You WILL discover things quickly. Conducted emmissions are awful in a car but radiated emmissions can be just as bad! Also check the other way around. Turn your device on and make sure you can still get all the radio stations on the radio.

Also, if the switch we are talking about is activated by a human then you most certainly will have ESD issues. Sliding into a car over the cloth seats can build up quite a charge!

Go electric!
Happy electric car owner / builder

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have some transorbs/tranzorbs - 1N6282/1N6283 - in the design. Are these effectively the same functionality as the BAV99/BAV199 which I can't use as they seem to be surface mount?

I do not think so. You need a "transient Voltage Stabilizer", AKA(?) tranzorb to divert the high voltages to ground. These are capable of handling some considerable voltage and current briefly. Your 1n6282 is a unidirectional TVS. I use a bidirectional, so + and - spikes are handled in the same package. This limits the voltage to something like 20-something volts, instead of a spike of thousands.

But you still need better clamping. That is the role of the dual schottkey diode. When placed after a current limiting resistor, it will clamp the voltage to close to the rails, within the limits of the AVR.

Ideally, you would have a bidirectional transorb to ground, followed by a current limiting resistor, followed by clamping diodes, followed by any further low/high/band pass filters as the order of the schematic.

I only use the transorb on my power supply circuit because that is the only "electrical" connection to the rest of the car electronics. All the sensors are powered from my own unit, and I would hope that big spikes will not exist. I could be wrong on this one, and I COULD blow my AVR, but we will see... so far, though after many hours or running (in a modern car) it is glitch free.

BTW, my project is a Rally Computer, what's yours?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I believe the 1N6282C is a bi-directional TVS so we are talking the same thing (I think!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your unidirectional tranzorb is fine. It's really a zener designed to handle high current/power. You get the rated clamp voltage in the reverse direction and the standard silicon 0.7V in the forward direction. You don't want a bidirectional unit (which is really two back to back devices) unless you expect bidirectional voltages in normal use. If you are clamping a unidirectional signal (logic or single supply analog) or a DC power rail, you want a unidirectional tranzorb. A bidirectional TVS will allow spikes in both directions up to the clamp voltage that can damage your circuitry, and you will pay extra to allow it!

Tranzorbs can have very high capacitance (1nF is not unheard of) which can be a blessing or a curse. In your switch application it could very well be a blessing as it eliminates the need for the capacitor. I use BAV99 for their very low capacitance, which allows higher current limiting resistance for the same bandwidth. They are small and cheap and give me the flexibility to tune that bandwidth as needed using the series limiting resistor and perhaps capacitance.

You can also place small "arc points" in the PCB layout to shunt a majority of an ESD spike. These are nothing more than little spots on your input traces that come very close to an exposed ground point. You can't cover this spot with solder mask, as that will prevent the intentional arcing. You can create a PCB footprint which is just a pair of rectangular pads offset diagonally that get to within your minimum track spacing at their corners. At 30KV/inch dielectric breakdown in dry air, you can easily get breakdown to occur at less than 1KV. It's not terribly accurate, it's not very repeatable, there is no spec sheet for its performance, but it's free.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Low/High are easy, its open that is trickier. I'd use a c urrent limiting resistor between the pin and the switch and set the pin to output state and drive the opposite polarity snd seeing if the pin state changes to the driven value. The resistor is there to eliminate pin damage due to the short circuit created when the switch is in one of the ON states (low/high).

HTH
DFR

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd be wary of transzorbs across the power supply - tranzorbs don't take much of a kick to kill them and then they go short circuit. Depending on the current requirement of the equipment, I would put a 10R 5W in series with the power to soak up any nasties and use an automotive regulator. With auto stuff, you have the legendary 'load dump' from the alternator that can exceed 40V - you would like your device to survive that and keep on working.

On you other inputs you can expect 12V to be applied in error, so you need to protect your transzorb. Most of the ECUs ive seen don't bother with a transzorb on the signal inputs - they do have low pass filters and rail to rail diode protection and rely on the resistor in the low pass filter to limit the current. 1N4148 style diodes work well in this application - BAV99/199 are also fine but they are low leakage which is probably overkill unless you're dealing with uV signals. The R & C of the low pass filter also knocks the edge of ESD events with the diodes cleaning up the rest.

Spamiam - as for your rally computer - is this a hobby or professional project? If hobby, I've had the project in the back of my mind for some time so I'd be interested in such a design. I've done most of the research but not got to the point of actually writing the code.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Martin,

Where is the 1N6282C? If it's across the 12V rail you're okay, but remember that your voltage regulator must survive an accidental reverse jump. Regulators that handle reverse inputs are often designed for automotive use and also handle load dumps, and therefore don't need the diode for protection.

If you put a 1N6282 unidirectional across the 12V bus, it'll eat the load dumps, but get blown off the board during a reverse jump. You can use a series diode in the 12V rail to avoid this problem and allow use of a regulator that doesn't tolerate reverse voltage input or 60V load dumps.

Almost anywhere else in your design (like across your 5V or 3.3V rail) a lower voltage unidirectional device makes more sense. The 1N6282C will pass +-25V on any wire it protects. A 1N6282 will pass +25V, -1V (-4V at 100A or so). And of course a lower voltage device will offer more protection to low voltage lines.

1N751 (5.1V 250mW zener) does a pretty good job of eating ESD spikes on 5V logic lines. It's not much good for larger transients, but it's cheap.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A rally computer (at least ours, back in the late '80s) was connected to an unswitched (fused of course) battery connection so we didn't lose power if (when) we stalled the car. The battery tends to protect us from a lot of evil surges due to its low impedance.

We used a 7805 with just a diode in series for about 10 years.

(Actually it wasn't a "computer" despite its 4 MHz Z80. It was a multiple digital stopwatch. Still met SOP rules.)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Scott - have you looked at the response specs for standard zener diodes? Sloooow compared to most TVS diodes and MOVs. Also watch using 5V1 zeners on analog signals - they start to conduct some voltage before the 5V1!

In many of the ECUs i've seen, they tend to use a MOV as the main feed protection. Whilst MOVs aren't too accurate with their voltage, they can take quite a kick and still keep ticking. Give them too much and they explode.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, zeners are slower, but they allow input resistance high enough for the RC to make up for it. Though input resistors don't really help as much if the arc can go around them. I would not use a 1N751 in any place where you expected a surge or line transient, but for protecting a line from a fingertip zap, they do work.

And on analog lines I only use BAV99/199 style protection, with series current limiting and a spark gap.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Back to the switch problem....

You could pull the input low(by making it an output) then test the pin state then pull the input high (by making it an output). If you can pull the pin both ways and detect the correct state then it is open circuit otherwise it is either high or low. Downside is this puts peak currents through the AVR - I would suggest a suitable low ohm resistor in series with the port pin - low enough to overcome any pullup resistors and to ensure the port pin pulls high or low enough outside the input threshold so you detectthe state correctly. I'd guess at 100R, but some calcs and experimentation should allow you to better specify this resistance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know you didn't want external components, but if you can afford a resistor or two and you can put it on an ADC input, you can build a resistor ladder and have each switch short out different sections. I've put a 26-switch keyboard on a single ADC - at the end of a 150 foot cable. Required about 8 resistors.

If you can put all of your switches on one ADC, this can be quite an I/O savings.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Guys - great thread and it certainly covered some other areas that are of good interest to me!

I've prototyped the RC solution and it seems to work fine in an isolated bench prototype mode - eventually. I had to put in a few synchronous delays to allow things to settle since the native instruction speed at 20MHz clock is far too fast to just go through the steps one after another!

So I now need to integrate it into the main app, where synchronous delays are not allowed....

ADC and a resistor ladder is quite an interesting idea - I'll think about that a bit more

Thanks all (so far!)
Martin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Martin,

The delay you needed is probably required at ANY clock speed. AVR output instructions change the pin state at the END of the instruction. Input instructions sample the pin state at the BEGINNING. So even at 100KHz, there is no delay between the action and the sensing unless you put something between the set and test instructions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm - I must admit I was putting 1mS delays in. I'll look at just putting a few cycles of delay in. Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'd be wary of transzorbs across the power supply - tranzorbs don't take much of a kick to kill them and then they go short circuit.

Fortunately, this thread is tolerating two parallel topics within it.

I am sorry to hear about the delicacy of transzorbs.... I have a 400V diode first, then the 1.5KE27CA bidir transzorb to ground, then a TI PowerTrends 5V switching power supply. It is rated for 40V input. I do not recall if it is rated for "automotive" purposes.

In the power line before this I _will_ be using a power line filter inductor. I got it a while back from RadioShack, but they do not carry them any longer. I am not positive where to get them now.

Right now I am not using that inductor, and I am powering the unit from a cigarette lighter because I wnat to have a nearly "worst case" situation for stress testing the device. The only worse thing I can see would be in my old classic car with solid core ignition wires and no resistors in/on the plugs. I will be making this test later in the year.

I had looked at a MOV instead of the TVS, but they are pretty bulky. I suppose I can make room for one.

I also am using the same TVS in a device in my classic car. It is the 10V "voltage stabilizer" for the instruments. I used the same filtration (Diode, TVS) feeding an automotive-rated 10V linear regulator. SO far that one is going strong, but does not have that many hours under its belt.

-Tony

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ScottKroeger wrote:
If you put a 1N6282 unidirectional across the 12V bus, it'll eat the load dumps, but get blown off the board during a reverse jump. You can use a series diode in the 12V rail to avoid this problem and allow use of a regulator that doesn't tolerate reverse voltage input or 60V load dumps.

If I remember correctly, a 1N6282/1.5KE30 can only absorb a couple joules before failing short circuit. A load dump can easily have an order of magnitude more energy than that. It would probably be a good idea to add a series resistor to limit the clamped current (if that's possible) or to use as high a voltage TVS as possible so that the vehicle's central suppressor or other suppressors take the bulk of the energy.

Some switch manufacturers also quote a minimum current (e.g. 1 ma). You may have long term reliability problems if you don't respect that. I am far from being a switch expert, however, and have also read that quoting a specific, minimum current is fairly meaningless.

My double-topic reply to a double-topic thread. :)

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The minimum switch current is there to ensure that oxidation is burned off the contacts when the switch closes/opens. In the past, I've put capacitance across the switch to ensure a small inrush when it's closed.

This is a common spec on reed switches where the mating force is very low and you can't depend on abrasion to keep things clean.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have also read such specifications and couldn't fathom why they should exist. How would a pair of hermetically sealed contacts oxidize or be contaminated? I am just puzzled!

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jfiresto wrote:
I have also read such specifications and couldn't fathom why they should exist. How would a pair of hermetically sealed contacts oxidize or be contaminated? I am just puzzled!

This parameter id cslled wetting currrent and I have always respected it in my designs yet have never heard a cogent explanation.

DFR

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

danafraymond wrote:
jfiresto wrote:
I have also read such specifications and couldn't fathom why they should exist. How would a pair of hermetically sealed contacts oxidize or be contaminated? I am just puzzled!

This parameter id called wetting currrent and I have always respected it in my designs yet have never heard a cogent explanation.

Of course if the contact surfaces were of dissimilar metals that would explain it (Galvanic Corrosion).

DFR

Last Edited: Fri. Oct 13, 2006 - 04:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The switch is hermetically sealed and full of air, and therefore at least some oxygen. There are inert gas filled reeds used for low level signal commutation, but they cost more.

The low operating force of reeds poses another problem. If you pass too much current, the contacts will weld together and the tiny separating force won't overcome it. I hate when that happens.