Turning LED on, turning it off...

Thread Starter

Externet

Joined Nov 29, 2005
2,635
Hi.
A pendulum motion needs to turn a LED on only while swinging left to right.

Evaluating hall effect and optointerrupters. At a extreme of motion, one to turn the LED on. at the other extreme, the other sensor to turn it off. Pendulum then returns to left, and repeat.

Thinking on a sort of multivibrator, but perhaps there is an IC applicable, flip-flop, responding to both sensors to drive the LED.
Any IC comes to your mind that can do it on 2.5 to 5V supply ?
 

MrChips

Joined Oct 2, 2009
34,827
The simple solution is to use an R-S flip-flip, i.e. any flip-flop that has Set-Reset inputs, such as CD4013.
You can also do it with just a pair of NAND gates (CD4011) or NOR gates (CD4001).
 

OBW0549

Joined Mar 2, 2015
3,566
Sounds to me like a basic S-R flipflop will do the trick; the sensor on one end of the pendulum swing connects to the SET input, and the sensor on the other end of the swing connects to the RESET input. You could use one half of a 74HC74 (just ground the D and CLK inputs), or two cross-coupled NAND or NOR gates (74HC00 or 74HC02).
 

AlbertHall

Joined Jun 4, 2014
12,626
As the pendulum is presumably swinging with a fixed period, you could do it with just one sensor which triggers a timer and turns on the LED. The timer is set to half the period of the pendulum so it switches off the LED at the other extreme of movement.
 
Top