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>Dear Milen,</p><p>Can you suggest any alternative for 74LVC1G14DBV and SN74LVC2G66? I would prefer it to be thru-hole instead of SMD.</p>
Hi CharleneD16 ,<br><br>You can replace the chip with a pair of PMOS transistprs (like BSS84 :<br>http://www.nxp.com/documents/data_sheet/BSS84.pdf) Exactly this is SND, but you can find similar in through-hole package. There should not be any difference in the performance.<br>The transistors should be connected in the following way:<br>sources - supply<br>gates - first to the input of the inverter, second at the its output<br>drains - to the trimmer potentiometers<br><br>Regards<br>Milen
<p>Thanks a lot! This project is really awesome. Thank you for sharing.</p>
<p>Dear Milen<br><br>You did a great job ! I have a project that need to use arduino as multimeter. Could you help me something? If i just want to use Arduino for measuring Current, Voltage, and Temperature and send the data to PLC, I don't need to show in LCD, but send to PLC.<br>What is the code should i use in Arduino program ? If Arduino's TX pin connect to TTL to RS232 converter.</p>
Thanks,<br>I think - you have to decide which type of communication you want to use : SPI or I2C and depending on this to define the used pins and libraries. From the code you can remove then the LCD and serial monitor part.
<p>Dear Milen,<br> Thank you for your replied and sorry for my late respond. I read about SPI and I2C as you recommended, So i chose I2C be my answer because I have to measure in real-time and yes I2C has more speed than SPI. I have a design for my Arduino measuring Voltage and Temperature as this in attached picture. Will it work ? I will use TX port for sending data to &quot;TTL to RS232&quot; and then to PLC.</p>
<p>Hi,</p><p>Check the connections of the voltage sensor - seems that the sig and supply pins are swapped. Is it not possible to supply this sensor with 5V arduino supply?</p><p>Do not forget pull-up resistors needed for the I2C communication. I suppose that also the rx TTL pin shall be connected - some return data is send also during the communication.</p><p>regards</p><p>Milen</p>
<p>Dear Milen,<br>Thank you very much ! But i'm not sure about the code. If i connected IR Temp and Voltage Sensor(swapped it already) with Arduino, Should i write the code like &quot;DigitalRead(A1, Voltage) and DigitalRead(SDA or SCL, Temp)&quot; like this ?<br>I know about doing code to show in LCD, But I don't know about sending/receiving data from TX/RX pin. Could you give me some hint ?<br>Sorry for bothering you a lot.</p>
<p>Hi .</p><p>Please write the type of both sensors. For the temperature sensor I suppose you have to serch the proper arduino library. The voltage sensor seems to me to have an analog output (check if true). In this case you have simply to use AnalogRead(A0). Check what should be the output voltage if you supply the sensor with 9V battery (as on the picture). If it is higher than 5V - an error will occur - you have to insert proper resistor voltage divider at the output of the voltage sensor and the analog arduino pin.</p>
<p>Great project! What are the dimensions of the PCB? I am going to order one but need the size and I can't read the Eagle files.</p><p>Thanks,</p><p>Will</p>
Hi Will,<br><br>The PCB size is 92.1 x 53.6 mm. Good luck.<br><br>Regards<br>milen
Thanks for the fast reply. My idea is to piggyback your electronics with a Pi Zero and have the Pi deliver a GUI front end. Ideally I want to get the Eagle board into Fritzing and hope I can find a conversion tool as I don't want to learn Eagle!<br><br>Will
<p>Hello Milen,Ray,</p><p>I am interested to make PCB for this design. If its possible may any of you share the Gerber files? I am going with PCBway.</p><p>Thanks</p>
<p>Hi Nituj,</p><p>I have attached the gerber files at step 3 of the instructable for download.</p><p>If any problem - please, contact me.</p><p>Regards</p><p>Milen</p>
<p>Hi Milen,</p><p>Thanks for the quick response and files. I will update BOM with part numbers &amp; I am going to build 5 numbers.</p><p>Thanks for the excellent project &amp; of course sharing your design.</p><p>Regards</p>
<p>Hi Milen,</p><p>I am only now ordering parts for this project because I had health problems. Old age is not good, but the alternative is worse! :-) I can't find the package &quot;085CS_1AR&quot; for C21 in Google, so can you give me some idea of the specification for this item? What voltage and accuracy are needed?</p><p>Best regards,</p><p>Ray</p>
Hi Ray,<br>This was a device from Eagle library. It is SMD tantalum capacitor.<br>I think you can solder there any capacitor size C or D1:<br>http://servenger.com/Resource/Tantalum_Chip_Caps_Case_Codes.pdf<br>Get well soon!<br>Milen<br><br>
<p>Great! Thanks Milen! I don't wish to offend, but I think C21 is electrolytic? It shows polarised on your schematic, and I think this is correct?</p><p>My bones ache, but my brain still works!</p><p>Ray</p>
<p>Hi Ray,</p><p>You are absolutely right : </p><p><a href="https://en.wikipedia.org/wiki/Tantalum_capacitor">https://en.wikipedia.org/wiki/Tantalum_capacitor</a></p><p>but if do not find such, you can solder a standard electrolytic one - simply bend it leads and solder them on the solder pads.</p><p>Regards</p><p>Milen</p>
<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>

About This Instructable



Bio: Thank you all for following me.
More by Milen:Party stroboscope done by recycled parts Arduino controlled power supply source Arduino Nano to Arduino Uno adapter 
Add instructable to: