Reply to A rock solid scratch encoder.
A rock solid scratch encoder. A quick note on creating a rock solid rotary encoder for scratch purposes. The trick with quadrature rotary encoders is that it has two lines that alternate high/low half a turn out of sync with each other. By inspecting these two pins every time they change from high-to-low or low-to-high you can work out which direction the encoder has rotated. Simple enough. Two problems, if you don't check the encoders often enough you'll miss transitions and get confused about the direction that it moved. This is especially true when scratch DJs are doing those tiny, high speed scribbling movements they love so much. Usually when you absolutely must know when an event has happened, we connect the event up to the "interrupt" pin of the microcontroller - this is a special pin that when it changes state causes a specific piece of code to be excecuted, called an "interrupt service routine". Great, but some controllers only accept interrupts on the rising edge of a signal, and for a quadrature encoder we need to catch the rising AND the falling edges. So the trick is to have a dedicated chip listening to the movements and recording, for a short amount of time, how much movement there was. We do this using a pair of chips - first, a LS7804 "quadrature decoder" converts the two pins to a +1/-1 signal, which we feed into a "up down binary counter", which keeps track of how many events have happened since we last checked, and in which direction they happened. http://www.lsicsi.com/pdfs/Data_Shee...083_LS7084.pdf http://www.fairchildsemi.com/ds/74%2F74F579.pdf Figure 6a here: http://doc.chipfind.ru/html/lsi/ls7084.html Maybe the 8-bit counter is overkill, if we sample often enough a 4-bit counter would do fine. Combine these two chips and you get rock solid scratching, never missing a motion. | |
You need to login in order to write on our forum |
<< Cancel