View unanswered posts | View active topics It is currently Tue Sep 22, 2020 5:21 pm

Reply to topic  [ 2 posts ] 
How to Adjust the Motor Power as the Battery Level Decreases 
Author Message

Joined: Fri Oct 17, 2014 11:55 pm
Posts: 1
Post How to Adjust the Motor Power as the Battery Level Decreases
My team has an autonomous which works the best when our battery level is close to full. However, we can never guarantee the success of the autonomous as our accuracy is decreased when the speed of the motor decreases due to a lower battery level. If the max battery level is around 8000, is there a way to program our code so that when the battery level is around, say, 5000, the motors go at the same pace as when the battery is at full power? Thanks!

Sun Jan 18, 2015 9:42 pm

Joined: Wed Feb 24, 2010 11:51 pm
Posts: 31
Post Re: How to Adjust the Motor Power as the Battery Level Decre
It sounds like what you want to do is have your autonomous specify the motor speeds instead of the motor power.

To do this, the autonomous script should never set the motor power directly. Instead, it can request motor speeds similar to how it requests power now, but a separate task monitors the speed requests and then controls the actual power to achieve the desired speed.

The parts of the system required to make this work:
- Each drive motor needs to have an encoder. The big red encoder or the IME will work for this.
- Create a task in the software that watches the current motor speed (how fast the encoder is changing) and varies the motor power to get the correct speed. There are plenty of examples online for speed control algorithms.


Vex & FLL Coach and robotics instructor

Mon Jan 19, 2015 2:41 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.