Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Measure current using PIC

Status
Not open for further replies.

picstudent

New Member
I need to measure the current in a electrolysis process.
Range from 0 to 500mA only
.1mA resolution is required. I plan to use a shunt resistor and use a 14 bit adc,(Please suggest a ADC also. need low cost,because my equipment uses 9 channels like this .
Also I need to cut off the line if current exceeds a preset value. Could you suggest a suitable logic level MOSFET for the purpose?

Any guidelines for me? Sample designs or app notes?

Thanks

Roy
 
You might start looking here.
**broken link removed**
 
(Please suggest a ADC also. need low cost,because my equipment uses 9 channels like this .

I assume from this that you are intending to use nine ADCs, one for each of the nine currents to be measured.

Bad idea.

In every application I have seen, there is one ADC and an analogue multiplexer which selects the inputs to the ADC.
The multiplexer is driven by outputs from the controller.

A bit of pseudo code for such a system may look like this:

Code:
Select input 1
Digitise 
Store value 1
Deselect input 1
 
Select input 2
Digitise 
Store value 2
Deselect input 2
.
.
.
.
 
Select input n
Digitise 
Store value n
Deselect input n

This way, one good ADC can be used for many analogue inputs.

JimB
 
I assume from this that you are intending to use nine ADCs, one for each of the nine currents to be measured.
JimB

Thanks for ther replay

No .I am planning to use multiplexer. CD4051 or something suitable.(have to search)

But my current problem is locating a suitable ADC which can give 14 bits of resolution, and a good mechanism to switch on and off this Chanel (without relays).

regards
 
Thanks for ther replay

No .I am planning to use multiplexer. CD4051 or something suitable.(have to search)

But my current problem is locating a suitable ADC which can give 14 bits of resolution, and a good mechanism to switch on and off this Chanel (without relays).

Are you sure you actually need 14 bit resolution? - plenty of PIC's (such as the 16F877) have enough analogue inputs, but only give 10 bit resolution.

Even at 'only' ten bits you might find the least significant bits lost in noise - at 14 bits it's almost certain that you will lose bits in the noise, and layout will be absolutely critical to get as much as you can. Ten bits is better than 0.1% resolution, are all your other components going to have better tolerance than that?.
 
Are you sure you actually need 14 bit resolution?

This area I am also not sure, please suggest, I will describe my analysis.I think something is wrong there.

I need to measure upto 500mA with .1mA resolution.
I want to show 150.1mA, 152.6mA like that
So 5000 .1s in 500mA. So I need a ADC with 5000 counts. 13 bit is only 4096 so 14 bit. This is how I reached my assumption. But I think (from your post) there is another way.

Please suggest.
Thanks for your time
Roy Thomas
 
Last edited:
This area I am also not sure, please suggest, I will describe my analysis.I think something is wrong there.

I need to measure upto 500mA with .1mA resolution.
So 5000 .1s in 500mA. So I need a ADC with 5000 counts. 13 bit is only 4096 so 14 bit. This is how I reached my assumption. But I think (from your post) there is another way.

Why do you think you need 0.1mA resolution?.
 
The original equipment Which I am trying to reverse engineer for my client has that much resolution ,so says the client.

I'm dubious it has 0.02% accuracy and resolution - have you actually ever seen it, or scoped the outputs from the sensors?.

Doing it with ten bit resolution requires one simple cheap PIC, and is reasonably forgiving about layout. Moving to 14 bits is going to make it many times more expensive and complicated, and make layout greatly more difficult - and you're still likely to gain little (or nothing) from the change.
 
I'm dubious it has 0.02% accuracy and resolution - have you actually ever seen it, or scoped the outputs from the sensors?.

Never! Only heard a report like that from him.
Understood the complications involved. So have to convince him.
btw
IS there anyway we can produce a display with that much resolution? The calculation involved in that device actually do not require that much precision. the original equipment also may be doing some sort of tricks like that. Any possibility?

Thanks for your time
regards
 
I'm using the ADS1100, 16 bit A/D converter, on an altimeter. Its low cost and shows good resolution, accuracy and repeatability.
 
Never! Only heard a report like that from him.
Understood the complications involved. So have to convince him.
btw
IS there anyway we can produce a display with that much resolution? The calculation involved in that device actually do not require that much precision. the original equipment also may be doing some sort of tricks like that. Any possibility?

You can easily stick as many extra digits on the end as you like, but they won't change one value at a time - with 10 bit resolution the last digit will be either 0 or 5 all the time.

But I would seriously suggest you go and see what you're dealing with.

In many respects it's like ordering a mechanical part to be made - you specify it's size, +/- it's required tolerance - and the smaller the tolerance, the greater the cost.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top