Controlling Industrial Stack Lights Over USB

Stack lights are the bright indicators you often see on top of machines in industrial settings. Their only purpose is to make it…

Cameron Coward
5 years ago3D Printing

Stack lights are the bright indicators you often see on top of machines in industrial settings. Their only purpose is to make it abundantly clear to workers what a machine’s status is. A green light, for example, might indicate that the machine is working as expected, while a red light would mean something has gone wrong. Usually they’re controlled via some kind of PLC (Programmable Logic Controller), but Glen Akins was able to get some working with a PIC16F microcontroller.

The Microchip PIC16F1459 is a small, inexpensive, and versatile microcontroller that Akins has used in many other projects. While he certainly could have used a different microcontroller to control his stack lights, he chose the PIC16F because he was familiar with it and because it is relatively easy to use as USB HID (Human Interface Device) with a PC. That was important, because he wanted to be able to control the stack lights from a PC.

The stack lights themselves were lightly used and ordered on eBay. They’re 24VDC LED models, as opposed to the more common 120VAC incandescent type. He ordered a handful of them, but is only using red, amber, and green for this project. Those are mounted on a 3D-printed base designed in Autodesk Fusion 360, which houses a PCB that Akins designed in Autodesk Eagle.

The PCB has the PIC16F, as well as the required connectors and components for it to work. The PIC16F connects to Akins PC via USB and uses the CDC (Communications Device Class) for bidirectional serial communication. All Akins has to do is use a simple CLI (Command Line Interface) on his PC to control which lights are turned on!

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles