Ideas for a circuit to make a connection 3 times - Page 1
Forum section: electronics / projects

author: peterd
author_rank: Newbie
timestamp: December 01, 2013, 09:43:52 am
content: Hi.Hi, sorry this is very basic at the moment, I have done electronic stuff in the past, but not for a while. At these stage I am just look for ideas and suggestions.I have this torch which is going to be mounted inside an old underwater case. This case as a toggle switch on it. I need something, when the Toggle switch is turned on, will simulate 3 pushes of the torch power button.The torch's power button is a push button. it needs 3 pushes as it goes via low/med/high modes, i only want the torch on high mode.So I was thinking to remove the push button and solder two wires in it place, and then I was thinking I need a circuit that when it receives power from the toggle switch, will make a connection between the two wires 3 times. (Possibly through a relay)Any suggestions or tips on how this could be done would be very helpful. If my thinking sounds possible any suggestion on what i should look into to make such a circuit would be great.Many thanks.

author: niekproductions
author_rank: Contributor
timestamp: December 01, 2013, 10:15:51 am
content: You could hook up a 555-ish pulse generator with a counter to the output that disables it after three pulses.Is the power button in series with the battery or does it connect to something else?

author: peterd
author_rank: Newbie
timestamp: December 01, 2013, 10:26:36 am
content: Hi. Thanks for the reply.The toggle switch in The case will be in series with the battery.The torch push button is mounted on a circuit board, so not really sure how that is wired.I'm hoping to run this new circuit off the same battery as the torch (8.5v)Cheers.

author: Jonny
author_rank: Regular Contributor
timestamp: December 02, 2013, 08:11:48 am
content: If you do not need the low/med settings just butcher the torch so the toggle switch passes power straight to the bulb (or led?). If careful enough you should be able to do it in a way that it can be undone if you need low/med later.

author: fcb
author_rank: Super Contributor
timestamp: December 02, 2013, 09:26:30 am
content: At least someone hasn't suggested an Arduino yet..My constructive contribution now:555 timer set up as an astable, feeding a 4017B decade counter (clock input).Diodes on outputs #1, #3 and #5 outputs, feeding your switch-simulator (relay, FET, whatever).Configure the 4017 to stop counting at say 6 (won't matter in your application) by taking the #6 output to the #CI (clock inhibit, pin 13).Test it to check the 4017 starts at zero, else you might need a power-on-reset circuit on the 4017 #RESET line (which wouldn't hurt).

author: SArepairman
author_rank: Frequent Contributor
timestamp: December 02, 2013, 09:51:49 am
content: You can easily implement this with a FPGA.A virtex 7 should be able to handle this task.Using 555 timers and counters is a very ugly solution, you will need multiple chips and the solder joints can come apart, which is important if you are under water. A FPGA will be a one chip solution and it will be easy to implement as a novice.

author: Maxlor
author_rank: Frequent Contributor
timestamp: December 02, 2013, 10:28:12 am
content: I'd go with those very basic 6 Pin MCUs, PIC10F200 or ATTiny10/13 for a cheap, easy to create single chip solution. Have it sleep with an interrupt-on-change for the pin connected to your external toggle switch, and when that is activated, have it toggle the pin connected to the flashlight's control circuitry. You didn't say what kind of battery you're using, but you can probably run the MCU directly off the flashlight's battery.Oh, and depending on how the flashlight's power button is implemented, quite a bit of current my go through it, so maybe use a mosfet instead of hooking up the MCU directly.

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 02, 2013, 10:40:58 am
content: +1 for just changing the torch so that it only comes up in high mode.

author: macboy
author_rank: Super Contributor
timestamp: December 02, 2013, 07:35:39 pm
content: Quote from: PA0PBZ on December 02, 2013, 10:40:58 amAre you sure that this solution is so simple? What do you know of the torch LED driver? I presume it is a DC-DC constant current driver. It will not be simple to hack it to simply come on to High mode.I like the idea of the 6 (orpin microcontroller. Someone who knows what they are doing could bang this code out in just a few minutes, and it is probably the simplest hardware too. Simple tasks like this are exactly what these sub-$1 micros are made for.FPGA? That sounds like way too much hardware at the problem.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: December 02, 2013, 07:53:00 pm
content: Hi,How about a reed switch inside the waterproof housing and a magnet on the outside?You can retain all the original functionality.Jay_Diddy_B

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 02, 2013, 08:15:03 pm
content: Quote from: macboy on December 02, 2013, 07:35:39 pmI don't know anything about the LED driver, but I think you can figure out how it works in less time you need to program the micro and hook it up. It will also be more reliable since less parts means less stuff to fail. Just guessing here but it might be as simple as bridging a current sense resistor.Oh, and I think the FPGA was just a joke...

author: dannyf
author_rank: Super Contributor
timestamp: December 02, 2013, 10:36:12 pm
content: Would a simple counter work?

author: Jonny
author_rank: Regular Contributor
timestamp: December 03, 2013, 05:39:41 am
content: Quote from: macboy on December 02, 2013, 07:35:39 pmWhy not simple? Worst case you can't figure out the existing circuit so you remove one LED leg, measure the current going through it on high, insert appropriate resistor to drive off the switch direct. I just don't see the need to over complicate something as simple as a torch

author: XOIIO
author_rank: Super Contributor
timestamp: December 03, 2013, 09:22:27 am
content: Quote from: SArepairman on December 02, 2013, 09:51:49 amI'd have suggested using the IDE to program an attiny85 to do itStill I'd just mod the torch to go right to full power.

author: Stonent
author_rank: Super Contributor
timestamp: December 03, 2013, 09:35:37 am
content: Less practical than hotwiring it to just work but how about 3 555 timers.Timer 1 pulses the second timer and the switch, timer two then pulses timer 3 and the switch, then timer 3 just pulses the switch.But yeah, lets keep it simple. Virtex 7, should only need about half a million gates for something as simple as this.Edit: Don't discount the Arria V SX, 1.1V supply voltage, 462K logic elements, 17k Logic Array Blocks and in a very friendly BGA-1517 package.

author: AndyC_772
author_rank: Super Contributor
timestamp: December 03, 2013, 10:04:25 am
content: Dunno... first you have to train the small rodent to push the button three times, then reverse engineer and model a surprisingly large chunk of the neural pathways in its brain. I'd go with a Stratix V at the very least, otherwise you risk having to over-simplify the logic and it'll end up wanting to mate with the torch.