# Voltage limiting without altering waveform

Discussion in 'General Electronics Discussion' started by arg733, Dec 1, 2012.

1. ### arg733

89
0
Dec 14, 2010
Hi.
I want to make a DIY oscilloscope with an usb sound card (max 20kHz).
The problem is that i will use it to analyze waveforms with voltages from 50 to 400VAC , so is there a way of limiting that voltage to 1v without dramatically altering the waveform? I will use voltage dividers but i need some sort of protection, in case i forget to set the voltage divider right and the voltage goes to 2 or more volts. The more i think about it the more i realize that this is not possible so what i need is something that will actually cut (turn off) the signal to the sound card if the voltage exceeds 1v.

Thank you very much.

2. ### duke37

5,364
772
Jan 9, 2011
If your voltage dividers have high value resistors in them, then it is only necessary to lilit the voltage with some diodes. The wave form will be distorted but you will be able to see if it is clipped and, if so, increase the attenuation.

Do you think it a good idea to put 400V anywhere near a computer?

3. ### arg733

89
0
Dec 14, 2010
What do you mean by that?

No, not really . But it will run through an external sound card that costs 2\$ so i'm confident it wont make it to the computer.

4. ### duke37

5,364
772
Jan 9, 2011
I had finger trouble, lilit shoud be limit!

If your attenuator has a resistor of say 100k from the signal source then two silicon diodes in series will limit the signal to about 1.2V in one direction. Two diodes in series connected in the other direction will limit the voltage with the alternative polarity.

If the signal is high enough to make the diodes conduct, then the signal will have a flat top and/or bottom and you can increase the attenuation to such a level that there is no distortion.

5. ### arg733

89
0
Dec 14, 2010
How can the diode limit the voltage? still don't get it..
Thanks

6. ### arg733

89
0
Dec 14, 2010
Just had another (maybe dumb) idea:
but i'm not sure if the mosfet will somehow alter the waveform when it's on

File size:
56.5 KB
Views:
200
7. ### duke37

5,364
772
Jan 9, 2011
I have not gone into the details of your circuit but it will not work since there is no current through the zener and you will need voltage offsets to get the fets to turn on at the right voltage.

A voltage divider will have a top resistor and a bottom resistor. For your highest attenuation, the top resistor should be about 1000 times the bottom resistor. Say 1M and 1k.

Two diodes in antiparallel across the 1k resistor will limit the voltage to about 0.6V.

Have you found 1V zeners?

8. ### KrisBlueNZSadly passed away in 2015

8,393
1,272
Nov 28, 2011
duke37's advice is good. A diode limits the voltage across it in the forward direction. When the voltage across a diode in the forward direction is less than the diode's forward voltage (around 0.6V for a general-purpose silicon diode), the diode conducts little current and appears as an open circuit. As the voltage approaches the forward voltage of the diode, the current drawn by the diode starts to increase sharply. The diode effectively becomes a voltage limiter, and it will clip the voltage across it to roughly its forward voltage.

You connect two diodes in antiparallel (parallel, but in opposite directions) to clip both positive and negative sides of the waveform. If you need to clip to 1.2V instead of 0.6V, use two diodes in series in each part of the antiparallel arrangement. The sound card input should be connected across this diode arrangement.

You need a series resistance between your voltage source and the diodes, otherwise high currents may flow, and blow the snot out of your diodes. And then damage your sound card too.

If you have a switchable attenuator, using a rotary switch and a chain of resistors, so you have a selectable full-scale voltage, like a multimeter does, then this resistor chain will inherently limit the current into the diodes, except maybe on the highest sensitivity setting; in that case, you should add a resistor between the output of the switchable attenuator and the diodes.

9. ### arg733

89
0
Dec 14, 2010
Ok now i get it. But that does not seem to eliminate the problem. When the voltage exceeds 1.1 volts the diode will start conduct and will not allow the voltage to rise any further right?
So if that occurs it will "cut" the waveform won't it? That's a good way to do it but i will not know that this is happening and presume that the waveform i'm seeing is correct. What i need is to turn off the signal to the sound card, a switch that will stop conducting when the voltage is higher than 1v and preferably turn on an led so that i can see that there is an over voltage and dial the (potentiometer) divider just a little bit.
Thanks.

10. ### duke37

5,364
772
Jan 9, 2011
I understood that you wish to make an oscilloscope using a sound card. If so, you will see if the waveform is clipped. You will need some complicated circuitry to automatically adjust the attenuator which I do not think justified and you will not know the attenuation which has been set.

The 'top' resistor in the attenuator will need to stand up to 1000V so should be made from say five 0.5W resistors in series since many resistors have a low maximum voltage.

You could use a two stage attenuator with the first stage limited by two zener diodes in series opposing at 4.7V and then attenuate from there. This may give sharper clipping.

If you use the emitter/base junction of a transistor instead of a diode, then the collector current could light a led. You will then need two transitors, one npn and one pnp and two power supplies + and - to drive the led.

11. ### KrisBlueNZSadly passed away in 2015

8,393
1,272
Nov 28, 2011
Yes, you're right, it will clip the waveform.

Automatically increasing the attenuation when clipping occurs is a bit tricky. It's called AGC (automatic gain control), or if you want discrete attenuation steps, so you can calculate the correct amplitude of the signal you're measuring based on the amplitude that the sound card sees, that would be described as auto-ranging, as used on non-budget multimeters.

duke37's answer is exactly right, although if you only need to handle a relatively narrow range of input voltages, there won't be the requirement for a wide attenuation range and high-voltage components.

Because you said you want to make an oscilloscope, we assumed that you WOULD need these features, because oscilloscopes have them. But if you don't, this simplifies the design.

I'm assuming this clipping problem is an unusual case, so you're prepared to adjust the sensitivity manually, by turning the attenuation potentiometer or the range switch. Therefore you just need an INDICATION that clipping is occurring.

This is a fairly trivial thing to do, and I can draw up a circuit that will light an LED when clipping is occurring, using two Darlington transistors, as duke37 suggested. As he said, this method needs a negative supply rail; if you don't already have one, you can generate one using a switched capacitor charge pump IC, which I can include in the design.

This circuit would also have an op-amp acting as a buffer. This is probably a good idea in all cases, since the sound card has a relatively low input impedance (~10 kilohms) which will affect the attenuation and prevent you from getting accurate attenuation ranges if you use an input range switch. If you just use a potentiometer, you can avoid the op-amp, but your input that you connect to the circuit you're measuring will have a relatively low and poorly controlled input resistance; this wouldn't be acceptable for a real oscilloscope but might be OK for your applications.

Let me know how you want to proceed.

Last edited: Dec 2, 2012
12. ### arg733

89
0
Dec 14, 2010
i don't need automatic attenuation i want something to stop , block , switch off the signal to the sound card. So i thought of running the signal trough a triac that will somehow stop conducting when the voltage goes above 1v . Could that work? I hope that this won't affect the waveform.
Sorry if i express myself poorly but my english is not perfect.
Thank you

Last edited: Dec 2, 2012
13. ### BobK

7,682
1,689
Jan 5, 2010
Why do you think you need this? No oscilliscope I have ever owned did it. If you set the range to 100V and the waveform on the display exceeds 100V you know that the waveform might be altered by cliipping, and you turn down the sensitivity until it is within range.

Bob

14. ### arg733

89
0
Dec 14, 2010
well i need it for safety. If the voltage raises to the point where the resistors can't handle any more current the will burn.

Last edited: Dec 2, 2012
15. ### KrisBlueNZSadly passed away in 2015

8,393
1,272
Nov 28, 2011
You don't need to cut off the signal to the sound card. As long as it is voltage-limited (clipped), it won't damage the card. You just need an indicator to tell you that the signal is being clipped (if it's not already obvious from looking at the shape of the waveform that you capture with the sound card).

The resistors that might burn up if the input voltage is exceeded are the resistors in the attenuator (and the potentiometer, if you use one). The limiting will protect the sound card.

Your input won't be isolated from the PC's ground. You won't be able to measure signals on circuits that are connected directly to the mains - they'll need to have a transformer at least. Just making sure you know.

16. ### BlairH

5
0
Dec 3, 2012
With Duke's suggestion of using the diodes as protection and then the attenuator circuitry to select the proper attenuation for an unknown signal input, you would need to assume that any +/- 1.2v square wave is clipped and increase attenuation until the signal does not exceed the clip limit. Anything that hits the clip limit is clipped by definition.

You could add some additional circuitry, say 2 x 741 op-amps with the same clip limiter on one and a higher clip limiter on the other, then into a LM339 comparator while attenuating the output from the higher clip limited op-amp slightly, and have the comparator turn on an LED if the clip limit is exceeded.

Blair

P.S. I've been looking into the Digilent Analog Discovery as a fairly inexpensive electronics tool, \$200 gets you your sound card input and more and the software to run it. When I get one I'll let you know whether I like it or not.

Last edited: Dec 3, 2012
17. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,505
2,852
Jan 21, 2010
Well, since you always start with maximum attenuation when you have an unknown signal, it will be obvious when the signal starts to clip.

18. ### arg733

89
0
Dec 14, 2010
I have no idea how to do that i don't have any experience with op amps and comparators.
I think that it should be ok without cutting off the signal to the sound card. But i need that led to show me when the signal is being clipped cause i am not experienced with oscilloscopes either.

Well i got the software (free) and the sound card costs me about 1.50\$

And if you are referring to one of those usb devises that let you read up to 1MHz , someone told me that they have a time delay but i don't know that this is true.

19. ### arg733

89
0
Dec 14, 2010
That's a good tip steve, thanks

20. ### KrisBlueNZSadly passed away in 2015

8,393
1,272
Nov 28, 2011
This thread is going round in circles.
This is my suggestion.
It consists of a range switch, an overvoltage protection circuit, and an op-amp buffer.
There's a negative rail generator as well. You can delete that part if you already have a negative supply rail available.

It needs a DC power supply of 5~9V.

C1 blocks any DC on the input signal. R1~3 provide selectable division ratios to support higher-voltage inputs. D3 and D4 clip the waveform to the positive and negative supply rails; this limits the maximum positive and negative voltages seen by the op-amp, and therefore the sound card, to prevent damage to either. D1 and D2 ensure the supply rails do not get pulled up or down by current from the input.

U1 is a unity gain buffer that feeds the sound card input. U2 is a negative rail generator with a maximum supply voltage of 10V. It can be omitted if the negative voltage rail can be provided in some other way.

This circuit clips the input voltage to prevent damage to the sound card. The sound card will also clip the signal that it measures; this is a natural result of converting an analogue signal to its digital representation. Whenever the digital value reported by the sound card reaches the maximum or minimum reportable value (+32767 and -32768 respectively, for a 16-bit sound card), the input is being clipped. This is the best way to detect clipping by the sound card.

File size:
9.4 KB
Views:
246