Display noisy square wave

Hey Folks,

I basically built an oscilloscope by using the online instruction. http://www.instructables.com/id/Arduino-Multi-Channel-Oscilloscope-Poor-Mans-O/

My input before the scope is the output from a differential amplifier. I measured the input with scope, and it displayed as noisy square wave which is to be expected due to 60Hz noise. The peak to peak amplitude range is from 2.5v down to 1.5v. The peak duration is 20 ms. The square wave has a period of 1s. I need to monitor the square wave in real-time. However, when I followed the above instruction, I was not able to display any square wave. It turned out to be a spike. If I zoomed in, It was actually a triangle. It seemed like an aliasing problem. But I am working in the range of 20 ms, I am pretty sure arduino can handle it. Any suggestions on how to fix it?

Cheers,

Ugo

Hi,
You have got gnds connected?

Tom... :slight_smile:

Yeah, it's properly grounded. I expanded the HI duration of my square wave to 200ms instead of 20ms. I got an exponential increase to HI, which seemed like my square wave got filtered.

Hi,
Can you post some pictures of your display and how you have everything connected.
Even a hand drawn circuit of what you measure and where will help.
I mean the gnd of the circuit you are measuring and the gnd of the scope.

Tom.... :slight_smile:

How many samples per second does your scope take?

If you get a triangle displayed, this means that only 1 sample was taken during the time of the pulse. Try with a longer pulse, then the triangle should turn into a trapeze.