Lights and Siren
Does anyone know how to and/or have code for, making a set of lights and siren for a vehicle? I can make L.E.D.'s and a Pizeo go off, but how do I run actual stuff? Can I use the same code? What about changes in power? How do I tap into extra power?
Comments
In a car or truck, the lights and horn draw a lot of current and you would have to switch these with a relay. Most relays with a rating of 10-20A themselves take more current than any microcontroller can easily handle so you would need some kind of driver. A simple FET would do or a transistor. You can also use a driver like the ULN2003 or ULN2803 for currents up to 300-500ma at 12-15V which should be more than adequate for an automotive relay that can handle lights or a horn or siren.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
See if you can borrow or look at a copy of the maintenance manual for the vehicle. It will have a schematic of the electrical system which will show you how the lights and siren are connected and, more importantly, show you where the wires run and are accessible. There's already a switch somewhere that you use to turn the lights (and siren) on and off. Essentially, you have to add a second switch in parallel with the existing one, a switch that's controlled remotely. If you have several different things you want to control remotely, you'll need several remote switches. There are multiple pole relays that can serve this purpose (usually 2 to 4 "poles" - 4PST-NO is four Pole Single Throw Normally Open - 4 independent mechanically linked switches that close when activated) and can handle currents of several amperes.
You could make a mechanical actuator for the existing switch that's moved by a servo, but the switch would need to be in a place where you could temporarily mount an actuator that could handle the force needed to trigger the switch on and off.
In any event, how you would do this depends heavily on the wiring of the vehicle, how the lights and siren are connected and controlled, where the existing switches are mounted, etc. If you end up controlling things with a relay, there are lots of examples in the Stamps in Class books on how to control a relay with a Stamp.