[[ANT]] * BC-ANT-SERIAL with moisture sensor [#z30266fc] > This is an example of electronics work, which uses BC-ANT-USB and a moisture sensor. This basically explains how to build a transmitter of moisture sensor with BC-ANT-SERIAL.~ BC-ANT-SERIAL can be attached to a microcontroller (IC) with only 5pins. One of 5pins is for the power source, which is between 1.9V and 3.3V. Another pin is assigned to ground. The other three pins are attached to the single end of TXD, RXD, and RTS. (Reset, sleep, and suspension functions will be added to BC-ANT-SERIAL) These pins work with 0.1 Inch (2.54mm) pin header.~ > This example of electrics work uses the MSP430G2553 (20pin DIP) of Texas Instruments, and this CPU is a part of MS430 LaunchPad. MS430 LaunchPad is required for writing Code into the CPU, so if you do not have one, please purchase one. MSP430LaunchPad is available at [[here>http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_(MSP-EXP430G2)]].~ > -Schematic~ &ref(MAKER-2012-1005A.pdf);~ > -Example of Implementation~ &ref(MoistureSensor.JPG,,25%);~ > - Parts List |No|qty.|Reference|Product Type|Specifications|Memo| | 1|1||LED| || | 2|1||Pin-Header|1x4 pin|2.54mm pitch| | 3|1||Female Pin-Header (Pin-Header Socket)|1 x 5 pin|2.54mm pitch, it should be fitted to BC-ANT-SERIAL| | 4|1||Resistor 1/16 ~ 1/4 W|1kΩ|Pull-up resistor for RST/NMT pin| | 5|1||Resistor 1/16 ~ 1/4 W|330Ω|For LED| | 6|1||Micro Switch||Turn On/OFF Power Supply| | 7|1| |CPU|MSP430G2553|This is a part of MSP430launchPad| | 8|1||BC-ANT-SERIAL||| | 9|1||Moisture Sensor||http://www.switch-science.com/products/detail.php?product_id=814| |10|1||Pin-Header|1 x 5 pin |This is soldered on BC-ANT-SERIAL with 2.54mm pitch| |11|1||Pin-Header|1 x 4 pin| It is connected to the moisture sensor| |12|1||Battery Holder||It is fitted with CR2032| |13|1||Battery||CR2032| > LEDs, resistors, capacitors, switches, pin-headers, and CPUs can be available at electronics hobby shops. Also, you can purchase from mail orders and the internets. The sensors are available at digkey and sparkfun. > For its development environment, Energia is used. * Program [#w9fd9011] > Since the moisture sensor is an analog sensor, ADC (A0) of MSP430 is used for reading the values.~ The data that MSP430 has read is changed into ANT format and written out to serial port.~ > Source: &ref(MoistureSensor.ino);~ Communication Speed: 9600bps~ ANT Channel Configuration~ Device#: 1~ DeviceType: 1~ TransType: 1~ Period: 2Hz~ Freq: 2450MHz~ * Python Application [#ofa3d311] > The application for the moisture sensor is listed at Python Application section of [[ANT/BC-ANT-SERIAL with various sensors]]. The application for moisture sensor is included in 4S.py. ~ The application for the moisture sensor is listed at [[Python Application section of ANT/BC-ANT-SERIAL with various sensors>http://labs.beatcraft.com/en/index.php?ANT%2FBC-ANT-SERIAL%20with%20Various%20Sensors#i6ed651e]]. The application for moisture sensor is included in 4S.py. ~ This application is written in wxPython. To use this application, please install the execution environment correctly, and put the Python file in an arbitrarily created directory. Execute 4S.py, the value of moisture sensor is displayed in blue.~ > The execution environment is created with python-2.7.3 and wxPython2.8-win32-unicode-2.8.12.1-py27.exe. * Revision History [#gd7a516d] > - 2013/02/04 This article is initially uploaded