Author Topic: Will this signal destroy my uC pin?  (Read 2335 times)

0 Members and 1 Guest are viewing this topic.

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1542
  • Country: ua
Re: Will this signal destroy my uC pin?
« Reply #25 on: May 18, 2024, 02:32:20 pm »
I have used some BAT46 to clamp signals to the rail, as inputs can only be max to 0.3V.
Things to keep in mind when using Schottky diodes for input protection are junction capacitance (pretty low in this case) and reverse leakage current, which in this case is going to be on the order of 0.1..3 uA, which may or may not be an issue, depending on the input and source impedances.

But i dont really know much about what you said.
Well it's a big topic. Take a look at e.g. https://www.digikey.com.au/en/articles/protecting-inputs-in-digital-electronics which covers the basics. What they don't cover in this article is that when you clamp input signal to power rails, then the rails must be able to sink whatever extra current the extra voltage of the input signal is able to source, otherwise your rails voltage may rise above acceptable levels. Short spikes (such as ESD or turn-on/turn off transients, like in your case) can be absorbed by capacitors (which you are supposed to have on power rails anyway). For prolonged input overvoltage you need something that will begin sinking current as the voltage of the power rail raises above a certain level, which can be as simple as a single Zener diode (of the beefier ones, if necessary), or more involved, if you need e.g. higher precision.

Simulate it. This kind of stuff is easy to simulate with little frustration, as it doesn't require any models beyond basic SPICE primitives, except maybe Schottky diodes, but they can be found easily (unlike some ICs, but that's a different story). It requires a bit of learning, but it's a very rewarding experience. In the long run it will save you a lot of time. Remember, though, that simulation has its limits. But adding explicit elements for parasitic inductance, capacitance etc. can make those limits much wider :).
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27137
  • Country: nl
    • NCT Developments
Re: Will this signal destroy my uC pin?
« Reply #26 on: May 18, 2024, 02:33:21 pm »
A TVS diode doesn't distort signals (TVS diodes are used on all inputs / outputs on any piece of quality equipment).
Of course they do. Not only they have non-zero junction capacitance, just like any diode, but this capacitance can actually be very high, which can be critical for fast signals.
Which is why there are so many different kinds of TVS diodes. Including those intended for high speed signals like USB (in various forms), PCIe, HDMI, etc. You can find these with capacitances way below 1pf.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6637
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #27 on: May 18, 2024, 02:36:43 pm »
I turned off the generator itself.

I would expect it, to make a difference... gonna try...

Edit:
I have not found any problematic issues. (0-2V).

So what does that mean? If you toggle the output off (via the dedicated rubber button) before powering down the generator, i.e. if you use the generator as intended, you don't have any problems at all? What does the "0-2V" limitation have to do with it, and where did it suddenly come from?  ???

Those troubleshooting discussions with you would be much more productive if you describe in detail what you did and observed, right away, rather than giving little sentence fragments here and there.

Also, please be more systematic in the experiments you do and the way you report results -- e.g. the unexplained transition from 4.25V to 5.7V transients earlier in the thread, and now the "2V" limitation which seems to come out of nowhere.
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1542
  • Country: ua
Re: Will this signal destroy my uC pin?
« Reply #28 on: May 18, 2024, 02:38:14 pm »
See picture with 100R: The signal is distorted from 4V on, and clamps the voltage to 4.7V
It's quite hard to understand. Yellow is obviously the post-clamping signal. Green must be the raw input? What's the vertical offset and scale? It's really hard to tell that yellow is distorted -- it looks good to me. The two traces must be aligned and have the same vertical scale to draw any conclusions.

What are the noisy-looking white traces? Are they relevant at all? If they aren't, they should be removed to avoid confusion.

If you want your data to be understood, you need to prepare its visualisation appropriately, otherwise you will have a hard time delivering your point.
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1542
  • Country: ua
Re: Will this signal destroy my uC pin?
« Reply #29 on: May 18, 2024, 02:50:23 pm »
Which is why there are so many different kinds of TVS diodes. Including those intended for high speed signals like USB (in various forms), PCIe, HDMI, etc. You can find these with capacitances way below 1pf.
Yes of course.

My point was that saying that a TVS diode doesn't distort signal without a further clarification may be misleading. It's important to explain that care must be taken to select parts that: a) have sufficiently low capacitance so as not to cause an unacceptable distortion of the input signal; b) have a sufficient surge capability so as to provide protection against the required level and duration of overvoltage.

Depending on the numbers, it may be impossible to find a single TVS diode that meets both requirements. That's when other protection techniques come into play.
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #30 on: May 18, 2024, 02:50:27 pm »
Well it's a big topic. Take a look at ....

That is one good article, i already read twice. But i did not really understand what you were saying, where the energy would go after the diode. In my case with the breadboard, i do not have a proper rail, nor do i want to solder anything on there. And long wires wouldnt be that good either would they (25cm)?

Can i clamp the volatage with a shottkey to a zener, that "simulatates" a rail?
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1542
  • Country: ua
Re: Will this signal destroy my uC pin?
« Reply #31 on: May 18, 2024, 02:52:40 pm »
That is one good article, i already read twice. But i did not really understand what you were saying, where the energy would go after the diode. In my case with the breadboard, i do not have a proper rail, nor do i want to solder anything on there. And long wires wouldnt be that good either would they (25cm)?

Can i clamp the volatage with a shottkey to a zener, that "simulatates" a rail?
The answer is "maybe". Hard to tell without a schematic that shows input, protection, output, and power rails (including ground).
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #32 on: May 18, 2024, 02:58:03 pm »
So what does that mean? If you toggle the output off (via the dedicated rubber button) before powering down the generator, i.e. if you use the generator as intended, you don't have any problems at all? What does the "0-2V" limitation have to do with it, and where did it suddenly come from?  ???

Those troubleshooting discussions with you would be much more productive if you describe in detail what you did and observed, right away, rather than giving little sentence fragments here and there.

Also, please be more systematic in the experiments you do and the way you report results -- e.g. the unexplained transition from 4.25V to 5.7V transients earlier in the thread, and now the "2V" limitation which seems to come out of nowhere.
Im sorry.

I encountered these problems only when turning off the gen, so far. At a squarewave from 0-2V, the level did not go up anywhere near 5V.

It was just some more detail, that i wanted to add.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6637
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #33 on: May 18, 2024, 03:11:49 pm »
I encountered these problems only when turning off the gen, so far.

But did you encounter the transients at all when you first turn off the output, then turn off the power to the generator? I am getting a bit desparate that you still have not answered this simple question.

If turning off the output first fixes the problem, that would be such an obvious and adequate solution. Before I shut off my car engine, I stop my car and put the gears into idle or step on the clutch pedal. I am not complaining that the car does not handle it well if I shut off the ignition while driving...
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19738
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Will this signal destroy my uC pin?
« Reply #34 on: May 18, 2024, 03:26:58 pm »
I encountered these problems only when turning off the gen, so far.

But did you encounter the transients at all when you first turn off the output, then turn off the power to the generator? I am getting a bit desparate that you still have not answered this simple question.

If turning off the output first fixes the problem, that would be such an obvious and adequate solution. Before I shut off my car engine, I stop my car and put the gears into idle or step on the clutch pedal. I am not complaining that the car does not handle it well if I shut off the ignition while driving...

Power cuts happen. I had a (VW) car where the engine suddenly cut out while I was going round a busy roundabout. Fortunately it was a manual transmission, so there was only inconvenience until the hall-effect sensor had been replaced. Analogies are always dangerous.

But I agree, there is the smell of the XY problem about this thread. The OP might benefit from reading the first three paragraphs at https://entertaininghacks.wordpress.com/library-2/good-questions-pique-our-interest-and-dont-waste-our-time-2/
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27137
  • Country: nl
    • NCT Developments
Re: Will this signal destroy my uC pin?
« Reply #35 on: May 18, 2024, 03:47:58 pm »
I encountered these problems only when turning off the gen, so far.

But did you encounter the transients at all when you first turn off the output, then turn off the power to the generator? I am getting a bit desparate that you still have not answered this simple question.

If turning off the output first fixes the problem, that would be such an obvious and adequate solution. Before I shut off my car engine, I stop my car and put the gears into idle or step on the clutch pedal. I am not complaining that the car does not handle it well if I shut off the ignition while driving...

Power cuts happen.
Indeed. Test equipment which supply power and/or signals to a DUT should be designed so they don't output spikes / surges when powered down for whatever reason.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline temperance

  • Frequent Contributor
  • **
  • Posts: 506
  • Country: 00
Re: Will this signal destroy my uC pin?
« Reply #36 on: May 18, 2024, 04:02:41 pm »
Quote
Indeed. Test equipment which supply power and/or signals to a DUT should be designed so they don't output spikes / surges when powered down for whatever reason.

For those wondering what is going on:
https://www.eevblog.com/forum/testgear/siglent-sdg1032-as-bad-as-rigol-dg812/msg5505595/#msg5505595

Maybe this topic should be closed or removed.
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #37 on: May 18, 2024, 04:43:13 pm »
I encountered these problems only when turning off the gen, so far.

But did you encounter the transients at all when you first turn off the output, then turn off the power to the generator? I am getting a bit desparate that you still have not answered this simple question.

If turning off the output first fixes the problem, that would be such an obvious and adequate solution. Before I shut off my car engine, I stop my car and put the gears into idle or step on the clutch pedal. I am not complaining that the car does not handle it well if I shut off the ignition while driving...

Power cuts happen.
Indeed. Test equipment which supply power and/or signals to a DUT should be designed so they don't output spikes / surges when powered down for whatever reason.

I do agree. Moreover, i would say, that there should be safe limits to setup, that would not be exceeded, when misconfiguring it.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19738
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Will this signal destroy my uC pin?
« Reply #38 on: May 18, 2024, 06:10:07 pm »
I encountered these problems only when turning off the gen, so far.

But did you encounter the transients at all when you first turn off the output, then turn off the power to the generator? I am getting a bit desparate that you still have not answered this simple question.

If turning off the output first fixes the problem, that would be such an obvious and adequate solution. Before I shut off my car engine, I stop my car and put the gears into idle or step on the clutch pedal. I am not complaining that the car does not handle it well if I shut off the ignition while driving...

Power cuts happen.
Indeed. Test equipment which supply power and/or signals to a DUT should be designed so they don't output spikes / surges when powered down for whatever reason.

I do agree. Moreover, i would say, that there should be safe limits to setup, that would not be exceeded, when misconfiguring it.

You do set limits: the max voltage and max current.

If you want to have a second set of limits, then you will have to define why you won't  misconfigure those limits.

Then you'll have to work out why a PSU would violate the first set of limits but not the second.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #39 on: May 19, 2024, 09:55:39 am »
Made another test with a 50 Ohm termination ( gen -> 50 Ohm term -> probe).
It peaks at 6.2V with a set up level of 3.3! And it equals a mean of 4.5V for 240us.

Squarewave on high level that is.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline EPAIII

  • Super Contributor
  • ***
  • Posts: 1086
  • Country: us
Re: Will this signal destroy my uC pin?
« Reply #40 on: May 19, 2024, 01:03:32 pm »
Pikes?

https://en.wikipedia.org/wiki/Pike_(weapon)

Yes, I would think a pike would definitely destroy any micro-processor pin that I know of. In fact, it would probably destroy the entire micro-processor.

But so would a sword, a saber, a lance, etc.



Sorry, but I have had German friends who made fun of mein Deutsch.



Hi,

my signal generator does some not so pleasent pikes when it is turned off.
I wonder if my inputs (3.3V) will take immediate damage, or if it takes a few of those pulses (10, 100, 600?).

Anyone has some references or knowledge?
Paul A.  -   SE Texas
And if you look REAL close at an analog signal,
You will find that it has discrete steps.
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6637
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #41 on: May 19, 2024, 01:25:14 pm »
Pikes?
https://en.wikipedia.org/wiki/Pike_(weapon)

No no, you got that wrong. What us Germans are really concerned about is the damage wrought to electronc circuits by fish, especially the predatory species.  ::)

Or maybe it was just a typo for "spike", which could actually happen to a native speaker too. I certainly produce plenty of them in German...
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7842
  • Country: de
  • A qualified hobbyist ;)
Re: Will this signal destroy my uC pin?
« Reply #42 on: May 19, 2024, 02:26:18 pm »
A TVS diode doesn't distort signals (TVS diodes are used on all inputs / outputs on any piece of quality equipment).
Of course they do. Not only they have non-zero junction capacitance, just like any diode, but this capacitance can actually be very high, which can be critical for fast signals.
Which is why there are so many different kinds of TVS diodes. Including those intended for high speed signals like USB (in various forms), PCIe, HDMI, etc. You can find these with capacitances way below 1pf.

A classic method to hide the relative large capacitance of a TVS is to place it in a diode bridge. Surge protectors for DSL or GigE often use this method (together with GDTs). For low power transients you can get that integrated in a chip, e.g. SRV05-4.
 
The following users thanked this post: shapirus

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #43 on: May 19, 2024, 07:41:40 pm »
I was thinking about a circuit, and this is what i ended up with.

Is there a way to get rid of the 3.3V ? Without it, the signal is greatly distorted from just over 2V on.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #44 on: May 21, 2024, 11:03:18 am »
I have now put a 10uF capacitor as DUT, and the line is terminated with a 50Ohm resistor.

Its not really smoothed out. I guess then it could really do some harm?
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7842
  • Country: de
  • A qualified hobbyist ;)
Re: Will this signal destroy my uC pin?
« Reply #45 on: May 21, 2024, 02:04:32 pm »
I was thinking about a circuit, and this is what i ended up with.

Is there a way to get rid of the 3.3V ? Without it, the signal is greatly distorted from just over 2V on.

Try a Zener rated for a higher voltage or five silicon diodes in series.
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #46 on: May 21, 2024, 08:23:33 pm »
Try a Zener rated for a higher voltage or five silicon diodes in series.

But then i probably exceed the upper limit. They dont have such a sharp knee.

Im thinking about putting in a 3.3V regulator without a zener, if there wouldnt be a better way.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1542
  • Country: ua
Re: Will this signal destroy my uC pin?
« Reply #47 on: May 21, 2024, 09:21:59 pm »
Im thinking about putting in a 3.3V regulator without a zener, if there wouldnt be a better way.
Not sure how exactly you're going to use it. In series with input signal?

I don't know if it's possible to design a precise clamper that won't distort the signal and would not require some supply voltage itself and, if it has to be really precise, some op amp based tricks. Several fast diodes in series connected from signal (after a current limiting resistor) to ground is probably as good as you can get.

How precise do you need it to be, anyway? You never answered the questions in post #17, answers to which will define the required precision: is the target input pin digital or analog? What bandwidth or timing tolerance is required?

Options can vary from a simple current limiting resistor in series with input signal and letting the input pin protection diodes handle the rest (if they exist there, of course) to some quite elaborate circuits.
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 775
  • Country: de
Re: Will this signal destroy my uC pin?
« Reply #48 on: May 22, 2024, 05:10:29 am »
Im thinking about putting in a 3.3V regulator without a zener, if there wouldnt be a better way.
Not sure how exactly you're going to use it. In series with input signal?

How precise do you need it to be, anyway? You never answered the questions in post #17, answers to which will define the required precision: is the target input pin digital or analog? What bandwidth or timing tolerance is required?


I put it in  place of the zener. See above the picture with the circuit.

I have not answered, because i have no numbers yet. At least i want it not look so bad on the scope. It looks horrible with that zener alone.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7842
  • Country: de
  • A qualified hobbyist ;)
Re: Will this signal destroy my uC pin?
« Reply #49 on: May 22, 2024, 12:10:31 pm »
Anyway, the 1 kOhm series resistor limits the current also for the microcontroller's clamping diodes. So the Zener diode can be for a higher voltage. Alternatively you could use a level shifter as a protective buffer in case of a digital signal.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf