View unanswered posts | View active topics It is currently Mon Sep 22, 2014 8:13 am






Reply to topic  [ 4 posts ] 
Battery and Performance? 
Author Message
Rookie

Joined: Fri Oct 26, 2012 2:01 pm
Posts: 6
Post Battery and Performance?
Does the amount of charge effect the overall performance of the code typed. I am having all sorts of issues with the robots. They would not perform as the code was typed. As a last resort I pulled the battery, put a fresh on in and it seemed to slove the problem. Am I asking a non question? Sorry, very new at this.

Thanks for any input.

Josh


Thu Jan 17, 2013 10:13 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 578
Post Re: Battery and Performance?
Depending on how the robot is programmed, battery life can have a definite impact on the robot's performance. This is especially true if the program contains 'move for time' commands:

Code:
motor[motorB] = 100;
motor[motorC] = 100;
wait1MSec(1000);


The reason for this is that the motor[] commands tell the NXT to send a certain power level (not speed value) to the motors. Without going too much into the math behind the numbers, as the battery charge drops the amount of available 'power' that can be sent to the motors drops as well. Thus, you will see a difference in performance between a fresh, newly charged battery and a battery that has been used for a couple of hours.

The best way to circumvent this is to use the NXT motor's built-in encoders to control how many rotations the motors have traveled. These encoders have the advantage of returning the same amount of 'ticks' per revolution no matter what speed or power level the motors are running at. To learn more about the NXT's motors and their built-in encoders, take a look atour wiki page on the subject.

Also, I would suggest taking a look through our video curriculum trainer. It walks you through pretty much everything I've just gone over, plus it can help you learn about programming motors and sensors for the NXT in ROBOTC.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Thu Jan 17, 2013 10:40 am
Profile
Rookie

Joined: Fri Oct 26, 2012 2:01 pm
Posts: 6
Post Re: Battery and Performance?
I understand what you are saying(power of battery can effect time), however my problem was a bit different(my apologies I may not have explained it well).

The robot would not even run the program that the kids typed in. It performed in a completely different manner ie. went straight and made no turns(even though it was programmed to do so). When I changed the batteries it appeard to be ok.

So I guess my question is "can battery performance affect the coding of a program?" I would think not - which leads me to another question...

Thank you again,

Josh


Thu Jan 17, 2013 11:13 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 578
Post Re: Battery and Performance?
Would you be able to post the code using the [code] tags? The battery level shouldn't affect what the robot is told to do by the program, but lower battery levels could make small, low power movements effectively null and void (especially if the motors aren't given enough power to move; I'd have to see the code to confirm this though).

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Thu Jan 17, 2013 12:15 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 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.