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 With A PIC

Status
Not open for further replies.

cobra1

New Member
Hi

I would like to measure current using the ADC on a pic.

I have been reading and i now know i need a shunt resistor and measure the voltage across it and then use ohms law to calculate the current.

Is i just a simple as this or is there a bit more to it??
 
Hi

I would like to measure current using the ADC on a pic.

I have been reading and i now know i need a shunt resistor and measure the voltage across it and then use ohms law to calculate the current.

Is i just a simple as this or is there a bit more to it??

Well a few questions come to mind. Do you want to measure AC or DC current? Lets say DC current. There is a little more to it, starting with how much current? A few amps? Maybe 2 or 3 or 10? The down side of measuring DC current with a shunt is a shunt has a very low output typically in mV. You could for example have a 10 amp 100 mV shunt that at full current of 10 Amps outputs 100 mV so you need amplification to really get the most from your PIC A/D.

Some members here have designed some nice amplifiers for this purpose. There are also hall effect devices that in some cases have built in amplification and provide nice output voltages to an A/D converter.

So it is really a matter of how much current, AC or DC current and if DC is it measuring on the High side or Low side?

Ron
 
I guess this chip leaves no unanswered questions.

The Allegro-microdevices ACS712 is available in three versions, ±5A - output voltage 185mV/A, ± 20A - output voltage 100mV/A and ± 30A - output voltage 66mV/A.

It has an internal conductor resistance of 1.2mΩ and can be used to measure AC and DC current - low and high side measurement.

Further it requires a single supply voltage of +5V.

Here is the data sheet.

Boncuk
 

Attachments

  • ACS712-714.pdf
    663.8 KB · Views: 240
That chip looks the business, Ron, the maximum current will be 8 amps DC.

It will be a system where i can look at a fuel cells output, if a device is drawing more current from the fuel cell it will send signals to a H2 generator to create more H2.

Thats the idea anyway.

Overall i wish to be able to see the output voltage, current and wattage.
This particular cell can output 200watts, 28v@7.2A
 
Last edited:
Mr. Boncuk provides a nice solution in that Allegro hall effect current sensor chip. The beauty of chips like this being that the problems of initial amplification following a shunt are done and the single 5 volt supply is nice. A little voltage division for measuring the cell output voltage and you are well along. There is a website called The Back Shed that has a pretty good wealth of information for projects like yours (similar) for wind turbines. You may want to Google it and you may get a few good ideas to go with what you have. Something to think about anyway. I would definitely consider the amplified hall effect solution Boncuk presented or similar.

Ron
 
Status
Not open for further replies.

Latest threads

Back
Top