Turtle Sense communications board v.0.25a
The Turtle Sense communications board v.0.25a is the controlling circuitry for Turtle Sense. It connects, via Cat5 cable, to a Smart Sensor. A piggybacked M2M plug-in telephony board made by Janus enables GPS and cellular communications.
The Comm Board is powered from a battery pack of 8 low self discharge rechargeable NiMH AA batteries. The battery pack is about 11V fully charged and has a capacity of 2 amp-hours. The positive battery input to the board first passes through a diode (D1) which protects the circuitry from damage if a battery pack is somehow connected backwards. The battery voltage is filtered by two capacitors, C7 and C1. The battery level is monitored by a resistor divider R11 and R12. The voltage on R12 (BattMon) is measured by an analog to digital converter, or ADC, in the microprocessor. The battery pack powers two power supplies on the board:
- a 3.3V linear low power voltage regulator (U3) which powers the microprocessor (U1) and related circuitry on the board
- a 5.0V switching voltage regulator (U4) which powers the Phone Board.
The 3.3V regulator U3 is on at all times, and its output is filtered by capacitors C17 and C5. The higher powered 5.0V regulator U4 is only turned on when the phone board is needed, in order to conserve battery power. Its output is filtered by L1 and C12. R15 and R16 set the voltage at 5.0V. C9, C10, C11, and R17 are used for proper operation of regulator U4. U4 is turned on by positive signal (PhnPower) from the microprocessor U1.
The microprocessor (U1) controls all the operation of the device. Programmed in C, it manages all the circuitry by:
- timing events
- sending instructions to the smart sensor
- downloading data from the smart sensor
- monitoring the battery
- controlling the M2M telephony board and its power supply
- sending instructions to the telephony board to connect to the internet
- uploading formatted data to the internet in a report
- downloading new operating parameters from the internet
- handling errors and other problems
We selected the Texas Instruments MSP430FR5739 because it is extremely low power and contains 16 K of FRAM memory. Newer versions of this chip contain more memory and will likely be used in future versions. The 3.3V power comes into U1 on AVCC and DVCC. The power ground connections are on AVSS and DVSS. There are three 8 bit I/O ports in the chip, labelled P1.0-P1.7, P2.0-P2.7, and P3.0-P3.7. Most of these ports are connected to various signals on the Phone Board and other parts of the circuitry. Most of them will be discussed later on. There are two pins connected to an external crystal (X1). X1, along with C1 an C2, provide the chip with a precise 32.768 KHz clock which is used for the timing functions in the program. The chip also has other internal higher frequency clocks. Another set of pins on the chip, labelled J.0-J.3, -RST, and Test, are used for programming the chip. These pins are connected to a PC via the JTAG connector J2.
Plug-in telephony board connections
The telephony Board piggybacks onto the Comm Board via header sockets J3 and J4. The microprocessor communicates with the phone board with several signals, named PhnOn/Off, PwrMon, PhnReset, PhnMon, U-out, and U-in. Because the Phone Board operates at a different logic level than the Comm Board, it's necessary to shift the voltage levels of these signals to make the two boards compatible. This level shifting is done by three dual analog switches (U6, U7, and U8). Note that the signal names listed are the ones at the microprocessor. The signals have slightly different names on the Phone Board side of the analog switches.
After the Phone Board 5V power supply is turned on (as described above), the PhnOn/Off signal is used to turn on the phone circuitry. This signal is active low, meaning the processor must put out a logic 0 pulse to turn on the phone. Later, the processor puts out another logic 0 pulse to turn off the phone. The processor checks whether the Phone Board is on or off with the PwrMon signal. The processor can reset the Phone Board with a pulse on PhnReset. This pulse is also active low. The processor can check the state of the Phone Board with the PhnMon signal. The last two signals, U-out and U-in, are serial data transmission lines between the processor and phone via a standard UART protocol operating at 115,200 baud.
Smart Sensor connections
The sensor is connected to the Comm board via about 20 ft of underground Cat5e shielded cable. A short stub of the cable connects to the Comm board and to a 9-pin male Molex connector. The main length of cable connects to the sensor board and to a mating female Molex connector.
|Comm Board||Signal||Molex 9-pin||Wire Color||Smart Sensor|
|J1 Pin No.||Pin No.||J1 Pin No.|
Several pins on the microprocessor are used to communicate with the Smart Sensor: SnsrRst, TX/RX ON, SensorTX, SensorRX, Interrupt, and Tamper. SnsrRst controls an analog switch (U9) which switches the 3.3V power going out to the sensor along with Ground. The output of U9 is normally connected to the 3.3V switch input. A logic high pulse on SnsrRst connects the sensor power to ground to reset the sensor. Interrupt is a signal which the sensor sends to the Comm board when it wants to communicate -- to send or receive data. Tamper is a signal which the sensor constantly keeps high. If the sensor cable is unplugged the Comm board can detect that by the logic low on the Interupt signal.
A standard 14 pin JTAG connector is mounted on the board this is used to program the microprocessor using a TI MSP430 USB-Debug-Interface. We are using the TI model MSP-FET430UIF. There are apparently other JTAG interfaces sold that could be used.
Olimex makes a line of accessories that can be attached to the MSP430 processor using a 10 pin UEXT connector. We have included one of these on our boards. These boards can be purchased through the Microcontroller Shop.
A logic high level on TX/RX ON enables an RS485 transceiver in the Comm Board (U2), which buffers the two serial data signals (SensorTX and SensorRX) going to and coming from the sensor. The TX/RX ON line is also connected via the cable to an RS485 transceiver in the smart sensor, so both transceivers turn on and off together. The microprocessor in the smart sensor monitors the TX/RX ON line to determine if communication is being requested by the Comm board.
The RS485 transceivers send and receive data over the sensor cable as differential twisted pairs. That is, there are two wires for transmitting data (labeled Y and Z on the transceiver), and two wires for receiving data (labeled A and B on the transceiver). The reason for this is to improve noise immunity on the cable and to allow faster data rates. There is an identical transceiver in the sensor circuit. Note that the data pairs are crossed between the two transceivers - that is, the send pair on one transceiver is connected to the receive pair on the other transceiver. The communication uses standard RS485 UART protocol at 115,200 baud. Four resistors (R1, R2, R3, and R10) are used to provide a correct initial bias voltage on the receive inputs of both transceivers. Another resistor (R8) is a termination resistor on the receive inputs of U2 in order to prevent signal reflections travelling back to the sensor transceiver outputs. The RS485 Transceivers in the circuitry are capable of driving a signal through several hundred feet of cable. However, the response timing in the program may need to be adjusted if long lengths of cable are used.
GPS and antennae
The telephony board has a built in GPS unit. There are connections on the board for two antennae, one for GSP reception and the other for Cell reception. The GPS unit is currently only used in the hand-held unit (see below), though it will likely be used in future firmware updates to track the device if it is disturbed.
Variation: hand-held registration unit
The Turtle Sense board as described above becomes a hand-held registration unit with a few minor modifications. The 8 AA battery pack is replaced with a single NiMH rechargeable 9 volt battery. At full charge it is about 10 volts. Fully discharged it is around 7. There are also three LEDs and a green button that are wired into the board, connecting to auxiliary i/o ports on the microprocessor. An on/off toggle switch can totally disconnect the battery from the board to conserve power because the 9V battery has only about 10% of the capacity of the AA battery pack. The firmware for this application adjusts for the different battery and is programmed to register the date and GPS location both by reporting the information on-line, and by recording it on the smart sensor. The device also checks for good cell reception, and proper functioning of any smart sensor that is plugged in. Once everything checks out, the status is indicated by a solid green LED which means that the nest can be registered by holding down the green button for one second. This registration process makes it possible to patrol beaches with just some light-weight sensors and the small hand-held registration unit. Later on, days or weeks after the sensors have been registered in nests, a communications unit can be installed in a secure heavy concrete base. When it is attached to the smart sensor, the communications unit reads the GPS location and date of registration from the smart sensor.
- The battery monitoring circuitry, originally designed with a much higher resistance voltage divider was found to be too high an impedance for the ADC converters in the microprocessor. Because of this, lower resistors had to be substituted in the board, causing a constant current drain of approximately 60 uA, or about 1.5 mAh a day. While not a tremendous power loss, it is more than the power used by both microprocessors and the motion sensor combined. Future versions of the board will have a switch to turn the voltage divider circuitry on and off, so there won't be any current drain when the voltage is not being monitored. The only significant drain on the batteries is from the plug-in telemetry board, so the voltage will only be monitored each time there is a telephony connection.
- Connections are hard wired to the board for the LEDs, switches and cables that are used. In future versions, these connections will use headers or some arrangement of sockets and plugs so that the board can be easily serviced and replaced.
- The connection between the communications board and the smart sensor uses shielded Cat 5 cable, so there are 9 connections to each board, and a pair of 9 pin molex connectors that allow the two units to be connected. This is the most labor intensive part of the project. The cable required reinforcing so that it would not break from repeated bending from connection and disconnecting. These were quickly found to be prone to failure if extreme care was not used. This is not a reasonable expectation of workers in the field. To deal with this problem we cast poly urethane around the base of the connectors and the ends of the cable, reinforcing the weakest part of the connection. This worked very well, but the result takes too much skilled labor to make it conducive to production in large numbers. We are considering alternate methods of making the connection between the sensor and communications units for future versions. We would like to make the connections wireless, but it is not possible to transmit from under 2 feet of wet salty sand. We are considering running power over a coax cable, having an antenna at the end of a cable from the sensor, or combining the options so both are possible. Coax has a long history of being used outdoors, and connectors can be replaced in minutes if they corrode or fail. Power over coax has been used for decades for TV mast antennas. We're considering using Sub-1G or Bluetooth Smart for the RF transmission.