ANT

BC-ANT-SERIAL with moisture sensor

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.

  • Example of Implementation
    MoistureSensor.JPG
  • Parts List
    Noqty.ReferenceProduct TypeSpecificationsMemo
    11LED
    21Pin-Header1x4 pin2.54mm pitch
    31Female Pin-Header (Pin-Header Socket)1 x 5 pin2.54mm pitch, it should be fitted to BC-ANT-SERIAL
    41Resistor 1/16 ~ 1/4 W1kΩPull-up resistor for RST/NMT pin
    51Resistor 1/16 ~ 1/4 W330ΩFor LED
    61Micro SwitchTurn On/OFF Power Supply
    71CPUMSP430G2553This is a part of MSP430launchPad
    81BC-ANT-SERIAL
    91Moisture Sensorhttp://www.switch-science.com/products/detail.php?product_id=814
    101Pin-Header1 x 5 pinThis is soldered on BC-ANT-SERIAL with 2.54mm pitch
    111Pin-Header1 x 4 pinIt is connected to the moisture sensor
    121Battery HolderIt is fitted with CR2032
    131BatteryCR2032

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

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: fileMoistureSensor.ino
Communication Speed: 9600bps
ANT Channel Configuration
Device#: 1
DeviceType: 1
TransType: 1
Period: 2Hz
Freq: 2450MHz

Python Application

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.
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

  • 2013/02/04 This article is initially uploaded

Attach file: fileMoistureSensor.ino 1577 download [Information] fileMoistureSensor.JPG 1969 download [Information] fileMAKER-2012-1005A.pdf 1765 download [Information]

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes
Last-modified: 2013-02-04 (Mon) 12:20:43 (4532d)