View Single Post
  #1   Spotlight this post!  
Unread 05-05-2016, 17:10
aphelps231's Avatar
aphelps231 aphelps231 is offline
Andrew Phelps
FRC #1318 (Issaquah Robotics Society)
Team Role: Mechanical
 
Join Date: Mar 2014
Rookie Year: 2012
Location: United States
Posts: 77
aphelps231 has a spectacular aura aboutaphelps231 has a spectacular aura about
Re: Set Motor position with Encoder?

You can't do this without the use of some other kind of sensor, as the encoder value resets to zero when the code is rebooted.

What you could do, and many teams did in the past with Recycle Rush elevators, is use a limit switch that resets the encoder count to zero (wherever the arm is when it hits the switch would theoretically be zero degrees), and use closed loop control to move and hold the arm at a certain number of encoder ticks.

Or if you're always going to be booting the robot up with the arm at zero degrees, you wouldn't even need a limit switch, just a way to reposition it to the same place every time you want to boot or reboot the robot.
__________________

team1318.org

2016: Flight Director, Alliance/Match Strategy
2015: Mechanical Lead
2013-2014: Fabrication

2016: 2x district finalists, Quality, DCMP Entrepreneurship Awards
2015: 3x district winners, Innovation in Control, Creativity, Team Spirit awards
2014: Galileo Division finalists, PNW District Championship winners, 1x district winners, District Chairman's, Innovation in Control, Entrpreneurship awards
2013: Entrepreneurship award
Reply With Quote