Help! Reading AC Voltage (sine wave) with Arduino

Discussion in 'Embedded Systems and Microcontrollers' started by akazemian, Feb 12, 2016.

  1. akazemian

    Thread Starter New Member

    Feb 12, 2016
    4
    0
    Hi guys! I'm trying to build a device to measure the electrical resistivity of a paste (cementitious materials) using Arduino Uno. Four steel probes are put inside the paste (jumper wires attached to them). Two outer probes apply AC signals (Sin waves- Frequency 1 kHz- Voltage(peak to peak)= 10 V) and two inner probes should measure the potential difference (usually it is between 1V to 3V). Then the resistivity could be calculated by a formula. I cannot change these since this is standard test procedure..Please take a look at pictures attached.
    I managed to apply the desired AC signals, but the issue is about reading the potential difference (two inner probes) by Arduino. When I use a oscilloscope I see clean sin waves (frequency still 1kHz) and I read some values (voltage) which should be correct. Then I use Arduino to read the voltage and again I get another totally different reading. I cannot see why! I have to use Arduino since I want to add more functionalities to the setup later.
    WHAT I DO: I connect one of the two inner probes to Arduino ground pin, and the other probe to analogue pin (A0) to read values, convert it to voltage ( float voltage = sensorValue * (5.0 / 1023.0); ) and print it to serial monitor. I programmed Arduino to read values 2000 times during a second and report the maximum value only. This is an example of what I get: Oscope: 2.5V, Multimeter: 0.7V, Arduino: 1.55V
    Could anyone suggest any modification to make to get correct values with Arduino? I would really appreciate any help!



    IMG_2117.JPG IMG_2119.JPG IMG_2121.JPG
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,974
    744
    akazemian likes this.
  3. #12

    Expert

    Nov 30, 2010
    16,262
    6,769
    If you can't teach the Ardunio to read the peak values, use this.
     
    akazemian likes this.
  4. KL7AJ

    AAC Fanatic!

    Nov 4, 2008
    2,039
    287
    I suspect that your arduino cannot sample fast enough to give you an accurate reading. You might try 50-100 Hz. Volume resistivity measurements are commonly used with 60 Hz driving signals.

    eric
     
  5. akazemian

    Thread Starter New Member

    Feb 12, 2016
    4
    0
    Thanks Eric... the input ACV has a 1kHz frequency (this is the test standard procedure) and my sampling rate is 2000 times per second.. You still think that is not enough? I tried it many times and not even once arduino gave me sth consistent with oscope or MM...
     
  6. KL7AJ

    AAC Fanatic!

    Nov 4, 2008
    2,039
    287
    Which model arduino are you using?
     
  7. akazemian

    Thread Starter New Member

    Feb 12, 2016
    4
    0
    Arduino Uno
     
Loading...