This instructable describes a shield, which converts "Arduino" board in a digital multimeter (DMM).

The shield can be inserted on "Arduino" UNO und Duemilanove boards. It can work in three modes:

  • standalone - the measurement data can be seen at the character or graphical LCM
  • connected - the measurement data can be read on the PC screen using the "Arduino" IDE "Serial monitor"
  • combined - the data can be observed on both devices

The second mode does not require the presence of LCM, what makes the shield very cheap.

The "Arduino" based DMM has the following functions:

  • voltmeter with 3 ranges : 0-10V; 0-30V; 0-100V
  • amperemeter - it has a range 0-500mA
  • ohmmeter with 2 ranhes : 0-1KOhm, 0-250KOhm
  • diode, LED, connectivity checker
  • LED functionality tester
  • NPN BJT Beta meter

Step 1: DMM "Arduino" v/s Standard digital multimeter

The following movie shows how the "Arduino" based DMM works in comparison with non-professional standard DMM

<p>HI Milen,</p><p>I ordered the PCB's from PCBWay, and 3.5 days later they arrive at my home in Australia. $AUD55 for five boards. Unbelievable service. You just can't get that in this country. Thank you so much for your help. I can hardly wait to put the first one together.</p><p>Best</p><p>Ray</p>
<p>Hi Ray,</p><p>I am glad that I could help you.</p><p>Regards</p><p>Milen</p>
Thank you Milen. I have ordered my first PC's from PCBWay already using your Gerber files. And the link to ITEAD Studio is excellent. I can follow this procedure in future very easily. You have been very helpful and thanks again!<br>Best regards,<br>Ray
<p>Hi Milen, this is a wonderful instructable, and your instructions are very precise. I would love to make this, but the cost of the PCB in Australia is like $150.00. Have you any ideas on getting them made elsewhere? Is it only back and front or are there many layers? Like, could I perhaps make the PCB myself?</p><p>Thank you,</p><p>Ray</p>
Hi Ray,<br><br>Here : http://www.pcbway.com/setinvite.aspx?inviteid=9970<br>you can make your boards (10 pieces) for ~ 10 times less money.<br>You can pay with paypal and they will arrive for 8-14 days.<br>Simply make an account at their site, send them the gerber and drill files, and pay the PCB's. You can track the production process and after that also the delivery. Also the PCB color can be chosen without price increase. The PCB's fpr this project are contaion only two metal layers - top and bottom.This makes the PCB.s cheaper and is fully enough.<br>Regards and good luck with the designing.<br>Milen<br>P.S. You can order also less than 10 PCB;s, but I am not sure is this would affect the price when 10 ordered.
Hi Milen,<br><br>Thank you so much for this. They are quoting only $13 for 5 pieces which is amazing!!!! Now I need an intractable on how to create the gerber files. There are so many variables in Eagle I am so confused. Like, what is &quot;wheel&quot;? but I will study this and try to create the right files.<br><br>Thanks again, fantastic 'able.<br><br>Ray
<p>Hi Ray,</p><p>I think that this will work for you:</p><p><a href="http://blog.iteadstudio.com/how-to-export-gerber-files-from-eagle/">http://blog.iteadstudio.com/how-to-export-gerber-f...</a></p><p>It is different PCB company, but the rules are acceptable by PCBway and</p><p>no problem shall appear.</p><p>Regards</p><p>Milen</p>
<p>Hi Milen,</p><p>Thank you for this good job!</p><p>Would you please help me to change the circuit like MeR5's request? Voltage range is 0~5V only, and current range is 0~100mA. For 100mA current measurement, I change R9 from 1 Ohm to 5.1 Ohm, and if I change R11 to larger one then I can reduce the measure range more because I want to get more precise measurement. Is it OK?</p><p>And I want two inputs for voltage, and two for current.</p><p>Thanks you!</p><p>Daniel</p>
Hi,<br>You can simplify the circuit a lot...<br>If you want to measure voltage between 0 and 5 volt, you do not need any voltage divider and switching circuitry at the inputs.<br>Simply apply the voltage to the input of the arduino ADC.<br>I<br>In all cases I would advice you to put some protection on these inputs - for example a resistor 10K and a zenner diode 5.1..5.6V.<br>If the measured voltage comes from the device, which is supplied by<br>the same power supply, used for the arduino - this is not needed.<br>You can use directly two ADC arduino inputs.<br>For the current measurements - different approaches can be used -<br>the simplest - you put resistor 50 Ohm and pass the current through - measure the voltage drop directly over it - without the use of any opamp. - disadvantage - the power dissipated by the resistor at max current (100mA) will be 0.5W. If you use small size resistor, it can overheat and to burn or at least to change it value (because of its TC), which could affect the accuracy of the measurement.<br>-the second method which can be used, is the actual.<br>Using 5.1 Ohm resistor will cause that the voltage drop over it with 100mA current is 510mV. The arduino supply is 5v. That means : you should amplify this voltage max 5/0.51 times. In other case the ADC will go in saturation. This gain defines the values of the resistors, you should use. The opamp is in noninverting configuration - the gain is 1+(R11+R12)/R9.<br>You will have the highest accuracy if at the maximum allowed current the input voltage at the ADC inputs is identical to the ADC reference (in this case the supply voltage).<br>Disadvantage of these current measurements, that the current is collected in the arduino ground. To measure some passing current, which flows further in other device - you should not merge both ground nets. The arduino must be floating. Solution for this problem can be found here:<br>https://www.maximintegrated.com/en/app-notes/index.mvp/id/746<br>You can use such chip with all needed supporting circuitry.<br><br>
Hi Milen,<br><br>Thanks for your quick reply.<br>It's a little hard to figure out your comment for me right now. I need time to digest.<br>My goal is to use Arduino to monitor voltage &amp; current of a driving board. This current output from board to operate a small device, its power consumption is about 30mA. I need to monitor the current drop during the device operation for a long time (500hrs Reliability Assurence). At the same time I need to monitor other constant voltage (among 4~5V) that will keep the previous output in the same level.<br>Do you have any specific suggest for my situation? <br>Can I measure voltage only between 4~5V? If it can be, I can get 5X precision of voltage measurement.<br>Thanks again!<br>Daniel
<p>Hi Daniel,</p><p>You can measure the voltage between 4-5 V using opamp in non-inverting configuration with reference 5V and gain of 5.In this way when you have 4V at the input - the output will be at 0V. With 10 bit resolution you will be able to measure the voltage with ~ 1mV precision, For the current measurements I would suggest that you use some if the chips, mentioned here - <a href="https://www.maximintegrated.com/en/app-notes/index.mvp/id/746">https://www.maximintegrated.com/en/app-notes/index...</a></p><p>Shall this be high or low side current measurement chip - depends in that is the current sourced from or sunk in the load</p>
Hi Milen,<br>Would you please give me further hint on &quot;opamp in non-inverting configuration&quot;, I hope I can carry it out. Thanks.<br>Daniel<br>
<p>Hi Daniel,</p><p>You can read this: <a href="http://www.analog.com/library/analogDialogue/archives/39-05/Web_Ch1_final_R.pdf">http://www.analog.com/library/analogDialogue/archi...</a></p><p>Page 8. Fig1-3. Only the bottom terminal of Rg connected to the 5V supply.</p><p>When Rf/Rg=4, the gain is 5 and 4V input voltage will bring your output to 0V.</p><p>The opamp used should have common mode input voltage covering the positive supply rail, and rail to rail output. The input offset should by small.</p><p>One solution could be: <a href="http://www.linear.com/product/LT6004">http://www.linear.com/product/LT6004</a>.</p>
<p>Thanks a lot! I will try.</p>
<p>please can you help me to change a little bit this circuit to become a circuit that measured only voltage and current permenantly and without buttons and choice of the measurment</p><div><br><div><div><div>about the component sn74lvc2g66 , i didn't found it , can i replace it with other component</div></div></div></div>
Hi,<br><br>If you want to simplify the circuit - only for V and I - you do not need <br>sn74lvc2g66. Please, be more specific - what is the input voltage range, how big is the current you want to measure? How many inputs you will have? Two for voltage, and two for current, or they have to be combined - you want to measure the voltage over the load through you also measure the current?
<p>Thank you for your answers, indeed the objectif of our project is to build a circuit that is used to measure I and V (always) without interreption and send its measures at distance (we will use a GSM module for this) the problem remains in the manufacturing of the measuring circuit; V max is 380V and 500A is I max</p>
<p>Hi,</p><p>500A is very serious current :-). It will be difficult to measure it using the principle used in the DMM.</p><p>You have to use such kind of device:</p><p><a href="http://www.aliexpress.com/item/500A-AC-DC-4V-to-send-maps-isolate-microcontroller-designed-for-power-measurement-module-detection-chip/32572802869.html">http://www.aliexpress.com/item/500A-AC-DC-4V-to-se...</a></p><p>It should have a microcontroller inside, and you have to catch only the data.</p><p>Another possible, but <strong>very</strong> difficult for implementation solution is to use </p><p>Allegro current measurement chips, connected in parallel (for example</p><p>ACS770xCB, which could measure 100A), but splitting of the current in 5 branches could be practically impossible. </p><p>The voltage of 380V could be measured - it will need some high resistive voltage divider (but the precision will be not high -especiall for lower voltages, because of the 10bit resolution of the atmega ADC and the possible resistor mismatch) This can be corrected by the software, but in some limits.</p>
circuit simulation by proteus isis please
<p>Sorry,</p><p>I did not use proteus. I use LTSpice for simulations and Eagle for PCB's.</p><p>But I did not simulate this circuit. There is nothing to simulate there.</p><p>All are simply equations.</p>
<p>found the problem with my project. I went back to having the same problem with the C8051F320/1 microcontroller. why not flowing into the modes????? well one simple fix in your code to fix them all with the debounced switch working great thanks to Jeremy Blum. problem is commented out:</p><p>void button_pressed() {<br> long current_Time = millis(); <br> if ((current_Time - last_millis) &gt; 150) {<br> last_millis = current_Time; <br> <br> if (MODE == 9) {<br> MODE = 1; <br> } <br> else {<br> // MODE = MODE++; issue is here<br> MODE = MODE+1; solution. all it was <br> } <br> }<br> } </p><p>Thanks for the great project and your patience with me. </p><p>Thank you thank you thank you</p>
Congrats...I am glad that you succeeded to solve the problem!<br>Good luck with the project and all the best
<p>Thank you for your response. I will try all your advise and see if I did make a wiring mistake or other issue. </p><p>Thank you for your time.</p>
<p>Okay I have had the project wired up for a while and tried everything debouncing, so gave up on that. I thought I found a solution to make the code you wrote go past the welcome screen. A debounced switch such as a 10K resistor from 5V to positive side of switch with a .33uF capacitor across the switch, then an inverted Schmitt trigger going to pin 2. It actually works on all other code except yours. Not sure what to do next. I am very frustrated as I have 2 weeks to make this work and have no solutions to the problem. I even tried writing the code different ways and nothing past welcome screen or running the loop to get to the modes. If you have any wisdom I would appreciate it. Sorry if I seem needy. lol. I know it is not in the hardware as it worked with other code. The issue with debouncing is I did not know how to add the millis() (milliseconds) to make it debounced. Still new at this code. </p>
Hi,<br><br>It is very strange for me.. No one except you is reporting problems with code. It is not perfect, but it works somehow. Sometimes it skips some menu item, but this should not be a big problem. You can compare the performance of the shield with yours looking the movie. If you want to implement hardware debouncing - you could find a lot of circuits in internet. Easy circuit can be done by the use of the 555 timer in mono-stable mode. You can try also to use external clock generator with low frequency instead the switch on pin.2. I saw that use Arduino Mega - its pin 2 is connected with interrupt 0. <br>For me seems that you have a hardware problem - I would advice you to make some very simple setup - connect only the LCD through breadboard (you can even not connect the LCD) - you can use the serial monitor - take a bare arduino, connect a switch with resistor at pin 2 as in the schematic, load the code, start the serial monitor and press the button - if it does not work, try with other arduino board....if it works - search the problem in the connections.<br>I see that you use a lot of cable connections - It can be that you have somewhere a bad contact. If you want, you can trace the connection between the switch and the arduino pin #2, but measuring the resistance from the arduino header to the pins of the switch. I hope that you will find the problem soon...<br>P.S Last idea...Check you fuses. The default settings for arduino Mega are<br>Arduino Mega 2560<br><br>Low Fuse 0xFF<br>High Fuse 0xD8<br>Extended Fuse 0xFD<br><br>P.P.S. Change the code in the way that for debouncing is not used INT0, but INT1. (Arduino mega has 6 external interrupt pins). INT1 is on pin 3 - connect the switch there and check again...<br><br>
I will keep trying. Thanks <br>It was the digital debounce example out of the menu. Might put that example into the sketch with a little modification.
I am having problems with getting the mode button to change the mode. I tested the button with the normal debounce example and it worked. Not sure why this is not changing on your DMM code.
Hi,<br><br>The reasons can be few:<br>1) Check the correctness of the circuit - do you have the pull-up resistor at the mode input - if you do not have, you can activate the <br>internal one.<br>2) I do not know which example you tried, but as you see in the code I use the interrupt 0 for debouncing. That means - the button must be connected to arduino uno or mega pin 2. The interrupt is activated on rising edge of the signal - you can try to change it to falling or change.<br>You may try to simplify the program - at first to try to run only small parts - for example only to change the mode and to print it out in the serial monitor...<br>
Thankyou for the answer and I will do my best. Adding in some LED driver channels to test a line of LEDS and using the current generator for single. The max 407 is actually doing well. Wish you well in your work. Wish I had your job. If time will post it all with my efforts.
Hello, I am currently building this project and wondering if you have any updates or as you discussed going further into the problem. I think cost should be last in our thoughts of making this better. I am wondering if the Max 407 off of the constant current generator can replace the LM358? Are there alternative ways to produce the trimming current? You were the only reference for anything like this and appreciate the post. I am putting this in a project box and going to make it more precise to use at work. I need to have 3 decimal points. Anyway please continue to work on this as I think this is the better project out of all of them for anyone in electronics for refresher and learning more about engineering. Well hope You consider to keep going.
<p>Hi,</p><p>I would like to wish you success in the building of the project.</p><p>It should be not a problem to use MAX407 as current generator. To have better results, you should use Arduino Due - its ADC has 12 bit resolution. The bad thing is that it uses 3.3V supply - some resistor values might need to be changed. Good thing of using the Arduino Due - it has 10bit DAC, which you could use for creating of some voltage reference (instead a Zenner diode) or to adjust fine the trimming current - the voltage of the DAC could be applied at the V2C converter input.</p><p>In the current time I do not have enough free time to do something additional in this project, but you can try to improve the design by yourself (it is not perfect). The only new thing I did is: I included additional menu item - random number generator - it produces for me a set of random numbers, which I can use to play in lottery (6 of 49) :-) . This feature is not published - it is specific for each country. If you improve the design I would suggest you to describe you modifications in a different instructable.</p><p>In all cases as this design is now - it should not be used at places where precise measurements are needed - for example at work. Additional work must be done also in the direction of enlarging the input resistance. As it is in the moment in some cases can be a reason for false measurements (if the output resistance of voltage the source you want to measure is relatively high).</p><p>Good luck in the playing....</p>
Oh and is there an update to this for further investigation on my part to make better.
I am building this DMM. I noticed that a max 407 was used in the constant generator and wondering if that can replace the LM358. Also trying to find a generator for trimming. Is there an easier route to produce the current? The generator at school has limits. I might just have to build the generator. I had used your design last quarter to adapt this meter to a C8051F320/1. Everything worked except the obvious, Too much code and just needed to add a variable to finish. I am using the Arduino now for simplicity. Also debounce of the switch worked with a small delay and a small capacitor across the switch. Anyway thank you for being the only reference for this project. Having fun.
<p>Hello. Thank you sharing your work. I have a question regarding the transistors. I dont wanna use smd transistor so can you advice me any? </p>
Hi,<br><br>I suppose that you want to replace bss123<br>I think that this : http://ww1.microchip.com/downloads/en/DeviceDoc/VN2210%20E082013.pdf<br>or <br><br>http://www.microchip.com/wwwproducts/Devices.aspx?product=TN0110<br><br>or<br>http://www.microchip.com/wwwproducts/Devices.aspx?product=TN0610<br><br>can be used<br>
<p>Hi Milen, im doing this project, and im wondering how i measure the current?, i mean, no how works the amperimeter or the VIC, im saying how i conect to the circuit that i want to measure? the way that connects a regular amperimeter (in series to the circuit) or the way that i connect a voltimeter (in paralel to the device measure)?</p>
Hi Yamil111,<br><br>I have tried to explain this on step 2.... never mind,<br>the idea is the following - if you use the DMM device connected to you PC, then you can measure only currents which are sourced by devices having the same ground - in this case you connect only one terminal of the device (the red one), the current loop is closed through the common ground. In the case you want to measure a current flowing in some network, with unknown (different form you PC ground potential), it is better to supply the whole assembling (arduino+the shield) by a battery pack or isolated DC/DC converter.<br>So you use the whole assembling as standard DMM. You have to be aware, that this device does not measure negative currents - it means - the red input connector shall be always connected to the more positive node of the measured branch (the node, from which the current flows out). The black one (the local ground of the assembling supplied by battery) shall be connected to the node with less voltage potential (the node where current flows in). In this way it is possible to measure currents flowing in branches, which potential could be kilo-volts. In all cases, you have to be aware of the possible high voltages and to work carefully.
<p>Thank you Milen, i understand what you're saying. Sorry, i miss up what you explain in step 2. But now, you clarify my doubt. Thank you, and excellent project.</p>
<p>Hi Milen </p><p>Hi can I convert your DMM project to read voltages say from 80v ac and 150v volts ac. I'm wanting to building ac voltage monitor for single or 3 phase that I can read with the w5100 ethernet module was thinking a web page or telnet. </p><p>Thanks </p><p>Donnie</p>
Hi Donnie,<br><br>You can rectify the AC voltage to DC and read its value. You have to change the voltage divider resistors (make them higher) and to change their ratio - at 150-160 V AC, after rectification, at A0 you must have 5V. You have to be aware that the AC voltage is measured as RMS - the amplitude is higher and the generated DC voltage is different. You have to calibrate the voltmeter with the proper coefficient. May be you have to add some correction because of the voltage drop over the rectifier diodes. And must be very care full - the banana sockets are not insulated and these voltages are dangerous!
<p>A quality project and great presentation ! The design discussion provides great information useful well beyond the scope of this wonderful project !</p><p>Have you considered storing additional calibration data in EEPROM to help deal with your non linearity concerns?</p>
I did not considered this, but under desire it can be done. This is nice idea for people who want to go deeper in the problem. I preferred to try to correct mainly the linear behavior errors. Practically with careful device choice you can have only such kind. This is most valid for the transistor choice - if the transistor has low Vsat voltage, for Vds/Vce voltages over Vsat it has more or less linear behavior. The used NTD2955 is not the best choice, but using the PNP improves the linearity. Also suitable PMOS can be chosen so that it works also in the linear regime, and than the non linearity problem disappear. But, for the pure science...your idea is very good. It require more than two measurements and making some kind of look-up table or trying to find the equation, which models the performance...
<p>Awesome !</p>
<p>To all potential builders: If you are powering this thing from your computer USB port you need to be very very careful what/where you are measuring. The USB port ground is usually earth grounded. This means that you can't go about measuring taking measurements with both leads on other mains-powered devices like you might with a commercial meter. Consider what happens if you try to measure a current in a circuit that is also mains powered, and you connect you ground lead somewhere in the circuit which isn't earth ground (Hint: you have created a short to ground via your PC). Commercial meters are either A) battery powered or B) isolated if they are mains powered. If you want to keep things safe, just power the Arduino from a battery pack.</p>
<p>Excellent , Thanks For Sharing !!!!</p>
<p>Milen, very nice job. Easy to follow good idea. How does one go about having a shield printed?</p>
<p>Hi Murfmv. I have attached the design data. It is in &quot;Eagle&quot; format.</p><p>Download the ZIP file and un -zip it in some folder.</p><p>You can download the free lite version of the tool from here :</p><p><a href="http://www.cadsoftusa.com/download-eagle/?language=en" rel="nofollow">http://www.cadsoftusa.com/download-eagle/?language...</a></p><p>Install the program, start it and in the File menu&gt;open one of the files (Schematic or Board) - the other will open automatically. Work with the board window. Press the &quot;Ratnest&quot; button - like &quot;X&quot; . Yo have to print separate the top and the bottom layers if you want to use the ink transfer method.</p><p>The top layer must be mirrored (in the print menu). Scale factor must be 1.</p><p>Solid and black checked. For the top layer - in the layer menu, first make all layer invisible, and then activate the following layers Top, Vias, Pads, Dimension.</p><p>For the bottom layer (not mirrored) activate the layers Bottom, Vias,Pads,Dimension.</p><p>The files are checked with the Iteadsudio checkset. They can be sent there, and you will have 10 boards for ~ 25 USD. If you want, I can attach also the gerber files.</p>
<p>Milen , this is a very impressive Instructable ! We all know that there are professional meters that can be purchased , but the impressive thing is this Instructable explains so much about what goes on inside a meter. </p><p>I feel ( and we are nearly the same age :) , that in our lifetime we have seen such an escalation in technology . I am not an expert in any aspect of electronics , but I am a lifetime student of this fascinating field. My father was enrolled in National Technical School correspondence learning and I was able to look through all his course materials in my early teens . Getting a basic understanding of Vacuum Tube theory , and then moving into transistor theory was so fascinating . </p><p>Integrated circuits started to simplify design , but we don't always take the time to appreciate what goes on inside and the engineering it took to create the special function chip.</p><p>Radio Shack had a great book out that I purchased on how to use your DMM , and that book helped me a lot . I hope that this Instructable gets a lot of attention as it covers in depth how a DMM works , and shows just how much design goes into a multimeter .</p><p>I think this would be a great project for College electronics students to build as it ties together electronics measurement theory and uses the Arduino controller which can be used for so many creative things.</p><p>I am going to download this Instructable as it is a keeper ! I will read through it more in depth as I am sure there is some interesting areas that will help me further my understanding.</p><p>Truly , I thank you for all the time and effort you put into this Instructable.</p><p>Build_it_Bob </p>
Hi Build_it_Bob,<br><br>Thank you for the nice words. I also went similar way. I started to solder some parts when I was 12. My first working detector receiver I did in 1977. Long history from this time... :-).<br>I want to mention - the design is not the perfect one, and no very universal.. - it has few week points : the low input resistance, the accuracy, the ranges comparing with standard industrial DMM. But his main purpose is to show a way of thinking - how using few devices a lot of functions can be implemented, how to have relatively accurate device, even you use standard and not trimmed building parts...This instructable is still not finished. Remain few additional things to be done - the ohmmeter trimming...and may be the conclusion.
does anyone know some good books for easy to learn basic on electronics my nephew wants to learn n build

About This Instructable



Bio: Thank you all for following me.
More by Milen:Arduino Nano to Arduino Uno adapterArduino controlled tiny FM radioFunction generator
Add instructable to: