kWh-Powerconsumption registration. Contains: (Fritzing)PCB with a Lightpulse detection circuit with Daylight compensation. Arduino Uno acting as a webserver. Arduino stores measured values on SD-card. Values can be displayed as charts by using a webbrowser.

At home I have a digital kWh-Powerconsumption meter. A blinking (orange) LED shows how much Power is consumed. 1000 pulses = 1 kWh. I designed a (Fritzing)PCB which detects these light pulses. The pulses are used as an interrupt on an Arduino UNO board. The Arduino counts the pulses and calculates every 30 seconds how much Power is consumed. The value is stored on a SD-card together with a (Unix)timestamp from a timeserver on the internet. The Arduino is also acting as a webserver. With a webbrowser you can show the measured values in several charts. The PCB is very simple to solder. No SMD's are used. The programming of the Arduino was very difficult (for me) because an UNO is to tiny (low SRAM) for such a program. I used a lot of programmingtricks to fit everything in SRAM and Flash. I also used a lot of hardware and software examples from various projects on the internet. So if you recognize something and it's yours. Thank you for your work. It helped me completing this project.

 

For the webpage of the Arduino webserver you have to store some html-files on the SD-card. Pictures and other files are stored elsewere on the internet. The webserver code uses "Highcharts.com" for calculating and displaying the charts. It's free to use..

 

Because Fritzing,org is not the right place for non-PCB related issues (like Arduino programming) I created a special project website.

 

For more details about this project or the demo page goto my projectpages at:

http://members.ziggo.nl/marcviet/projectpages/index.htm

Login to post a comment...

Marc Viet 4 years ago

Marc Viet
Hi, this projects contains an Arduino UNO, Ethernet Board and SD card reader/writer. When you also use the microcontroller as a webserver, be aware that sooner or later you will run out of RAM memory. You can use the function: freeMemory() to check what is happening. (Load the library: #include <MemoryFree.h>) A better option is: Use an Arduino MEGA or Teensy3.x: More Flash memory and more RAM. You can also use a Raspberry Pi. A RaspPi is a better solution when running a webserver. For timecritical events use interrupts. (The RaspPi controller uses also CPU cycles for the Linux OS)

Equintox 4 years ago

Hey boudhief, i am going to start makeing a similiar Project like this now, if you want we can help eachother together

boudhief 4 years ago

hi, i'm interested for this projet but my problems is the shematics (with arduino and senser current and the method to send many information in my website

Marc Viet 4 years ago

Marc Viet
Boudhief, can you be more specific? Have you opened it with de Fritzing application?

boudhief 4 years ago

c'est bien mais le fichier LPD003.fzz n'est pas clair

Marc Viet 5 years, 5 months ago

Marc Viet
Hallo Unigyr. In de tekst stond: 500 pulses = 1 kWh. Mijn kWh meter is echter ook een 1000 pulsen model. Ik heb de tekst aangepast. Eventueel kan je de volgende regel aanpassen: watt = (3600000.0*(float)lastinterruptcounter)/((float)lastdeltatime); Wat betreft de S0-bus. Ik heb er geen ervaring mee. Je kan mijn extra printje weglaten en de uitgang van de S0-bus rechtstreeks aansluiten op de interrupt ingang van de Arduino. Zie b.v: http://de.wikipedia.org/wiki/S0-Schnittstelle. Je kan, voor zover ik begrijp, de S0+ pin aansluiten op de +5V Power pin van de Arduino en de S0- pin aan de interrupt pin van de Arduino. Werkt dit niet dan kan je aansluiten volgens: http://playground.arduino.cc/Main/EEM12L-32AKWhMonitoring De weerstand van 10K zorgt ervoor dat als er geen puls is, de interrupt ingang naar GND niveau wordt getrokken, zodat de interrupt ingang niet zweeft met alle gevolgen van dien. S+ -------------------- +5V Arduino S- -------+---< R1 >--- GND Arduino R1 = 10K | | IRQ0 PIN2 arduino Ik lees ook dat de uitlezing van de S0-bus pulsen niet altijd stabiel is (waarschijnlijk door de zwevende INT ingang). In mijn ontwerp sample ik gedurende 30 sec en bereken dan pas een waarde. Voor mijn toepassing is dit voldoende.

unigyr 5 years, 5 months ago

Hallo Marc dit is een mooie datalogger met webserver ik heb een 1000 imp/kwh meter met S0 waar kan ik dit instellen?

wholistic 5 years, 8 months ago

What a great project. I too would like to use some of your work in an off grid situation, I don't have the flashing LED, but need to use get my input data from shunts. I'll update this page when I create something to share.

gadom 5 years, 9 months ago

Thanks a lot Marc. I've downloaded files from your website. Regards.

Marc Viet 5 years, 9 months ago

Marc Viet
There is an update on my project website: http://members.ziggo.nl/marcviet/projectpages/index.htm Still under construction, but look at the download page for the files on the SD-Card. There is also a DEMO page included.

gadom 5 years, 9 months ago

Hello Marc. Thanks a lot for fast answer. So everything is clear, I'll look forward for update. Best Regards.

Marc Viet 5 years, 9 months ago

Marc Viet
I use pin 2(Arduino UNO) as interrupt port. This pin is directly connected to my PCB. (No pull-up resistor or driving circuit needed) Pin 8 is used for driving a LED (with 470 Ohm resistor). My Arduinoboard is supplied via a USB 5V power adaptor. My PCB is supplied from the 3.3V pin on the Arduinoboard. So you don't need the voltage regulator on my PCB. (Put a jumper on J3 / pin 1,2 to override this voltage regulator). Next week I will upload some additional pictures and the files on the SD-card. Greetings.

gadom 5 years, 9 months ago

Hi Marc. First of all, nice project. You've wrote about some files on the SD card. I can't see them. And which port do you use on Arduino board to check interrupts?

fox 5 years, 10 months ago

Thanks for updating and sharing! I'll se if i go down that route. I'm interested in doing the measurement as well.

Marc Viet 5 years, 10 months ago

Marc Viet
Hey Fox, Fritzing repaired my project page. I added some additional information to the project page. The Arduino code is functional but needs some cleanup. (Some code is not used anymore). You also need extra Arduino libraries and extra files on the SD-card.

Marc Viet 5 years, 10 months ago

Marc Viet
Hey Fox, This projectpage got corrupted. So I send you the original text in this comment. Still interested? Let me know. kWh-Powerconsumption registration. Contains: (Fritzing)PCB with a Lightpulse detection circuit with Daylight compensation. Arduino Uno acting as a webserver. Arduino stores measured values on SD-card. Values can be displayed as charts by using a webbrowser. At home I have a digital kWh-Powerconsumption meter. A blinking (orange) LED shows how much Power is consumed. 500 pulses = 1 kWh. I designed a (Fritzing)PCB which detects these light pulses. The pulses are used as an interrupt on an Arduino UNO board. The Arduino counts the pulses and calculates every 30 seconds how much Power is consumed. The value is stored on a SD-card together with a (Unix)timestamp from a timeserver on the internet. The Arduino is also acting as a webserver. With a webbrowser you can show the measured values in several charts. The PCB is very simple to solder. No SMD's are used. The programming of the Arduino was very difficult (for me) because an UNO is to tiny (low SRAM) for such a program. I used a lot of programmingtricks to fit everything in SRAM and Flash. I used a lot of hardware and software examples from various projects on the internet. So if you recognize something and it's yours. Thank you for your work. It helped me completing this project

fox 5 years, 10 months ago

very interesting, is there some more information available in how to connect, arduino code? i would love to implement it for my e-car charging module.