Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to measure voltage / current using PIC microcontroller?

Status
Not open for further replies.

DeathYu

Newbie level 2
Joined
Jun 1, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Singapore
Activity points
1,296
I am trying to build a project that is able to detect the amount of voltage and current from a electrical appliance and then it will send a signal to the micro controller to decide whether or not to cut the power supply.

But I am struck at the part of how to detect/measure current and voltage using PIC .

Please show me how to do it if possible.

Thank you:D
 

Re: how to measure voltage / current using PIC microcontroll

You can measure the voltage using a built-in Analog-to-Digital converver (ADC). As it measures the voltage relatively to the reference voltage, so you need a stable +5v supply (for example, using a L7805). ADC has has it's resolution (usually it is 1024), so the accuracy will be 5/1024.

To measure a current you just need to measure the voltage on the resistor, and calculate the current using the Ohm's law: I=U/R.
 

Re: how to measure voltage / current using PIC microcontroll

Use ADC available in PIC to measure voltage. Current can be measured by measuring the voltage across a resistor. The practical issues can be different based on how much voltage and current you plan to measure. Usually PIC ADC can measure up to rail voltage (when using VDD as reference), so you will have to make sure that the voltage to be measured is always between 0 - VDD volts. If the original signal is too small, use an amplifier otherwise use a voltage divider. The shunt resistor used for current measurement should have enough wattage to stand the power dissipation.
 

Re: how to measure voltage / current using PIC microcontroll

thanks guys but how to program the thing?
 

i have made the project about solar monitoring system. solar is the supply to the load. from solar, i connect it to the boost converter (DC to DC voltage) and then output of inverter will connect to the inverter. which is 12v to 230v. my problem is, i don't know how to connect the PIC 16F877A to my circuit. can you please explain to me. at the same time, can you please give me the coding of PIC.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top