Editing Experimenting with Stepper Motors as Rotary Encoders using a PIC running BoostC Project

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 2: Line 2:
  
  
'''Almost done, needs some detail completed, should be useful as stands, email if you have questions'''
+
'''DRAFT - Almost READY'''
  
  
 
*Name: Experimenting with Stepper Motors as Rotary Encoders using a PIC running BoostC Project
 
*Name: Experimenting with Stepper Motors as Rotary Encoders using a PIC running BoostC Project
*Status: works in my lab
+
*Status: early draft -- do not read
 
*Technology: PIC microcontroller with code in BoostC  
 
*Technology: PIC microcontroller with code in BoostC  
 
*Author: russ_hensel ( where you can find an email address to reach me )
 
*Author: russ_hensel ( where you can find an email address to reach me )
 
*Summary: A PIC16F877A project that operates a stepper motor as an encoder Runs with a PC running a terminal program.
 
*Summary: A PIC16F877A project that operates a stepper motor as an encoder Runs with a PC running a terminal program.
*Last revision Dec 19 2008  
+
*Last revision Dec 19 2008 – Early Draft.
*Archive zip file see Download below.
+
*Archive zip file ( none ) includes: nothing Email me for file, will be posted eventually.
  
 
Rotary encoders are devices that allow electronic measurement of rotation.  You can find a lot of information by Googling “rotary encoder”.  Many are optical with a partly transparent wheel rotating and being read by 2 pairs of led and photo detectors.  Most of the old ball based mice had 2 optical rotary encoders to measure motion in the x and y direction.  You can take these old guys apart to get at the encoders.  Stepper motors can also be used as rotary encoders.  When rotated the motors act as generators and generate the two out of phase waves that are the standard output of encoders (at least after the waves are squared up).  If turned very slowly the output signal drops to a very low voltage and you can miss steps; so these guys are not perfect.  A nice feature of the motors is that they often have a very nice feel in your hands especially if you put a nice knob on them.  Other multi phase motors, like disk drive motors, are reputed to work as well, and often have enough mechanism on them to use as a knob.  The output of the encoder can be used as a volume control, tuning device or whatever.
 
Rotary encoders are devices that allow electronic measurement of rotation.  You can find a lot of information by Googling “rotary encoder”.  Many are optical with a partly transparent wheel rotating and being read by 2 pairs of led and photo detectors.  Most of the old ball based mice had 2 optical rotary encoders to measure motion in the x and y direction.  You can take these old guys apart to get at the encoders.  Stepper motors can also be used as rotary encoders.  When rotated the motors act as generators and generate the two out of phase waves that are the standard output of encoders (at least after the waves are squared up).  If turned very slowly the output signal drops to a very low voltage and you can miss steps; so these guys are not perfect.  A nice feature of the motors is that they often have a very nice feel in your hands especially if you put a nice knob on them.  Other multi phase motors, like disk drive motors, are reputed to work as well, and often have enough mechanism on them to use as a knob.  The output of the encoder can be used as a volume control, tuning device or whatever.
Line 20: Line 20:
  
 
Platform: PIC16F877A using BoostC connected via rs232 to a PC running a terminal program, or as an alternative running a Java program developed especially to control the PIC ( still under development ). The PIC chip is supplemented with a dual op amp connected as two schmidt triggers, there is of course a stepper motor.
 
Platform: PIC16F877A using BoostC connected via rs232 to a PC running a terminal program, or as an alternative running a Java program developed especially to control the PIC ( still under development ). The PIC chip is supplemented with a dual op amp connected as two schmidt triggers, there is of course a stepper motor.
 +
 +
  
  
Line 38: Line 40:
  
  
Parts  -- this is not up to date, working on it, but mostly correct.
+
Parts  -- this is not up to date, working on it
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 261: Line 263:
 
Rotary Encoder
 
Rotary Encoder
 
http://www.webx.dk/oz2cpu/20m/encoder.htm
 
http://www.webx.dk/oz2cpu/20m/encoder.htm
 
[http://home.clear.net.nz/pages/joecolquitt/stepper_as_encoder.html  Stepper Motor As Rotary Encoder]
 
 
[http://www.instructables.com/id/HDDJ_Turning_an_old_hard_disk_drive_into_a_rotary/ HDDJ: Turning an old hard disk drive into a rotary input device]
 
  
 
Using a disk drive motor as encoder:
 
Using a disk drive motor as encoder:
 
Inexpensive rotary encoder
 
Inexpensive rotary encoder
 
http://users.tkk.fi/~jwagner/electr/rotary-enc/
 
http://users.tkk.fi/~jwagner/electr/rotary-enc/
 
[http://home.clear.net.nz/pages/joecolquitt/stepper_as_encoder.html Stepper Motor As Rotary Encoder]  seems to be same as [http://www.piclist.com/techref/io/sensor/pos/enc/stepper_as_encoder.htm Stepper Motor As Rotary Encoder] this seems to give a nice trick to greatly improve the sensitivity of the motor as encoder.  Might want to try this.
 
  
 
Info on steppers:
 
Info on steppers:
Line 279: Line 275:
 
Stepper motors  
 
Stepper motors  
 
http://www.allaboutcircuits.com/vol_2/chpt_13/5.html
 
http://www.allaboutcircuits.com/vol_2/chpt_13/5.html
 
Rotary Encoders
 
http://www.ubasics.com/adam/electronics/doc/rotryenc.shtml
 
  
 
More info on steppers:
 
More info on steppers:
Line 294: Line 287:
 
SourceBoost Technologies
 
SourceBoost Technologies
 
http://www.sourceboost.com/
 
http://www.sourceboost.com/
 +
 +
  
 
== Download ==
 
== Download ==
  
At: [http://home.comcast.net/~russ_hensel/OC/StepperTest_v1.zip Version 1 zip file: StepperTest_v1.zip]  To check for more recent versions email me: [[russ_hensel]]
+
pending, not at: [http://home.comcast.net/~russ_hensel/OC/StepperTest_v1.zip Version 1 zip file: StepperTest_v1.zip]
  
 
== Comment, Questions, Contributions? ==
 
== Comment, Questions, Contributions? ==

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)