HEDS5540 optical encoder


Results 1 to 24 of 24

Threaded View

  1. #14


    Did you find this post helpful? Yes | No

    Default Re: HEDS5540 optical encoder

    For testing and learning the 16F628A is seems to be OK. But now I try to convert the pulse reading to distance. One full encoder turn generates 1440 pulses. The wheel diameter is 25mm, the circumference is 157mm. I want reading precision to 0,1mm. I try basic math like:
    Code:
    Main_Loop: 
    if Flag = 1 then 
    let counter = (enc_counter/36) * 157 / 4
    Lcdout $fe, 1                    
    lcdout  Dec counter     ; display counter value on LCD
    Flag = 0
    endif
    goto Main_Loop
    But the precision is terrible, can you explain me the right way?
    Last edited by louislouis; - 5th October 2016 at 00:49.

Similar Threads

  1. 2 Beam Optical Pulse Generator
    By WOZZY-2010 in forum Schematics
    Replies: 8
    Last Post: - 6th April 2010, 04:03
  2. USB Optical mouse as motor encoder
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th August 2008, 15:09
  3. optical voice link
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th May 2008, 21:11
  4. Using a optical coder
    By debutpic in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 16th October 2007, 04:57
  5. Using the optical sensor from a ball mouse
    By lsteele in forum General
    Replies: 5
    Last Post: - 5th September 2007, 16:45

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts