Author Topic: DIY Arduino oscilloscope input protection  (Read 1680 times)

0 Members and 1 Guest are viewing this topic.

Offline bborisov567Topic starter

  • Regular Contributor
  • *
  • Posts: 95
  • Country: bg
DIY Arduino oscilloscope input protection
« on: May 26, 2021, 09:16:32 pm »
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? |O
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3039
  • Country: us
Re: DIY Arduino oscilloscope input protection
« Reply #1 on: May 26, 2021, 09:48:58 pm »
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.
« Last Edit: May 26, 2021, 09:56:34 pm by ledtester »
 
The following users thanked this post: bborisov567

Offline bborisov567Topic starter

  • Regular Contributor
  • *
  • Posts: 95
  • Country: bg
Re: DIY Arduino oscilloscope input protection
« Reply #2 on: May 27, 2021, 02:13:33 pm »
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?
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3039
  • Country: us
Re: DIY Arduino oscilloscope input protection
« Reply #3 on: May 27, 2021, 02:56:46 pm »
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.

« Last Edit: May 27, 2021, 03:21:39 pm by ledtester »
 
The following users thanked this post: bborisov567

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1113
  • Country: lt
Re: DIY Arduino oscilloscope input protection
« Reply #4 on: May 27, 2021, 04:22:20 pm »
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.
 
The following users thanked this post: bborisov567

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14262
  • Country: de
Re: DIY Arduino oscilloscope input protection
« Reply #5 on: May 27, 2021, 04:53:28 pm »
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.
 
The following users thanked this post: bborisov567

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3380
  • Country: nl
Re: DIY Arduino oscilloscope input protection
« Reply #6 on: May 28, 2021, 10:23:26 am »
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.
 
The following users thanked this post: bborisov567


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf