SM3BAT/SM4BAT FS RS-232 Monitoring Interface
The SM3BAT and SM4BAT FS implement a serial communications interface in support of wind energy SCADA systems to report possible bat activity. With firmware version 1.3.3 and later of the SM3BAT, or SM4BAT FS recorders produced with serial numbers greater than S4U06942 (shipped on or after March 12, 2019), the recorder responds to serial requests with information including cumulative number of bat passes and pulses detected as well as timestamp, voltage, temperature, and flash card capacity information.
The protocol is “plug-and-play” in the sense that the SM3BAT or SM4BAT FS automatically detects receiving the first request at either 38,400 or 19,200 baud while recording bats. Once detected, the SM3BAT or SM4BAT FS will configure the serial port and respond to subsequent requests with information.
The SM3BAT or SM4BAT FS is configured as per normal operation for recording bats in triggered WAV mode. The various parameters and settings can be tuned for defining the monitoring times and definitions of a valid bat pulse or pass.
Under normal operation (e.g. without the RS-232 interface), the SM3BAT or SM4BAT FS would stop recording if the flash cards became full or unusable. However, when the RS-232 interface is in use (e.g. if one or more requests have been detected), the SM3BAT or SM4BAT FS will continue recording until cards are full or fail, but will then continue monitoring/counting. In this mode, the LCD display will indicate that the SM3BAT or SM4BAT FS is recording to the “Z” card (instead of “A” through “D”) and the SM3BAT or SM4BAT FS will continue to respond to requests over RS-232 with bat activity information.
SM4BAT FS Hardware Interface
SM4BAT FS recorders produced with serial numbers greater than S4U06942 (shipped on or after March 12, 2019), have an integrated RS-232 UART with signal lines using 2 of the 5-pins used in for the external power connector, a 5-pin Conxall weatherproof panel mount connector (equivalent to Switchcraft 7282-5PG-300) accessible from the exterior of the SM4BAT FS chassis. Wildlife Acoustics can provide a “V” cable terminating with one branch of the “Y” used for external power to the SM4BAT FS and the other branch of the “Y” terminating in 4 bare wires as follows:
|
SM4BAT-FS Pin # |
“Y” Cable Wire Color |
SM4BAT-FS Signal name |
RS-232 Signal (DB9 pin) |
Description (relative to SM4BAT-FS) |
|---|---|---|---|---|
|
1 |
Black |
TX |
RD (2) |
Transmit data to network |
|
2 |
Red |
RX |
TD (3) |
Receive data from network |
|
3 |
Blue |
GROUND |
GROUND (5) |
Signal ground |
|
4 |
POWER |
External power for SM4BAT-FS |
||
|
5 |
Green |
Not used |
SM3BAT Hardware Interface
The SM3BAT recorder hardware has an integrated RS-232 UART terminating with an 8-pin Conxall weatherproof panel mount connector (equivalent to Switchcraft 7282-8PG-300) accessible from the exterior of the SM3BAT chassis. Wildlife Acoustics can provide a shielded 3 meter mating data cable terminating in 8 wires as follows:
|
SM3BAT Pin # |
SM3BAT Data Cable Wire Color |
SM3BAT Signal name |
RS-232 Signal (DB9 pin) |
Description (relative to SM3BAT) |
|---|---|---|---|---|
|
1 |
Green |
Vcc |
Output 3.3V (not used) |
|
|
2 |
Black |
TX |
RD (2) |
Output RS-232 data TX |
|
3 |
Red |
RTS |
CTS (8) not used |
Output RS-232 RTS (not used) |
|
4 |
Orange |
Enable |
Output GPS enable (not used) |
|
|
5 |
White |
PPS |
Input GPS time synch (not used) |
|
|
6 |
Brown |
RX |
TD (3) |
Input RS-232 data RX |
|
7 |
Yellow |
CTS |
RTS (7) not used |
Input RS-232 CTS (not used) |
|
8 |
Blue |
GND |
GND (5) |
Ground |
Communications Protocol
The RS-232 interface is configured as 8-bit, no parity, and one stop bit (8N1) with no hardware flow control. The least significant bit is transmitted first. Baud rates of 19,200 or 38,400 bits per second can be supported.
Customer equipment would send a 2-byte request to the SM3BAT, or SM4BAT as follows:
B<CR>
This is the same as (0x42 0x0d).
Within 50ms (typical), the SM3BAT or SM4BAT FS will respond with a response formatted as follows:
BYYYYMMDDhhmmss,aa.a,bbb,ccc,ddddd,eeeee,fffff,ggggg,hh<CR>
Where the following fields are defined:
|
Field |
Description |
Number of bytes |
|---|---|---|
|
B |
Start character (0x42) |
1 |
|
YYYYMMDDhhmmss |
Timestamp |
14 |
|
, |
Delimiter (0x2c) |
1 |
|
aa.a |
Supply voltage e.g. 12.0 |
3-4 |
|
, |
Delimiter (0x2c) |
1 |
|
bbb |
Internal temperature in Celsius (e.g. -20) |
1-3 |
|
, |
Delimiter (0x2c) |
1 |
|
ccc |
Flash cards full indicator, percentage of full |
1-3 |
|
, |
Delimiter (0x2c) |
1 |
|
ddddd |
Number of bat passes detected modulo 100,000 channel 0 since last power cycle |
1-5 |
|
, |
Delimiter (0x2c) |
1 |
|
eeeee |
Number of bat pulses detected modulo 100,000 channel 0 since last power cycle |
1-5 |
|
, |
Delimiter (0x2c) |
1 |
|
fffff |
Number of bat passes detected modulo 100,000 channel 1 since last power cycle |
1-5 |
|
, |
Delimiter (0x2c) |
1 |
|
ggggg |
Number of bat pulses detected modulo 100,000 channel 1 since last power cycle |
1-5 |
|
, |
Delimiter (0x2c) |
1 |
|
hh |
CRC-7 Checksum (two hexadecimal digits [0-9A-F]) |
2 |
|
<CR> |
End of message (0x0d) |
1 |
The maximum message length is 56 bytes including the “B” start character and <CR> ending character. The CRC-7 checksum is calculated on the bytes including the “B” start character through the “,” delimiter just before the checksum value using the polynomial (x^7+x^3+1).
For example, the message “B20170522034559,6.1,26,5,8,153,0,0,3F”+<CR> would be as of May 22, 2017 at 03:45:59 in the morning (24-hour time), battery measuring 6.1V, internal temperature 26C, flash cards 5% full, 8 bat passes and 153 bat pulses, detected since the last power cycle, on channel 0 (and nothing on channel 1) and a valid CRC-7 value of 0x3F.
Note that after power-up, the SM3BAT or SM4BAT FS may listen on the RS-232 port at 38,400 baud. If the customer equipment sends the request message at 19,200 baud, the SM3BAT or SM4BAT FS will detect a first character with the value 0x18 typically followed by two additional characters with undetermined values. This is how the SM3BAT or SM4BAT FS could automatically detect if the customer equipment is operating at 19,200 baud. If this is the case, the SM3BAT or SM4BAT FS can reconfigure the UART to operate at this lower baud rate. As a consequence, the first request message (or the first few request messages) after power up may go unanswered.
Operational Considerations
Scheduling
The SM3BAT or SM4BAT FS can be programmed to monitor during specific periods of the day, and “sleep” during other parts of the day to conserve power. When the SM3BAT or SM4BAT FS is sleeping, it will not respond to RS-232 messages. Therefore, the SM3BAT or SM4BAT FS must be programmed when to be monitoring for bats: e.g. 24 hours or just at night, etc.
Recording
The SM3BAT or SM4BAT FS normally records the ultrasonic echolocation audio data on up to 4 SDHC or SDXC flash cards. Full spectrum recordings can typically consume 1-2GB of card space per night depending on bat activity. The flash cards will eventually fill up. Normally, the SM3BAT or SM4BAT FS would shut down if it is no longer able to make recordings. However, for this application, it is desirable to continue monitoring, updating bat counters, and responding to requests. If the RS-232 interface is detected, then the SM3BAT or SM4BAT FS will continue monitoring for bats even if the flash cards are full, but no new bat activity data will be recorded. This condition is indicated by the flash card 100% full indication in the response messages.
Bat Activity
Echolocating bats typically produce individual ultrasonic “pulses” continuously while they fly for navigation, avoiding obstacles, and hunting for food. The frequencies, bandwidth and duration of pulses varies from species to species and with the functional needs of the bat at the time (e.g. many bats will increase bandwidth and decrease duration as they close in on prey).
The SM3BAT or SM4BAT FS can be configured to recognize pulses that may be tuned to specific bats in a given area. This includes specifying the minimum and maximum frequencies and minimum and maximum durations of a pulse. These parameters can be tuned to recognize echolocating bats while avoiding false positives from other ultrasonic noise sources such as wind, rain, and insects. The optimum parameters will depend on the specific bats and insects likely occurring in a given area.
A “bat pass” refers to a series of pulses recorded as a bat flies by the microphone. Additional parameters in the SM3BAT or SM4BAT FS help define what a bat pass is including the maximum trigger duration and the maximum time between pulses (the trigger window). A bat pass begins with the first detected pulse, and ends when either no pulses have been detected after the maximum time between pulses has occurred, or when the maximum trigger duration has been reached. The SM3BAT or SM4BAT FS will not count a bat pass unless it contains at least two pulses. In this way, the SM3BAT or SM4BAT FS can count passes and pulses detected on an ongoing basis and report these counts to the customer equipment.