Difference between revisions of "Lesson 30--Microduino-made DC V-A Meter"
(Created page with "Using Microduino to Make a DC V-A Meter--C# PC Display {| style="width: 800px;" |- | ==Purpose== The tutorial uses Microduino to make a DC V-A meter. The PC-side upper compu...") |
|||
Line 10: | Line 10: | ||
*'''[[Microduino-USBTTL]]''' | *'''[[Microduino-USBTTL]]''' | ||
− | 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 | + | 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. |
*Other Hardware Equipment | *Other Hardware Equipment | ||
Line 65: | Line 65: | ||
delay(10); | delay(10); | ||
Serial.print(myValueA0_V*5.0/1023,3); | Serial.print(myValueA0_V*5.0/1023,3); | ||
− | Serial.print('\n');//C# program need this | + | Serial.print('\n');//C# program need this character to split |
myValueA5_I=analogRead(A5); | myValueA5_I=analogRead(A5); | ||
delay(10); | delay(10); | ||
Line 78: | Line 78: | ||
*Compile the program and choose the right board and the related serial port. | *Compile the program and choose the right board and the related serial port. | ||
*Click Upload. | *Click Upload. | ||
− | *Open the file IV_control\bin\Debug under the folder of IV_control.exe after uploading Arduino program, you can see the form interface. (The C# program is supported | + | *Open the file IV_control\bin\Debug under the folder of IV_control.exe after uploading Arduino program, you can see the form interface. (The C# program is supported by".NET framework 4.0" . ) |
− | * | + | *Let's begin testing. Just watch the value change of the current and voltage in the form interface. |
[[File:IV_Control_comOutput.jpg|600px|center|thumb]] | [[File:IV_Control_comOutput.jpg|600px|center|thumb]] | ||
*Images of C# source program, Microduino and the protel schematic is available for download. | *Images of C# source program, Microduino and the protel schematic is available for download. | ||
− | Csharp program and | + | Csharp program and picture: '''[[File:Csharp program and pictures.rar]]''' |
==Result== | ==Result== |
Latest revision as of 07:42, 12 September 2016
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 |