74HC74 problem

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hello to all.

I am building digital volume control and will use rotation encoder. For that I decided to use 74HC74 logic, which should decode encoder's pulses to CW/CCW pulses.
And here I ran in to problem.

My simplified schematic looks like this:
An externally hosted image should be here but it was not working when we last tested it.

These signals are what I get and I know this is bad. Y should be always high. Input pulses looks ideal, with 90° shift.
Any ideas?


Full schematic:
An externally hosted image should be here but it was not working when we last tested it.

Board (slightly differs, protective diodes added):
An externally hosted image should be here but it was not working when we last tested it.
 
It almost works..

Hello Circuit, on paper your design will work fine. Clever too. But in real, noisy, dirty world you will have problems. Referring to first schematic, the HC74 flip-flop should only trigger on rising edge of the clock pulse only. But the Y output is being triggered on the seemingly negative edge too. So you have A: a miswire somewhere. Or B: more likely there are noise spikes roaming all over your board. Or most likely C: at the falling edge of the A pulse there is a small but able noise pulse giving the DD1.2 flip-flop a second pulse and triggering the DD1.2 flip-flop.

So you could apply .1uf caps all over the board on the 5 volt inputs to all the chips, standard practice on digital boards. Apply more caps on the D and clock lines to filter the inputs, or change out the op amps DA1.1 and 1.2 to voltage comparators and use a 100K resistor from output to input for more hysterisis.

It looks like the op amps are pulse cleaning circuits but they are probably the problem giving you a double pulse. Got a scope to look for the pulses? You might also change R4 and R9 to 100K resistors to lower the gain and put some cap filters on the inputs to clean up the problem.

Also what is on the XP1 MOTOR inputs? Looks interesting.....

Hope this helps, Joe
 
Thank you for your replies.

Well, I do have 4-channel analogue scope, but I've seen only a perfect signals with 90° phase shift. Well, most likely there is very short CLK pulse after negative edge. Since I use analogue scope, I can't see these pulses. Tried to trigger on negative edge, zoom - no results, can't see it.
I have also probed supply for noise - well, there is low level noise, about 10mV. I have placed 100µF tantalum capacitor on main board's supply, also 0.1µF ceramic caps directly on both chips. Also placed linear voltage regulator (7805) directly to that tantalum cap - absolutely NO results.
Well, and then I gave up - just removed that D latch :) These signals will go to MPU, so it will do the job.


And now the interesting part. This board gets pulses not from a typical rotation encoder, but from bipolar stepping motor :) That is why hysteresis of these Schmitt trigger is so small - just 5mV.
Resistors R6 ant R8 loads stepping motor, so it does not exceed 400mVp and rotates very smoothly. This is a feeling worth thousand words ;)
I have also improved that motor (polished it's ball bearings), so now it's axis can be pushed for about 0.5mm.
I have already made a new schematic and board, also assembled everything on this motor. My camera is waiting for an ultrasonic motor replacement, so sorry, no photos :(


I am doing all of that for my DIY project. You can look at it here: http://circuit.lt/?section=projektai&page=a03
You'll find new schematic and board there. Also there are two photos of that motor.
Sorry, everything is in Lithuanian for now, but you can still understand schematics and pictures ;)

Any comments and recommendations are very welcome.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.