A solid state relay (SSR) is an electronic (as opposed to mechanical) switch that is able to control a large amount of current with a small amount of input. Compared to a mechanical relay, SSR’s are capable of switching on and off on the order of milliseconds and hypothetically have a lifespan of switching in the millions of times. From a speed perspective, a mechanical relay would likely be fine, but it’s lifespan would be less than a few dozen brew sessions.
Controlling a solid state relay with a beaglebone is as simple as turning on or off the voltage on the input side of the relay. I will be using three (One for element in HLT and two for elements in BK) 25A SSRs that can be found on most websites under various names (amico, fotek). If you are using a heating element larger than 1500W, I’d suggest you choose a SSR with larger capacity. This will produce less load and thus less heat to dissipate. With less load, it generally should last longer too.
The trigger voltage listed on the data sheet is listed as 2.4 – 32VDC. In theory, the beaglebone’s 3.3V GPIO pins alone should be enough to trigger the active state. In testing, out of five of these relays, only one was able to switch on with direct GPIO voltage. The indicator LEDs would light up, but the active state was not triggered. Therefore, it’s a good idea to increase the voltage if you’re looking for reliability. This can easily be done with about a dollar of hardware. I elected to use a Darlington array, the ULN2003. You can get a pack of them for just a few bucks.
This is a small integrated circuit that will take up very little space on a perfboard and provide us with seven channels of output if needed. Another very important reason to use this and not attempt to run directly off the GPIO pins is that a backwards current of just a few mA can destroy your beaglebone. This will provide isolation and protect your hardware.[sc:468banner]
Integrated Circuit Sockets
You should start with a test run of this setup using a breadboard first, which I would recommend. Once you feel comfortable you have it setup correctly, you should solder it to your perfboard cape. I would suggest you solder a 16 pin integrated circuit socket instead of directly soldering in the ULN2003. You won’t have to worry about damaging it and it can be easily replaced later if needed.
Wire It Up
Dennis’s diagram is pretty self explanatory, but I will go through some of the details. To orient ourselves, have the ULN2003 vertical with the “notch” oriented at the top. The input side is on the left. You can use up to seven of these pins as input. The output corresponds to the pin on the opposite side.
Connect the lower left pin to your ground, and the lower right to your 5V pin. Next, connect the output side to pin 4 (may differ on your particular relay, check the data sheet). Pin 3 on each relay will all be connected to the 5V output (as well as the lower right pin on the ULN2003, as noted above).
A 1kohm resistor is added between pins 3 and 4 of each relay to ensure the voltage drops to zero after the ULN2003 is switched off.
When you trigger the particular GPIO pin to it’s HIGH state, the darlington array will be switched on and will draw 1V off the 5V rail. This should provide about 4V of voltage to switch on the relay.
We’ll cover how to enable the GPIO pins in part two.