I’ve picked up on a previous project of mine again, the S0-logger.
The main idea is to be able to log the elctrical power usage in the house. As the mains meter box has twelve different groups, and I have provided each group with a kWh-meter (real Chinese quality), I would like to be able to see what the actual usage per group is at each time of the day.
I’m interested in more than a merely cumulative overview of power usage. I want to now how much power per group per dayframe / time is being used. (Please don’t ask me why.)
For this reason, I want to timestamp every pulse on every group. To be able to timestamp, a DS1307 RTC is included in the design.
The new design is also based on the MCP23017 GPIO extender, which should retain the pulses from 12 different kWh-meters. The meters are de-coupled (signaling with 12V) by optocouplers. However, now the main chip is the Microchip PIC18F26K22, which has to handle the pulse-interupts, storing the data and communications.
Next, the logger must be able to communicate with more sophisticated computers that can store the collected data in a database and visualize it somehow. To be able to communicate with the outside world, an Ethernet module is added (based on the Microchip ENC28J60). Also, the I2C-bus is offered to communicate directly with RaspberryPI / Arduino boards. Two EEPROMs are added to store data while the unit is offline.
As the PIC18F26K22 is potentially a very powerful chip, I felt that leaving unused pins void would be a waste. Therefore, all open pins are made available with a header, including the I2C bus. Adding a LCD should thus be quite straight forward. The I2C bus is also connected to a four-wire terminal, that can either be powered externally or from the board itself (either 3V or 5V).
Below are the schematic (v0.6) and the PCB-design (v0.6). Both are yet to be tested… (and programmed). Please note that values for capacitors are to be adjusted yet! For now, they are merely meant as ‘placeholders’.
To be continued.
PNG of schematic:
PNG of the PCB (top-view)
Here are two PNG’s of the PCB with copper fill (top and bottom).