Go Down

Topic: SOLVED arduino signal != CRO signal; (Read 572 times) previous topic - next topic

zaftheman

Jan 22, 2013, 04:00 pm Last Edit: Jan 22, 2013, 05:04 pm by zaftheman Reason: 1
Hello guys,

I have a serious issue here. I have a signal (5V)  as shown


If I zoom to 5ns/div, then we can see some tiny noises between 4.9V and 5.0V or so as shown


Note that these pictures are given when I connect the signal to an oscilloscope.

Now the interesting part!
If I connect this signal to the digital port and load the example sketch DigitalReadSignal (File>Examples>01.Basics>DigitalReadSignal), then I get a series of zeroes and ones as the output (Actual Output: 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 1 0 0 0 1 0 1). Founding this bizarre, I connected the signal to the analog port and then I loaded the arduinoscope sketch. I got the following result


Now if I use the 5V line from the arduino, then I get the correct 5V reading on the serial monitor. The same goes for GND. But when I connect my signal, everything is a total mess in the arduino!!!

What I did to try to rectify this which I failed miserably and as a last resort, I posted here:
1. Change interface from Linux to Windows. In linux, I am using Arduino 1.0.2 version while in windows I am using 1.0.3 version.
2. Change from Arduino Uno to Arduino Uno R3
3. Change USB cable
4. Tried to search this forum for hints


Can someone guide me on this? Also, I hope this post is in the correct forum. If not, please change it accordingly.

Thanks

PaulS

Quote
If I connect this signal to the digital port and load the example sketch DigitalReadSignal (File>Examples>01.Basics>DigitalReadSignal), then I get a series of zeroes and ones as the output (Actual Output: 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 1 0 0 0 1 0 1). Founding this bizarre

What code? What is generating this signal? Did you connect the grounds, too?

I don't find the output bizarre, if you didn't connect the grounds, or set the pin mode correctly, or a number of other possible problems.


MarkT

I'd also vote for a lack of common grounds - you don't have a circuit if you don't connect ground as well, a circuit needs two wires.

When you connect only one wire you are using one circuit as an antenna for the other.  Typically you will pick up mains interference.
[ I won't respond to messages, use the forum please ]

Grumpy_Mike

It also looks like you are trying tool okay a signal too fast for your scope, or at least the settings you have on the scope.

zaftheman

I checked the grounds again and it is brilliantly working now.

Thanks for the help!!!

zaftheman


What code? What is generating this signal? Did you connect the grounds, too?

I don't find the output bizarre, if you didn't connect the grounds, or set the pin mode correctly, or a number of other possible problems.


Your answer was top notch PaulS.

Thank you!!!

zaftheman


I'd also vote for a lack of common grounds - you don't have a circuit if you don't connect ground as well, a circuit needs two wires.

When you connect only one wire you are using one circuit as an antenna for the other.  Typically you will pick up mains interference.


Exactly what I was picking: mains interference!

Thanks for your help!

zaftheman


It also looks like you are trying tool okay a signal too fast for your scope, or at least the settings you have on the scope.


I was thinking along that line at first. I used a better scope after and nothing changed.

It was a ground issue after all.

Thanks for reminding about the speed of scopes.

Go Up