Arduino Powered Multimeter

by Adityadp in Circuits > Electronics

3272 Views, 21 Favorites, 0 Comments

Arduino Powered Multimeter

IMG_20200208_182046.jpg
WhatsApp Image 2020-08-15 at 15.18.27 (1).jpeg

In this project, you will be building a voltmeter and ohmmeter using the digitalRead function of an Arduino. You will be able to get a reading almost every millisecond, much more precise than a typical multimeter.

Finally, the data can be accessed on the Serial monitor, which then can be copied onto other documents, e.g. excel, if you want to analyze the data.

Additionally, since typical Arduinos are limited to only 5V, an adaptation of the potential divider circuit will allow you to change the maximum voltage that the Arduino can measure.

There is also a bridge rectifier chip incorporated into this circuit which will allow the multimeter to measure not just DC voltage but also AC voltage.

Supplies

1) 1 x Arduino nano/Arduino Uno + Connecting cable

2) 5cm x 5cm Perfboard

3) 20 x jumper cables or wires

4) 1 x 1K resistor

5) 2 x resistors of the same value (doesn't matter what the values are)

6) 1 x 16x2 LCD screen (Optional)

7) 1 x DB107 bridge rectifier (Can be replaced with 4 diodes)

8) 1 x 100K or 250K potentiometer

9) 6 crocodile clips

10) 1 x Latching push switch

11) 1 x 9V battery + connector clip

Acquiring the Materials

Most items can be purchased off amazon. There are a couple of electronics kits on amazon which provide you with all of the basic components such as resistors, diodes, transistors, etc.

The one I have found to give me a bang for my buck is available on this link.

I personally had most of the components already as I do a lot of these types of projects. For the inventors out there in Singapore, Sim Lim Tower is the place to go to purchase all electronic components. I

recommend Space electronics, Continental electronics, or Hamilton electronics on the 3rd floor.

Understanding the Circuit (1)

The circuit is actually slightly more complicated than you might expect. This circuit makes use of potential dividers to measure the resistance and add the feature of variable maximum voltage for the voltmeter aspect.

Similar to how a multimeter can measure the voltage at various stages, 20V, 2000mV, 200mV so on and so forth, the circuit allows you to vary the maximum voltage the device can measure.

I will just go over the purpose of the various components.

Understanding the Circuit: Purpose of Components

1) Arduino is used for its analogRead function. This allows the Arduino to measure the potential difference between the selected analog pin and its ground pin. Essentially the voltage at the selected pin.

2) The potentiometer is used to vary the contrast of the LCD screen.

3) Building on that the LCD screen will be used to display the voltage.

4) The two resistors of the same value are used to create the potential divider for the voltmeter. This will make it possible to measure voltages above just 5V.

One resistor will be soldered onto the perf board while the other resistor is connected using crocodile clips.

When you want more precision and a max voltage of 5V, you would connect the crocodile clips together without any resistor in between. When you want a max voltage of 10V you would connect the second resistor between the crocodile clips.

4) The bridge rectifier is used to turn any AC current, maybe from a dynamo, into DC. Additionally, you now don't have to worry about positive and negative wires when measuring the voltage.

5) The 1K resistor is used to make the potential divider for the ohmmeter. The drop in voltage, measured by the analogRead function, after 5V is inputted into the potential divider will indicate the value of the R2 resistor.

6) The latching push switch is using to switch the Arduino between the Voltmeter mode and Ohmmeter mode. When the button is on, the value is 1, the Arduino is measuring the Resistance. When the button is off, value is 0, the Arduino is measuring the Voltage.

7) There are 6 crocodile clips coming out from the circuit. 2 are the voltage probes, 2 are the ohmmeter probes, and the last 2 are used to vary the max voltage of the multimeter.

To increase the maximum voltage to 10V, you would add the second same value resistor between the varying maximum crocodile clips. To keep the maximum voltage at 5V, connect those crocodile pins together without any resistor between them.

Whenever changing the voltage limit using the resistor, make sure to change the value of VR in the Arduino code to the resistor value between the varying maximum crocodile clips.

Putting Together the Circuit

Screen Shot 2020-02-09 at 12.35.39 PM.png
Screen Shot 2020-02-09 at 12.35.15 PM.png
Screen Shot 2020-02-09 at 12.35.02 PM.png
Screen Shot 2020-02-09 at 12.34.38 PM.png
Screen Shot 2020-02-09 at 12.34.24 PM.png
Screen Shot 2020-02-09 at 12.33.43 PM.png
IMG_20191225_204024_1.jpg

There are a couple of options on how to put together the circuit.

1) For beginners, I would recommend using the breadboard to build the circuit. It is a lot less messy than soldering, and it will be easier to debug because the wires can be adjusted easily. Follow the connections shown on the fritzing images.

In the last fritzing image, you can see 3 pairs of orange wires connected to nothing. Those actually connect to the voltmeter probes, ohmmeter probes, and maximum voltage varying pins. The top two are for the ohmmeter. The middle two are for the voltmeter (can be AC or DC voltage). And the bottom two are for varying the maximum voltage.

2) For more experienced individuals, try out soldering the circuit onto a perfboard. It will be more permanent and last longer. Read and follow the schematic for guidance. It is named new-doc.

3) Finally, you can also order a pre-made PCB from SEEED. All you would have to do it solder the components on. The necessary Gerber file is attached in the step.

Here is a link to a google drive folder with the zipped Gerber file: https://drive.google.com/drive/folders/1BiDizfdqELH9Jw2WzIk26-8mdwan7ch5?usp=sharing

Code for the Arduino

#include LiquidCrystal lcd(12,11,5,4,3,2);

float analogr2;

float analogr1;

float VO1; \\Voltage across the potential divider for the circuit that measures resistance

float Voltage;

float Resistance;

float VR; \\This is the resistor that is used to change the maximum limit of the voltmeter. It can be varied

float Co; \\This is the factor by which the voltage recorded by the arduino has to be multiplied with to also account for the decrease in voltage from the potential divider. It is the "coefficient"

int Modepin = 8;



void setup()

{

Serial.begin(9600);

lcd.begin(16,2);

pinMode (Modepin, INPUT);

}

void loop() {

if(digitalRead(Modepin) == HIGH)

{ Resistanceread(); }

else

{ lcd.clear(); Voltageread(); }

}

void Resistanceread() {

analogr2 = analogRead(A2);

VO1 = 5*(analogr2/1024);

Resistance = (2000*VO1)/(1-(VO1/5));

//Serial.println(VO1);

if (VO1 >=4.95)

{ lcd.clear(); lcd.print("Leads not"); lcd.setCursor(0,1); lcd.print("connected"); delay(500); }

else

{ //Serial.println(Resistance); lcd.clear(); lcd.print("Resistance:"); lcd.setCursor(0,1); lcd.print(Resistance); delay(500); } }

void Voltageread() {

analogr1 = (analogRead(A0));

//Serial.println(analogr1);

VR = 0; \\Change this value here if you have a different resistor value in place of VR. Once again this resistor is there to change the maximum voltage that your multimeter can measure. Higher the resistance here, the higher the voltage limit for the Arduino.

Co = 5/(1000/(1000+VR));

//Serial.println(Co) ;

if (analogr1 <=20)

{ lcd.clear(); Serial.println(0.00); lcd.print("Leads not"); lcd.setCursor(0,1); lcd.print("connected"); delay(500); }

else

{Voltage = (Co * (analogr1/1023)); Serial.println(Voltage); lcd.clear(); lcd.print("Voltage:"); lcd.setCursor(0,1); lcd.print(Voltage); delay(500); }

}

Casing With 3D Printer

Screenshot 2020-08-22 at 1.11.05 PM.png
Screenshot 2020-08-22 at 1.10.50 PM.png
Screenshot 2020-08-22 at 1.10.35 PM.png
Screenshot 2020-08-22 at 1.19.47 PM.png

1. Apart from the acrylic housing, this Instructables will also feature a 3D printed housing, which is slightly more durable and aesthetic.

2. There is a hole on the top for the LCD to fit in, and there are also two holes on the side for the probes and Arduino cable to come through.

3. On the top, there is another square hole for the switch to fit into. This switch is the once changing between the ohmmeter and voltmeter.

3. There is a groove on the bottom's inside walls for a thick piece of card to slide into so that the circuit is properly enclosed even at the bottom.

4. To secure the back panel, there are a couple of grooves on the text face where a rubber band can be used to tie it up.

3D Printing Files

WhatsApp Image 2020-08-15 at 15.18.27 (1).jpeg
Screenshot 2020-08-22 at 1.24.37 PM.png

1. Ultimaker Cura was used as the slicer and fusion360 was used to design the casing. Ender 3 was the 3D printer used for this project.

2. The .step and .gcode files have both been attached to this step.

3. The .step file can be downloaded if you want to make some edits to the design before printing. The .gcode file can be uploaded directly to your 3D printer.

4. The casing was made out of orange PLA and took about 14 hours to print.

Casing (without 3D Printing)

IMG_20200208_182046.jpg

1) You can any old plastic case for its casing. Using a hot knife to cut out the slots for the LCD and button.

2) Additionally, you can check out my account for another instructable where I describe how to build a box out of laser cut acrylic. You will be able to find a svg file for the laser cutter.

3) Finally, you can just leave the circuit without a casing. It will be easy to repair and modify.