Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Rotary Encoder Interfacing with PIC Mirocontroller

Rotary Encoder Interfacing with PIC Mirocontroller
i am currently working with some power supply design and i can say using conventional pots(potentiometer)  and rotary  switch  to adjust the voltage and other stuff is quite old school. so i have decided to go for a bit high tech , actually bit digital.
so here is the solution
Incremental Rotary Encoder
first of all i would like to tell you , these type of rotary encoder is totally digital component so you can’t directly replace these  with you conventional pots. so lets start what are Incremental Rotary Encoder , Incremental rotary encoders by the looks of it just like a general purpose pot looks like but output is quite different they  provide a pair of digital signals that allow a microcontroller to determine the direction of a shaft’s rotation. They can be used to monitor motors and mechanisms, or to provide a control-knob user interface.

for a quick look here is a typical incremental rotary encoder

and hear the output wave form


Decoding with Microcontroller 

in this examples we will be decoding the rotary encoder with the help of sate machine.

view of state machine in the wave form

Schematic with PIC18F458


Source code and firmware

CLIK Here To download Source Code and Firmware. 

Read more Here

 

More Articles to Read

App note: Testing inductors at application frequencies
App note: Testing inductors at application frequencies
App note: Working voltage ratings applied to inductors
App note: Working voltage ratings applied to inductors
1968 Princeton Reverb Repairs
1968 Princeton Reverb Repairs
Skill Sunday: Power Over Ethernet for Arduino
Skill Sunday: Power Over Ethernet for Arduino
More on Color TFT Displays ~ The Big Ones — 240 X 320
More on Color TFT Displays ~ The Big Ones — 240 X 320
Vertical Pole Climbing Robot
Vertical Pole Climbing Robot
ESP8266 Weather Station Projects
ESP8266 Weather Station Projects
Single tube Lethal Nixie clock
Single tube Lethal Nixie clock
How to make a simple 1 watt audio amplifier (LM386 based)
How to make a simple 1 watt audio amplifier (LM386 based)
Flashing Binaries to DRA7xx Factory Boards Using Device Firmware Upgrade
Flashing Binaries to DRA7xx Factory Boards Using Device Firmware Upgrade

Top




Shares