KWh / Power Meter

It is going to be a DIY project.

Objectives

Measurements and logging (in a .csv file for viewing in excel or any other program) of the following (these are

  • Battery Temperature using LM35
  • Current using AC712 or a Clamp-on hall effect current sensor.

on a SD card or over a wifi network on a PC.

And if possible the following

  • Battery Voltage
  • PV Voltage
  • PV current
  • UPS Current using Clamp-on hall effect current sensor (for both directions)

Logging of following

Power in WH

Energy used in KWh ( CC charging current +/- UPS charging/discharging)

Plotting graphs like the example shown

Personally I'm inclined towards using ardunio uno, but I can use other hardware if all the necessary help is available.

Yes this is an over-ambitious project, but atleast I need to measure the current and temperature. :)

So please post your suggestions and comments.

Well Okay,

Care to explain a few things,

a) Is there a need to create a system just for the purpose of logging? If so there are several pre-built devices that you can hack quite easily.

B) Can you make two :P

c) How much does it cost (incl. labor) to build one for sale (mass produce?)

[quote=“djayz, post:2, topic:21256”]

Well Okay,

Care to explain a few things,

a) Is there a need to create a system just for the purpose of logging? If so there are several pre-built devices that you can hack quite easily.

B) Can you make two :P

c) How much does it cost (incl. labor) to build one for sale (mass produce?)

[/quote]

a) yes, it will allow me to log the performance of my Solar Panels and the Charge controller.

B) If there are any pre-built devices which are a hackable, I can look at those options too.

c) yes, No labor charges for WiredPakistan members. As for mass production, I'm still on the drawing board.

Such system already exist for AC current http://www.home-energy-metering.com/single-point-monitor.html. and open source option http://openenergymonitor.org/emon/ but I want to build for DC systems.

I know the DC systems can be a bit too tricky and require multiple microprocessors and nerve wrecking patience and programming technique, to accomplish such, Good thing you're using arduino any particular idea of making it an open source or just a one time thing. I think you can gain much more acknowledgement and input from people who are already doing similar stuff (DIY) if you broadcast / post a video, on youtube, instructables and similar sites.

[quote=“djayz, post:4, topic:21256”]

I know the DC systems can be a bit too tricky and require multiple microprocessors and nerve wrecking patience and programming technique, to accomplish such, Good thing you're using arduino any particular idea of making it an open source or just a one time thing. I think you can gain much more acknowledgement and input from people who are already doing similar stuff (DIY) if you broadcast / post a video, on youtube, instructables and similar sites.

[/quote]

Obviously I will post my result. The difficult part is how to handle 60V to measure the voltage of the Panel array. Is there any components you can suggest which I should use ?

Yousaf,

First of all my congrats for taking the iniative to do this. By working on this Let me assure you that you will develop a fuller understanding of your RE system.

I vehemently disagree with djayz who has suggested that you should use something pre-built. Unfortunately it was this 'attitude' which resuted in our loss of understanding of science and technology.

Yousaf.

No worry on measuring 60 volts. Just use a voltage divider comprising of a 56K and 4.7K resistor in series. Measure the voltage across the 4.7K resistor and multiply it with 56/4.7=11.9 in the software to get the panel voltage. Connect a 5 volt zener acrossthe 4.7K resistor as aa safety net so that voltage cannot rise beyond 5 volts.

Before connecting to the computer do the exercise manually to confirm the result and when you feel confident connect to the computer.

Aurangzeb

Someone suggested using a optocoupler, is it necessary ?

Is AC712 good enough for measuring current and is it easily available ? or should I use some other hall effect sensor ?

Optically isolated voltage and current measurement are available. However in this particular case I don't think it is needed since voltage is not that high. Nevertheless if you want to use it as a matter of abundant caution there is no harm. However local avaiability is a question mark.

ACS712 is excellent for current measurement. It can directly be interfaced with microcontrollers such as the Arduino. Easily available locally.http://www.evselectro.com/kits-30a-range-acs712t-elc-30a-module-current-sensor-module-3024

Aurangzeb

Yousaf,

My suggestion is to start simple and gradually build up as you develop an understanding of the system. My suggestions are as follows.

1. Start by adding an analogue ammeter on the line carrying the current alongwith an ACS712 circuit. The output of the ACS circuit should be measured with a digital voltmeter and current calculated manually. It should be reconfirmed from the analogue ammeter.

2. Connect the voltage divide circuit that I had suggested in my earlier post and measure the voltage across the 4.7K resistor and solar array voltage should be calculated manually.

3. Putting all the readings in an excel sheet will do all the power energy current voltage etc.calculations and graph them for you.

Aurangzeb

[quote=“aurangzebhaque, post:8, topic:21256”]

Optically isolated voltage and current measurement are available. However in this particular case I don't think it is needed since voltage is not that high. Nevertheless if you want to use it as a matter of abundant caution there is no harm. However local avaiability is a question mark.

ACS712 is excellent for current measurement. It can directly be interfaced with microcontrollers such as the Arduino. Easily available locally.http://www.evselectro.com/kits-30a-range-acs712t-elc-30a-module-current-sensor-module-3024

Aurangzeb

[/quote]

Price is quit different from different stores, e.g it is also avaiable for as low as Rs 630 http://digipak.org/zencart/index.php?main_page=product_info&cPath=2&products_id=131

what should be the power rating of the 2 resistor ? Should I use 2W resistor like these http://www.evselectro.com/2w-5-4.7k-ohm-650 and http://www.evselectro.com/resistors/2w-5/2w-5-56k-ohm-1240

Or 1W is good enough http://www.evselectro.com/resistors/1w-5/1w-5-56k-ohm-602 and http://www.evselectro.com/resistors/1w-5/1w-5-4.7k-ohm-598

Here is the maths.

60/(56+4.7)K=0.97 mA.

So the current through both resistors would be around 1 mA.

Calculate the power dissipated by each resistor using I^2*R.

1mA*1mA*56000=0.056 watts. Thus a normal quarter or half watt resistor will suffice. Cost Re. 1.00.

Similarly for the 4.7K resistor.

Aurangzeb

Ardunio UnoR3 up and running.

[quote=“yousaf465, post:13, topic:21256”]

Ardunio UnoR3 up and running.

[/quote]

Great.

Next stop - measuring array output voltage.

Aurangzeb

[quote=“aurangzebhaque, post:14, topic:21256”]

Great.

Next stop - measuring array output voltage.

Aurangzeb

[/quote]

Next step, is how to power the ardunio. I couldn't find a 6 X AA battery Holder at hall road. http://www.adafruit.com/products/248?&main_page=product_info&cPath=38&products_id=248

I have quite a few NiMH batteries laying around.

I did bought the DC jack.

even 56K and 4.7K resistor were difficult to find, now they have so many Mobile and Solar panels shops, all others have just gone into background.

Second step is powering the ACS712 30A http://www.allegromicro.com/~/media/Files/Datasheets/ACS712-Datasheet.ashx

I want to measure current using ACS 712 independently, without connecting it to ardunio at this stage of the project.

This sounds like a good project.

You can power up the ACS712 with 5VDC and and measure the output voltage at pin 7 of the IC. This should correspond to the current flowing through the chip. You will however need a milli volt range precise DC voltmeter if you want to make accurate measurement.

[quote=", post:17, topic:21256"]

This sounds like a good project.

You can power up the ACS712 with 5VDC and and measure the output voltage at pin 7 of the IC. This should correspond to the current flowing through the chip. You will however need a milli volt range precise DC voltmeter if you want to make accurate measurement.

[/quote]

The challenge in the ACS712 circuit is to build the current carrying conductor in such a manner that it offers no resistance to the current path.

I suggest that you use the tracks of a vero-board. Half the tracks should be connected in parallel by bridging them with solder. The ACS should be mounted on the vero-board along with the filter capacitor and the output connector. Two studs should be mounted on either side of the vero-board to connect the incoming and outgoing current wires.

Aurangzeb

[quote=“yousaf465, post:15, topic:21256”]

Next step, is how to power the ardunio. I couldn't find a 6 X AA battery Holder at hall road. http://www.adafruit.com/products/248?&main_page=product_info&cPath=38&products_id=248

I have quite a few NiMH batteries laying around.

I did bought the DC jack.

even 56K and 4.7K resistor were difficult to find, now they have so many Mobile and Solar panels shops, all others have just gone into background.

Second step is powering the ACS712 30A http://www.allegromicro.com/~/media/Files/Datasheets/ACS712-Datasheet.ashx

[/quote]

I think you are not going to the right market.

When you get to Hall Road ask to go to ELECTRONIK 2000. That is the area where you will find this stuff.

Take a printout of what you need other than the very common items, such as resistors and caps. Most of the times you will not know the exact name by which a certain component is known in the market. A picture is worth a thousand words.

You should be able to find all types of resistors/capacitors etc. in that market. Also consider ordering from digipak or evselectro. It will save you a lot of hassle in parking etc. at Hall Road. It is more convenient to catch a bus to the city center and then come back without worrying about your car/bike being stolen or lifted by the police.

Aurangzeb

[quote=", post:17, topic:21256"]

This sounds like a good project.

You can power up the ACS712 with 5VDC and and measure the output voltage at pin 7 of the IC. This should correspond to the current flowing through the chip. You will however need a milli volt range precise DC voltmeter if you want to make accurate measurement.

[/quote]

Only 5VDC supply I can think of is 3AA x 1.5 =4.5V without using the ardunio. I don't have any battery holder though. Or else I can use a 9V battery with voltage regulator ?

[quote="aurangzebhaque, post:18, topic:21256"]

The challenge in the ACS712 circuit is to build the current carrying conductor in such a manner that it offers no resistance to the current path.

I suggest that you use the tracks of a vero-board. Half the tracks should be connected in parallel by bridging them with solder. The ACS should be mounted on the vero-board along with the filter capacitor and the output connector. Two studs should be mounted on either side of the vero-board to connect the incoming and outgoing current wires.

Aurangzeb

[/quote]

I bought this, after searching whole of hall road. Only 2 shops store it one is in rahim market, hall road and other is in Khalil plaza.

what is the technical name for these green thingy (connectors) These are too small for the 7/29 wire. How should I connect 7/29 wire with this ?

one way is to all together remove this green thingy and use cable lugs, but that could require de-soldering