Baseline voltage of Arduino Uno

Hi,

This problem looks pretty simple but I cannot find previous relevant response from anywhere.

When I use my laptop to supply power to Arduino through USB, I found the reading keeps on ~300 which is 300 * 5 /1024 voltage around. The Code I used is pretty simple and does not include formula to offset or amplify the input signal.

Even when I dis-connect any pin as input to Arduino, but only connect to laptop USB, it is still like this...
I have tried another Arduino board, but still see this problem.
Can any one plz tell me what wrong inside? I do not think this huge offset is normal.

Thank you very much!

Probably nothing wrong.
An analogue pin that is not connected to anything (floating) will be at a random state of about 1/3 of the supply voltage, thus returning an A/D value of about 300-350.

You must connect the pin to a source with an impedance <= 10k, otherwise the readings could be all over the place.

Post all the details of your project if you want more help.
Read the 'how to post' sticky first.
Leo..

Hi Experts,

I am working on a piezoelectric sensor project utilized in healthcare field but stuck in the electric circuit design for a while to amplify the sensor signal and noise cancellation.

This is the whole circuit which I use LM358 Op Amp as amplifier and stabilator (against voltage drift). I separated the circuit in Figure 1 into several parts below.

1.(Figure 2) Sensor supplier (red square) can produce only 2 mV "RESPONSE" which is too small for data analyzing. So, I need to use Op Amp amplifier and circuit combination (R2&R3) to strengthen the signal. Plz note that we want to measure the sensor response instead of the absolute voltage. However, the baseline voltage around 1 Voltage becomes a pain! When I amplified the signal by manipulating the R2&R3 resistors, the baseline voltage is amplified as well and easily reach to the 3.7V limitation of LM358 chip.
2.The LM358 Op-Amp comes with R2 and R3 can amplify the signal by 151 times (1+R3/R2) theoretically.
3.In order to cancel the high frequency noise, R1 and C1 are utilized for this purpose.
4.R5 resistor is the one I do not know the purpose. As long as I remove the R5, the voltage reading of Arduino will go up to 3.7V (the limitation of LM358 chip). I do not know why yet.

Questions:
1.Why the output voltage goes up beyond 3.7V as long as remove R5 resistor?
2.Why the baseline voltage exists? I have asked the questions in other post (Baseline voltage of Arduino Uno - Sensors - Arduino Forum). The reason is that it must connect the pin to a source with an impedance <= 10k. Otherwise, the Arduino will output 1/3 of supply voltage in random state. However, I still do not know how to reduce the impedance below 10k before reach Arduino board. The impedance of Op-Amp is extreme high beyond 10k.

Do NOT double post.

Can't see the values on those blurry images, but 10 Arduino values with default Aref is about 50mV peak/peak.

I think you need to use two opamp stages.
A buffer with minimal or no gain, and an amplifier stage.
With a high-pass filter in between that removes that DC offset.

You should also switch Aref to EXTERNAL in setup(), and connect the Aref pin to the 3.3volt pin (assuming Uno). Do it in that order, otherwise you will fry the Arduino. Sort off needed, because the LM358 is not rail2rail, and has only a ~3.5volt output swing.
Leo..

Threads merged. (Which breaks the image links. Just another reason not to cross-post.)

Yes, you are correct but my calculation wrong. It does output 50mV peak/peak.
I am a bit confused about the what you mentioned: A buffer with minimal or no gain

From my understanding, you were saying I should separate this problem by two parts in circuit design:
(i) LPF (filter the high frequency noise)+ HPF (filter the dc offset)
(ii) Op-Amp (use other rail to rail chip)

However, instead of HPF, can we use low impedance circuit to cancel the baseline voltage as you mentioned before? If so, the problem would become how to design a low impedance circuit with Op-Amp. Can you plz tell me is that possible?
Plus, even disconnected with circuit, the Arduino still output ~1Volt dc offset which confused me the effectiveness to add HPF on circuit board before Arduino board. Because the dc offset of Arduino is introduced during Arduino rather than circuit board.
The electronics path is: Sensor supply -> Circuit board -> Arduino -> Laptop

Last, any recommend rail2rail Op-Amp for general use? Thanks a lot!

All we know is that the unspecified sensor outputs a 50mV peak/peak wave at an unspecified frequency,
and that the wave is superimposed onto an unspecified DC voltage.

If you design that preamp right, and you code/connect to the Arduino right, then you don't need rail2rail opamps.

There are two opamps in an LM358 package.
You can basically use one as buffer/low-pass filter, and the other one as gain stage.
The gain stage should be biased onto 1.65volt if you use Aref as I have explained.
Leo..

Post a link to the sensor.

This is self-made piezoelectric sensor from lab. Not commercialized and specification defined yet.

Do you have any evidence that the sensor output will actually be useful?

Yes! This sensor was connected to low noise current preamplifier and product clear signal. However, my goal is to mobilize this device by using op-amp chip and electronic components.

If I understand this correctly, you won't provide useful information (impedance, voltage, current, frequency) about the sensor and its output signal, but you want us, members of an open source forum, to help design the amplifier to turn this into a commercial product.

You got me wrong. I do not know the detail of self-made piezoelectric sensor, because I am not the maker. What I want to do is to check the circuit design and Arduino work!

In order to reveal the full picture of design, next week, I will try use other commercialized sensor with specification to try out the circuit and Arduino stuff. By doing so, I believe I will depict this problem in a clear and detail way.

Thanks for helps and reminders.

FIRST determine the voltage/current/frequency characteristics of the sensor.

THEN start thinking about designing an amplifier.