Author Topic: Do I need to use zener clamping?  (Read 595 times)

0 Members and 1 Guest are viewing this topic.

Offline kjr18

  • Regular Contributor
  • *
  • Posts: 94
  • Country: pl
Do I need to use zener clamping?
« on: August 06, 2018, 02:53:40 pm »
Hi, I'm making something that uses attiny13. uC is used for detecting voltage on two inputs and depending on both inputs, outputting some different pwm signal. As this will be used in a car like environment, should I use clamping on both inputs as well as on voltage supply?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: de
Re: Do I need to use zener clamping?
« Reply #1 on: August 06, 2018, 05:31:18 pm »
Yes, you need protection. An automotive environment is one of the dirtiest you can operate in (electrically-wise).
I'd strongly suggest using an automotive voltage regulator that will survive a 60-V load dump. For the inputs, use double Schottky diodes for deflecting over/under voltage transients to V+ or ground.

 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 7838
Re: Do I need to use zener clamping?
« Reply #2 on: August 06, 2018, 07:05:01 pm »
As Benta points out, you *need* clamping.   I'd clamp the taps of the input potential dividers with Schottky diodes as he suggests, then add 1K resistors between the divider taps and the input pins.  A few nF of capacitance to ground at the taps would go a long way towards making it less sensitive to transients and EMI.

As the whole circuit only needs a few mA at +5V for the ATtiny13 and the MOSFET gate drive, consider using a 5.1V Zener as a shunt regulator.  As long as it and its dropper resistor have adequate wattage ratings, it will be immune to typical automotive supply transients and load dumps.   I'd also upgrade the BC547B to something with a Vceo comparable to the MOSFET Vds breakdown voltage (100V) so it can survive the transients unprotected.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 13303
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Do I need to use zener clamping?
« Reply #3 on: August 06, 2018, 07:37:14 pm »
Toss on a MMSZ5231B and you're fine.

I wouldn't actually recommend clamp diodes, because there's nowhere for the current to go -- likely you don't have much load on the 5V supply, so it will be pulled up, and cause problems.  The solution to that, is a TVS across the supply.  Which isn't a bad idea, and usually comes for free in TVS array chips, which is not a bad idea here.

You may also want to replace Q1 with a protected switch device.  This is a MOSFET with an internal control circuit to handle level shifting (may not need Q2 and resistors), to protect against excessive voltage, current and temperature (but not all three at once, obviously(?)).

As-is, you still may want to protect Q1's gate with a zener, 5 to 15V rating is fine.  The zener would be wired from gate to source, in parallel with R5.  Q2 should then have a resistor added in series with its collector, maybe 1-10k, so it doesn't draw excessive current through the zener.  This protects against excessive input voltage (automotive load dump can swell up to 40V+, well outside of Q1's Vgs(max) rating).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 7838
Re: Do I need to use zener clamping?
« Reply #4 on: August 06, 2018, 09:14:24 pm »
Good catch on the need for a gate-source Zener.
Yes, clamping to the +5V rail can cause it to rise, but if you use a shunt regulator (which is only possible because the operating current is so low), that's entirely manageable.    As the ATtiny13 has internal ESD clamping diodes, not fitting external Schottky ones wont prevent the rail rising if a series regulator is used.  You'd need clamps that divert current to ground to do that.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 13303
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Do I need to use zener clamping?
« Reply #5 on: August 07, 2018, 12:18:41 pm »
ESD diodes on MCUs is not usually a good idea, especially if you're using the ADC, which seems to be the case here.  For general purpose logic, I don't mind a few mA peak.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline kjr18

  • Regular Contributor
  • *
  • Posts: 94
  • Country: pl
Re: Do I need to use zener clamping?
« Reply #6 on: August 08, 2018, 05:57:53 pm »
Thanks for all your answers. This thing that I'm making is just one piece for myself, it will be tail light/stop light led driver for my diy tractor, that's why I said car like environment. Both inputs are for switches, one for brake pedal switch, second one for tail light. So I need to clamp both inputs, output transistor and input or use zener diode to supply mcu, right? I want it to be simple so things like tvs arrays are a bit of overkill for me, and zener diodes are cheap.

Also I have another question, those spikes in voltage, won't they be suppressed by car battery?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 13303
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Do I need to use zener clamping?
« Reply #7 on: August 08, 2018, 07:00:55 pm »
Short spikes occur specifically because the battery is at a distance from the stuff making the racket -- ignition and lights and motors and relays turning on and off.  The wiring has stray inductance, probably on the order of 5uH.  (This is also the value used in most automotive test fixtures.)

The other tests commonly done -- undervoltage, overvoltage and reverse -- occur during cranking (low voltage), jump starting (when backwards (reverse) or when accidentally jumped to a 28V system -- that one seems rare though!).  These involve large currents (or a completely faulty battery), so the voltage can change a lot.  The final test occurs when the battery comes entirely disconnected: load dump, where the alternator generates a large voltage swell without a battery connected to reign it in.

So if you don't need to worry about your project turning into a lump of charcoal when one of these -- probably quite rare -- events occurs, there you go, don't worry about dealing with it. :)

Fast transients are definitely worth a think.  Filtering on signal inputs, and often outputs too, helps prevent random upsets or mysterious failures.  Basically, 10nF across those signal input zener diodes would do a good job.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf