Okay, this is where things start getting interesting!
Now that we’ve verified we can format and interpret instructions for the Rx-LIVE directly with a serial terminal, it’s time to start doing those things through the Bristlemouth Developer Board.
Bristlemouth uses a small electric circuit board called a “Mote ‘’ to convert the combined power and data connections provided by Bristlemouth into separate power and data interfaces. There is a Mote at each interface in a Bristlemouth network. Each Mote has an onboard processor that does all the networking between Bristlemouth Nodes and can be programmed to interact with the device it is attached to. The Mote supports a large variety of interfaces (including serial for RS-485, like we’ll want to use) through an array of pins in the board-to-board connector located at the center of the Mote PCB. Some protocols (like RS-485) will still require an external chip to do voltage level conversions from the Mote’s raw serial. That is easily done with commonly available circuitry, and the Development Board has most of the common options covered.
The board-to-board connector on the Mote is a compact way of exposing lots of pins for various types of interfaces all in one connector, but it’s not practical for attaching wires to directly- that’s what the Development Board is for. The Development Board breaks the pins of those headers out into discrete, easy-to-wire to spring terminals, has all the necessary level conversion electronics for various types of communication protocols like RS-232 and RS-485, and also has a variety of other features that are helpful for quickly developing and testing new integrations with the Sofar Smart Mooring system.
Here are some of the features the Development Board offers:
- Breakouts for communications over RS232, RS422, RS485, SDI-12, SPI, I2C, UART, and GPIO
- Regulated power outputs for 3.3V, 5V, 9V 12V, 19V and (unregulated) bus voltage (generally 24V)
- Power monitoring
- Integrated sensors for barometric pressure, temperature, humidity, and an Inertial Measurement Unit (IMU) with 3-axis gyrometer, 3-axis magnetometer, and 3-axis accelerometer.
For more detail about the Development Board, checkout the technical documentation [here] and a sneak peek of the user guide [here].
To configure the Dev Board for our device, we’ll need to set the board up for the correct (12v) voltage and (RS-485) communication protocol, and then wire the device into the correct spring terminals. The development board makes this pretty easy using jumpers that can be placed onto headers for whatever configuration is needed.
There will be more documentation about jumper placement on the Bristlemouth Dev Board in the future, but just by looking at the silkscreen labels near the header pins on the Dev Board, I was able to see where to connect jumpers to set the board up for RS-485.
First I connected the Microcontroller Unit Receive (MCU RX) and Transmit (MCU TX) pins to the RS-485 transceiver electronics by placing jumpers in the MCU RX and MCU TX sections of the header area to the respective rows labeled “RS485”.
For the rest of the RS-485 serial settings I needed to get some help from the Bristlemouth firmware developers, but they’re working on some detailed documentation for the Bristlemouth website so others won’t have to figure all this out on their own.
Some RS-485 devices use an inverted polarity, but from my bench testing I know the Rx-LIVE uses the standard convention, so I inserted jumpers under the TXP and RXP (“Transmit Polarity” and “Receive Polarity”) sections to select standard polarity instead of inverted polarity.
In that same area as the polarity headers, there is also a section labeled “SRL” which allows you to select which Serial communication speed you’d like to set the RS-485 transceiver to. The Rx-LIVE is set up for 9600 baud, so I left the SRL jumper off. The “NC” stands for “Not Connected”, and indicates that the system will work at 115 kbps and below when no jumper is connected.
Finally, there is a section with header pins labeled “RTS”, “RE”, “CTS”, and “DE”. These pins are used for different driver settings depending on the specifics of the serial device you’re connecting to. In the case of the 2-wire RS-485 the Rx-LIVE uses, we’ll install the jumpers for “DE” and “RE” - “Drive Enable” and “Receive Enable” which allow the system to alternatively transmit and receive data to the Rx-LIVE.
Now all we need to do is configure the Dev Board to output the necessary supply voltage to power the Rx-LIVE. This can be done by placing wires or resisters between designated pads on the Dev Board as described by this table I found on sheet 5 of the Dev Board schematics.
“DNP” stands for “Do Not Populate”, and I can see that 12V is the default. Note - adjusting the voltage would require some hand soldering.
As a quick sanity check, I powered the Dev Board up with a 24v supply attached to the Bristlemouth input pins and verified that Vout was showing 12v.
Now the system should be set up for supplying 12v output and communicating with the correct format of RS-485. All we need to do with the Dev Board now is attach the Rx-LIVE!
I attached the four wires for the Rx-LIVE: The two RS-485 data wires (D+ and D-) went to their respective ports, “RS485 Y” and “RS485 Z” (I can describe why we use Y and Z instead of A and B in a later post), Ground went to “GND”, and the power wire which needs 12v was attached to the voltage output pin, “Vout” which we know is configured for 12v.
Now the hardware should be ready to use!
I connected a USB-C cable between the Dev Board and my computer, then plugged in a 24v power supply to one of the two Bristlemouth input connectors on the Dev Board, programmed my Mote with a pre-release RS-485 serial demo app I got from the Bristlemouth core firmware team (I’ll add a link and information about this later), opened CoolTerm on my computer, selected the newly connected port, then typed the command “pluart write *457042.0#22,STATUS”, and Voila! – data from the Rx-LIVE sent data through the RS-485 connection on the Dev-Board to my computer.
Next, we’ll start programming the microcontroller on the Mote so that it can interface with the RX-Live on its own and send data over the Bristlemouth network to my Spotter.