Hi,
I'm completely new to electronics and I have a few questions with regards to a small project i'm trying to build.
I have a simple switch that is closed most of the time and occasionally opens then closes again. I would like a setup whereby whenever the switch opens and stays open for more than 15 ms a light comes on for a second or so.
I want the circuit to be battery powered and as small and light as possible, ideally not much larger or heavier than a AA battery.
I looked up various tutorials and tried to summon up the electronics course i took 14 years ago at school. And have managed to design a circuit that does what i want albeit with ground inputs. You can see my circuit if you go to
Circuit Simulator Applet
and then Import the 1st code segment at the bottom of this post.
What i've done is to take two 555 timer chips that are triggered together when my switch opens. They are timed for 15 ms and 16 ms respectively, the outputs feed into an xor gate. So that after 15 ms the outputs are different and the xor gate outputs a +1 which lasts for 1 ms before the outputs become equivalent and the xor gate drops back to 0.
I feed this pulse into an and gate with a second input that comes directly from the switch, so the and gate only outputs a +1 if the switch is open and the pulse is active. This then triggers a third 555 timer chip which will switch on an led for a second.
I was thinking of using a TLC556 chip and a TLC555 chip for the timers and a 3.3 1/2 AA battery as power supply.
My questions are:
Is this overall design a stupid way of doing it? I.e. is there an obvious solution that is simpler, less power hungry, etc.
I use a dspt switch but it feels somewhat clumsy can anyone see a better of way handling it that wouldn't require a second switch?
Will it be ok to replace all the grounds bar the one in the top left with lines back to the battery? (see second circuit) and will it be ok to replace the ground in the top left with a line that connects to the ground pins of the 555 chip and then also feeds back to the back of the battery? (I can't do this in the simulation because it doesn't give you the ground inputs on the 555s). Ultimately i can't have any grounds because it's not mains powered but i'm not sure what you're supposed do with pins on chips like the 555 that ask to be connected to a ground!
Thanks you so much for you time.
Cheers
Moonbat
I'm completely new to electronics and I have a few questions with regards to a small project i'm trying to build.
I have a simple switch that is closed most of the time and occasionally opens then closes again. I would like a setup whereby whenever the switch opens and stays open for more than 15 ms a light comes on for a second or so.
I want the circuit to be battery powered and as small and light as possible, ideally not much larger or heavier than a AA battery.
I looked up various tutorials and tried to summon up the electronics course i took 14 years ago at school. And have managed to design a circuit that does what i want albeit with ground inputs. You can see my circuit if you go to
Circuit Simulator Applet
and then Import the 1st code segment at the bottom of this post.
What i've done is to take two 555 timer chips that are triggered together when my switch opens. They are timed for 15 ms and 16 ms respectively, the outputs feed into an xor gate. So that after 15 ms the outputs are different and the xor gate outputs a +1 which lasts for 1 ms before the outputs become equivalent and the xor gate drops back to 0.
I feed this pulse into an and gate with a second input that comes directly from the switch, so the and gate only outputs a +1 if the switch is open and the pulse is active. This then triggers a third 555 timer chip which will switch on an led for a second.
I was thinking of using a TLC556 chip and a TLC555 chip for the timers and a 3.3 1/2 AA battery as power supply.
My questions are:
Is this overall design a stupid way of doing it? I.e. is there an obvious solution that is simpler, less power hungry, etc.
I use a dspt switch but it feels somewhat clumsy can anyone see a better of way handling it that wouldn't require a second switch?
Will it be ok to replace all the grounds bar the one in the top left with lines back to the battery? (see second circuit) and will it be ok to replace the ground in the top left with a line that connects to the ground pins of the 555 chip and then also feeds back to the back of the battery? (I can't do this in the simulation because it doesn't give you the ground inputs on the 555s). Ultimately i can't have any grounds because it's not mains powered but i'm not sure what you're supposed do with pins on chips like the 555 that ask to be connected to a ground!
Thanks you so much for you time.
Cheers
Moonbat
$ 1 5.0E-6 14.841315910257661 57 5.0 50
165 368 96 480 96 0 0.0
w 368 128 368 224 0
w 368 128 336 128 0
w 368 192 288 192 0
w 336 128 336 224 0
c 336 224 336 272 0 1.0E-6 0.0019986675549633582
g 336 272 336 288 0
r 336 128 336 64 0 15000.0
w 336 64 432 64 0
r 288 64 288 192 0 100.0
w 288 64 336 64 0
c 288 192 240 192 0 1.0E-5 3.0001054973638475E-9
c 480 464 432 464 0 1.0E-5 3.0001059414530573E-9
w 480 336 528 336 0
r 480 336 480 464 0 100.0
w 528 336 624 336 0
r 528 400 528 336 0 16000.0
g 528 544 528 560 0
c 528 496 528 544 0 1.0E-6 0.0018738288569643974
w 528 400 528 496 0
w 560 464 480 464 0
w 560 400 528 400 0
w 560 400 560 496 0
165 560 368 672 368 0 0.0
w 240 464 240 192 0
w 496 160 736 160 0
w 688 432 736 432 0
w 736 432 736 192 0
154 736 176 768 176 0 2 0.0
w 240 464 240 640 0
w 240 640 768 640 0
I 768 640 816 640 0 0.5
w 816 640 880 640 0
150 880 624 928 624 0 2 0.0
w 880 608 848 608 0
w 768 176 848 176 0
w 848 176 848 544 0
w 848 544 848 608 0
w 1232 592 1280 592 0
165 1104 528 1216 528 0 0.0
w 1104 560 1104 656 0
w 1104 560 1072 560 0
w 1104 624 1024 624 0
w 1072 560 1072 656 0
c 1072 656 1072 704 0 2.4999999999999998E-5 2.999700029997027E-4
g 1072 704 1072 720 0
r 1072 560 1072 496 0 100000.0
w 1072 496 1168 496 0
r 1024 496 1024 624 0 100.0
w 1024 496 1072 496 0
c 1024 624 976 624 0 1.0E-5 -1.9999999999998668
w 928 624 944 624 0
I 944 624 976 624 0 0.5
w 432 64 496 64 0
w 528 336 528 64 0
w 496 64 528 64 0
w 1072 496 1072 64 0
w 528 64 1072 64 0
w 240 464 176 464 0
w 240 464 432 464 0
160 176 464 176 368 0 10.0 1.0E10
w 112 416 160 416 0
g 64 64 64 112 0
v 64 64 112 64 0 0 40.0 3.0 0.0 0.0 0.5
s 112 416 112 64 0 0 false
g 192 368 192 320 0
w 160 368 160 64 0
w 160 64 112 64 0
w 160 64 288 64 0
o 25 64 0 35 7.62939453125E-5 9.765625E-5 0 -1
o 4 64 0 35 0.01953125 9.765625E-5 1 -1
o 3 64 0 291 10.0 9.765625E-5 2 -1
h 2 7 5
$ 1 5.0E-6 12.050203812241895 57 5.0 50
165 368 96 480 96 0 0.0
w 368 128 368 224 0
w 368 128 336 128 0
w 368 192 288 192 0
w 336 128 336 224 0
c 336 224 336 272 0 1.0E-6 0.0019986675549633582
r 336 128 336 64 0 15000.0
w 336 64 432 64 0
r 288 64 288 192 0 100.0
w 288 64 336 64 0
c 288 192 240 192 0 1.0E-5 3.0001054973638475E-9
c 480 464 432 464 0 1.0E-5 3.0001059414530573E-9
w 480 336 528 336 0
r 480 336 480 464 0 100.0
w 528 336 624 336 0
r 528 400 528 336 0 16000.0
c 528 496 528 544 0 1.0E-6 0.0018738288569643974
w 528 400 528 496 0
w 560 464 480 464 0
w 560 400 528 400 0
w 560 400 560 496 0
165 560 368 672 368 0 0.0
w 240 464 240 192 0
w 496 160 736 160 0
w 688 432 736 432 0
w 736 432 736 192 0
154 736 176 768 176 0 2 0.0
w 240 464 240 640 0
w 240 640 768 640 0
I 768 640 816 640 0 0.5
w 816 640 880 640 0
150 880 624 928 624 0 2 0.0
w 880 608 848 608 0
w 768 176 848 176 0
w 848 176 848 544 0
w 848 544 848 608 0
w 1232 592 1280 592 0
165 1104 528 1216 528 0 3.0
w 1104 560 1104 656 0
w 1104 560 1072 560 0
w 1104 624 1024 624 0
w 1072 560 1072 656 0
c 1072 656 1072 704 0 2.4999999999999998E-5 0.8847155531996896
r 1072 560 1072 496 0 100000.0
w 1072 496 1168 496 0
r 1024 496 1024 624 0 100.0
w 1024 496 1072 496 0
c 1024 624 976 624 0 1.0E-5 -1.9999999999998677
w 928 624 944 624 0
I 944 624 976 624 0 0.5
w 432 64 496 64 0
w 528 336 528 64 0
w 496 64 528 64 0
w 1072 496 1072 64 0
w 528 64 1072 64 0
w 240 464 176 464 0
w 240 464 432 464 0
160 176 464 176 368 0 10.0 1.0E10
w 112 416 160 416 0
v 64 64 112 64 0 0 40.0 3.0 0.0 0.0 0.5
s 112 416 112 64 0 0 false
w 160 368 160 64 0
w 160 64 112 64 0
w 160 64 288 64 0
w 528 544 528 704 0
w 1072 704 528 704 0
w 336 272 336 704 0
w 528 704 336 704 0
w 192 368 208 368 0
w 208 368 208 704 0
w 336 704 208 704 0
w 64 64 64 704 0
w 64 704 208 704 0
g 64 64 16 32 0
o 23 64 0 35 5.0 9.765625E-5 0 -1
o 4 64 0 35 2.5 0.2 1 -1
o 3 64 0 291 10.0 9.765625E-5 2 -1