AusOcean Rig Controller Manual - Original Version
Revised: 11 November 2019
NB: This version is now deprecated. Use the new version.
Finished controller board (minus the ESP8266).
Copyright © The Australian Ocean Laboratory Limited (AusOcean) 2019.
The information contained herein is licensed under a Creative Commons Attribution 3.0 Australia License.
AusOcean rigs are maritime infrastructure and must be deployed at sea only with approvals from relevant regulatory authorities. Typically a Notice to Mariners (NTM) will be issued to advise mariners of the rig’s location and flashing light sequence.
AusOcean is not liable for any losses, damages, costs and/or other consequences resulting directly or indirectly from using or relying on the information in this document.
Table of contents
The control unit (or “controller”), which is supplied as a kit, houses a microcontroller which controls the navigation light sequencing, battery monitoring, power control and standard sensors. It is based on the Adafruit HUZZAH ESP8266-based microcontroller, mounted on an Adafruit half-sized perma-proto board. It is enclosed within a plastic project box inserted into the bottom of the mast tube (above the mast seal). The control unit also houses the solar charge controller, which is attached to the lid of the box. The ESP8266 is configured by NetReceiver, a free cloud service developed and operated by AusOcean for collecting and monitoring remote sensor data ("sensing") and controlling devices ("actuating").
The control unit utilises two LCA717 relays, known as the “alarm” relay and the “power” relay, specified by the AlarmPin and PowerPin NetReceiver variables respectively.
The rig controller uses the alarm pin to control power to the router and the power pin to control power to other devices, such as cameras. Both pins can also be actuated like regular output pins, and therefore controlled by means of NetReceiver variables, triggers and crons. Refer to NetReceiver configuration for details and to the ESP8266 tech notes to learn more about the ESP8266.
To learn more about the AusOcean Rig refer to the Rig Assembly Guide.
The finished board will look like the following, with the 24V power rail on the top and the 5V power rail on the bottom. The ESP8266, sensors and connections have been removed to show the wires that would be otherwise be hidden.
In this version the shorting block is in the position for 24V output power, located above and to the left of the alarm relay. For 5V output power the shorting block would be located above and to the right of the alarm relay (currently bare mail pins). See Power configuration.
Figure 1: Controller board without ESP8266 with ports annotated.
More photos of the assembly process can be found here.
NB: Some photos may to earlier versions of the controller.
Battery voltage monitor
Alarm control (AlarmPin)
DHT22 (temp/humidity sensor)
DS18B20 (water temp sensor)
Power control (PowerPin)
GPIO#16 → RST
Power (PWR, BOTTOM-PWR or TOP-PWR)
Digital input or reset
White (not currently used)
Analog input (A0)
The top power rail is used for 24V power (TOP-PWR).
The bottom power rail is used for 5V power IN (BOTTOM-PWR).
Mnemonic: High (top) is high (voltage), low (bottom) is low (voltage).
Use solid core wire. Note that ~4mm must be stripped from the end of each wire, and then bent at right angles. Ensure there is no excess bare wire that might cause a short circuit.
All wires should be soldered.
Tip: Secure wires with tape on the top side to hold them in place while soldering.
JST connectors, both 2-pin and 4-pin types, are used for all board-wire connections. Looking at the open side of the board connector, the rightmost pin is always power as shown below.
Mnemonic: Right is red.
Figure 2: 2-pin JST board connector
“Right is also red” when crimping plugs with wires below the plug (as shown in the photo below).
Figure 3: 2-pin JST plug
NB: Unless you have a professional crimping tool, do not rely solely on crimp connections when making plugs. Always solder the connections too (as shown).
JST connectors are also used to terminate Power over Ethernet (PoE) and Ethernet data. Ethernet cables consist of four twisted pairs of conductors. These are split into two 4-pin connections, with blue/brown for power and green/orange for data.
“Right is red” also holds for 4-pin PoE board connectors as follows:
The top-right corner of the board is the “data hub” where up to 3 Ethernet devices can be connected. One of these is used to connect the router, leaving 2 slots for cameras or other Ethernet devices. The data wires are connected to the 4-pin JST plug as follows and as shown in the photo:
Figure 4: Ethernet-to-JST data connection
NB: All plugs must be made exactly the same in order for the data hub to work.
Adafruit half-sized perma/proto board
4.99kΩ or 5kΩ
JST board header
JST board header
0.1" male header pin
0.1" shorting block
ESP8266 HUZZAH (“ESP”)
Solid-core wire (not included)
Red, black, blue & yellow
Prepare the board by scraping away the conductor at the following locations on the underside of the board as shown in the photo.
NB: When upside down count columns from right to left instead the usual left to right.
Figure 5: Underside of perma/proto board.
Tip #1: It is much easier if conductor is removed prior to soldering.
Tip #2: Upon completion, perform a resistance check with a multimeter to ensure the conductor is removed.
Warning: Failure to remove the conductor completely in the exact specified locations will result in a short circuit that will damage the electronics.
Figure 6: Zoomed view of removed conductor.
Solder header pins to the ESP8266 HUZZAH per the following photo (courtesy Adafruit.com).
Figure 7: Adafruit ESP8366 HUZZAH board.
Next, we make up the left side of the board that will hold the ESP. Orient the board so that numbers increase from left to right (1 to 30) and letters bottom/up (A to J), as shown in the photos.
The ESP sockets can be made by cutting a 10-pin dual in-line (DIP) socket holder in half. The longer sides of the sockets should should be on the outside.
Tip: Ensure the correct spacing by inserting the ESP. Do not force the pins into the socket as the socket springs will be damaged.
ESP power and ground
NB: Pulling GPIO#0 HIGH ensures that the ESP boots normally. If GPIO#0 is held LOW during reboot the ESP will enter bootloader mode. The ESP must therefore be removed in order to flash a new version of the software. To learn more read the ESP8266 Tech Notes.
Make up a 5V power cable using the 2-pin JST plug as shown in Figure 3.
Test the ESP before proceeding further.
Use red wire to connect:
Useblack wire to connect:
Use red wire to connect:
Use black wire to connect:
Tip: Solder the resistors in place before any of the wires.
Note: Output is selectable to either 5V or 24V depending on the shorting block position.
NB: Relays are inserted with the semicircle on the left side as shown below.
Figure 8: LCA717 relay circuit diagram.
Input control signal
Supply voltage (5V or 24V)
Connect nav light LEDs with GPIO pin #2:
NB: GPIO pin #2 also drives the ESP8266’s built-in blue LED. Note however that built-in LED is on when GPIO #2 is LOW, and off when it is HIGH. In other words, the built-in blue LED will be OFF when the nav light is ON and vice versa.
Warning: The nav light LEDs should never be powered by more than 3V.
Make up a 31:1 voltage divider:
Attach the remaining JST board connectors per the photo.
The first relay, which is controlled by AlarmPin, can output either 5V or 24V power, depending on the type of router used.
Type of router
Input voltage (DC)
NetGear Nighthawk M1 or M2
TP Link CPE 210 or CPE 220
The second relay, which is controlled by PowerPin, always outputs 24V, which is the standard voltage used by AusOcean underwater cameras. If a lower voltage is required use a DC-DC step-down converter.
The following sensors are standard with every rig:
Since these sensors are low-power devices they are therefore always powered..
Figure 9: DHT22 sensor
Figure 10: DS18B20 waterproof temperature sensor connected to 4-pin JST plug.
Note that the JST connector is upside down. Red is right when the open side is up.
In addition a Raspberry Pi Zero based camera is typically included, which is powered as needed via the PowerPin.
The battery voltage is monitored by a voltage divider and, as for the standard sensors, is always powered. The resistor values are 5kΩ and 150kΩ respectively, forming a 5/155 or 1/31 voltage ratio. For a nominal voltage of 24V DC, the current is 0.15mA. The voltage divider therefore draws a tiny 3.6mW continuously (24V x 0.15mA).
The solar charger can produce as much as 29.6V during the boost phase (14.8V x 2), resulting in a draw of 0.19mA or 5.6mA. This only occurs during periods of energy abundance though, typically during the “boost” charging phase.
NB: 29.6V would be divided down to 0.955V at Analog Pin 0 on the ESP8266, i.e., less than the maximum of 1.0V.
When SensePin is non-zero, the corresponding GPIO pin will be driven HIGH prior to sensing and LOW immediately afterwards. This is useful for power-hungry sensors that should not be powered continuously. Any available GPIO pin can be used providing SensePin is set to that value.
Although the software supports it, the current Rig controller hardware does not currently utilise the SensePin feature.
NB: It is important that wires are sufficiently long to permit ease of assembly and avoid wire tension. Any excess should be gently looped into the mast.
Required length (mm)
Router (power and data)
Combined air temperature & humidity sensor
Sea surface temperature (SST)
Comes in a fixed length of ~500mm
Varies depending on deployment.
Solar charger 5V power supply
Solar charger 24 power supply
In a standard rig, the battery voltage is 24V. The PV panels, which produce 12V each, therefore need to be connected in series to double the voltage. To do this, join the positive terminal of one panel to the negative terminal of the other panel using a 3-terminal strip connector, as shown below.
Figure 11: Voltage doubling block.
The battery voltage is normally doubled inside the battery compartment, but in systems in which two 12V battery cables are supplied, the battery voltage will also need to be doubled in a similar fashion.
NB: If your PV panels are new you can instead use the original connectors to connect them in series.
NB: Insert the mast seal O-ring over the tops of the battery and PV cables prior to connecting the solar charger.
Tip: Leave a little slack on the cables running up from the base of the mast to reduce the risk of abrasion on the aluminum mast base.
Feed the cables so they fit securely inside the mast seal and secure with the O-ring. The mast seal has been specifically designed to account for differing cable widths.
Line up the cables coming down from the mast cap with the hole so they can be fed through easily.
Secure the combined temperature and humidity sensor to the router data cable with tape so that it is elevated vertically within the mast. The goal is to locate it as far away from the control box as possible.
NB: Connect positive terminal first
The following is a typical NetReceiver configuration. NetReceiver variables generally take the form DEVICE.VARIABLE but the device ID has been omitted for clarity.
Start temporary alarm after 10 network failures.
Temporary alarm duration in seconds.
Start continuous alarm if A0 drops to this value (corresponds to ~24.0V).
Stop alarm when A0 rises above this value (corresponds to ~24.4V).
Restart automatically if alarmed for 10 minutes.
Number of nav light flashes (pulses).
Pulse width in seconds (2s means 1s on, 1s off)
Pulse repeat cycle in seconds.
GPIO pin that controls the power relay.
Value sent to PowerPin.
Turns off device power when off (false).
Suppresses the nav light when true.
A loss of power at sea is a very serious failure. Ahead of anything else, it is very important to test that solar charging is functioning normally. The best way to do this is to install the controller and solar charger in an actual rig and then monitor it for 48 hours. The rig should be placed outside and not in the shade. If everything is functioning normally, the battery voltage should vary as follows:
The chart can be explained as follows. At the beginning of each day there is a spike in charging which, in sunny weather, typically lasts for only a couple of hours. This is the “boost phase” during which the charger replenishes the battery which has lost charge the previous night. In cloudy conditions it may of course take longer. Once replenished if the sun is shining the charger will then sit in the “float phase” for the rest of the day. Finally, at night the battery will slowly discharge.
The second most important thing to test is that the nav light is flashing according to the required sequence. This requires configuring 3 NetReceiver variables described in the NetReceiver ESP8266 help.
For example, for 3 flashes every 30 seconds, with each pulse 2000 ms wide, the values would be as follows:
# of pulses
Cycle (repeat) period in seconds (optional).
Pulse duty cycle (optional).
Note that a pulse that is 2000ms wide with a 50% duty cycle is on for 1000ms and off for 1000ms.
NB: The nav light will not flash unless both Pulses and PulsePeriod NetReceiver variables are defined. PulseCycle defaults to the monitor period and PulseDutyCycle defaults to 50%.
The ESP8266 is a 3.3V microcontroller that comes with WiFi and a full TCP/IP network stack.
Although it can be supplied with a 5V voltage via VBat, its I/O operates at 3.3V. With the exception of VBat, Rx and Tx, the I/O pins are not 5V tolerant, and applying more than 3.6V on any pin will fry the chip.
The ESP8266 also has a single analog input (A0), with a measurement input range of 0V to 1.0V and an absolute maximum voltage is 1.1V. The rig uses A0 for battery voltage monitoring (via a 1:31 voltage divider). Even though the normal range for a 24V battery is typically 24.4V to 27V, the voltage can reach almost 30V while charging, which is scaled down to under 1.0V.
GPIO 0, 2 and 15 perform special boot mode functions at boot time, described below.
SDIO mode (not used)
GPIO 2 is pulled high by default (using the internal pull-up resistor), and GPIO15 is pulled low by default. To ensure that the ESP boots normally GPIO 0 must be pulled high. This is accomplished by means of a 10kΩ resistor between the 3.3V pin and GPIO 0.
NetReceiver ESP client documentation:
Github project documentation:
The LCA717 is a single-pole, optically-isolated, normally-open solid-state relay, rated for 30V and 2A of load current. We use them in the DC-only configuration, as shown below.
The most common problems are power related. When testing always use a good 5V power supply that can supply at least 1A and check all connections are solid.
After power supply problems, the next most common problems are poor connections.
Hardware watchdog timeout (WDT) resets can also be due to hardware or power problems, although these are usually software problems. The latter should not not occur if you are using the proper software. You will need to use the Arduino IDE serial monitor to debug such problems.
These messages look like:
ets Jan 8 2013,rst cause:4, boot mode:(3,7)