Difference: EnergyCounter (3 vs. 4)

Revision 42015-06-17 - PedroMaiaAlves

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Energy Counter Project

Line: 118 to 118
 

Data storage

Changed:
<
<
Search
>
>
This module doesn't store the data by itself. The objective is to have the data in some place where it can be quickly accessed. The following figure describes the SW architecture inside the Linux Server. Further detais in the next sub-sections.

USB to serial

The "USB to serial" adapter is a standard of-the-shelf adapter usually based on a FTDI or Prolific device. In this case the serial interface is done at TTL levels in order to skip all the TTL to/from RS-232 conversion.

Linux Driver ttyUSB

The "USB to serial" adapter is directly supported by the Linux Kernel and is mapped into a /dev/ttyUSBxxx device.

serial_hub

The serial_hub software, developed by me, has some interesting features, most of them not needed for this specific project. In general:

  • It opens a Linux character device, keeps it open and retry to open it again if it's closed on the other end
  • After opening the character device, it can run a program (usually stty) to setup the device configuration
  • Accepts multiple connections done through:
    • Raw TCP sockets
    • RFC2217/TCP sockets.
  • The data received on the character device is sent to all open sockets
  • The data received from any socket is sent to the character device.

energymeter_resample

The energymeter_resample software converts energy consumption events (pulses reported by ATmegaOnDIN) into an average power consumption report once per minute.
The output of this SW is something similar to:

1429270680.000000  25.683640 123.180953 182.124549
1429270740.000000  25.680292 123.784811 182.011305
1429270800.000000  25.534447 123.763774 182.006320
1429270860.000000  25.534447 124.544685 181.391650

  • The first column have the time as reported by command "ts %.s"
  • The next columns have the average power consumption, on each phase, during the corresponding minute.

The data generated by the "energymeter_resample" is stored in a file and can be processed afterwards in EXCEL.

 
Deleted:
<
<
-- PedroMaiaAlves - 2015-06-16
 
META FILEATTACHMENT attachment="DRS155D_1.jpg" attr="h" comment="Energy counter" date="1434402425" name="DRS155D_1.jpg" path="DRS155D_1.jpg" size="11414" user="PedroMaiaAlves" version="1"
META FILEATTACHMENT attachment="DRS155D_2.jpg" attr="h" comment="Energy counter diagram" date="1434402703" name="DRS155D_2.jpg" path="DRS155D_2.jpg" size="6848" user="PedroMaiaAlves" version="2"
Line: 131 to 171
 
META FILEATTACHMENT attachment="diagram_step2.jpg" attr="h" comment="Step 2 diagram" date="1434412498" name="diagram_step2.jpg" path="diagram_step2.jpg" size="36737" user="PedroMaiaAlves" version="1"
META FILEATTACHMENT attachment="IMG_1202.JPG" attr="h" comment="MOD-IO with the connections to the Energy Counters" date="1434412742" name="IMG_1202.JPG" path="IMG_1202.JPG" size="90442" user="PedroMaiaAlves" version="1"
META FILEATTACHMENT attachment="ATmegaOnDIN_1.jpg" attr="h" comment="ATmegaOnDIN installed on the eletrical box" date="1434413153" name="ATmegaOnDIN_1.jpg" path="ATmegaOnDIN_1.jpg" size="89660" user="PedroMaiaAlves" version="1"
Added:
>
>
META FILEATTACHMENT attachment="Linux_SW.jpg" attr="h" comment="" date="1434578077" name="Linux_SW.jpg" path="Linux_SW.jpg" size="29872" user="PedroMaiaAlves" version="1"
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback