Merge branch 'master' of github.com:openenergymonitor/emonth2

This commit is contained in:
Glyn Hudson 2016-10-02 10:31:10 +01:00
commit fb19e0d940
6 changed files with 59 additions and 47 deletions

View File

@ -101,6 +101,8 @@ const byte DIP_switch2= 8;
const byte pulse_countINT= 1; // INT 1 / Dig 3 Screw Terminal Block Number 4 on emonTH V1.5 - Change to INT0 DIG2 on emonTH V1.4
const byte pulse_count_pin=3; // INT 1 / Dig 3 Screw Terminal Block Number 4 on emonTH V1.5 - Change to INT0 DIG2 on emonTH V1.4
#define ONE_WIRE_BUS 17 // D19 emonTH V1.5
const byte DHT22_PWR= 6; // Not used in emonTH V2.0, 10K resistor R1 connects DHT22 pins
const byte DHT22_DATA= 16; // Not used in emonTH V2.0, 10K resistor R1 connects DHT22 pins.
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
@ -135,6 +137,16 @@ void setup() {
pinMode(LED,OUTPUT); digitalWrite(LED,HIGH); // Status LED on
// Unused pins configure as input pull up for low power
// http://electronics.stackexchange.com/questions/43460/how-should-unused-i-o-pins-be-configured-on-atmega328p-for-lowest-power-consumpt
// port map: https://github.com/openenergymonitor/emonth2/blob/master/hardware/readme.md
pinMode(DHT22_PWR, INPUT_PULLUP); //DHT22 not used on emonTH V2.
pinMode(DHT22_DATA, INPUT_PULLUP); //DHT22 not used on emonTH V2
pinMode(14, INPUT_PULLUP);
pinMode(20, INPUT_PULLUP);
pinMode(21, INPUT_PULLUP);
pinMode(4, INPUT_PULLUP);
//READ DIP SWITCH POSITIONS - LOW when switched on (default off - pulled up high)
pinMode(DIP_switch1, INPUT_PULLUP);
pinMode(DIP_switch2, INPUT_PULLUP);

View File

@ -15,34 +15,34 @@
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="no" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="no" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="no" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="29" name="tStop" color="2" fill="3" visible="yes" active="yes"/>
<layer number="30" name="bStop" color="5" fill="6" visible="yes" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="yes" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="yes" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="yes" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="yes" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="yes" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="yes" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="yes" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="yes" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="yes" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="yes" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="yes" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="yes" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="yes" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="yes" active="yes"/>
<layer number="29" name="tStop" color="2" fill="3" visible="no" active="yes"/>
<layer number="30" name="bStop" color="5" fill="6" visible="no" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="no" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="no" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="yes" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="yes" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/>
<layer number="49" name="Reference" color="13" fill="1" visible="yes" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="no" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="no" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="no" active="yes"/>
<layer number="49" name="Reference" color="13" fill="1" visible="no" active="yes"/>
<layer number="50" name="dxf" color="12" fill="1" visible="no" active="yes"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="yes"/>

View File

@ -18191,7 +18191,7 @@ You are welcome to use this library for commercial purposes. For attribution, we
<text x="24.765" y="356.87" size="3.81" layer="91">ATMEGA328</text>
<text x="104.14" y="367.665" size="3.81" layer="91">RFM12B
RFM1269CW</text>
<text x="2.54" y="233.68" size="1.778" layer="91">D17
<text x="2.54" y="233.68" size="1.778" layer="91">D16
DHT22 data</text>
<text x="106.68" y="292.1" size="1.778" layer="91">Si7020 / HTU21D Temperature &amp; Humidity </text>
<text x="35.56" y="241.3" size="1.778" layer="91">DHT22 PWR</text>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -19,31 +19,31 @@
# Port Map
| | | | | |
|----------------|-----------|------------|-----------------------|-----------------------|
| Arduino | ATmega328 | Function | emonTH V1.5 | emonTH V2 |
| Analog 0 (D14) | PC0 | | | |
| Analog 1 (D15) | PC1 | | 2x AA Battery Voltage | 2x AA Battery Voltage |
| Analog 2 (D16) | PC2 | | | DHT22 Data |
| Analog 3 (D17) | PC3 | | | DS18B20 One-wire Data |
| Analog 4 (D18) | PC4 | (SDA) | DHT22 Data | SI7021 SDA (Data) |
| Analog 5 (D19) | PC5 | (SCL) | DS18B20 One-wire Data | SI7021 SCL (SCK) |
| Analog 6 (D20) | | | | |
| Analog 7 (D21) | | | | |
| Digital 0 | PD0 | (RXD) | FTDI Tx | FTDI Tx |
| Digital 1 | PD1 | (TXD) | FTDI Rx | FTDI Rx |
| Digital 2 | PD2 | (int0) PWM | RFM12B IRQ | RFM69CW IRQ |
| Digital 3 | PD3 | (int1) PWM | Terminal block | Terminal block |
| Digital 4 | PD4 | | | |
| Digital 5 | PD5 | PWM | DS18B20 PWR | DS18B20 PWR |
| Digital 6 | PD6 | PWM | DHT22 PWR | DHT22 PWR |
| Digital 7 | PD7 | | DIP 1 | DIP 1 |
| Digital 8 | PB0 | | DIP 2 | DIP 2 |
| Digital 9 | PB1 | PWM | LED | LED |
| Digital 10 | PB2 | (SS) PWM | RFM12B SEL | RFM69CW SEL |
| Digital 11 | PB3 | (MOSI) PWM | RFM12 SDI | RFM69CW SDI |
| Digital 12 | PB4 | (MISO) | RFM12 SDO | RFM69CW SDO |
| Digital 13 | PB5 | (SCK) | RFM12 SCK | RFM69CW SCK |
| | | | |
|----------------|-----------|------------|-----------------------|
| Arduino | ATmega328 | Function | emonTH V2 |
| Analog 0 (D14) | PC0 | | |
| Analog 1 (D15) | PC1 | | 2x AA Battery Voltage |
| Analog 2 (D16) | PC2 | | DHT22 Data |
| Analog 3 (D17) | PC3 | | DS18B20 One-wire Data |
| Analog 4 (D18) | PC4 | (SDA) | SI7021 SDA (Data) |
| Analog 5 (D19) | PC5 | (SCL) | SI7021 SCL (SCK) |
| Analog 6 (D20) | | | |
| Analog 7 (D21) | | | |
| Digital 0 | PD0 | (RXD) | FTDI Tx |
| Digital 1 | PD1 | (TXD) | FTDI Rx |
| Digital 2 | PD2 | (int0) PWM | RFM69CW IRQ |
| Digital 3 | PD3 | (int1) PWM | Terminal block |
| Digital 4 | PD4 | | |
| Digital 5 | PD5 | PWM | DS18B20 PWR |
| Digital 6 | PD6 | PWM | DHT22 PWR |
| Digital 7 | PD7 | | DIP 1 |
| Digital 8 | PB0 | | DIP 2 |
| Digital 9 | PB1 | PWM | LED |
| Digital 10 | PB2 | (SS) PWM | RFM69CW SEL |
| Digital 11 | PB3 | (MOSI) PWM | RFM69CW SDI |
| Digital 12 | PB4 | (MISO) | RFM69CW SDO |
| Digital 13 | PB5 | (SCK) | RFM69CW SCK |
# BOM