Circuit Construction

A light in reef-pi is composed of one or more channels. Each channel is controlled by a jack, a type of connector (similar to outlets or inlets) that represent a DC current source with PWM capability. The lighting circuit in reef-pi determines how many jacks are available and their supported voltage/current range. For our light controller, we are aiming for 3 Kessil light controls and a blue actinic led strip for moonlight. Each of the kessil light control requires two 10V PWM control signals and the blue actinic led strip will require one more, which makes our total number of required jacks at 7.

We'll be using Adafruit PCA9685 breakout board which offers 16 channels, more than enough for our use. For each channel, we'll use a basic circuit where the 5V PWM signal will be generated by the PCA9685 IC and then a transistor will be used to convert that PWM signal to an appropriate voltage and current for the specific light.  Kessil lights have dedicated 10V PWM control inputs which are different from the actual power source, which makes the control signal current requirement fairly low (under 20ma). We'll use a common NPN transistor 2N2222A for this. There will be six total transistors  to support all 3 Kessil lights, each with two channels.  For the actinic LED strip we'll use a TrueLumen actinic LED strip and dim it by controlling its power source directly using a power MOSFET.

Here is an overall schematic of the wiring. We'll use a single 12V 2A power supply to power the entire project. Two LM2596 modules will be used to generate 5V (for Raspberry Pi & PCA9685 breakout board) and 10V (for Kessil circuit) power source from a single 12V rail. The 12V rail will be used to feed the actinic strip as well, connected via a 2.1mm barrel jack connector.

Notice there are two perma proto boards used in this build. A half size perma proto board has the Kessil control circuit, which involves one NPN transistor for each channel, the PWM output from PCA9685 IC is connected to the transistor base (green wire) with a 10K resistor in series.  While the 10V rails are connected to the collector pin (blue wire) of the transistor with a 1K resistor in series. The emitter pin of the transistor is connected to GND.

The power MOSFET based control circuit for the 12V actinic LED strip is mounted on a small Mint Tin size perma proto board. A common N channel logic level power MOSFET is used, with the PCA9685 PWM output connected to the Gate pin (green wire), the Source pin connected to the -Ve end of the LED strip (blue wire) and the Drain pin connected to GND.

Start with preparing all the connectors. We'll need two barrel jack connectors, one for the incoming 12V 2A power source and another for powering the actinic LED strip.  We'll also use an SPDT switch for convenient power up or power down of the controller.

Prepare three panel mount female audio jacks by soldering female jumper wires on them.

 

We'll use each one of them to control one Kessil light. We'll need three such connectors for this build.

We'll need two LM2596 modules. For this build, I am using the LM2596 module with female jumper wires soldered on them directly. 

Always tin the connectors and the jumper wires before soldering. 

Next, build the Kessil control circuit on the half size Perma Proto Board. I have used color-coded male header pins and jumper wires to make it easy to understand the circuit. The green header pins represent inbound 5V PWM signal from PCA9685. They are in pairs, since each Kessil light has two controllable channels. The blue header pins are for 10V PWM that will be generated by the transistor. Each of the light control signal involve two 10V PWM channels and a GND.

Add NPN transistors and resistors.

Then solder the jumper wires and male header pins for power rails. I use 22AWG solid core wires for this. The upper power rail is used for 5V and the lower power rail is used for 10V.

You don't want to mix the upper power rail lines with the lower ones as they are at different voltages in this build.

Next, build the actinic LED strip control circuit on the Mint Tin size Perma Proto Board. This board will also provide a 12V that is used to power the LM2596 modules.

The actinic LED strip comes with bare wires. Connect with a 2.1 mm male barrel connector.

This guide was first published on Oct 25, 2018. It was last updated on Oct 25, 2018. This page (Circuit Construction) was last updated on Jul 22, 2019.