Neil's Blog

boolean

In order to drive the relay modules, a set of control signals is needed. Since I only have 18/5 cabling at most, that means that I'll only have 3+VCC+ground to work with, but there are five relay modules plus a reset line. Boolean logic to the rescue!

My thinking was using binary number values from 0-4 to select which relay to enable, while I'd have a 7 (0b111) indicate a reset signal. After creating the truth table on paper, I converted it into AND and NOR gates and simulated it in Qucs-S.

Boolean logic gates and truth table from Qucs-S

Then I made footprints for the 74HC00A-series ICs that contain the gates I'd be using, and lastly created a schematic showing the routing for all of the lines I'd need in KiCad.

NOR, AND, and AND ICs in Kicad with all of their signal and power lines connected

With that, I had what I needed to actually create the board on perf board. I also made a test fixture using buttons and LEDs to verify that it was correct.

The only bug I ran into was where the Relay4 line was high whenever I held all buttons down, which should only trigger Reset. Turns out I only forgot to connect a couple of traces. With that fixed, it worked 100%!

#AmateurRadio #HamRadio #electronics #maker #boolean #logic