====== Building up a Soil Moisture Meter ====== ===== Needed Parts and PCB ===== You need a **PCB**. You may use the layout from [[https://github.com/breaker27/smarthomatic/tree/develop/hardware/soil_moisture_meter|Github]] and etch it yourself or [[https://www.smarthomatic.org/shop/|order]] the PCB. ==== Partlist (in buildup order) ==== ^ Amount ^ Part ^ Placing ^ Picture ^ | 1 | PCB Soil Moisture Meter | | {{ parts:pcb_soil_moisture_meter.jpg }} | | 1 | Battery holder CR2032 | BAT | {{ parts:battery_holder_cr2032.jpg }} | | 1 | Capacitor 1µF | C1 | {{ parts:capacitor_smd_603.jpg }} | | 1 | IC ATMega328 TQFP | IC1 | {{ parts:atmega_smd.jpg }} | | 1 | Transceiver PCB RFM12B | IC2 | {{ parts:ic_rfm12b.jpg }} | | 1 | IC 74HC14D | IC3 | {{ parts:ic_smd_74hc14d.jpg }} | | 1 | Connector AVR Mini ISP 6pin | JP1 | {{ parts:connector_mini_isp.jpg }} | | 1 | Connector pin header (for serial TX debugging etc.) | JP3 | {{ parts:connector_pinheader.jpg }} | | 1 | Antenna (82,2mm wire) | ANT | {{ parts:antenna.jpg }} | | 1 | LED 2mA | LED1 | {{ parts:led_yellow.jpg }} | | 1 | Resistor 560R | R1 | {{ parts:resistor_smd_603.jpg }} | | 1 | Resistor 1M | R2 | {{ parts:resistor_smd_603.jpg }} | | 1 | Resistor 100k | R3 | {{ parts:resistor_smd_603.jpg }} | | 1 | Button | S1 | {{ parts:button.jpg }} | ===== Buildup of PCB ===== Since this is a SMD PCB, you usually don't solder the parts with a soldering iron manually. Instead, you apply soldering paste to the PCB, place the parts on it and heat everything in a special oven. Please search in the internet on how to do that. You could also help writing a short "best practice" howto in this wiki. - The first step is to solder (with soldering paste) all the SMD components, which is everything except the RFM12B module, the two pin connectors, LED and antenna. - Measure with a continuity checker if there are any short circuits and remove them carefully. Especially check the pins of the ATMega. - Solder the LED and ISP connector. - Flash the device. - Now connect a multimeter to **check the power consumption**. Press the button when the device starts up. The device will blink some seconds very fast and then go to power down mode. **The device should draw only ~0.1µA.** If the current is much higher, you may have a short circuit somewhere. - Solder the debug TX pin, the RFM12B module and antenna with a soldering iron as usual. - Switch on the device and check power consumption again. With connected RFM12, it should now be ~1.7µA. {{https://raw.github.com/breaker27/smarthomatic/develop/hardware/soil_moisture_meter/placing.png?500}} //(Image directly loaded from external GitHub source. If it doesn't work, fix link in wiki!)// ===== Flashing the firmware ===== If you have a new ATMega where nothing is flashed onto, [[http://www.smarthomatic.org/builds/builds.html|download a prebuilt binary package]] or [[build your own firmware|build your own firmware]]. If you bought a hardware kit, the ATMega should already be flashed. ===== Integrate it into a housing ===== describe it...