Shop OBEX P1 Docs P2 Docs Learn Events
Boe-Bot Questions — Parallax Forums

Boe-Bot Questions

rtmorrisrtmorris Posts: 31
edited 2006-02-21 15:25 in BASIC Stamp
Two quick questions from the boe-bot book..version 2.2:

1)· In the set up instructions for the rev c board of education, the boe bot book says to use the 4
AA battery pack, and set the jumper for the servo header to vin.· If I wanted to use a 9 volt battery instead of the AA battery pack, what should the jumper setting be?·

2)· In the boe-bot book, there is a discussion about computing the time that it takes a for next loop to execute.· Some sample code looks like this:

counter var byte
for counter = 1 to 100
pulsout 12, 650·· '1.7 ms
pulsout 13,850··· '1.3 ms
pause 20··········· '20 ms
next
···"code overhead" 1.6 ms

Total time = 24.6 ms

MY QUESTION:· Now this code is found on pg 83 of boe-bot...I know that 1.6 ms represents the time to execute the for next loop, but on pg 82 a similar loop is shown and it shows only 1.3 ms as the time to execute the loop....I need to know why and how to compute this time to execute the loop, or as the book calls it code overhead.

Thanks,
Rob Morris
·

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-02-21 14:15
    A 'servo' has three pins -- power, control, and ground. Now, a 'servo' is designed to run off of 4.8 to 6 volts (basically 4 NI-CD cells (4 x 1.2 == 4.8), or 4 Alkaline cells (4 x 1.5 == 6). Lately, some servo manufacturers have 'bumped' the specifications on their hardware so they can handle 7.2 volts.

    But 9-volts is bad, it will burn up the Servo electronics or motor or both.

    Now, it also turns out to be helpful, IF you are using 4 alkaline batteries, to run that voltage DIRECTLY to the Servo. That's what setting the jumper to 'Vin' does. The other setting drives the servo with the output of the BOE voltage regulator. Now, the voltage regulator NEVER goes over 5 volts, so that's good if you're using a 9-volt battery. But you do lose some power going through the regulator, which is why the jumper is nice if the Vin voltage is already 6 volts.

    So, short answer: IF your Vin voltage is 5.5 to 7 volts, you can set the jumper for Vin. If it's over 7 volts, set the jumper for Vdd.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-21 15:25
    Rob,

    ·· Calculating overhead isn't an exact science per se.· The examples give show the overhead for that given loop, but the actual totals will depend greatly on what else happens within the loop.· You can get an idea of the time required to perform various tasks at the following web page:

    http://www.emesystems.com/BS2speed.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.