Hi,
I recently bought a Arduino Nano, I am making a EMG amplifier in order to change a servo position. However, my Arduino's Serial readings goes wrong, it show random values, Without been connected to anything! The only connection is the USB, and the Arduino act as reading something. Image below is self-explanatory with used Code.
That's not exactly random serial data. It's sending out exactly what you told it to send out. You are getting a random reading. That's a completely different type of problem.
You mean there's nothing connected to the analog pin? Yeah, so if there's nothing connected to it then what do you think it should read? You can't say 0 because that would mean it was connected to ground. You can't say 1023 because that would mean it was connected to 5V. You can't really say any number. The pin is floating and picking up whatever stray electromagnetic signals happen to be around.
Delta_G:
That's not exactly random serial data. It's sending out exactly what you told it to send out. You are getting a random reading. That's a completely different type of problem.
You mean there's nothing connected to the analog pin? Yeah, so if there's nothing connected to it then what do you think it should read? You can't say 0 because that would mean it was connected to ground. You can't say 1023 because that would mean it was connected to 5V. You can't really say any number. The pin is floating and picking up whatever stray electromagnetic signals happen to be around.
Delta_G:
That's not exactly random serial data. It's sending out exactly what you told it to send out. You are getting a random reading. That's a completely different type of problem.
You mean there's nothing connected to the analog pin? Yeah, so if there's nothing connected to it then what do you think it should read? You can't say 0 because that would mean it was connected to ground. You can't say 1023 because that would mean it was connected to 5V. You can't really say any number. The pin is floating and picking up whatever stray electromagnetic signals happen to be around.
Yeah I'm getting random readings, is it a way to just receive just the signal from the differential amplifier?
You need to connect the analog input to the differential amplifier output, and connect the Arduino and sensor grounds together.
jremington:
You need to connect the analog input to the differential amplifier output, and connect the Arduino and sensor grounds together.
Image below shows how's look with Arduino and Sensor Ground connected together.
Do you still have nothing connected to the analog pin? Then you're still just looking at ambient noise. @jremington said you needed to make 2 connections.
The analog input is still acting as if it is floating. Either your connections are bad, or the sensor is defective.