Using Optical encoder for 74HC595

Thread Starter

beaverx

Joined Jun 3, 2024
5
I would like to modify the following project:




To switch register (LED) by a photoresistor:
pBqa9OSf.png

Is it possible to provide clock signal to the 74HC595 by just this optical encoder?
I can also leave the 555 in the project if needed but the goal of this project would be that I have 16 leds and I would like to shift between them by using that encoder wheel. For the encoder wheel I use a regular LDR and a white LED on the other side. The desired effect would be that if I move the wheel with 1 position then the next led lights up in the row.

Thanks
 

sarahMCML

Joined May 11, 2019
695
I would like to modify the following project:




To switch register (LED) by a photoresistor:
View attachment 323779

Is it possible to provide clock signal to the 74HC595 by just this optical encoder?
I can also leave the 555 in the project if needed but the goal of this project would be that I have 16 leds and I would like to shift between them by using that encoder wheel. For the encoder wheel I use a regular LDR and a white LED on the other side. The desired effect would be that if I move the wheel with 1 position then the next led lights up in the row.

Thanks
What encoder are you trying to use? It may be just a simple substitution for the switch!
 

Thread Starter

beaverx

Joined Jun 3, 2024
5
I just put the the drawing there as an illustration. In this case I have a self made. I drilled 3 holes on a wheel which will be moved by a conveyor belt. Under the wheel there is a simple white LED on the other side there is a simple LDR, which resistance changes for the light and to avoid most outside lighsources it's inside a box.
 

sarahMCML

Joined May 11, 2019
695
I just put the the drawing there as an illustration. In this case I have a self made. I drilled 3 holes on a wheel which will be moved by a conveyor belt. Under the wheel there is a simple white LED on the other side there is a simple LDR, which resistance changes for the light and to avoid most outside lighsources it's inside a box.
I haven't watched Julian's video, so I don't know whether his push button is arranged to pull up or pull down to trigger the 595's switching. However, I do wonder whether an LDR will be sensitive and fast enough, or change resistance sufficiently to give the required High or Low level needed to function properly. A phototransistor might be a better option.
 

panic mode

Joined Oct 10, 2011
4,871
in above video fixed oscillator is used as slow clock (3-4Hz, always running) and the data is supplied by button.
if you build two such circuits and feed the data from A and B channels of the quadrature encoder, you can visualize the waveforms (like a crude oscilloscope)
 

Thread Starter

beaverx

Joined Jun 3, 2024
5
in above video fixed oscillator is used as slow clock (3-4Hz, always running) and the data is supplied by button.
if you build two such circuits and feed the data from A and B channels of the quadrature encoder, you can visualize the waveforms (like a crude oscilloscope)
Yes that's one of the reason why I think keeping the 555 would work better. In the video he explains also that he hooked together the shift+storage registers which shouldn't be as intended but it just works :)
It might be a better way for make the 555 "stop ticking" by that optical encoder (eg on positions where the hole is closed and the light does not shine on the ldr stop the 555 alltogether then when the wheel turns turn it back on again)
 

Thread Starter

beaverx

Joined Jun 3, 2024
5
During normal operation switch S2 connects pin 4 to the supply voltage. To stop the timer before the end of the timing interval you set S2 to the “Reset” position which connects pin 4 to ground. Before starting another timing interval you must return S2 to the “Timer” position.



What do you guys think of actually using that LDR itself as the S2 switch on this example. Any time when the wheel turns (the ldr gets light through the hole), the resistance changes so it can pull up or down that switch aka stopping the clock.

What I need is no way of (resetting the sequence aka the led sequence is on 0000000000X000000) when the wheel turns I do not want this go bonkers and jump to whatever position but to either stop or start and continue from the same position.
 

olphart

Joined Sep 22, 2012
124
ALWAYS put a Schmitt trigger gate (7414 / equ) between the encoder output(s) and ANY logic.
Without hysteresis, you won't BELIEVE the "flutter" on slow encoder rotation if you don't.
You may Still have a minimum rotation rate, start/stop apps are Really "interesting".
 
Top