PIC16F877 BASED MULTIMETER
Free for educational and noncommercial use ! ! !
For commercial use you must contact the author ! ! !
DESCRIPTION:   This is multimeter (voltmeter and amperemeter) based on PIC microcontroller (PIC16F877) intended for use in power stabilizers 0-35V 0-3,5A. There are used two analog inputs to measure voltage U and current I. After that are calculated power consumption P and resistance of consumer R and all four are shown on 16x2 row display. A/D converter is 10 bit and VRef on pin5 is set on 3,5V, that means that last digits of U and I are rounded with error 3,5. (example 12.00V... 12,04V... 12,07V). That is why I've placed two jumpers J1, J2. Their purpose is to show (J1, J2 ON) or ignore (J1, J2 OFF) last digits of U and I. As an option you can add MAX232 to connect multimeter on COM port (RS-232) to PC, software is included in this project. And one good thing is that code for PIC16F877 is less than 2KB which is within demo limit of MikroC.
PRINCIPLE of measuring:    I Input is connected to non-inverting input of operational IC and it is multiplied by 10 (3,5A x 0,1 ohm = 0,35V x 10 = 3,5V). -U Input is connected to inverting input and divided by 10 (35 / 10 = 3,5V). I had very interesting problem with operational IC. First I used TL082 and there was no problem in U input (inverting input) measurement was precise, but on I Input on non-inverting input there was over 50% error... Instead 100mA it was measured 150mA. Then I used TL062... and error dropped to 20%. However that was not good enough. The end solution I found was.... I took broken volt meter, and took out operational IC... and there was no error anymore... it is shown on photo below.
SOFTWARE for PIC16F877:     As you can see, program code is written using MikroC. Code optimization is not so good, you'll get bigger files compared to assembler. The reason why I use MikroC and what is most important for me is because it's very simple and you can do everything in no time with very little effort.
SOFTWARE for PC:

Now available v1.3 with new features, skin, monitoring chart, and some bugs removed. Also removed bug with floating point for different regional settings.
Software works on Win 2000, XP and later.
Links to some usefull web sites.
AllPIC Programmer                                                        MikroC
Donations are appreciated.