# Using 8051 as a multimeter with LED display?

Status
Not open for further replies.

#### Learner

##### New Member
Hi guys,
I am looking to build a multi meter using 8051, I know that I can use an AD converter to display the voltage but what can I do to measure the resistance and the current?

Can anyone refer a link or suggest the easiest way to do this?

So far, I have figured that I can put the AD on the bus but would I need a HEX to decimal decoder on the bus to display the voltage? or shouldn't it be a binary to decimal decoder?

Thanks!

#### Nigel Goodwin

##### Super Moderator
Learner said:
Hi guys,
I am looking to build a multi meter using 8051, I know that I can use an AD converter to display the voltage but what can I do to measure the resistance and the current?

Can anyone refer a link or suggest the easiest way to do this?

A conventional multimeter is only a micro-ammeter, to read amps you place a resistor in parallel with it, and to read volts you place a resistor in series with it - it's all basic formula - ohms law. To read resistance you measure the current through a resistor, which gives a non-linear reversed scale - or you can pass a constant current through the resistor and measure the voltage across it, this gives a linear forward reading scale.

So far, I have figured that I can put the AD on the bus but would I need a HEX to decimal decoder on the bus to display the voltage? or shouldn't it be a binary to decimal decoder?

HEX and decimal are really the same thing, just different ways of displaying the same data - both are identical binary. You don't need any decoder, you do it all in the software - and you need to convert it to decimal, if you want your display to be decimal?.

#### Learner

##### New Member
Hi Nigel,
Thanks for coming to the rescue again!

I was more refering to how to actually measure the current and resistance using a 8051, since I can capture the voltage using an AD converter and placing it on the bus and may be use a lookup tabe to convert into decimal and output it on the bus to the decimal 7 seg led.

However to display the current I would need to use the 8051 to divide the voltage value by the resistance which is variable, so I would have to measure the resistance and put that into a register but that's where the problem arrive ..... because I am looking building a power supply to display voltage and using a potentiometer to adjust the output voltage.

The input of the AD converter will be placed at the output of the potentiometer to measure the voltage and display that but how can I measure current and resistance?

#### Nigel Goodwin

##### Super Moderator
Learner said:
The input of the AD converter will be placed at the output of the potentiometer to measure the voltage and display that but how can I measure current and resistance?

As I mentioned above, it's just like a multi-meter, you measure the voltage drop across a resistor. A 1 ohm resistor will drop 1 volt across it when 1 amp of current flows through it, you can use opamps to boost the voltage drop across smaller resistors, or for smaller currents. I gave two methods of measuring resistance in the previous answer, the constant current method is probably the best to use.

Your biggest problem is likely to be the power supply for all your measuring circuit (8051, displays, A2D etc.) - you will probably require a completely seperate floating supply - or some very cunning design work!.

#### spindrah

##### New Member
i did this with a pics A/d
i also hooked it up with a .01ohm current sensing resistor, and graphed 175amps through a coil

#### Exo

##### Active Member
That's pretty nice :wink: - especially like the blue...

#### Learner

##### New Member
Hi spindrah,
That looks f*ckin AWSOME!!!!!!!! :shock:

GREAT STUFF!!!!!

Is that an 8051 with 8 bit AD?

#### Nigel Goodwin

##### Super Moderator
Learner said:
Is that an 8051 with 8 bit AD?

Looks like a PIC 16F876 (or varient), they have 5x10 bit A2D inputs.

#### spindrah

##### New Member
thanks

its a 18LF2320 pic
it has 10-10bit a/d channels, but i'm only using 8bits.
the glcd's res is only 128*64 so 10 bit is overkill.

here is one of it measuring current.

Status
Not open for further replies.

Replies
4
Views
4K
Replies
0
Views
7K
Replies
10
Views
4K
Replies
1
Views
1K
Replies
12
Views
3K