Lesson 30--Microduino-made DC V-A Meter
Using Microduino to Make a DC V-A Meter--C# PC Display
ContentsPurposeThe tutorial uses Microduino to make a DC V-A meter. The PC-side upper computer Winform can display the voltage and current values being measured. From the tutorial, you can have a further understanding of operational amplifier as well C# program example, and also get prepare for flexible application of Microduino and the real circuit buildup. EquipmentMicroduino-Core is the 8-bit single-chip development core board with Atmel ATmega328P as the core, which is an open and Arduino Uno compatible controller. Microduino-USBTTL is the program download module, capable of connecting with Microduino-Core or Microduino-Core+ and making the modules communicate with the computer. It uses MicUSB as the download interface, which is also the smallest part of Microduino. Microduino is just as small as a quarter. Besides, the download cable is just like the USB cable of most smart phones, easy to use.
AD620 Instrument AmplifierAD620 instrument amplifier is the product of AD company in America. Users can set the gain of any request from 1 to 1,000 with only an external resistor. Here we adopt a 2K Ω external resistor, meaning the gain G=1+(49.4/2)=25.7. The core of AD620 instrument amplifier is the three-stage operational amplifier circuit, which has higher CMRR(Common Mode Rejection Ratio) and a good temperature stability as well as small noise factor and high accuracy.
SchematicThe circuit can test the current within 19.45A and the voltage within 50V theoretically.
Programint myValueA0_V=0;//for measure voltage
int myValueA5_I=0;//for measure current
void setup()
{
Serial.begin(9600);
}
void loop()
{
myValueA0_V=analogRead(A0);
delay(10);
Serial.print(myValueA0_V*5.0/1023,3);
Serial.print('\n');//C# program need this character to split
myValueA5_I=analogRead(A5);
delay(10);
Serial.print(myValueA5_I*5.0/1023,3);
delay(300);//send data delay fit for c# program time_tick
} Debugging
Csharp program and picture: File:Csharp program and pictures.rar ResultWatch current and voltage values and compare them with the theoretical value. Video |