This is my first Arduino project and I am bit confused with the results I am getting.
I want to read the voltage from a transducer that is powered by the Arduino.
The transducer output is connected to Analog Pin 2.
My code is pretty simple:
analogread(A2) x 5/1023
However the reading I have is very different from what my multimeter is giving me.
Multimeter: -0.29V
Arduino: 0.00V
Is there something wrong with the grounding maybe?
Note:
the Arduino is powered by laptop USB
the transducer is powered by Arduino 5V and step up transformer
Google says " A transducer is a device that converts energy (electrical signals is a form of energy) from one form to another so that the desired characteristics of the input energy can be read at the output signal. Transducers are a vital first link in your measurement chain.".
You failed to identify what your transducer is and what it does.
Please post a link to the product page or data sheet of the mysterious "transducer", and a pic of a hand drawn circuit diagram, with all connections and components clearly labeled.
If that's a minus sign, the Arduino doesn't read negative voltages. (It can be damaged by negative voltages greater than -0.5V, or voltages greater than 5.5V).
This also means that it can't measure unbiased AC voltages (and you only "sample" the AC voltage for one instant every time you read).
MAYBE you can reverse the connections. But the mystery sensor probably shouldn't be putting-out negative voltage either.
Thanks all for the prompt reply - the negative voltage was the issue.
FYI the transducer is a directional current reader transforming a 0 - 50 A signal into a 0 - 10V signal.
Now I need to improve the stability of the reading, I am considering using a 1.1V reference and adding a capacitor.
The 1.1V reference is stable, but not calibrated and can be anywhere between about 1.0 and 1.2V. So for accurate results, you need to calibrate the measurement using a separate standard voltage reference (e.g. a decent multimeter).
You need to calibrate the entire setup, which includes the voltage divider.
For "one point calibration", multiply the value obtained by analogRead() with a scale factor that gives the correct result, when an accurately known voltage is applied to the voltage divider.
I don’t see any code in your publication. Just remember that analogRead() returns an integer value from 0 to 1023 corresponding to a 0-5V range. If the input voltage is below 1V, analogRead() will return an integer number between 0 and 204, and your above “code” will be something like
204 x 5 / 1023, which is zero.
Please post your code so we’ll all be better informed to provide help.