Shop OBEX P1 Docs P2 Docs Learn Events
Lights and Siren — Parallax Forums

Lights and Siren

AImanAIman Posts: 531
edited 2006-10-04 15:23 in BASIC Stamp
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

  • AImanAIman Posts: 531
    edited 2006-10-02 23:52
    Anyone?
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-03 00:36
    By "a set of lights and siren for a vehicle" do you mean you want to switch on a standard vehicle's lights and siren? Do you want to control a toy vehicle's lights and siren? What?

    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.
  • AImanAIman Posts: 531
    edited 2006-10-04 14:45
    This is for a truck that we sometimes us to do work at night. If I am understanding you correctly, all I really need to do is run a switch to turn it on or off. In that case couldn't some sort of pot be hooke up to turn the switch?
  • FranklinFranklin Posts: 4,747
    edited 2006-10-04 14:56
    Why do you want computer control of the lights? (sorry I may just be missing the point of a toggle switch)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-04 15:23
    AIman,
    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.
Sign In or Register to comment.