View Single Post
  #11   Spotlight this post!  
Unread 27-02-2014, 08:57
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Help with speed control set up

Because the <=6 test uses absolute value there is a very tiny range .0588v wide where the test will pass.
This is what I forgot before when I did that quick min/max calculation (and I forgot to note that it was absolute value).

Specifically, from the raw sensor readings:
  • 0v to 0.6761v fails the test
  • 0.6762 to 0.735 passes the test
  • 0.736 to 5.0v fails the test
I couldn't get my sensor to hit that tiny range last night and trigger a 0 speed.

I'd suggest positioning your sensor at the min and max of where you want the robot to be, take the sensor readings at both positions, and I wouldn't test for being between those two raw sensor marks. I'd just test for being less than the first one. The way it's setup now, if the robot doesn't stop within the 6" it overshoots the mark and drives away.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 27-02-2014 at 10:18.
Reply With Quote