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>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
<p>How old is he? Does he understand formulas?</p><p>May be the best solution should be to buy him some design kit with possibility to experiment with plenty of circuits and to learn the electronics practicing it... this will keep his interest, instead reading some book with theory.</p>
he 14 n i have bought him some kits before n he really good but now he wants to take things apart but i rather he made stuff on his own from parts from old radios n stuff like that ... but i would like him to learn the basics
<p>I did a small research in the internet...it seems that a lot of people recommend more or less the same books:</p><p><a href="http://www.circuitstoday.com/4-great-books-to-study-basic-electronics" rel="nofollow">http://www.circuitstoday.com/4-great-books-to-stud...</a></p><p>and a classical example:</p><p><a href="http://frank.harvard.edu/aoe/" rel="nofollow">http://frank.harvard.edu/aoe/</a></p><p>There are also some very useful sites like:</p><p><a href="http://www.allaboutcircuits.com/..." rel="nofollow">http://www.allaboutcircuits.com/...</a></p><p>I hope that this would give you him a nice start.</p>
and thank yu for yur replys :)
<p>That's nice! I am just thinking about designing and building my own universal multimeter-but mine will be benchtop and higher end. I will use dedicated adc chips, voltage references and relays. But... I have to point out that your design has EXTREMELY low input impedance. I understand that you don't wanna go all the way into megaohms because of noise, but maybe you could add a low noise input buffer?</p>
You are absolutely right. The input resistance is low. I decided to make a compromise, also with the ranges... only to keep the schematics simpler and cheaper. But I think that for applications, for which this DMM could be used ( Arduino projects, digital projects... etc), the low resistance would not be such a problem. I wish you good luck with you project, and I hope that we all will see after a nice Instructable describing it.<br><br>Regards<br>Milen
<p>I see. I didn't understand the reasoning behind the low resistance, but now I do-it's to keep the complexity down. I wasn't sure if you are fully aware of this being a flaw, so I wanted to point it out! I would also like to mention that I am not trying to nitpick the flaws of your (I think brilliant) design, but with this in mind... Is the spacing between the rails sufficient? It seems like the 100 volts might easily spark over... Maybe that's just me though.</p>
<p>As I wrote, before - I did compromise also with the ranges. May be 100V is not the suitable range, but here is another problem - I do not have any insulation of the banana socket - if there is really high voltage, it can be dangerous for the users. I did not want to have any dangerous high voltages on the board.The Zener diode is able to pass over 100 mA. This current multiplied by the input resistance of 10 KOhm, gives a voltage drop over 1000V at the input resistor. It is 1W and for some time will survive. But I do not suggest, that anybody tries that ! :-).</p><p>I want also to mention something additional about why I put so small input resistance - I did not want to use a buffer. I do not know how exactly the AD conversion is done in the Atmega chip. There is Sample &amp; Hold circuit, but I do not know is there any buffer inside the chip before the S&amp;H circuit. If no buffer exist, it is possible that the time constant of the S&amp;H circuit capacitor and the big input resistance is enough high comparing with the sample time to introduce huge error. (I had some problems with ADC's without buffers before the S&amp;H circuit, which were sampling false value because of the high output resistance of the previous circuit). OK, here the filtering capacitor of 10 nF helps, but with higher input resistance this capacitor also will create time constant and if the measurement was short in time, it would be also not correct.</p>
<p>ommg/////.........nice......one more possibility......</p>
oh! realistically, how would this compare to a harborfreight model? same? better? WAY better?
<p>The described DMM has some limitations - The ranges are not the most appropriate.</p><p>The reason for that - the ADC has reference voltage 5v - that defines an input range for Vmeas 5V. This DMM can be done relatively precise inside this region, but comparing with even harborfreight model, it has the following disadvantages:</p><p>1) the ranges...</p><p>2)the accuracy - for the industry DMM special dedicated chips are used, which are trimmed internally, have the required resolution. For the &quot;Arduino&quot; based DMM, the resolution is limited to 10 bit...</p><p>3)the input resistance is relatively low...</p><p>In other words - the proposed solution is cheap, relatively precise, but with some limitations </p>
Nice writeup! So you used a combination of opamps and voltage dividers for the ranges?
<p>Hi,</p><p>The voltage dividers are used for the voltage measurements...this approach use also the professional voltmeters. For the current measurement using voltage gain amplifies, may be is not the best solution, because the error is also amplifies. There a different set of very precise resistors is used. Their connection is done by mechanical switch, which contacts have practically 0 resistance and do not influence the accuracy. I wanted to use this approach for the current measurements (also for the voltage), I had to use some kind of relays (reed) , what would make the circuit more expensive and heavy. That is the reason I have only one range for the current measurements.</p>

About This Instructable


334 favorites

Bio: Thank you all for following me.
More by Milen: Salvaging a NOKIA 3310 LCD and using it with Arduino Two circuits of switched mode power supply based on the 555 timer Tiny FM radio
Add instructable to: