How to transform a temporary switch into a permanent one?

Cemoi

Enlightened
Joined
Jan 23, 2008
Messages
527
Location
France
Hello,

I have a small homemade circuit driving two 5mm LEDs. I need to connect it to + and - terminals (a pair of AA batteries) for it to work.
But I want to integrate it in a commercial bike light, whose switch is a temporary one, i.e. when I depress the switch it is on, but doesn't remain so when I stop pressing.
So I'm wondering which electronic component I need to use, so that:
- one press of the switch turns my circuit on,
- the next press turns the circuit of, a.s.o.
Or on a sketch:
Temp-switch.jpg

where my circuit is connected to 4 and 5, what should be "in the box"?
 
Last edited:

Lynx_Arc

Flashaholic
Joined
Oct 1, 2004
Messages
11,212
Location
Tulsa,OK
the easiest thing to do is get an on/off switch, otherwise you need more electronics or a relay to use a momentary to *change* condition.
 

Cemoi

Enlightened
Joined
Jan 23, 2008
Messages
527
Location
France
the easiest thing to do is get an on/off switch
I know it would be easiest, but this is ruled out: I must keep the original switch, which is part of a waterproof design and is perfectly integrated in a very compact way.
otherwise you need more electronics
What kind of electronics? Is there an IC that does this?
 

Lynx_Arc

Flashaholic
Joined
Oct 1, 2004
Messages
11,212
Location
Tulsa,OK
how much room do you have for stuff to do this?
You sure the switch is waterproof and it is not just a boot over a non waterproof switch?
 

Cemoi

Enlightened
Joined
Jan 23, 2008
Messages
527
Location
France
how much room do you have for stuff to do this?
Very little. The current switch is very compact, but I may be able to have a small* extra component fit inside the light enclosure.
*say 1 cm x 0.5 cm x 0.5 cm
You sure the switch is waterproof and it is not just a boot over a non waterproof switch?
You are correct. It's a tiny pushbutton switch located right below a somewhat flexible part of the enclosure.
As it's well integrated into the enclosure I'll much rather add a component to carry out the above function (turn on and off my circuit) over trying to replace the existing switch.
 

Lynx_Arc

Flashaholic
Joined
Oct 1, 2004
Messages
11,212
Location
Tulsa,OK
There may be an IC based solution but I don't know of one. I know logic circuits like a flip flop would work but then you have to run a power transistor or relay then to control the output as most IC based solutions cannot handle enough power. I don't know of any other way to do it I have been thinking of a relay and capacitors to help in this but that would be a constant power drain in addition compared to an IC or transistor switch based option.
 

VegasF6

Flashlight Enthusiast
Joined
Dec 5, 2007
Messages
1,449
Location
Las Vegas
Yes, you need a "latching circuit" which is a name I am more familiar with for what Lynx-Arc is describing. The original circuit triggers a fet or electronic relay to transfer power. If you google latching circuit, you should find several schematics, here is one:
http://www.discovercircuits.com/H-Corner/u-flasher.htm

I built one of these to send power to the auxilary lighting in my truck from the stock fog light switch.

Here is a lower power option:
http://www.discovercircuits.com/circuit-solutions/latching.html
I would guess you could eliminate the 3rd cap, but I have no real experience with these for low power lighting.

Lighthound sells a key chain light for 2$ that has a latching circuit of some kind. I just took mine apart and I am afraid I have absolutely no idea how it works. There is a circuit board, a membrane switch and some leads that go to a black spot of epoxy. Under that epoxy is the latching circuit, or whatever solution they used. If it will handle the power of what you want it sounds like a very cheap source for your circuit?
 

Cemoi

Enlightened
Joined
Jan 23, 2008
Messages
527
Location
France
Yes, you need a "latching circuit"
Thanks, at least I know the name of what I have to look for :)
The first circuit you mentioned looks very complex to me (I'm still a nube at electronics).

Here is a lower power option:
http://www.discovercircuits.com/circuit-solutions/latching.html
I would guess you could eliminate the 3rd cap, but I have no real experience with these for low power lighting.
A bit more simple, although some things are unclear to me:
  • Why do you and the author talk about a "third capacitor", whereas I only see one (0.6 F) in the circuit?
  • Why are there two almost identical drawings on this page? Should I realize both? I'm puzzled and don't understand how all this should be connected to the 1, 2, 3, 4 and 5 terminals of my "question mark box" (see drawing in my OP).
Hopefully I can find a easier option :confused:

Lighthound sells a key chain light for 2$ that has a latching circuit of some kind
I found two models on their website:
  1. One that costs 1$, said to work by "press once for on, press again for off".
  2. One at 1.2$ which "has a button for momentary light and a small switch for constant on"
I suppose you are talking about the first one?
 

VegasF6

Flashlight Enthusiast
Joined
Dec 5, 2007
Messages
1,449
Location
Las Vegas
Yes, the first keychain light is the one I am talking about. I was thinking it was 2$, that is even better. They actually have that same style quite a few places. I have gotten them along with orders from both battery junction and light hound, and I have seen them at DX. I assume the internals are all similar, though I can't swear to it. It would be great if that would do it.

I can't see your picture, so those circuits (the ones from the links) are just a very generic solution that may not work in your case? I am also not quite clear what you are doing. You are integrating this circuit into an existing housing? Is there any other electronics or lighting in there already?

I am really 100% in agreement with Lynx Arc, that another switch would be much easier :) Something like a membrane switch in an external soft housing like the tape switches you see being used for weapons lights for instance run into that housing and siliconed around. But since that isn't what you want, we must find something else :) I also have a halloween pendant in front of me where you push the face and it lights up and you can hear a micro switch activate but it doesn't physically latch in place. But it goes off after about 30 seconds with a timer circuit. Probably a ton of light in your halloween section at Target or something right now that you could maybe cannabalize. (I didn't notice your location though, are you in the US?)

The circuits I linked to aren't really apropriate, but just an example. That particular IC I think requires both circuits, one to latch and another to unlatch?

I did search around some, and all the latching circuits I am finding require several components, not a simple IC.
http://www.edn.com/article/CA472837.html This is another circuit that would function like you ask, but requires some 10 odd components or so.

And here is just one case of someone looking for the same thing. They mention programming a pic chip for it. Sorry I couldn't be of more help, I wish you the best in this.
 

Lynx_Arc

Flashaholic
Joined
Oct 1, 2004
Messages
11,212
Location
Tulsa,OK
the $2 latching circuit *may* work for 2 5mm LEDs. If they are direct drive it should work but if there is a boost circuit and they are driven to spec the circuit may not be able to handle the extra current from the batteries needed which is probably in excess of 80ma I am guessing the keychain one could handle up to 60-80ma but may overheat approaching 100-120ma which could be what a boost circuit requires for input.
 
Top