Skip to main content

Testing an oscilloscope with my Arduino

I bought a very old oscilloscope and although it works, I have my doubts about refreshing the screen (the electron beam fades away very slowly or is not showing up consistently across the screen).

I tested a bit with digitalWrite and anlogWrite, but this only sends either 0 or 5V out. Is there a way to make a preferably sine or triangle wave of 0 to 5V or -5 to +5V... I guess the Arduino should be capable of it, but so far I only get 0V or 5V out, nothing in between.

According to lesson 8 I should get a variable voltage of 0-5V on a pin with analogWrite, but all I get is 0 or 5V.

For what I see:

  1. PWM gives with analogWrite a pulse signal of 0V or 5V with a duty cycle.
  2. non PWM pins give either 0V or 5V (analogWrite of 0-127 appr: 0V, >127: 5V).
Michel Keijzers
  • 13k
  • 7
  • 42
  • 59