Hi! I tried to build an energy meter using MCP3901 IC but failed to do due to some unidentified error in the source code. I had to use a resistor divider for voltage measurements and a 200 micro ohm shunt for current measurements. Since I had failed to do this I thought of going to an alternative which measures the energy consumption of a conventional energy meter using an IR sensor. I was wandering whether I could use the A/D converter of the PIC for this task and placing zener diodes for protection. I wanted to know whether it is possible and whether some one has done this before? I would really appreciate if you could give a source code too. I have less than 7 days to finish the project. Pls help.
What failed in your first attempt?
The most straightforward way to measure current is to use a voltage divider and a shunt resistor - you should protect the inputs with diodes.
IR sensors may be used to indirectly measure temperature of a theoretical black body, and thus I presume it is not a good approach to reach the task. There are other ICs nice to this task such as ADE7755.
I know using an IR sensor is not a good is method, since I have only couple of weeks to finish the project I have no other options. I have purchased MCP3901 IC from the US and no time to purchase other ICs such as ADE7755. I don't know whether the error is with the hardware connection or with the software. I made it by referring to MCP3901 PIC18F65J90 Shunt Meter Reference Design ( **broken link removed** ) I think I burnt my MCP2200 which means I can't calibrate the meter. The program doesn't run after a while loop which uses to initialize the MCP3901. Also the energy variable has been defined as an integer in KWh, but I want to display it with couple of decimal places. I have post the source code.
I think if you r going with microcontroller then you don't need any ir sensor you just use voltage divider for voltage measurements and use shunt resister for current measurement and do mathematical procedure using PIC microcontroller and the best PIC for this purpose is PIC18f452 as I have used this for same task...
I think if you r going with microcontroller then you don't need any ir sensor you just use voltage divider for voltage measurements and use shunt resister for current measurement and do mathematical procedure...
I agree that´s in essence the core of task to measure energy consumption, however it is intricate due he must be able to deal with real time RMS calculations. Anyway this can solve his problem without need to acquire some dedicated IC.
I think if you r going with microcontroller then you don't need any ir sensor you just use voltage divider for voltage measurements and use shunt resister for current measurement and do mathematical procedure using PIC microcontroller and the best PIC for this purpose is PIC18f452 as I have used this for same task...