Author Options:

shaft direction indicator? Answered

does anyone know an easy way to get/make a simple device to determine the direction of a spinning shaft? 
It must give some logic (5V) signal, NOT encoded in any way.  Just +5 if CW or 0 if CCW (or backwards, or 3.3V, or whatever else, it doesn't really matter).  However, it must not
A) require any digital controller (no arduino, ATtiny, PIC, computer, raspi, etc.)
B) have an "encoded" output, or gray code
C) have a large "dead band" where it still indicates CW but it's actually spun a tiny bit CW (or vis-versa).  Must be under 3-4 degrees
D) require  the shaft to spin quickly
E) be expensive.  This is a prototype for an ANALOG mill D.R.O., so I don't want to have to spend ten bucks on one part that I have to buy several of, plus the other parts. 
Its a 1/4" threaded rod, but can easily be adapted to whatever else it needs to be.  The device needn't be small, and I will have a 3D printer avaliable (or at least a mill). 



5 years ago

A flaw in your logic is how does this direction indicator delineate a shaft at rest ?

Doesn't matter, it won't register movement (which will be a separate device), so it ONLY matters that it registers direction immediately when movement does start.

The point is I don't want to drop twenty dollars for a good encoder, plus the headache of making it determine direction analog-Ly from the grey code. If you don't have the solution I asked for ( A B and E) then don't suggest something i said it shouldn't do/be).

It doesn't NEED to be a "good" encoder, it just needs marks every 3 degrees and you need two detectors. You can print that on a laser OHP transparency with no difficulty.

If you're incapable of telling that this passes A, B and E then don't ask the question.....

okay, this went, like most questions to a " I can't do A, how do I do B" where a lot of the answers are an explanation of how to do A. I don't want an encoder, period. The only encoders that I could find in my price range were 24 per rotation, which is more than 3 degrees. 100 count encoders were more like $20, AND would require some sort of controller or digital IC. icengs answer was much better, as it did actually propose the solution that I asked for, not one that I stated I did not want.

If you don't have an answer to the question asked, don't answer

OK, ASK THE RIGHT QUESTION. You specifically DIDN'T exclude encoder solutions !

A) require any digital controller
B) have an "encoded" output, or gray code
C) have a large "dead band" where it still indicates CW but it's actually spun a tiny bit CW (or vis-versa). Must be under 3-4 degrees D) require the shaft to spin quickly
E) be expensive.

This has turned into you whining about how we haven't given you the solution to the problem you haven't detailed properly.

B) have an "encoded" output or gray code. This IS what encoders output, no matter what kind of ENCODEr you use, it always will be. I did look at encoders before I asked the question and, if that would have solved it, I wouldn't have pointed out the microcontroller, nor the encoded output. The point is, that when someone says something won't work for a problem, there may be a good reason, even though it may be the "right" way to do it. I already have a solution, and I'm sick of arguing.

The CW/CCW signal isn't "encoded", its on or off, as you asked.
"It must give some logic (5V) signal, NOT encoded in any way. Just +5 if CW or 0 if CCW "

You appear to have an "encoder" in your own solution.....with lots of bits of wire. That'll be reliable....

I'm tired of you moving your goalposts where you want.

the whole point of this is that I made the "goalposts" in the first place. Second, the wires are NOT encoding, they're ALL working at the same time, only supplying a constant 5V or ground, never changing unless direction does too. I have rethought that though, and decided that two larger posts would work better.

Think of it like a shaft coupler (the type with two metal halves and rubber in between), but without the rubber, and using plastic instead of metal. When one side of the coupler turns one way, it hits one side of the other coupler half. When it turns the other way, it hits the other side. By covering each side with foil or a wire, I can tell which side it hit simply by making one side +5 and one side 0. This does NOT encode the output, only tells direction.

Very good and reliably simple direction detect scheme.

I want to explain that we EE types are  sloppy  about definitions
and tend to call anything that delivers axial electric information
as a subset of shaft encoders.

A real shaft encoder can give analog or digital;
  • Shaft rotary position in fractional degree information which could involve binary data in a gray code format.
  • or Rate and Direction using a dual signal line quadrature square wave..


After some cad I found its not as simple as I'd hoped, but I'll see. As for the encoders I had assumed that he meant a grey- code type encoder (as in your pictures), and that's what I originally meant by encoded. Sorry if that was unclear.
Thanks for your help though.

So, a magnetized shaft or magnets attached, glued or pressed on to a shaft roll two B•Bs in a 7° axial plastic cage.  One end of this cage has
metal ring and pad such that in on rotary direction the metals are
shorted zero to make a Low signal. 
While the OCW  (Other_Clock_Wise) rotation provides a High signal.

What is this device that can tell when rotation begins and continuous ?


If I understand correctly, that should work prettty well. However, from that, I think I figured something that may work a little better in my case. basically, a disk with a bunch of very short copper leads sticking up about the circumference, and another disk with a bunch of holes that are slightly larger than the leads in the same setup. One of the disks attaches to the handle for the mill, and is what is used to push the main shaft. when it turns, the leads push against one side of the hole, when turned the other way, it pushed the other side. That can then be connected to provide high or low.

How about a pair of gears, or pulleys, on a swinging mount?   When shaft turns CW, it swings the mount to the right, and when the shaft turns CCW, it swings the mount to the left.  

The magnitude of the swing, and the means by which you detect it and convert it to a logic signal, I will leave up to you.

Let me know if you want me to draw you a picture of this.

Are you allowed to mark the rotating shaft? If so, then two dots, separated by a small distance (e.g., 45 degrees) along with a pair of photodetectors in the plane of rotation, with the same angular separation as the dots, should be sufficient to identify the direction of motion unambiguously.

The pattern of signals from the photodetectors will be of the form "leading only, both, trailing only" followed by a gap. It should be possible to code that up with two sets of coincidence and delayed-coincidence counters (one set for CW, one for CCW).

The only thing is that it needs to flip the signal within a few degrees, not just once per rotation. Plus, it does need to work if the piece I'm working on casts a shadow over it, or a work light is turned on. Plus, I can't use a microcontroller of any kind.

Sounds like Steve has already given you a workable answer, which you might not be able to recognize. Good luck with your project!

Two markers, one D type flip-flop. One channel into "clock" one channel into "D". Tie the "clr" and"/clr" to supply.