PIC16F1459 USB Stack Light Controller

Glen Atkins writes controlling an industrial stack light over USB using a PIC16F1459 USB microcontroller and a PCA9685 I2C PWM LED controller:

DSC00840-cropped-3-1024x683 (1)

PIC16F1459 USB Stack Light Controller

After using the PIC16F1459 to build numerous USB HID input devices including a giant keyboarda tiny keyboard, and a big red button, it was time to see if the PIC16F1459 could be used to control outputs too. Sticking with the industrial theme, I chose to build a USB controller for a, um, stack of industrial stack lights.

4

Industrial stack lights are usually used to indicate the status of machines on production lines. Green could indicate all is functioning normally, yellow could mean the machine is running low on input material, and red could indicate the machine jammed and needs intervention.

DSC00856-1

For a simple, quick project such as this one, one does not want to have to write a custom USB driver for a Mac, PC, or Linux box. The best way to avoid writing a custom driver is to use an existing USB device class that lends itself to controlling custom hardware. The USB Human Interface Device (HID) and USB Communication Device Class (CDC) device classes both support controlling custom hardware.

PIC16F1459 USB Stack Light Controller

Leave a comment