buffering analog input

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

I need to read a few sensors for an automotive application. I have learned to be very afraid when connecting anything from the outside world directly to a leg on an avr using copper. People (including me) do all sorts of stupid things and the avr is usually the most PIA to replace. What does everybody else use to buffer an analog input? An op amp with a gain of 1:1? Any other ideas?

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

For complete electrical isolation, an optoisolator is the best option. But depending on the linear accuracy required, an optoisolator may not be the best choice. Optoisolators are typically used for digital input/output isolation. I think there are analog buffers out there to do what you are looking for but I am not familiar with them. I know analog isolators were used in an umbilical cord between the launch pad and ICBM our company designed. Having any current flowing between the umbilical cord and the ICBM was not permitted for ESD reasons (aka spark prevention). So I know they do exist. I am sure the more intelligent people reading will have better suggestions or know what parts to suggest.

What sensors are you connecting to the pins. I assume you are using the microcontrollers internal ADC?

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

We usually put protection on all inputs and outputs, this is for EMC which includes transients, RF, Static...

For your input I would use a series resistor to limit the available current and then clamp the voltage either with 2 diodes (one to the supply rail and one to the ground) or a zener, or back to back zeners that limit the voltage but won't limit the input signal. A TVS does the same thing.

This assumes the on board circuitry has high impedance and won't notice the 1K or 10K series resistor.

We also filter the pin by placing a cap to ground, sized as a low pass filter for the maximum frequency expected.

Depending on how bad things can be you may need additional protection, maybe a fuse, the resistor should be one that OPENS when it overheats before the zener blows. You can use resettable fuses - "polyfuse".

Hope it helps

GK

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

Haven't we talked about this before? There's a few threads adressing this very topic from input regulators to analog protection. Be wary of zener diodes - they're not quite the device you think they are - they start conducting before their rated voltage and can cause errors in your analog signal.

As Klave mentions - a series resistor with rail to rail diodes is a favorite and also a capacitor to gnd to give you some ESD and noise protection.

There's a few diy fuel injection boxes published on the web - see them for some ideas. You could also go to the local auto dismantlers and get some ECUs to see how the auto companies do it.

Putting an op-amp in is just moving the problem to the op-amp - you still need to protect it. Also, don't forget vibration and temperature - these can also easily kill electronics in an auto environment.

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

Yeah, polyfuses are cool, but I don't think that is the way I am looking to go. A zener is good - I am using that technique to buffer some 12V digital signals down to 5, but it takes some current for them to work. I tried to buffer an input one time that used a coil next to a high voltage wire as a pickup. The voltage spikes were high, but there was no current and the zener wouldn't clamp them.

I am reading a throttle position sensor, a map sensor, and a water temp sensor. In the future, I will add an air temp sensor and maybe something else if I can think of it. I am not so worried about the first unit - the one I use - but it is the "production" version - the one that someone else is hooking up (while reading directions) - that I am worried about. You know, someone gets "smart" and cuts a 5V wire and feeds it 12V. That or maybe they drop a connector and it bangs against a voltage source. I have seen AVRs take some punishing abuse, but more often than not, I remember saying to myself "that didn't take much."

I have also found that things like buffers and op amps can take more abuse than an AVR - besides giving isolation. Op amps can be a PIA, though, because you need a dual supply - unless you use rail to rail. I think I like the series resistor/zener idea. While it is not fool proof, it is simple, doesn't add too much to the part count, provides some protection, and I am using these parts anyway so they are in stock.

As for vibration and heat, I have 5 or 6 test vehicles lined-up and I plan to thoroughly abuse them before I am done. If anyone else has some good ideas, please feel free to comment. Otherwise, thanks a bunch!

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

Depends on the car and the sensor. I interfaced my AVR to the MAP and TPS signal on several cars and it seemed to work fine.

I sent a prototype of an automotive device to a guy to test on his mazda. He ended up frying his MAF sensor, but that was probably due to miswiring.

I have hooked up several cars directly to the AVR; 1993 honda civic, 1996 honda civic, 1996 Ford Probe Gt, 1996 Mazda Miata, 1993 Toyota MR2. The following sensors on those cars were connected directly to the AVR without buffering; TPS, MAF, MAP, ignition signal.

All seemed to work fine, I might eventually end up putting in stuff for buffering, but I will only do it if things seem to go horribly wrong.

Generally IMHO Hondas and to a lesser degree toyotas, are electrically very well behaved. Mazda on the other hand seems to be not so well behaved.

May I ask what you are making?

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

Quote:

May I ask what you are making?

I am making fuel injection.

Quote:

All seemed to work fine, I might eventually end up putting in stuff for buffering, but I will only do it if things seem to go horribly wrong.

I agree that all works fine in a "normal" situation. I have worked with "racers" though, and I have seen what can happen. I also have had some other stuff out there that, when someone breaks it, you have to look and say "WTF were they trying to do and how did they come up with THAT idea?" I just hate to have to fix mistakes that other people have made. You know it is their fault, they know it is their fault, but they would never admit it. I just want to take a "reasonable" precaution that would curb some of the "common" mistakes.

Quote:

I have hooked up several cars directly to the AVR

Like I said, I am not worried about the stuff that I hook up myself. I want other people to be able to hook it up, too. ;)

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

paramax55 wrote:

The voltage spikes were high, but there was no current and the zener wouldn't clamp them.

That seems to contravene ohm's law! If you had a 200V spike through a 1k resistor to a 5V1 zener, what would the current through the zener be? Nearly 200mA! Obviously, if the impedance of the source was high, the current would not raise to that level, thus the voltage spike would be clamped!

If you introduced a capacitor into the equation, the spike would have to charge the capacitor through the 1k resistor. If the spike was 1uS, the voltage on the capacitor wouldn't rise much (assuming a 100nF cap).

Yes, customers will do the worst you can imagine then abuse you for your box not taking it. Is there a fair chance they'll put 12V into it? Yes, then protect against it. Is there a fair chance the wiring will be near the ignition wires? Yes, protect against this.

Some auto manufacturers spec 25kV discharge into the actual signal wires and the device has to survive. Whilst this is quite harsh, it indicates what the auto manufacturers have found exists in the environment - otherwise specs like these would just push up the unit cost for no good reason.

Resiliance to ESD, temperature and vibration get designed in, testing in 6 vehicles will just tell you it survived in those instances. You want a simple test? Get a kitchen gas lighter and zap the incoming wires and the box - if the box survives this without failing or rebooting, then it has a fair resiliance to ESD. mind you, its not a very scientific or repeatable test, but gives you a ballpark indication.

Vibration - this tends to be cumulative. Single sided pcbs usually fail and the solder joints get cracks due to vibration and temperature. Use two sided or more as the solder fillet is larger and this stronger.

Checkout:

http://caffrey.dk/megasquirt/fil...

I can tell you the electrolytic capacitors are not rated for the temperature and will probably fail in time to vibration. Also, they use 5V1 zeners on the analog inputs - apply known voltages to the input and comparethis to the a/d readinds and see what happens past about 4.3V!

How did you solve your ignition issue?

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

Quote:

How did you solve your ignition issue?

I didn't "solve" it yet, but I know what I am going to do. I am going to use an H bridge with a transformer, or I might use a center tapped transformer and just switch tne ground. I would rather use the center tapped approach - know any good references on transformer design? I can't find any - AND I HAVE LOOKED!

Quote:

That seems to contravene ohm's law!

Sort of. What I had were uA of noise spikes. They were small enough that a cheaper o'scope didn't see them. There is a "turn-on" current required for a zener to conduct backward. There was simply not enough current to "push past" the zener. It was falling into the same realm that resistors fall into at microwave frequencies and/or high voltages. I guess, however, if the amperage is that small, it might not bother the AVR.

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

I looked and Google came up with:

http://leeh.ee.tut.fi/transforme...

Or you could go to your local library and dig up some engineering textbooks - this is usually covered.

Most of the magic numbers are given in the datasheets for the ferrite cores.

H bridge usually makes for a smaller transformer but you have extra losses due to the current flowing through two semiconductor devices vs the double ended primary - twice the turns required. One of the many tradeoffs in the design.

If you want a starting point - go to Pep Boys and buy a cheapy 12V-110vac inverter. They've done most of the hard work for you. If you don't like the secondary voltage - remove the transformer and pull it apart. A hot air gun helps to melt the goo. Unwind the secondary being careful to count the turns. Then rewind with the number of turns to get the voltage you want. If there was 100 turns for 100V then the ratio is 1 turn per volt. 200 turns will get you 200V etc. You won't get more energy as the transformer and drive circuitry will only give you X amount. How thick the wire? Thick as possible - too thick and you wont be able to fit it on the bobbin, too thin and it will go up in smoke. Once you know how many turns, there are tables based on the available area that will tell you what wire will fit, you can then calculate the resistance using the wire size and figure out what your ohmic losses will be. Another tradeoff.

These style of inverters don't like to run into short circuits - like your big CDI capacitor. So don't be surprised if it goes up in smoke after some time of running. Most CDI units I've come across use a 'ringing choke' style of converter which tolerate this - you can hear them change frequency as the capacitor charges. I wonder what MSD uses? I encourage you to experiment, it is one of the best ways of learning. An expert is one who has made the mistakes before!

Your explanation does not hold water! I'm sure there are other effects at play, but ohms law is ohms law. Voltage, current and resistance are inextricably linked. And this 'realm' at microwave frequencies and high voltage! I don't think the reactive properties of the resistors are called into play here.

You may guess, but the reality is that it does take much current at all to damage the sub-micron geometries of modern semiconductors, thus the hype about electro static discharge. If you exceed the ratings of a device on a regular basis, it will most likely fail. I can tell you this from bitter experience.

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

Quote:
Sort of. What I had were uA of noise spikes. They were small enough that a cheaper o'scope didn't see them. There is a "turn-on" current required for a zener to conduct backward. There was simply not enough current to "push past" the zener. It was falling into the same realm that resistors fall into at microwave frequencies and/or high voltages. I guess, however, if the amperage is that small, it might not bother the AVR.

There is a specified current at which the zener reaches its knee voltage, before this current the voltage across a zener is LESS than the zener voltage. A zener will not allow a higher voltage to exist unless the current becomes large. When there is a large current the zener voltage increases because of the dynamic impedance - available on the spec sheet (the slope of the IV curve beyond the knee). The series resistor before the zener limits the maximum current and drops the voltage. At very high currents the circuit can be modeled as a potential divider with the series and dynamic resistors.

Very fast voltage spikes will be attenuated by the parallel capacitance (if you put it in - again, don't allow more bandwidth than you need!!! If you need high frequency protection add a series inductance (ferrite bead), these are usually designed for 10MHz and higher operation.

The zener turns on in picoseconds! You can't fool it. At extremely high frequencies (GHz) the lead inductance may prevent the correct zener operation but that won't happen in a car system. The lead inductance is available in the package spice model if you really want to look into it.

There is no magic here, this is standard practice for analogue input protection, anyone who sells commercial products in Europe needs to do this and has been doing it for at least 10 years.

GK

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

Quote:

Your explanation does not hold water! I'm sure there are other effects at play, but ohms law is ohms law. Voltage, current and resistance are inextricably linked. And this 'realm' at microwave frequencies and high voltage! I don't think the reactive properties of the resistors are called into play here.

http://www.amazon.com/Electromag...

Quote:

There is a specified current at which the zener reaches its knee voltage, before this current the voltage across a zener is LESS than the zener voltage. A zener will not allow a higher voltage to exist unless the current becomes large.

Try it. Wrap 5 or 6 turns of 18G solid strand wire around an ignition wire. You will pick-up near field effects from the pulses. Now, try to clamp them to 5V with a zener. It won't happen. Feed the same circuit 12V from the battery and it will clamp to 5V. It is just one of those "goofy" things about a zener. It does clamp nicely with a cap, though.


Thanks Kartman, but what I need is to be able to calculate how much core material I need in order to keep it from overheating, how much inductance I need to keep it from saturating at a set frequency and current, and the rest I think I have. BTW, MSD uses a regular transformer.

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

I think the effect you're seeing is inductive/capacitive coupling - this is more due to your measurement technique rather than the zener itself. The capacitor doesn't 'clamp' as such, it limits the rate of change of the voltage.

As for your test, been there ,done that! That's how I pick up the tacho signal on my kart.

A given core will support a given amount of magnetic field measured in gauss. You need a given amount of gauss to couple a given amount of energy.

A ringing choke converter uses what looks like a 'normal' transformer - it is the circuit configuration that drives it that makes the difference.

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

Quote:
Try it. Wrap 5 or 6 turns of 18G solid strand wire around an ignition wire. You will pick-up near field effects from the pulses. Now, try to clamp them to 5V with a zener. It won't happen. Feed the same circuit 12V from the battery and it will clamp to 5V. It is just one of those "goofy" things about a zener. It does clamp nicely with a cap, though.

Your measurement setup is wrong if you still see the problem, zeners are not goofy! Conducted immunity testing goes up to 80MHz (the system is fairly close to what you are trying to measure, EN 61000-4-6.) It has isolator boxes called CDNs, so that the whole measurement setup is isolated and so that your test equipment is not affected by the applied disturbance.

Your "near field effect" is most likely capacitive coupling. Capacitive coupling affects the whole circuit. The dangerous one is the differential voltage which is clamped by the zener.

This site
http://www.meteolabor.ch/e/ussmassn.htm
Gives you more information, it's time you did some more research. The topic is quite complex because there are multiple paths that need to be accounted for. These are caused by parasitic capacitances, ground loops and imperfect grounding.

GK

GK

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

The inductive pickup on the cart wire does work, yes, I was using it on one of my circuits. I couldn't get the spikes above 5 volts to clamp and I tried it for 2 weeks and had multiple conversations with a couple of engineers. The trick was that I needed to "see" some signals without the noise. I ended up fixing it with 2 tricks. The first was shielding - either twisted pair or coaxial - both worked. I believe it to be more the capacitative effects of the wire than the shielding. The other was filter capacitors. I needed to find a value that wouldn't wipe out the signals that I wanted while it kept out the signals that I didn't want. It has been a few years since I messed with that project, but I will hook a zener circuit to an ignition wire and try it again.

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

I went back to my original experiments and realized that the problem that I had was a little backward. Same type of problem, but backward. What I wanted were the spikes that were over 5V so I was trying to use the zener as a high-voltage-pass filter. I thought I could block everything below the zener voltage. What happened is that it let everything through - low or high. And I remember it had to do with the fact that I was trying to read current levels that were like that of an antenna. The caps and the shielded wire got rid of the lower voltage noise.

Kartman - on the transformer design, you mentioned finding engineering textbooks. Is this information in the general EE books, or do I need to find one on electromagnetics?

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

hOW i BRING IN ANALOGIN INPUTS is by using a 4-quadrant differential opamp with G-.1

Using the classical 3 opamp differential comfiguration means that the input common mode range of the diff amp will be (VDD-VEE)/G which with +/-12VFC supplies gives +/-120vdc or close to it, depending on th opamps used.
I frequenrly want a 110VAC withstanding voltage if I can achieve it.

HTH
DFR

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

dana - are you getting your protection because of the fact that the op amps are rated for 120V, but you are only letting the output get to 5V?

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

As for a book- you'll just have to search. Some EE textbooks have sections on electromagnetics some don't.

Anyway, I did a quick Google and found this:
http://ece-www.colorado.edu/~pwr...

The equations are incomprehensible unless you know what each of the variables means, however, have a look at the worked examples and substitute your values to see what you come up with. As I mentioned previously, there are magic values that are got from the manufacturers datasheets - like core area, max flux density etc. Having a good textbook on the basics will have it make sense.

I also came across this site:

http://www.smps.us/magnetics.html

I googled for 'transformer design'

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

paramax55 wrote:
dana - are you getting your protection because of the fact that the op amps are rated for 120V, but you are only letting the output get to 5V?

Well, The high common mode tolerance helps because transients of a few hundred volts are easily handled by the internal op; amp catch diodes in tandem with the few hundred kiloohm input resistors.

Limiting the output to 5V is a seperate step that I didn't include in my posting. However, thst dhould be easy as the op amp output impedance is very low compared to the current limiting resistor required between it nd the adc input (with schottky clamp to 5V).

Caveat: my approach detailed here has a drawback in that precision resistors (.1-.2%) must be used to achieve good CMRR and gain accurqacy. also, SNR will be degraded due to the lower intermediate voltages used in the figgerential amp circuit. poorer SNR may affect adc if >8bit conversion is used. Do the math to check for yourself.

BTW I am descriving techniques here that I've actually used - its not just theory.

DFR

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

Take a look at the Linear LT1991 series of opamps. They have built-in precision resistors, and you can set the gain just by pinning the inputs in various ways. They have a nice Excel spreadsheet "software" that will generate the appropriate pinning for you based on your requirements.

Before I discovered the LT1991 I used a fairly flexible scheme for automotive inputs.

The layout lets you do several things to input signals.

1) Amplify signals less than 5V to 0-5V. Use a wire-link for R3 and set the GainA and GainB resistors to do the gain you want.
2) Divide down a larger signal to 0-5V. R3/R10/R16 are set to divide your signal down to 0-5V, GainA is a wire-link to make a voltage follower, GainB is unpopulated.
3) Map portions of higher signals to a 0-5V range, so you don't lose ADC resolution on unwanted range. For example, set GainA to 180k, GainB to 100k. This will map 8-12V down to 0-5V. Umm, exactly what the Toyota Supra has : several signals that are 8-12V. R16 is a 10k pot, and lets you trim the input range. That is, 7-12V maps to 0-5V, or 9-14V maps to 0-5V and so on.

The TVS is a Littelfuse SP723ap - a nice small 6-input protection. This whole setup is in several Supras and working well. No glitches or fried components yet ...

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

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

chancy - Thanks for the heads-up on the op amp circuit. I hope you don't mind that I added it to my list of reference materials to be used for my plans to rule the world. It could be handy to map a portion of a signal.

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

@chancy
May be I dont get my math right, but I cant
understand how the circuit given in your diagram
can map a voltage portion as 8..12V to 0..5V without
loosing accuracy/resolution ?

As far as I see its just an adjustable
linear amplifier/attenuator or do I miss some point ?

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

Doh. My Bad. I just realized I posted an old schematic portion with an error - it was a PNG capture I had done ages ago. The GainB resistor doesn't go to GND, it goes to Vcc (5V).

Here's a SwitcherCAD III simulation to illustrate the effect. Drop this code into a file called analogmap.asc, then load it up in SWCADIII. When you run it, choose to look at V(inp) and V(out).

Version 4
SHEET 1 2212 1544
WIRE 1216 880 976 880
WIRE 1776 880 1216 880
WIRE 976 960 976 880
WIRE 1216 1008 1216 880
WIRE 1312 1008 1216 1008
WIRE 1616 1008 1392 1008
WIRE 1664 1008 1616 1008
WIRE 1888 1008 1744 1008
WIRE 1776 1120 1776 880
WIRE 1616 1136 1616 1008
WIRE 1744 1136 1616 1136
WIRE 1856 1152 1808 1152
WIRE 1888 1152 1888 1008
WIRE 1888 1152 1856 1152
WIRE 1232 1168 1120 1168
WIRE 1296 1168 1232 1168
WIRE 1504 1168 1296 1168
WIRE 1648 1168 1584 1168
WIRE 1744 1168 1648 1168
WIRE 1120 1216 1120 1168
WIRE 1888 1216 1888 1152
WIRE 1232 1248 1232 1168
WIRE 1648 1264 1648 1168
WIRE 976 1392 976 1040
WIRE 1120 1392 1120 1296
WIRE 1232 1392 1232 1312
WIRE 1648 1392 1648 1344
WIRE 1776 1392 1776 1184
WIRE 1888 1392 1888 1296
FLAG 1648 1392 0
FLAG 1856 1152 OUT
FLAG 1296 1168 INP
FLAG 1888 1392 0
FLAG 1776 1392 0
FLAG 1232 1392 0
FLAG 1120 1392 0
FLAG 976 1392 0
SYMBOL voltage 976 944 R0
SYMATTR InstName Vcc
SYMATTR Value 5
SYMATTR SpiceLine Rser=5
SYMBOL Opamps\\LT1367 1776 1088 R0
SYMATTR InstName U1
SYMBOL res 1760 992 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName GainA
SYMATTR Value 180k
SYMATTR SpiceLine tol=5 pwr=0.25
SYMBOL res 1600 1152 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R3
SYMATTR Value 39k
SYMATTR SpiceLine tol=5 pwr=0.25
SYMBOL res 1664 1360 R180
WINDOW 0 36 76 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName R10-R16
SYMATTR Value 22k
SYMATTR SpiceLine tol=5 pwr=0.25
SYMBOL res 1872 1200 R0
SYMATTR InstName R5
SYMATTR Value 1k
SYMATTR SpiceLine tol=5 pwr=0.25
SYMBOL voltage 1120 1200 R0
WINDOW 39 0 0 Left 0
WINDOW 123 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 0
SYMBOL res 1408 992 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName GainB
SYMATTR Value 100k
SYMATTR SpiceLine tol=5 pwr=0.25
SYMBOL cap 1216 1248 R0
SYMATTR InstName C1
SYMATTR Value 220pF
TEXT 1504 824 Left 0 !.dc V1 0 20 .1
TEXT 1008 800 Left 0 ;Analog input section\nMaps 9-14V input to 0-5V output

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

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

Ok, now I get it !
But be careful,
accuracy now depends on accuracy of VCC !

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

What protects the TVS diode? Put anything that exceeds the rail voltage and it will conduct - what will limit the current? Mind you, in the application it would be unlikely that you would come across a DC voltage that exceeds the battery voltage. If there did - I dare say the pcb traces would act as a fuse - not nice. Since the TVS is low leakage, you could've placed the series resistor in front of it - 39k would limit the current quite well. Also, by relocating the 220pF cap, you can get some low-pass filtering. As Klave mentions - you don't want too much bandwidth - especially since you have an ADC on the line - you don't want aliasing of your signal.

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

Ossi: Yup - Vcc is key here. Power input to the whole device is heavily filtered. You can see the schematic of the power input section HERE.

Kartman: Point taken on the TVS. I think if it as the protection device itself ... Moving it inside the 39k R3 would do the trick. Then change the options for signals less than 5V to leaving it as a 39K instead of a wire link, but not populating R10 or R16. Next spin of the board :)

The 220pF cap was just in the SWCAD simulation. It's not on the production box. Photos can be seen HERE.

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

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

Chancy99 - I learnt the hard way with protection devices. I had some RS485 stuff so i thought I'd add some protection. Some TVS diodes and i thought I was home free - until the guys in the factory called me down to sort out a problem. They'd wired the connector backwards and put 24VDC into the RS485 signals. The TVS diodes did their job and died for the cause. I figured our customers were likely to do the same, so I added some polyswitches. Short of someone putting 240vac on the wires, it should survive any likely mishap and live to play another day. Later I found this was a common solution. LT and Maxim have released RS485 parts that withstand upto 60V and 15Kv ESD, so these parts don't really need extra protection in many cases.

In terms of the customer - if the box fails, he doesn't care if it was the protection or whether he smoked the cpu. The box is dead and he's pissed off.

So, if you add items like TVS diodes, MOVs etc - what limits the fault current? Add a polyswitch etc and your customers will be a lot happier! You will be too as you won't get 'warranty' returns.

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

Kartman: sounds like sound advice. How would you go about making the automotive inputs absolutely bulletproof against vehicular slaughter and human dorkishness ?

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

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

Chancy - as I mentioned, moving your 39k resistor to the input side of the TVS would give a huge amount of protection to the input circuit. For example - say the tacho line came in contact with this input - on older cars where this signal is off the primary of the ignition coil and has 400+volt spikes on it and normally of a few mS duration. The current through TVS diode would be:

400-12V = 388V. R = 39k. I = 388/39000 = 10mA. Even allowing for the duty cycle of the input signal, there's a fair chance that your box will survive this abuse for the short term - we're putting 3.8W peak through this resistor (less due to duty cycle) so a 0.1w 0805 smt resistor will overheat in due course. Making that resistor beefier would allow it to survive.

As with engineering in general, it is a tradeoff. If you make it too bulletproof, then it may be too expensive. So, you have to ask yourself:
1/ What is the worst input you can expect in its application
2/ Are there any applicable standards or has the customer demanded a standard
3/ What you expect your box to do when the worst input is applied, for how long?

In your application, it is probable the user will:
1/wire the dc input backwards
2/maybe connect it to 24 volts. Besides, there is the alternator load dump of around 40v

My example of 400v from the tacho signal is unlikely in a modern car as the tacho is usually got via CAN from the ecu.

Your current TVS circuit for the analog input will survive unless a voltage >12V is applied. Then you get smoke.

You DC input (your circuit was chopped off) hopefully has a series diode for reverse power and a fuse or polyfuse to protect against overvoltage. Simply get a variable dc supply and put 30V into your box. What does it do? TVS diodes don't like long term overloads - they get hot and die. A normal fuse is fine - although vibration can cause them to fail. I like the polyswitches - they have their limitations, but in low voltage apps, they do fine.