
One for the electrical wizards....
I ideally want to control all the lights on my bike with momentary push button switches on the handle bars, including the indicators.
Basically I want them to work so that you push the button once to turn the lights on, then again to turn it off.
Will a latching relay do this? Or do I need to look for something different or a different way of doing it? If its too complicated then I will start
looking for compact latching push button switches 
Yep a latching relay will do this.
Are there different types of latching relay? I see that some require 12v to another coil to change switch 'off' the relay which would need another switch to cancel?
This should do.
http://www.cbsonline.co.uk/latching-change-over-relay-rly6lat-3594-p.asp
You want a Press to make Press to break relay. As dave suggests, one like the changeover relay that CBS offer.
Thanks
Just need to find some compact push button switches that look ok now 
quote:
Originally posted by flak monkey
Thanks![]()
Just need to find some compact push button switches that look ok now![]()
I did a similar thing but used push to make to switch on and push to break to switch off. I used normal relays with the switched output looped through the push to break switch back into the coil. When you pushed the PTM switch, it triggered the relay and it stayed on because of the output being connected to the coil until you hit the PTB which released it. Probably a very complicated of doing somehting simple but thats what tedious nightshifts do to you...
I normally use a volvo car headlight relay
with the lights off pressing it flashes full beam, with lights on, it toggles between hi and lo, and its just one wire to the switch
I normally build with fat bars and drill and tap them, then fit a microswitch, failing that theres some great bar mounting switch housings on
britchopper
At the risk of becoming slightly more complicated...
If there are several circuits to include it might be worth considering using a small microcontroller to handle the switches and control some standard
(ie cheaper) relays? Almost certainly the way I'd do it, but then microcontrollers are my 'thing'.
It'd let you do all sorts
of odd things if buttons are held down or pressed briefly (ie flash indicator 3 times after a brief push, etc?)
Ed.
[Edited on 7/10/10 by Madinventions]
quote:
Originally posted by Madinventions
At the risk of becoming slightly more complicated...
If there are several circuits to include it might be worth considering using a small microcontroller to handle the switches and control some standard (ie cheaper) relays? Almost certainly the way I'd do it, but then microcontrollers are my 'thing'.It'd let you do all sorts of odd things if buttons are held down or pressed briefly (ie flash indicator 3 times after a brief push, etc?)
Ed.
It would indeed be a PoP with a nice little PIC. The only issue would be debouncing the switch either electronically or in software but that's hardly an untrodden path.
Debouncing in software is relatively simple. You just need to check the condition of the switch every few milliseconds via an interrupt loop. If the
contacts are made, then increment a counter. If the contacts are open then decrement the counter. If the counter=0 then consider the button as not
pressed. If the counter is greater than a certain number then it means that the switch has been pressed for a given duration. This makes it easy to
check for short/long presses and even 'double clicks' given an extra bit of code.
Of course, it's only relatively simple because I do quite a lot of it. On the other hand, you should see my welding... Bloomin' awful!
I'd love to be able to help if I can Flak. See you Sunday.
Ed.