# Need help wiring power push momentary switch



## Taly.21@live.com (Aug 5, 2013)

http://item.mobileweb.ebay.com/viewitem?sbk=1&nav=SEARCH&itemId=140961093961

I recently bought this switch but have no idea how to wire it.
What I'm planning on doing is connecting my led light(interior) to turn on when my car's head lights are on. But as a back up I wanted a switch just in case I wanted my head lights on but not the LEDs. I want to momentary factor to stay in. 
I saw a video that should me how to wire the led to the headlights(by wiring the + to a green cable) but I need help adding the switch.

It would also be awesome if my LEDs could turn on with my dome light when the door opened. I saw a video which they said to connect the + to any 12v + connection and connect the negative to the negative wire on the dome switch in the door.

So over all my plan is to have LEDs that turn on when my headlights are one, have a switch to turn off and on, and for them to turn on with dome light .plz help


----------



## bencrutz (Aug 5, 2013)

you will need a relay, preferably a non solid state one.

+12v at the common of the momentary switch
connect the momentary switch's NO to + side of the relay's coil
connect the momentary switch's NC to relay's NO in series to the + side of the relay's coil
connect - side of the relay's coil to neutral/gnd.


----------



## Taly.21@live.com (Aug 5, 2013)

*Purpose*



bencrutz said:


> you will need a relay, preferably a non solid state one.
> 
> +12v at the common of the momentary switch
> connect the momentary switch's NO to + side of the relay's coil
> ...



What Is the purpose of the relay? Where can I find a non solid ? And after the relay how would I connect to LEDs?


----------



## Brusfantomet (Aug 5, 2013)

do you want the switch to also turn the leds on again? Also, getting the leds to be controlled by either the dome ligth OR the head light would be rather simple, just not with a momentary switch.


----------



## Taly.21@live.com (Aug 5, 2013)

*Yeah*



Brusfantomet said:


> do you want the switch to also turn the leds on again? Also, getting the leds to be controlled by either the dome ligth OR the head light would be rather simple, just not with a momentary switch.



Yes, I would want the switch to turn on the LEDs again. For instant , If I'm driving down the street with my headlights on and I get tired of the interior LEDs I would wanna turn them off with the switch, but also be able to turn them back on.

So if I understood right, the LEDs can't be controlled by both the head lights and dome light? And do you recommend me buying just a simple push power button?
And is there any way the one I bought can just be used as a simple push switch?


----------



## de.das.dude (Aug 5, 2013)

isnt driving with interior lights on illegal in most places?


----------



## Taly.21@live.com (Aug 5, 2013)

*Yes*



de.das.dude said:


> isnt driving with interior lights on illegal in most places?



I think so, that's why I'm looking for a way to wire the switch so I can turn them off if something happens.


----------



## Brusfantomet (Aug 5, 2013)

the ting is, with a momentary switch you need come complicated relay setups with delays to turn it on AND of. getting the light from one stat to the other is not a problem, its getting it back that poses a challenge. 

One solution would bee to turn the headlights of and then on again, sort of reseting the control circuit.

Getting another momentary switch to act as a off switch makes the circuit rather simple again.

Getting the leds controlled by only one momentary switch, reacting to the headlights AND the dome light is probably easiest with a simple microcontroller (audrino, AVR or similar), you only need 3 input (one for the momentary switch, one from the dome light and one form the headlight) and one output to control the leds.


----------



## Taly.21@live.com (Aug 6, 2013)

*Okay*



Brusfantomet said:


> the ting is, with a momentary switch you need come complicated relay setups with delays to turn it on AND of. getting the light from one stat to the other is not a problem, its getting it back that poses a challenge.
> 
> One solution would bee to turn the headlights of and then on again, sort of reseting the control circuit.
> 
> ...



So if I understood right, lets say I get a simple rocker or just push power on/off switch , with the micro controller I can control that kind of input my out(LEDs) get? So for my inputs I would connect a + tap from each source(dome light,headlight) and I would just tap the headlight source going to the micro controller to insert the rocker switch( so when on it'll allow the flow automatically but when pressed off it'll cut the flow of energy)

Can you give me a link of an example of the microcontroller I would need and which ones are the input and output?


----------



## Brusfantomet (Aug 6, 2013)

Taly.21@live.com said:


> So if I understood right, lets say I get a simple rocker or just push power on/off switch , with the micro controller I can control that kind of input my out(LEDs) get? So for my inputs I would connect a + tap from each source(dome light,headlight) and I would just tap the headlight source going to the micro controller to insert the rocker switch( so when on it'll allow the flow automatically but when pressed off it'll cut the flow of energy)
> 
> Can you give me a link of an example of the microcontroller I would need and which ones are the input and output?



 Arduino boards are easy to start with, rather powerful and have a ton of accessories. Programing directly on the AVR gives more options, but is more complex.

The one i liked to can take the voltage from the dome light, headlight and the switch you linked to and depending on how you program it, turn on or off the led lights. 

Lets say you primarily want the leds to be on when the headlights or the dome light is on, but the switch you linked to to change the state. that is rather simple with that microcontroller.

I would like to say that i have never used a Arduino myself, have used several AVRs tho, and seen 8 year old programing Arduinos, so it should not be any problem for you either, but fro curiosity, what are your electronics and programing skills.


----------



## Taly.21@live.com (Aug 6, 2013)

*Okay*



Brusfantomet said:


> Arduino boards are easy to start with, rather powerful and have a ton of accessories. Programing directly on the AVR gives more options, but is more complex.
> 
> The one i liked to can take the voltage from the dome light, headlight and the switch you linked to and depending on how you program it, turn on or off the led lights.
> 
> ...



I myself am good with electronics however don't know much about programming however I have a friend that programs numerous things I'll see if he can help me, is there any specific arduino I could use or just which ever? You've been of great help , thank you.


----------



## Taly.21@live.com (Aug 6, 2013)

*Picture*

I wanna knw what goes in the ? Box so that the LEDs won't get the power from both sorces and burn.. I was the LEDs to turn on with the headlights switch, but I also want another switch In the middle that would allow me to turn off the LEDs but still have my headlights on. So when the cars off the power for the headlights will be off too so the LEDs won't turn on, so I wanted to get the power from the domelight(the light that turns on in your car when yuh open the door) so the LEDs would turn on with the domelight..pero idk what goes in the middle so it can distribute power


----------



## de.das.dude (Aug 6, 2013)

since u say its illegal, connect them to the interior light that goes on when off. To find the wire go into the fuse box with a multimeter, and check which wire stays 12v only when door is open anf the interior light is on.

Mark these off, then run the led wires to there and you will be set. You may or may not solder. Twisting an inch around works as well.


----------



## drdeathx (Aug 6, 2013)

This cannot be done


----------



## bencrutz (Aug 6, 2013)

Taly.21@live.com said:


> What Is the purpose of the relay? Where can I find a non solid ? And after the relay how would I connect to LEDs?



nope, sorry, what i posted earlier would not work, not with single relay. maybe with a pair of relays and a capacitor. or perhaps with simple flip-flop circuit or a simple counter chip?

it would be much much simpler if you change that momentary switch to a toggle one.


----------



## Taly.21@live.com (Aug 6, 2013)

*True*



bencrutz said:


> nope, sorry, what i posted earlier would not work, not with single relay. maybe with a pair of relays and a capacitor. or perhaps with simple flip-flop circuit or a simple counter chip?
> 
> it would be much much simpler if you change that momentary switch to a toggle one.



Yeah I'm over with trying to do the momentary switch. What's your opinion on the whole headlight, dome light thing?


----------



## Brusfantomet (Aug 6, 2013)

Using a momentary switch is possible, but it need some extra logic (microcontroller or a large relay setup).
The simples solution is a on off on switch like these and doing the cabling like this: 





That would send 12 volt to the leds if either the dome light or the headlight is on, but that would depend on the position of the switch.

Now, the Arduino Leonardo board should be a good starting point it you want to use that momentary switch you linked to in you first post, and to make the control a bit more advanced, like this:




Its more complicated, but can be expanded to also control color and you get a lot more options.


----------



## Taly.21@live.com (Aug 6, 2013)

*Thanks*



Brusfantomet said:


> Using a momentary switch is possible, but it need some extra logic (microcontroller or a large relay setup).
> The simples solution is a on off on switch like these and doing the cabling like this:
> http://img.techpowerup.org/130806/leds1.png
> 
> ...



Than you and everybody else that replied to my post you have been of great help and I'll let you knw how everything ends up.


----------



## Brusfantomet (Aug 6, 2013)

Taly.21@live.com said:


> Than you and everybody else that replied to my post you have been of great help and I'll let you knw how everything ends up.



I think i made a bit of an mistake with the ebay link, those are on/off (two position) switches, you need a on/off/on switch (tree postion) like this, or this, or this or this or this


----------



## de.das.dude (Aug 6, 2013)

why not jsut buy a friggin push button switch XD use the momentary in ur pc or something.

the momentary switch is unnecessarily complicating things by 100%


----------



## bencrutz (Aug 7, 2013)

Taly.21@live.com said:


> Yeah I'm over with trying to do the momentary switch. What's your opinion on the whole headlight, dome light thing?



go with a toggle switch. if you want it to lit with headlight & dome light, you just gonna have to get 2 relays, solid state is okay (if the load are just LEDs)

take the + from headlight indicator lamp (or from the headlight's switch or relay or lamp) use it to power the 1st relay. do the same for the dome light. and then take + from battery, pass it on the NO (normally open) contacts of the relays, wire them in parallel and then to the toggle switch and the to the + of the LED. connect the - of LED to ground wire, and you're done.

hope it helps.

PS: i couldn't draw in autocad coz am on vacation. but maybe i can use ms paint should you need it, just ask


----------



## Taly.21@live.com (Aug 7, 2013)

bencrutz said:


> go with a toggle switch. if you want it to lit with headlight & dome light, you just gonna have to get 2 relays, solid state is okay (if the load are just LEDs)
> 
> take the + from headlight indicator lamp (or from the headlight's switch or relay or lamp) use it to power the 1st relay. do the same for the dome light. and then take + from battery, pass it on the NO (normally open) contacts of the relays, wire them in parallel and then to the toggle switch and the to the + of the LED. connect the - of LED to ground wire, and you're done.
> 
> ...



Honestly I'm new to all this relay things and switches but it would be greatly appreciated if you could draw it. I can wait till your back from vacations I'm still waiting on the pieces to arrive


----------



## sneekypeet (Aug 7, 2013)

I don't see what is with all the complication. Assuming these are 12V LEDs, grab any 12V switched power wire in the car, or from the battery is better, add in a switch, and ground them. Switch on when you want lights, switch off when you want them off!


If you were to go and look and truck and van accessories, they make strips that come with the swtich and wire in with a 12V+ and a ground, it really is that simple.

something like this....http://www.trucknvans.com/product-p/cz-3008w.htm


----------



## Taly.21@live.com (Aug 8, 2013)

Bencrutz is this what you mean?


----------



## bencrutz (Aug 8, 2013)

Taly.21@live.com said:


> Honestly I'm new to all this relay things and switches but it would be greatly appreciated if you could draw it. I can wait till your back from vacations I'm still waiting on the pieces to arrive


well, lets see what i can come up with ms paint 



Taly.21@live.com said:


> Bencrutz is this what you mean?


yep, solid state type.

basically, relay is just an electrically controlled switch. apply a voltage and the switch will close / open.
there are 2 type of contact on relay, a NO (normally open) means a contact that are open in un-powered/de-energized state and will close when you energized the relay; and a NC (normally close) which is the opposite.

i'll come back with schematic drawing.

EDIT:
here's the schematic, well, sort of


----------



## Taly.21@live.com (Aug 8, 2013)

bencrutz said:


> well, lets see what i can come up with ms paint
> 
> 
> yep, solid state type.
> ...



Seems really simple, I'll try it out. Thank you.


----------



## bencrutz (Aug 8, 2013)

Taly.21@live.com said:


> Seems really simple, I'll try it out. Thank you.



just a small addition, make sure you pull the + from the battery through a fuse, just to prevent fire hazard in case of short circuit occur 

PS: i miss labeled one of the lamp, it should be dome light, not doom light, doh


----------

