Introduction/Purpose: Warning - Supply Voltage Should Not Be Above 20V Due To Uno
Introduction/Purpose: Warning - Supply Voltage Should Not Be Above 20V Due To Uno
Introduction/Purpose – Displaying the Voltage at the electrodes onto an LED display. In the
process of dielectrophoresis, the voltage and frequency is the source of energy used to
separate the cells. So keeping tabs and adjusting both of the voltage and frequency are
extremely important, and knowing what their values are at the electrode.
Background – This website will explain how the Arduino is used with the LED:
http://www.allaboutcircuits.com/projects/make-a-digital-voltmeter-using-the-arduino/
http://www.electroschematics.com/9351/arduino-digital-voltmeter/
Materials:
● LED Display (1602A)
● Potentiometer (15kΩ)
● Resistors (100k, 10k, and 100Ω
● Arduino Uno
● 24 AWG Wire
Setup/Procedure:
1. Solder the LED input/output (I/O) connections with 24 AWG wires.
2. Connect the Arduino Uno to a computer with the Arduino Software and upload the code.
Code can be found after conclusion.
3. Make all the appropriate connections with the LED and Uno (the Uno needs specific
wiring placement depending on the code).
4. Supply power where needed, such as the LED and Uno (need 5V and minimum 1A).
Warning – supply voltage should not be above 20V due to Uno
5. Using the voltage divider, supply a voltage between 0 - 50V and read display.
Results: Show all results, figures, graphs, etc.
Wire Configuration
Conclusion: What was learned from experiment, was it successful? Why or why not? Are there
follow up experiments? Were the goals of the experiment reached?
The LED displays the correct values of voltage, therefore the Arduino Code is set up properly
with inputs and outputs so the LED knows what to display. There was one issue with the LED
voltage being displayed and jumping all over the place, from 0 to 50V, when a constant DC
voltage was connected. The error ended up being that since both grounds were not tied to the
same ground, the volt meter did not want to align with the voltage used as supply to the
Arduino/LED.
Stepper Motor Arduino Code
/*
DC Voltmeter
An Arduino DVM based on voltage divider concept
T.K.Hareendran
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
float vout = 0.0;
float vin = 0.0;
float R1 = 100000.0; // resistance of R1 (100K) -see text!
float R2 = 10000.0; // resistance of R2 (10K) - see text!
int value = 0;
void setup(){
pinMode(A0, INPUT);
lcd.begin(16, 2);
lcd.print("DC VOLTMETER");
}
void loop(){
// read the value at analog input
value = analogRead(A0);
vout = (value * 5.0) / 1024.0; // see text
vin = vout / (R2/(R1+R2));
if (vin<0.09) {
vin=0.0;//statement to quash undesired reading !
}
lcd.setCursor(0, 1);
lcd.print("INPUT V= ");
lcd.print(vin);
delay(500);
}