I am working on a movie prop that will be a simulated spaceship control panel. We are using an old control panel from a Boeing aircraft and would like to control all of the existing lights and read the switch settings with an arduino. All of the annunciators and lights work on 24vdc. All of the switches have 24v supplied to the switch and we need to determine when the switch is closed/open.
There are around 20-30 lights and 5-10 switches that we would like to be able to control with an arduino based on programs written for each part of the script
In order to make this project as efficient as possible, I am not really thrilled about building 20-40 individual control circuits using transistors or mosfets. Is there a faster way to switch/sense a large number of 24vdc circuits?
We are a low budget production, so we are not looking at commercial controllers. But we are not broke college students either!
Either of the boards in the links you posted should be ok for the
inputs. They also might work for the needed outputs if the 24vdc
light bulbs don't exceed their current rating.
The descriptions given on Amazon for electronic devices are often translated from another language and most of the time are very misleading or make no sense. So don't buy anything from Amazon that does not have a schematic or users manual.
I can see that the 8 channel board would be totally useless for you and I have doubts about the 16.
You have 40 digital I/Os so I think a Mega would be enough to handle that.
The inputs can be read with voltage dividers. Not my go-to solution, but it's cheap and fairly easy.
For the indicators, since the relay noise is a problem, you could use relay boards and remove the relays, or at least cut the signal line to the coil with an X-acto knife to keep them from switching.
[edit]
I was going to say that you could then use the relay drivers to switch the lights directly, but a lot of those boards only use 5V optos, not actual relay drivers so that might not work.
For low current (max 150 mA) lights and other peripherals you may look at the TPIC6B595 shift registers. A very easy way to switch 24V output. One IC can switch eight outputs; they can be daisy chained; only three I/O needed from the Arduino.
I think the quickest way is to buy a bunch of RS485/Modbus units. 24V is commonly used for industrial automation with PLCs etc, so these are available from specialist suppliers, but typically not through ebay/Amazon.
The only additional hardware required is an RS485 module which are widely available. Of course, you could also control these modules via a PC.
I like the concept of the TPIC595, but have a few questions:
It looks like they can be used to drive the lights, but they are not able to read switch values?
2 - Should I add any other components between the TPIC595 and the lamps?
3 - There is a TPICB595 that seems like a good fit too. Any reason not to use it, as it seems to be more available.
No, you need a parallel to serial shift register for that, such as the 74hc165. Note that this one can not handle 24V and you need external pull-up or pull-down resistors for your switches.
It's TPIC6595 (you lost a 6 there). They should be able to control your lamps without extra components.
Indeed the TPIC6B595 (again you lost a 6 in the part number) seems to be the most popular one. The key difference is the current they can switch. If your lamps draw less than 150 mA this one will do fine.
I am going to try both opto-isolators, and the TPIC6595 discussed below.
For the opto-isolators I planned to use an arduino to sense a switch, and if closed, turn on a 24V lamp on the existing panel. Here is what I was thinking.
Looks good for the inputs but the PC817 is only rated for 50ma
collector current. If the light bulbs require more the TPIC6595 or
a different opto-isolator might be a better solution for the outputs. With the scheme you posted you will need to use the
INPUT_PULLUP directive for your input pins.
Typical indicator bulbs seems to be 5W, which would be about 200mA at 24V. Of course, the best thing to do is measure the bulbs in situ, and add a margin for safety.
R2 will limit the current to the 24V lamp to the extent that it may not light up - what current does that lamp need? This is a parameter you still haven't specified and which is of course crucial for the overall design.
Is there any reason to connect the switch to 24V? It would make your life a lot easier to connect one side of the switch to the GND and the other side to the Arduino pin. No further components or wires needed.
I looked up the specs, and they are 2W, which is probably still to much current. I am waiting for the delivery of the TPIC6595's and will let you know how that works.
One question, this would probably be a decent solution for driving single LED's if I replace the incandescent bulbs for the indicator lights? I am still trying to figure out when to use transistor/mosfet/optocoupler/TPIC6595's/relays... So many details!
The reason I am using 24V for the switch voltage is that we are using the original aircraft enunciator / switch that is already installed in the panel. It has a single source of 24V to the switch/enunciator that drives the light and the power for the switched function.
We want to use an arduino to drive all of the lights/switches so we can write a program that will allow us to shoot a scene with the proper actions leading to proper light display. For example, warning lights start flashing and they flip a switch and they stop. Or show the landing gear lights down except one is flashing red, etc...