# Position of reed sensors on Wheel

#### Ashish Vara

Joined Dec 3, 2015
5
Hey folk,

I attached two reed sensor on wheel exactly 180 degree out of phase. I want to the find forward and reverse direction of wheel. I attached one magnet on gear so when magnet comes near to sensor, sensor is interrupted.Based on this I try to find direction but i can't get it. After lot of research i got the one point about sensor position. Is it possible to find forward and reverse direction of wheel by placing two sensor exactly 180 degree out of phase?

Thanking you....

Regards
Ashish Vara

#### Picbuster

Joined Dec 2, 2013
1,025
Well, this is a simple one.

Place the two reed sensors near each other.
On a way that left goes on left and right goes on or in opposite direction right, both, left.
Connect then each reed to interrupt and a few lines of programming and ready.

If you do it correct you have; left counts and right counts. Difference is what 'counts smile'

Thats all.

#### djsfantasi

Joined Apr 11, 2010
7,251
You need to find out the order in which the sensors are triggered. The order I am referring to is calculated by when they are triggered.

Take an example of two reed switches 90 degrees apart. In one direction, the time is how long the wheel moves 90 degrees; in the other direction, the time is how long the wheel moves 270 degrees.

Now when they are 180 degrees apart, the time in both directions is how long it takes to rotate 180 degrees. There is no useful information.

So the only way this will work is if it's NOT 180 degrees.

#### GopherT

Joined Nov 23, 2012
8,012
Hey folk,

I attached two reed sensor on wheel exactly 180 degree out of phase. I want to the find forward and reverse direction of wheel. I attached one magnet on gear so when magnet comes near to sensor, sensor is interrupted.Based on this I try to find direction but i can't get it. After lot of research i got the one point about sensor position. Is it possible to find forward and reverse direction of wheel by placing two sensor exactly 180 degree out of phase?

Thanking you....

Regards
Ashish Vara

Search "quadrature encoder". With that, you might find 90-degrees more helpful. The problem, however, is that reed switches are on for a very short time. You will need them arranged so they are both on for some time. Then monitor which turns off first - determines direction.

The other issue is that you are putting the electronics on the turning wheel and the magnet on the stationary frame. Why would you design it this way? Adding the circuit and batteries will cause the wheel to be out of balance, risk damage to the electronics, and more difficulties. Put the magnet on the wheel is likely a better solution.

#### Picbuster

Joined Dec 2, 2013
1,025
oeps her the paper

#### Attachments

• 4.7 KB Views: 8

Joined Jul 18, 2013
22,063
I have set up a simple 90° quadrature detector by using a dual opto slot sensor, and a single slotted flag on the rotary part, reading the leading edge of a particular direction with respect to the other will give you direction.
A bit trickier to set up but you could probabally do the same with reed switches.
Max.

#### Bernard

Joined Aug 7, 2008
5,722
Look up on AAC- EDUCATION- VOL IV- Chapter 11- last section on Rotary Shaft Encoder.
Might have difficulty with switch bounce using reed switches.

#### Ashish Vara

Joined Dec 3, 2015
5
Thanks a lot everyone...Nice response

My doubt is clear....................

Regards
Ashish Vara