Industrial Control Panel
I Stopped at the local scrap yard and managed to pick up a door from a power conversion station, It contained fourteen lights, four switches, one emergency stop, two panel meters and two potentiometers. In my haunt we did an alien invasion theme, so I thought that this would make a nice background piece. The only problem is that none of the lights would do anything and it would not look right just sitting there. I decided to put together a small controller that could make the lights flash in different patterns and make the panel meters change.
I decided to use a PIC18F2550 microcontroller because it has enough outputs to control everything on the panel, the program can be changed quickly and it has a small foot print. To switch the fourteen lights that came with the panel I used a pair of ULN2803 Darlington arrays, these act as a switch between the Micro controller and the 24 volts that the industrial lights used. They are less then a dollar each and are simple to wire. Basically all you have to do is connect the output pins of your microcontroller to the input pins of the ULN chips and your ready to switch higher voltages.
To wire the lights up, you connect one side all together, this is your positive side, since the ULN chips switch the negative side. Each of the lights will connect to one pin of the uln chip so that the microcontroller can address each one individually. To change what is displayed on the panel meters I simple connected them to a 5 volt pin on the microcontoller, so that when it is turned on and off the meters will display information on that Voltage.
I used swordfish compiler to program the chip. The program is very simple and is just designed to turn the lights on and off. This is the basic code that I used to control the panel, all it does it set up the pins on the microcontroller and then toggles them on and off in which ever order is programmed in. This is made easier using the PORTA =%00000000 command because it allows you to change the state of all the pins in that port group at once instead of having to address each one individually.
Device = 18F2550
Clock = 20
Dim LED As PORTA.0
Dim LED1 As PORTA.1
Low(LED) // Make the LED pin an output and set it low While True
… Add for each port defined above
PORTA = %11100010
PORTB = %10100110
PORTC = %10100011
PORTA = %11001110
PORTB = %01011110
PORTC = %10101110
PORTA = %00000000
PORTB = %00000000
PORTC = %00000000
End While //Loop
What you will need:
1. Panel with lights you want to control
2. PIC18F2550 (PICKIT 2 or other programmer)
3. 2 x ULN2803 Darlington arrays
4. 20.0 MHz oscillator and 2x 15pf capacitors
5. 5 volt and 24 volt power supplies
6. screw terminals
7. Tools, Soldering iron, wire cutters, screw drivers, zip ties
Panel and Wiring:
When the panel was removed from the scrap yard, I cut the wires in the cabinet. All of the lights and meters came to a central point where it entered the cabinet. This would give me a central location to install the power supply and microcontroller board that I made.
The controller in this project can be applied to other projects as well, it can use used to switch all kinds of lights, including LEDS, and lasers, just about anything that you can think of controlling this could be adapted to.
Any questions or comments email: HauntHacker@Outlook.com