Gareth Branwyn is a freelance writer and the former Editorial Director of Maker Media. He is the author or editor of over a dozen books on technology, DIY, and geek culture. He is currently a contributor to Boing Boing, Wink Books, and Wink Fun. His free weekly-ish maker tips newsletter can be found at garstipsandtools.com.
Here’s a linear optical encoder made from printer parts, a PIC 18F4520 MCU, and an L298 motor controller:
The goal of this tutorial is to create a way to know where the ‘stage’ is, accurate to about 1/4” using optical encoding. The stage is controlled via a 12v motor so we will use an L298 motor controller for controlling the motor via a 18F4520 PIC.
The PIC will use hardware PWM generators to output the correct frequency & duty cycle. The PIC will also take the analog input from the IR detector diode to keep track of how far the stage has moved via an internal analog to digital converter (ADC).
What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.
Gareth Branwyn is a freelance writer and the former Editorial Director of Maker Media. He is the author or editor of over a dozen books on technology, DIY, and geek culture. He is currently a contributor to Boing Boing, Wink Books, and Wink Fun. His free weekly-ish maker tips newsletter can be found at garstipsandtools.com.
Our websites use cookies to improve your browsing experience. Some of these are essential for the basic
functionalities of our websites. In addition, we use third-party cookies to help us analyze and understand
usage. These will be stored in your browser only with your consent and you have the option to opt-out. Your
choice here will be recorded for all Make.co
Websites.
Allow Non-Necessary Cookies
Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!