Easy Rotary Encoding For Your Projects

Want to monitor how much a wheel has turned in your project? Then you need a rotary encoder! Here’s a way to add rotary encoding without changing the mounting method of your wheels (translated). [Jorge] added it as a way to improve the functionality of this line-following robot. It uses a paper encoder wheel which is monitored by an optical sensor.

The paper wheel consists of alternating white and black pie pieces. You can make this with a felt-tipped marker, or use a tool like the one we featured a couple of years ago to print out a disc rendered to your own specifications. This is glued to the inside of the wheel and monitored by a CNY70 reflective sensor (the same one used in that electric keyboard retrofit).

The homemade board which holds the sensor can be seen mounted on top of each wheel’s motor. It requires three wires, voltage, ground, and data. The data line is connected to the output of the phototransistor in the CNY70 package so it can be used with a microcontroller interrupt for easy integration with the firmware driving the robot.

[Jorge] goes into some detail about how the added data helps to improve the speed performance seen in the clip after the break.

[youtube=http://www.youtube.com/watch?v=2SBk3J5ikjM&w=470]

[Thanks Tom]

10 thoughts on “Easy Rotary Encoding For Your Projects

  1. If anyone is interested, here are how rotary encoders look in a commercial product. (printer)
    I am posting the full size versions of them, so you can see all the details, unlike all the billions of pictures that are resized to blobs.

    The pictures are taken by me:
    http://8486.a.hostable.me/pictures/HP_Printer_Teardown/20101216-P1250454.JPG
    http://8486.a.hostable.me/pictures/HP_Printer_Teardown/20111218-P1250491.JPG

    And a linear encoder:
    http://8486.a.hostable.me/pictures/HP_Printer_Teardown/20111218-P1250479.JPG

    Here is the forum post regarding the project that includes the encoders:
    http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=3334

  2. i was going to make a very angry and overly personal rant(verbal attack) about commercial (robot)s and his torx screws being a security-screw (aka anti-HackADay), but his page is in non-english so ill let the non-english ppl flame him/her.

    besides maybe im wrong and the screws are actually phillips? my eyes are getting bad.

    but just for future refrence, if you want to be taken seriously by any TRUE hardware hacker, one that does it for self interest and to say we did it, then you shoud consider throwing all those torx screws in the garbage and use some of the phillips or flathead screws you SHOULD have kicking around…

    or maybe you dont have extra screws kicking around because ……. it doesnt fit in your buget? lol doesnt fit in my junkpile,,,

    its a real pile of juicy parts you should be jealous,,, over 100’s of $ worth of parts, 95% working.

    so much for not flaming, oh well at least i wasnt rude this version :)

    PPS: this is what torx security screws look like:

    http://www.google.ca/imgres?q=torx&hl=en&safe=off&biw=1024&bih=647&gbv=2&tbm=isch&tbnid=V-a9ASShxrQJ8M:&imgrefurl=http://mbworld.org/forums/c63-amg-w204/323229-rear-diffuser-removal.html&docid=mBaTpNCjRIqemM&imgurl=http://img.alibaba.com/photo/201289033_1/High_Quality_Various_of_Torx_Head_Screws_with_a_Pin_in_Center_.jpg&w=400&h=400&ei=UMoDT9-yCofb0QHCoumlAg&zoom=1

    1. I don’t see the problem.

      it’s clearly just using screws that are left over from something. clearly he has a security torx screw driver, and anyone attempting to build this themselves can sub out the screws for whatever they like.

      I guess, in commercial products, you’re right, but this is a hobby, use whatever comes to hand.

      once upon a time I thought that torx screws were bad (normal not security), then torx bits started being just a part of every screw driver set -even cheap ones so now I think, what’s the problem.

    2. LOL, I have triangle screws I have used on stuff that I pulled off of some POJ that I had in my junk pile. I use torx screws for my deck too. Seriously though, who gives a damn what kind of screw? Maybe his stupid little brother was taking stuff apart so he put some “security” on it.

Leave a Reply to someonecoolCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.