Post by papa on Oct 10, 2015 13:01:58 GMT
Building a DHT End Node (on a prototyping shield) with DHT temp/humidity sensor, push button, & relay control of AC devices
Also see the Oct 17, 6:10pm post below for a "Simple DHT End Node" with just a DHT Sensor built not on a shield, but on an Arduino compatible.
Also see the Oct 17, 6:10pm post below for a "Simple DHT End Node" with just a DHT Sensor built not on a shield, but on an Arduino compatible.
See this Building an RFM69 Home Automation Network (Beginners ??) thread on how to build & program a necessary Gateway & also program this DHT End node.
Parts needed for each DHT end node: You need a Buono Uno Arduino compatible switched to 3.3 volt mode. (Or you could instead use a regular Arduino Uno compatible hacked to 3.3 volt operation like this.) You also need an Arduino prototyping shield with 2 push buttons AND with soldering strips in the middle originally intended for mounting Integrated Circuit packages (pics in a post below show its top & bottom). You also need: a BC547 transistor, a DHT11 temperature / humidity sensor, a SSR-10DA (DC to AC) solid state relay, a supply of 22 gauge insulated wire (at least red, black, & yellow) plus tools & solder to assemble the above. For a DS18 temperature sensor, you also need a 4.7 kilo ohms resistor. Some resistors (like for the DHT sensor) were eliminated via what I documented in thread Simplify End Node w Arduino internal pullup resistors. Somewhat optional but recommended: more colors of wire & heat shrink tubing.
You also need enough break away header strips (including sockets you will "waste" in between the following sections) to create four 3-socket header sections, one 4-socket header section, & one 5-socket header section. Here's a source for Break Away Female Headers (.1" spacing). These have female sockets on top & male pins for installation on the bottom. To use: Count how many female sockets you need, then pull the male pin beneath the next socket. Score (cut a small groove) around all sides of that "wasted" socket middle. Put 1 set of pliers on each side of the scoring. Gently twist to break the strip at the scoring. A slightly different method is here though I recommend trimming against something hard & flat, not one's thumb. My favorite method now is using a coping saw to cut a groove on one or both sides of the "wasted" socket then use my hands to break along the grooves. (Without damaging a wanted socket, be sure to trim off ALL of the wasted socket (or it could get in your way).
This post continues with assembling a DHT End node on a Prototype Shield chosen & adapted for extra 3.3 volt connections. The Shield is then plugged on top of an Arduino compatible in 3.3 volt mode.
Prepare a DHT11 Temperature / Humidity sensor to plug into the shield you are creating. Immediately below is the sensor's "hashed" front with the connecting pins labelled. Vcc is power & NC means "not connected."
(Click on the images for a larger view.)
The pins are too short & too thin for our purposes. Cut 22 gauge insulated wires about 1.5 inches long: one red for 3.3 volt power, one yellow for data, & one black for Gnd. From each wire, strip insulation from one end for soldering to a DHT11 pin. From each wire, strip the other end, so the tip will bottom out in a female header socket & the insulation will be next to the top of the socket.
<< Solder the wires to the pins like this, using the Helping Hand method for "when wire leads are too short or thin" in a Sept 28, 2015 post. Then cut some heat shrink tubing (match colors?) to slide over the bare wire / pin joint. Use gentle heat to shrink the tubing. Set this piece aside to be installed later.
Prepare a RFM69 Wireless transceiver to plug into the Shield you are building:
Here is my RFM69HC mini-board. The hole labels on your board may be in similar locations or different. What's important is matching each RFM69 to the correct Arduino connection. One wire is crimped to the MOSI solder hole. The detached wire has one end stripped to crimp on a solder hole. Its other end is stripped to insert into an Arduino Shield socket.
Revised 12/7/2016: From my research, the 1/4 wave ANT or ANA (antenna) wire for 868 or 915 MHz can be about 3 inches (80mm), about 6.5 inches (165 mm) for 433 MHz. (After soldering, you may leave the antenna straight or wind it around a pencil into a coil). This page shows a 433MHz antenna that is some coiled & some straight.
If components will be installed below the RFM69 radio (like the transistor for the relay below), I suggest you make the RFM69 & its plugged wires a little "roof" about 1 inch above the top of the Shield. To prepare the RFM69 radio for this, cut the following (color coded?) wires: 4 wires 1.5 inches long (GND, MISO, MOSI, NSS); two wires 1 5/8 inches long (3.3v & SCK), & one wire 2.25 inches long (DIO0). (If components will NOT be installed below the RFM69 radio, keep the antenna length as indicated above for your radio frequency, but the other wires may be about 1/4 inch shorter.)
As the End Node schematic indicates, SCK connects Arduino D13, MISO to D12, MOSI to D11, NSS to D10 (different from Gateway), DIO0 to D2, 3.3v to a source of Arduino 3.3 volts, & one RFM69 GND to an Arduino GND. My RFM69 has 3 GND solder holes to choose from, & my Shield has 3 Arduino GND sockets.
As much as possible, plan for the most possible RFM69 wires to be on the same side as the Arduino connection they need. Using those wiring/inserting locations & having the radio above the Shield, cut each wire to be able to bend, reach, & insert into its connection socket. For all wires, strip one end just long enough to insert into its RFM69 solder hole & crimp back over the hole. For all wires, except ANT (ANA), strip the wire's other end to insert totally into a socket & remaining insulation stops just at the top of the socket.
See this post about using a Helping Hands method to hold the RFM69 board & wires steady so you can solder one side of the board at a time. Remember a piece of cardboard to protect RFM69 components from the Helping Hand alligator clip. Also see the Sep 28, 2015 at 6:52pm post about checking the quality of your soldering with multimeter, etc. Set the wired RFM69 transceiver board aside to install later. RFM69 solder holes are very close together. Soldering them gets easier with practice.