Configuration & Testing

Before powering up the entire build (the Raspberry Pi in particular), make sure the LM2596 modules are correctly tuned to generate exactly 5 and 10V output. Crosscheck with a multimeter the power rails on half size Perma Proto board (5V above, 10V down) as well as the mint tin size Perma Proto board (12V) are as expected.

Once everything is as expected, connect the Raspberry Pi power pin (Pin 2) at the end and power up reef-pi.

Once reef-pi is running, go to the UI and declare jacks under the Connectors section in Configuration tab to represent all four connectors. There are three Kessil connectors, J1 to J3, connected to pin 0, 1 and 2,3 and 4,5 respectively. Make sure to choose pca9685 as the driver. I am using the PCA9685 pin 12 to control the power MOSFET.

Next, create lights and associate the relevant jacks with the lights.

Next, create four lights to test all the connectors. I am declaring three of my Kessil lights, for example.

Once created each light can be controlled independently using profiles.

The fixed profile allows running lights in a constant brightness or color. This is generally useful for creating on-demand moonlights or during photo shoots of the tank. 

The diurnal profile allows users to simulate daylight cycle by an exponential ramp up and ramp down with most of the time operating at maximum PWM value. The diurnal profile cannot be visualized in the reef-pi dashboard itself, but if you have integration enabled, then you can observe the diurnal profile generated PWM values in your dashboard. Here is an example from my build:

The auto profile allows users to set a specific light intensity throughout the day at two hours interval. reef-pi linearly increments/decrements the PWM values in between the two-hour intervals. This is an effective way to simulate the daylight cycle with finer control over how steep the PWM value ramp up/down will be.

We can configure the reef-pi dashboard to show the light profile in "auto", to visualize how individual channels will be ramped up or down throughout the day.

reef-pi dashboard with three lights and health chart (cpu/memory)

This build guide covers Kessil and actinic led strip controller, but the basic circuitry should work for a variety of led light types. reef-pi community members have used raw power MOSFETs to a Meanwell LDD driver based control circuit for other proprietary/branded lights or cheaper (and often times not UL listed) black boxes or completely DIY lights made with Cree or Luxeon LEDs (3W).

This guide uses an Adafruit PCA9685 board, which gives up to 16 PWM channels. If you need only two PWM channels (e.g. only one Kessil light controller) then you can just use the Raspberry Pi. reef-pi can use Raspberry Pi's hardware timers (GPIO pin 18 & 19) natively for PWM. Just remember Pi based PWM pins are limited to two and in reef-pi UI they are denoted as pin 0 and 1 for GPIO pin 18 and 19.

Thank you for reading through the light controller guide, we'll look into the pH monitoring module in reef-pi in our next guide.

This guide was first published on Oct 25, 2018. It was last updated on Oct 25, 2018. This page (Configuration & Testing) was last updated on Oct 25, 2018.