DIY Arduino oscilloscope input protection - Page 1
Forum section: electronics / beginners

author: bborisov567
author_rank: Regular Contributor
timestamp: May 26, 2021, 09:16:32 pm
content: Recently i have followed this project for an oscilloscope :https://microkontroller.ru/arduino-projects/osczillograf-10-gcz-50-kgcz-na-arduino-nano/(it is in russian, posting the link for the code). I have modified the circuit a bit by adding a protection zener diode on the input to keep safe 5 volts for the arduino. Modification is drawn over the schematic. But after hooking it up to a sine wave signal generator i get a weird shape on the bottom part. After removing the zener diode everything works as expecred. So my question is how to protect the arduino input for voltages over 5 volts and still keep the frequency?

author: ledtester
author_rank: Super Contributor
timestamp: May 26, 2021, 09:48:58 pm
content: Your circuit is set up like on the left. Try putting the zener just before the analog input pin, like in the right-hand circuit:Btw - you also want to prevent negative voltages from reaching the Arduino's pins, so another zener placed from the analog input to the +5 rail would be a good idea.

author: bborisov567
author_rank: Regular Contributor
timestamp: May 27, 2021, 02:13:33 pm
content: Thank you for the reply, i will try it later. But i have some theoretical questions. Why the zener diode affects the signal when it is before the capacitor - does it have something to do with impedace? And what is the purpose of the voltage divider?

author: ledtester
author_rank: Super Contributor
timestamp: May 27, 2021, 02:56:46 pm
content: Your input signal appears to be centered around ground. When the signal is negative (like -0.5 V) the zener will conduct and thus deform the signal.The purpose of the cap and resistors is to center the signal at 2.5V so that it is within the voltage range of the Arduino's ADC. When placed after the resistors the zener will conduct only if the re-centered signal is > 5.1V or less than -0.5 V. This allows you to measure input signals having amplitudes up to 2.5V.Allowing -0.5V to reach an Arduino pin might not be good for it, so that's why another zener placed from the pin to +5 might be advisable.

author: Manul
author_rank: Super Contributor
timestamp: May 27, 2021, 04:22:20 pm
content: Why use zenner and not two diodes to VDD and GND? Zenner is not very accurate, arduino board is not guaranteed to be working at +5, also zenner probably has more capacitance. Seems illogical to me.

author: Kleinstein
author_rank: Super Contributor
timestamp: May 27, 2021, 04:53:28 pm
content: Directly going to the ADC pin of the µC has another problem: the ADC inputs usually require a relatively low impedance drive to work well. With a higher ímpedance (e.g. 50 K range) the capacitance at the pin also has an effect. So Ideally one would have some amplifier / buffer in front. This could provide a more standard 1 M input impedance, so that a normal scope probe could be used. For the still not so high frequencies a simple OP based buffer should be OK. With a RR type powered from the same supply as the µC no extra protetion is needed between the OP and ADC - maybe a little resistance (e.g. 1 K) to avoid interference.One would still need protection for the OP input. The main part would be some series impedance to limit the current in case of a fault. Some OPs even have sufiicient diodes for protection inside, so one could get away without extra clamping diodes.Zener diodes can have a high and nonlinear capacitance, but it varies a lot between types.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 28, 2021, 10:23:26 am
content: I recommend to have a look at the schematics of the DSO-138 (manual switches) and DSO Shell (with CMOS input mux). These are both from JYE-tech and schematics are freely available on the 'web.These are designed for low-budget, (You can buy the whole thing for about EUR40) but the front end is still good enough to have some decent imput impedance and voltage ranges.