FIRMWARE UPLOAD EMONWRT2
Upload Arduino sketch to the EmonWRT2
Required Equipment
- 1 screw driver
- 1 avr Programmer
- A computer running the Arduino IDE
Steps

1/ Disconnect all cables (ethernet power sensors) from the unit.
2/ Open the EmonWRT2 enclosure removing the four screws.
3/ Download and install the Arduino IDE on your computer. https://www.arduino.cc/en/Main/Software
4/ Open the sketch template given on the main EmonWRT2 page.
5/ Modify it to your needs. The main parameters to change are at the top of the sketch.
#define POLLING_INTERVAL 5000
const float ICAL = 83.33; const double VCAL1 = 273.9; const double VCAL2 = 269.5; const double VCAL3 = 271.0;
boolean THREEPHASE = true;
ICAL is the calibration value for the SCT. VCAL are the calibration value for the Voltage sensor. THREPHASE true or false will enable/disable 3 phase output.
6/ Install all required libraries:
One Wire
http://www.pjrc.com/teensy/td_libs_OneWire.html
arduino-tiny core:
http://code.google.com/p/arduino-tiny/
sendonlySoftwareSerial:
http://lechacal.com/RPICT/7CT1V/SendOnlySoftwareSerial.zip
7/ Remove all 6 jumpers from the EmonWRT2 board.
8/ Connect the AVR programmer to the EmonWRT2 board on the FTDI port. Make sure grounds are connected together.
9/ Setup correct serial port and programmer on Arduino IDE. Also make sure that the ATtiny84 @ 8Mhz is selected.
10/ Upload the firmware. Disconnect the avr programmer. Re-install the jumpers. Apply power to the board for testing.