Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need help with arduino sampling voltage and current

  1. Jan 22, 2013 #1
    Hi, I built a electrolytic cell that uses electricity to break water into hydrogen and oxygen. I am testing efficiency and need a way of calculating the average current draw and voltage drop over a period of time for the cell. I have some experience using Arduinos in projects but not much. I know I will have to take samples then use a function to calculate the average voltage and current. By the way the current is measured using a shunt so 1mv = 1amp. The voltage drop averages around 40 volts. I have researched some but am still very confused on adding memory to the arduino and outputting data via serial cable to a laptop. Any help would be much appreciated. Thanks in advance.
  2. jcsd
  3. Jan 23, 2013 #2
    Sounds like you want to do some analog input sampling. Remember the Ardunio can only measure inputs between 0-5V, so you want to design a circuit with a voltage divider and some diodes to ensure that the input to the Arduino never exceeds the value it can take (trust me, you'll fry the thing if you don't).

    Have a look at this one:

    As for the actual analog signal sampling, the Arduino is very useful and userfriendly. Have a look at the analogRead() function:
    http://blog.littlebirdelectronics.com/tutorial-arduino-and-the-aref-pin [Broken]
    Last edited by a moderator: May 6, 2017
  4. Jan 23, 2013 #3
    Thanks for the reply, I now understand how to read the voltages with the arduino, but I don't totally understand the serial functions that are used to output the data that is recorded. I understand that I can use the Arduino environment to process this serial data input but I was wondering if you know a good way to maybe make a graph out of the data. Again thanks for all of your help.
    Last edited: Jan 23, 2013
  5. Jan 24, 2013 #4
    No worries!
    Well, what serial functions are you using at the moment?

    An easy, but slow, method that I sometimes use when I need to graph data is to use the Serial.println( ); function, and then simply graph the data I get versus time in some other software (Excel)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook