User Tools

Site Tools


Basic installation

1 Equipment

1.1 emonTx

1.1.1 Wiring

  • Plug in the SMA antenna to the emonTx board.
  • Plug in the USB to serial uart module to the emonTx board and connect it to the USB port of your computer.
  • Connect the CT clips from the electrical panel to the emonTx board :

1.1.2 Install the firmware for a three-phases power installation

The full-assembled emonTx v3 is shipped with the emonTxV3_RFM12B_Discrete Sampling firmware as pre-loaded which is suited for a one-phase power installation. As we have a three-phases power installation we can't use it. The solution is to upload a new firmware, using the Arduino environment as the RFM12B module is Arduino compatible. Here is what we did (Linux) :

  • Install the Arduino environment.
  • Install the git software.
  • Install the required Arduino libraries for emonTx v3 :
    cd ~/.arduino/libraries
    git clone
    git clone
    git clone
  • Get emonTx v3 latest sources :
    cd ~/.arduino
    git clone
  • Connect the the USB to serial uart module to the emonTx v3 and to your computer.
  • Launch the Arduino IDE.
  • In the menu “Tools / Boards” select “Arduino Uno”.
  • In the menu “Tools / Port” select the port (for example /dev/ttyUSB0).
  • In the menu “File / Sketches” open the “emonTxFirmware / emonTxV3 / RFM12B / Examples / emonTxV3_3Phase_Voltage.ino” file.
  • Compile and upload the sketch to the board.

1.1.3 Test it

  • Connect the emonTx power adaptor. A red led should be on and then flash regularly.
  • To see the values that are transmitted from the emonTx module you can:
    • Either use the serial console of the Arduino IDE serial console.
    • Or use a short Python script to display the values received over the serial interface:
      • Install the python-serial package
      • On your computer run this python test script (name it, which reads the values emitted from the emonTx over the serial port (make sure the serial port is correct, you can see it executing the dmesg command) :
        import serial, sys
        ser = serial.Serial('/dev/ttyUSB0', 9600)
        while 1:
    • You should have an output like this (after about 10s)
    • The first three columns correspond to the power consumption of each phase (in W).
    • The fourth column is the operating voltage (multiplied by 100) of the electrical installation.
    • If you have negative values for the power consumption, turn up side down the CT clip on the electrical panel.

1.1.4 Calibrate emonTx

  • In the Arduino IDE, open the emonTxV3_3Phase_Voltage sketch.
  • Eventually uncomment the #define DEBUGGING if you want to have detailed output over the serial port.
  • For each electrical phase:
    • Make sure there is no power consumption (switch off the lights, appliances…).
    • Connect a pure resistive load (e.g. a heater) to the electrical phase you are calibrating.
    • Look at the power consumption in the serial console.
    • In the sketch, adjust PhasecalX (X corresponding to the phase you are calibrating) to display:
      • A power factor of 1.00.
      • The power consumption corresponding to the one of the appliance you connected.

1.2 emonTh

1.3 Raspberry Pi and emonCms

To collect and display the data from emonTx (power consumption) and emonTh (temperature and humidity) we will use the Raspberry Pi.

All the data received will be published to a emonCms server. This one can be either :

/var/www/tech_mirelsol/data/pages/projects/open_energy_monitor_unmonastery/2_installation.txt · Last modified: 18/06/2014 12:59 by Mirelsol