Magnetic encoder interfacing circuit

Status
Not open for further replies.

Rohith_elec

Full Member level 4
Joined
Dec 16, 2011
Messages
198
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,470
Can anyone help me building a Magnetic encoder interfacing circuit ?
Magentic encoder is connected to behind of a DC motor , how can i interface it with uC using H-bridge and count the steps ?
 

hall effect sensors and magnet bar combination is used for Magnetic Rotary Encoder System.

magnetic encoder out put



simple program to read direction and count

Code:
//L1  encoder pin1
//L2  encoder pin2

unsigned int count=0;
unsigned char status1,status2;
while(1)
{
     count=0;
	 while(L1&&((count++)<30000));
	 status1=L2;
     count=0;
	 while(!L1&&((count++)<30000));
	 status2=L2;  
 	
 
 if((!status1)&&status2) {    //down     dec count  }
 else if(status1&&(!status2)){   //up      inc  count  }

 }
 
Is there any interfacing (amplifier) circuit needed for connecting it to uC ?
The sensor has two leads each from each bar.
 

Can anyone help me building a Magnetic encoder interfacing circuit ?
Magentic encoder is connected to behind of a DC motor , how can i interface it with uC using H-bridge and count the steps ?


See this thread:

https://www.edaboard.com/threads/220787/

**broken link removed**



 
Last edited:
For 'decyphering' the encoder, it is more typical to act on the rising and/or falling edge of A (or both A and B signal).
When you detect a rising/falling edge then it is just a matter of checking the state of the other signal to determine if you have to increment or decrement the counter.
For a '1x' decoding you act on the rising edge of A.
For a '2x' decoding you act on both rising/falling edges of A.
For a '2x' decoding you act on both A and B rising edges.
For a '4x' decoding you act and both rising/falling edges of both A and B signals.
 
these are the photos of motor with the magnetic sensor ,



- - - Updated - - -

This sensor doesnt need any amplifier ?
 

The motors with the sensors as the above pic's sensors will work with the amplifier circuit as Jestin_cubetech suggests ?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…