Rotary optical encoder with ABZ

Have searched with no luck, most posts deal with AB types only. I read that the Z signal (1 pulse per complete rev) can be used to reset a zero datum wrt to shaft while passing thru +/- 0/360deg (but surely this has to be implemented in s/w?). I am looking at the Omron E6B2 CWZ1X (1000 ppr) ABZ outputs. I am not mounting it on a motor, so no high rpm, say 100 rpm max. 5v Vcc and to i/f with Arduino Uno. I see that careful conditioning of the pulse train is needed, screened cable etc and using Rise detection interupts etc. The objective is to get a pseudo Absolute system (well at least self correcting using the Z pulse) as the system may well pass through zero say every 5 mins or less, so a correction for a few missed Lbits can be made without notice indication (using a large dial gauge made with a positioning stepper motor 0-5v = 0-360 deg).

FWIW this type of system was pioneering during WW2 with the Synchronous transmitter/receiver (Selsyn/Muirhead) used in aircraft and gunnery/tanks etc. Absolute measurements rugged and reliable and glitch proof.

Can anyone help out here?

ps Synchro - Wikipedia

Handle the A & B signals as you would any other quadrature encoder. There's probably a dozen Arduino libraries for this, plus lots of information online to write the code yourself.

You'd monitor the Z signal separately and use it to reset the counter controlled by the A & B signals. Depending on the encoder part of the code, there may be hooks where you can do this every time the coder position changes.

Indeed there are many Quad libs around with varying degrees of competence. I havent come across any that address the Z reset issue. As demonstrated in quad libs its not as simple as it looks in theory so I was hoping there was a path for the reset issue - I can see some clever delay interrupt/timing needed during continuous rotation albeit in my case not that fast, I was looking for 360ppr say 100 rpm, 36000 ppm (could be made much slower say 3600ppm with a mechanical damper - desirable)

Post a timing diagram showing the timing of the Z signal relative to Quadrature signals A & B.

1 Like

I havent received one of these yet so cant do a timing diag. Dont know how easy it is to see on a scope. The issue may arise with transition, I believe the Z pulse is twice an A(orB) pulse width. Some error/uncertainty correction algorithm may be needed. Hopefully someone with experience will share here. A proper gray code device is needed but $$$ out of my league

Until you can provide a proper set of requirements, there's no point in anyone suggesting possible implementation solutions. You need to do some homework.

Be careful! the timing of the "Z" signal, in relation to A and B will be different depending on rotation direction.

A timing diagram (or 2 would show that).

GFV are you able to point to anyone else who has actually gone down this ABZ path of development.
z stream
Hope this is self explanatory Z stream pulse may occur at on physical spot in a 360deg cycle and can be used to reset the counter. Thats the theory, so what is the practice? What are the hazards in the transition region? BTW I think the Z pulse is twice the width of an A/B pulse? IMHO Im surprised this feature hasnt received more attention by hobbyists?

This information is in the data sheet. Have you looked yet?

timing chart

Capture

I asked for that back in Post #4.

As @Paul_KD7HB opined, timing is different depending on direction of rotation. That makes it trickier as you can't count on Z being active at the end of the complete quadrature cycle.

I'd consider using an interrupt to detect the rising edge of Z and set a flag in the ISR. Then, check for that flag at the completion of every full quadrature cycle. If it's set, adjust the internal count accordingly and reset the flag.

1 Like

Yes indeed I have looked at the DS and the timing diagram rang alarms bells for me with my limited Arduino coding experience - hence I asked the humble question on here. Has anyone been down this decoding route practically rather than plausible conjecture. Am I going to need a Logic Analyser to optimize timings in transition regions? Im afraid I might open a can of worms way beyond my facilities - which may explain the deafening silence on the subject. Surely there will be clever developers who have already been down this available route (Ali Express Omron E6B2 ABZ knock off for £12?)

Paws - reality check - the basic ohmic wirewound pot can do the job of absolute rotary position within 0-325deg. Its rugged, cheap, simple, reliable (within limits of wear) slow,robust analog signal, immune to rfi, stray magnetism, small vibrations, drift, 1deg res, - all this is known, yet how many of these boxes can be ticked with a digital equivalent? Go back further to the WW2 ac Synchro/servo system ( first used for the opening of the Panama Canal). Now thats a statement of requirements

I'm not. It seems tricky but certainly not impossible. Try the approach I proposed in Post #12.

" It seems tricky but certainly not impossible." you said it. It must be possible or such devices wouldnt be so readily available. Its strange to me that I havent found an ready made interface/dev board etc for its wires - its like a dark secret out there - unmentionable social disease :rofl: I find the prospect daunting having seen the special care taken with A/B sketches. Do you have any members' experience links to where A/B quad encoders have been used in practice eg it seems slight vibration whilst stationary can ramp the counter

@robint
You didn’t give us a lot of detail about your application but I can describe a way that was used to synchronize an instrument to a piece of rotating machinery. It was necessary to measure a pressure at each degree of machine rotation and to synchronize to various events by rotating the encoder around its attachment point.

The A channel would generate an interrupt and inside the ISR the B channel would be sampled to determine the direction of rotation and the Z channel is sampled to reset a counter or whatever else one might need to provide synchronization.

I once had a synchro AMPLIFIER! I recall it used 4 807 tubes driving a transformer. IT was used to run the syncho motors for a remote controlled pair of 50 cal machine guns on some type of bomber.

B-29s had remote controlled guns - possibly your amp was used here: https://www.youtube.com/watch?v=vwNPJgNEyMU

Wow DP that vid is a truly humbling experience. Immense skill in machinists' manufacturing and designs all done with a sliderule/Friden mechanical calculator
curiousmarc.com - Friden STW 10 Mechnical Calculator.
Then there must have been an army of mechanics skilled in calibrating and maintaining such complex devices???

That must be the source of the amplifier. Thanks much for the link. Even though I was much enthralled by aircraft back then, I never new much about the B-29 configurations.