This is an old revision of the document!
The envsensor is designed to run 24/7 on two alcaline batteries with an estimated battery lifetime of > 5 years.
|1||PCB Generic Midi 1|
|1||Resistor 560R green-blue-brown||R1|
|1||Resistor 150k 0,1% brown-green-black||R2|
|1||Resistor 330k 0,1% orange-orange-black||R3|
|1||Resistor 1M brown-black-green||R4|
|1||Resistor 100k brown-black-yellow||R5|
|1||Resistor 10k brown-black-orange||R6, R7, R8|
|1||Connector AVR ISP 6pin||JP1|
|1||Connector 1 pin header (for serial TX)||PD1|
|1||Battery Holder 2xAAA|
|1||Transceiver PCB RFM12B||IC2|
|1||Antenna (82,2mm wire)|
maybe extra pins, at your opinion.
As always: start from flat to high. Go through the partlist and solder the parts from the top ones to the last ones.
For some parts, you have to consider something special:
(Image directly loaded from external GitHub source. If it doesn't work, fix link in wiki!)
You can leave the batteries inserted all the time, no matter if you're currently flashing or using the device.
To make a “reset”, take one battery shortly out of its holder.
After flashing and switching the power on, your temp sensor should blink quickly for some seconds. After that, it only flashes shortly once whenever a temperature data packet is sent (>5 min).
Battery voltage and brightness are measured using two voltage divisors each consisting of two resistors. The idle power consumption can be improved (down to about 21µA) by connecting the one end of them (see both left red ovals at R3 and R5) to PB6 (pin 9, the other red oval), which is only switched on when the device is actively measuring.
You only need this with a PCB version < 1.2. The advantage in power consumption is not so big if you don't have a photocell connected. To use this feature, you need also a firmware >= v0.7.0 or develop build from 06/17/2014 or later.
Please read about the supported sensors at the envsensor description. Below, you'll find assembly instructions.
Even if the SHT15 uses partly the same pins as the I2C sensors, they can be connected and used in parallel!
The mapping between SHT15 and Generic Midi PCB was different before firmware V0.6.0. If you want to use a firmware < 0.6.0, connect the SCK pin of the SHT15 with PC4 instead of PC2. The images below show how to connect the SHT15 using a current firmware.
Connect the SHT15 sensor to a ribbon cable by soldering the four pins shown on the picture. The SHT15 is very sensitive to heat. I suggest soldering one pin, wait a minute or two and then solder the next!
Solder the other end of the wires to the PCB. The picture is from the top side of the PCB. The border of the PCB is at the bottom of the picture.
If you have an older PCB version you have to patch the SCK wire to the PC2 pin instead of PC4, which is the fourth pin of the ATMega counting from the PCB border.
If you look at the back of the PCB, you have to solder the wires as shown on the picture.
The pin layout for all I2C sensors in general is like shown here. Besides power and ground, they use a clock (SCL) and a data (SDA) line.
I glued the DS7505 temperature sensor to a breadboard and connected wires to it.
If you want to connect other I2C sensors, you can wire them in parallel to the DS7505 as I did with a BMP085. That's why you can see two pairs of wires in the picture.
The pins have to be wired as shown here. You need 4k7/10k pull-up resistors as specified by the I2C standard. If you have a Generic Midi PCB Rev. 1.1 and up, just solder R7+R8 to the PCB. If you have an older PCB revision, you have to solder the resistors as shown in the picture.
A BMP085 barometric pressure sensor is often available on small PCB. You can connect the pins (VCC, GND, SDA, SCL) the same way as described above for the DS7505. <clear>
The SRF02 can be connected just like other I2C sensors to SDA, SCL, GND and VCC. Please note that the SRF02 needs 5V input voltage.
You have two options for the power supply:
First you have to solder a small transistor circuit to power the voltage regulator. This is because the input current of the regulator is about 20mA at the low battery voltage used (SRF02: ~4,5 mA at 5V). The I/O pins of the ATMega328 can't produce this amount of current (at 2-3V).
As a voltage converter, I found this nice model at eBay for less than 2 EUR. It produces 5V and works with a minimum input voltage of 1V. It draws 0.25 mA when idle.
You should use at least AA cells for the environment sensor when using the SRF02 and the voltage converter, because one SRF02 measurement takes about 0.015 mAh, which results in ~800 days battery lifetime at AA cells (2800 mAh) when you make one measurement every 7 minutes.