Quadrature Shaft Rotary Encoder Interfacing . . . - Page 1
Forum section: electronics / projects

author: Orion12
author_rank: Contributor
timestamp: January 18, 2016, 04:53:23 am
content: Hi everyone . . . I would appreciate some help with interfacing the following Rotary Encoder . . .Encoder 600P/R Incremental Rotary Encoder AB phase encoder 6mm Shaft W coupling . . .http://www.ebay.com/itm/171454356826The Exact Model Number is ( ZSP4006-0003G-600B-5-24C / NO:2015110605 )Description:600 p/r (Single-phase 600 pulses /R,Two phase 4 frequency doubling to 2400 pulses)Power supply: 5-24 V DCOutput :AB 2phase output rectangular orthogonal pulse circuit, the output for the NPN open collector output typeMaximum mechanical speed: 6000 R / min : Response Frequency: 0-20KHzNotice:AB 2phase output must not be directly connected with VCC, otherwise, will burn the output triodeConnections:Green= A phase,white= B phase, red = power +, black = power -( See attached Image for Current Hookup Schematic )I'm currently using 120K Pullup Resistors between the Green A-phase & White B-phase output leads & VCC+ ( Using a 12 Volt Supply )( See attached Image for Oscilloscope A-Phase & B-Phase Output Signal pics )A goal is to track shaft rotation position & pick off trigger signals @ Selectable Number of Pulses / Degree Positions . . .( Which are Referenced to a Master Rotation-Sync Pulse Cycle / Reset which is provided by a single Hall-Effect Sensor )( Using an Encoder with built-in Z-Axis Channel to Provide the Sync / Reset Indicator for a Full Revolution instead of using a Hall-Effect Sensor is an Option . . . Any Suggestion on that Topic ? )This is a Low Cost Project . . . I'm not sure what is the "Best" Platform . . . Maybe an Arduino Approach or maybe a Counter Chip Approach . . .Simple & Lower Cost ( If Possible ) is Better . . . The Target Max Shaft RPM is ~ 5000The HPHCTL-2000Interfacing Chip looks promising /https://inst.eecs.berkeley.edu/~ee128/fa05/labs/lab_7/hctl2016.pdf/Any Perspectives ?Any help or Input on this will be Greatly Appreciated . . .This is my 1st Rotary Encoder project / A $13 600p/r Encoder may be a stretch as one of the Goals is to use "Accurate" Degree Positioning to fire the Trigger Signals( Suggestions or Comments on Device Selection & Approaches are Much Welcomed ) . . .Looking forward to your Inputs or Suggestions . . .Thanks & Cheers from Orion12

author: promacjoe
author_rank: Regular Contributor
timestamp: January 18, 2016, 06:25:31 am
content: Have a look at this,http://www.robogaia.com/3-axis-encoder-conter-arduino-shield.html.the individual chips are available from US digital,http://usdigital.com/products/interfaces/ics/LFLS7366R-S.the chip has a very easy SPI interface, and will work with any 3V or 5V microcontroller that has an SPI interface. It keeps up with the count, So your microcontroller does not have to.Hope this helps.also, try using a smaller font. It makes it hard to read when you have such a large font. It also seems like you're shouting at us. Neither is good.

author: Orion12
author_rank: Contributor
timestamp: January 18, 2016, 06:38:16 am
content: Major Thanks ProMacJoeI'll check that out ASAP ! ! !Thanks again & Cheers from Orion12UPDATE : I checked that solution out . . . Very Interesting but that's a 3-Axis Solution & Only 1-Axis is needed . . . ( looks like that company has also a 2-Axis Board )BUT it appears these Encoder Boards are more designed for Lower Resolution & Lower Speed Rotary Encoders . . . ( Maybe I missed something or am adding an incorrect interpolation )Still Thanks for the Link & Consideration, I appreciate your time & effortOrion12

author: Kilrah
author_rank: Unknown
timestamp: January 18, 2016, 11:18:15 am
content: QuoteIs hardly "slow".That chip precisely has the purpose of handling the counting of a high resolution encoder like yours where a micro with no dedicated encoder counter hardware would not be able to keep up with the high pulse frequencies without missing some.

author: MagicSmoker
author_rank: Super Contributor
timestamp: January 18, 2016, 11:29:15 am
content: Quote from: Orion12 on January 18, 2016, 04:53:23 am5000RPM * 600PPR = 50kHzYou're gonna need a bigger boat.

author: Fungus
author_rank: Super Contributor
timestamp: January 18, 2016, 11:47:44 am
content: Why are you shouting?

author: Orion12
author_rank: Contributor
timestamp: January 18, 2016, 12:10:58 pm
content: Quote from: Kilrah on January 18, 2016, 11:18:15 amThanks Kilrah . . . I did a Double Take & Looked up the LS7366R Chip Specs . . . ( I'd initially just looked at the 3-Axis Application with 3-Panel Style Encoders & Assumed a Lower-Frequency Envelope )Many Thanks for Your Attention & Help . . . Cheers from Orion12

author: Orion12
author_rank: Contributor
timestamp: January 18, 2016, 12:37:29 pm
content: Quote from: MagicSmoker on January 18, 2016, 11:29:15 amExcellent Point MagicSmokerIt may be less problematic in the end for me to select a different Encoder with a 360 p/r resolution WITH A, B& Z Outputswhich would eliminate the need for the External Hall Sensor.( ~.5-Degree Resolution may put Expenditures over the edge / 1-Degree Resolution should still be workable & may allow me to push the RPM up to the 6,000 RPM range )Thanks for your Discernment & Analysis & Input . . . Major Cheers from Orion12

author: retrolefty
author_rank: Super Contributor
timestamp: January 18, 2016, 01:05:44 pm
content: Just from experience I would suggest lowering the pull-up resistors to say 10K ohms. That will lower the impedance of the two signals and help with noise suppression and over/undershoot.

author: MagicSmoker
author_rank: Super Contributor
timestamp: January 18, 2016, 04:26:18 pm
content: Quote from: retrolefty on January 18, 2016, 01:05:44 pmActually, even 10k is too high; use the lowest value pullup resistor acceptable, down to an ideal value of 100 to 120 ohms.

author: Orion12
author_rank: Contributor
timestamp: January 19, 2016, 03:46:40 am
content: Quote from: retrolefty on January 18, 2016, 01:05:44 pmThanks RetroLeftyYour suggestion direction to DECREASE the 120k Pull-Up Resistor Value was Absolutely Important in Decreasing the Signal Noise & Increasing Overall Performance !I appreciate your input THANKS . . .This Definitely HELPED my design path.Cheers from Orion12

author: Orion12
author_rank: Contributor
timestamp: January 19, 2016, 04:08:45 am
content: Quote from: MagicSmoker on January 18, 2016, 04:26:18 pmVery Wise Suggestion MagicSmokerI ended up sticking a couple of 1k Resistors together ( 500 ohms / On both A & B Encoder Outputs for Pull-Up Resistors ) & this Majorly Increased Signal Integrity & Decreased Signal Noise . . .See the DS1054Z Screen Shots ( 1st is a Medium RPM Capture with the Original 120K Pull-Up Resistors . . . 2nd is a Higher RPM Capture with Your Suggested LOWER VALUE Pull Up Resistors . . . 3rd is a 3000 RPM Capture with Your Suggested LOWER VALUE Pull Up Resistors . . . ( 500 Ohms was what I had at hand - I can try the 100 or 120 ohms in the future ) . . .Both You & RetroLefty were Definitely on the Right Page . . . Quite a Decent Result for a $12.99 - 600p/r Rotary Encoder with NO MANUAL.Major Major Improvement . . . MANY THANKS !Thanks Again with Cheers from Orion12

author: Molenaar
author_rank: Regular Contributor
timestamp: January 19, 2016, 11:29:36 pm
content: The TI Hercules series have a QEP built in with nice software to boot. Could they be a solution?

author: Orion12
author_rank: Contributor
timestamp: January 20, 2016, 02:49:31 am
content: Quote from: Molenaar on January 19, 2016, 11:29:36 pmThanks MolenaarYour TI Hercules series looks like it would Definitely WORK WELL as a High End Solution !When I was looking at the Platform it appears you'd need TI's "Code Composer Studio (CCS) Integrated Development Environment (IDE)" for development ( ~ $750 USD )If that's the case, it's pushing my development costs up for this initial prototyping stage . . .Have to say that otherwise it appears to be a Kick-Ass Solution that I wasn't previously aware of . . . I greatly Appreciate Your Suggestion . . . It could be something I'd go back to in the future.Funding is pretty tight at the moment . . . Any other Possible Solutions ?Update . . . I did discover a Scaled Down Version of "Code Composer Studio (CCS) Integrated Development Environment (IDE)" that's a free download so I'm doing some further evaluationThanks again for your Time & ConsiderationsCheers from Orion12