BOE Shield FAQ
Moderators: adafruit_support_bill, adafruit

BOE Shield FAQ

by thoughtfix on Wed Mar 21, 2012 6:10 pm

Hey forum folk.

I have a BOE Shield kit and am going to try to post some answers to some of the questions I've been seeing around. Perhaps this post will be useful to others:

- Which Arduino controllers are compatible? The last-generation Uno is a perfect fit. The current Uno R3 will fit as well though the "new pins" will not be used. The Mega will fit as well, but none of the additional Mega pins are broken out through the stackable headers. With great care, it's possible to build a ribbon cable to move these pins to a usable location. I haven't yet tried other boards but know that many inexpensive boards do not include independent voltage regulating hardware.

- Which shields are compatible? - As a robot, the shield defaults to using pins 12 and 13 for servos. These pins are broken out to servo headers next to the mini proto board. Next to these pins are servo headers for pins 10 and 11 as well. The default software can be modified to use those pins as the motors or as additional servos for other functions. As long as your shield does not require additional power and doesn't use more than two pins between 10 and 13, it should be compatible.

- I already have a Propeller BOE-Bot. How do I switch to Arduino? - Parallax sells the BOE Shield in a standalone kit from their site - approx. US $30.

- It includes a AA power pack. What other options are available? - The spec sheet for the shield says it supports 7-12V DC through the Arduino VIN. Since the only plug going into the robot is through the Arduino board, make sure your power is within your Arduino board's spec.

- Won't the Arduino fall out? - Nope. The kit comes with nylon spacers to hold the Arduino in (though they aren't visible in most of the tutorials)

Those are the questions I've seen floating around and in other forums. If I see more, I'll expand this.
---Daniel Gentleman
Open source projects: http://thoughtfix.com
thoughtfix
 
Posts: 67
Joined: Mon May 23, 2011 2:44 pm

Re: BOE Shield FAQ

by thoughtfix on Wed Mar 21, 2012 8:25 pm

Differences between the installation manual and reality:

http://learn.parallax.com/ShieldSetup
It's VERY difficult to use the nylon spacer near the mounting header by the AREF pin. I skipped using the spacer and just used the screw and nut - tightening it until it felt snug.

Between ShieldSetup and building your robot, it actually IS important to do the servo centering. Both of the servos I got were not centered.

http://learn.parallax.com/node/194
The 1" aluminum standoffs and screws aren't attached to the shield when it is shipped. The instructions are there for people who followed the introduction course and mounted the shield before the
In the same bag, there are two lengths of screws and all fit the standoffs. USE THE SHORT SCREWS FOR THE STANDOFFS. The long screws are needed to mount the servos.

Tires: Annoying!

Spare parts: All bolts are used. Two spare "tire" rubber bands are included. I don't know how, but I also had two long screws, two short risers, and two nylon washers left over as well. **EDIT** The long screws, risers, and washers are used for the whisker kit.

Example sketch notes:
Many of the example sketches run all the code in void setup() so they only run once and stop. This means the servo test code will only run once. If your power switch is in the wrong position and you start the test, hit the reset button and see if it runs.

That's it so far. More to come.
---Daniel Gentleman
Open source projects: http://thoughtfix.com
thoughtfix
 
Posts: 67
Joined: Mon May 23, 2011 2:44 pm

Re: BOE Shield FAQ

by thoughtfix on Thu Mar 22, 2012 12:46 pm

Tips:
- When running whisker tests, make sure the power switch on the board is at 1, not 0. The power won't carry from the Arduino to the power headers otherwise.

- When the power on the shield is set to 0, the Arduino is still pulling power from the batteries. It does not shut off the controller: only the shield.
---Daniel Gentleman
Open source projects: http://thoughtfix.com
thoughtfix
 
Posts: 67
Joined: Mon May 23, 2011 2:44 pm

Re: BOE Shield FAQ

by thoughtfix on Mon Apr 16, 2012 7:28 pm

Navigating with a Ping))) sensor on a servo example code posted:

http://thoughtfix.com/blog/2012/3/25/arduino-boe-shield-ping-and-a-servo.html

Also below:
Code: Select all | TOGGLE FULL SIZE
// BOE Shield code from "Robotics with the BOE Bot"
// Roaming With Whiskers source, modified to use a PING)))
// sensor on the PING))) servo bracket.
// Using code from the Ping))) example sketch.
#include <Servo.h>                           // Include servo library
Servo servoLeft;                             // Declare left, right and Ping))) servos
Servo servoRight;
Servo PingServo;
int minSafeDist = 11 ;                        // Minimum distance in inches
int pingPin = 10;                             // PING input on 10 so the last servo port is used.
int centerDist, leftDist, rightDist;          // Define distance variables
long duration, inches, cm;                    // Define variables for Ping)))
void setup()                                 // Built-in initialization block
{
  tone(4, 3000, 1000);                       // Play tone for 1 second
  delay(1000);                               // Delay to finish tone
  servoLeft.attach(13);                      // Attach left signal to pin 13
  servoRight.attach(12);                     // Attach right signal to pin 12
  PingServo.attach(11);

void loop(){
  LookAhead();
  if(inches >= minSafeDist) /* If the inches in front of an object is greater than or equal to the minimum safe distance (11 inches), react*/
  {
    forward (121); //Go Forward
    delay(110); // Wait 0.11 seconds
  }
  else // If not:
  {
    servoLeft.writeMicroseconds(1500);
    servoRight.writeMicroseconds(1500);
    LookAround(); // Check your surroundings for best route
    if(rightDist > leftDist) // If the right distance is greater than the left distance , turn right
    {
      turnRight (250); // Turn Right     
    }
    else if (leftDist > rightDist) // If the left distance is greater than the right distance , turn left
    {
      turnLeft (250); // Turn Left
    }
    else
    {
      backward (250); // Go Backward
    }
    delay (250);
  }
}
void forward(int time)                       // Forward function
{
  servoLeft.writeMicroseconds(1700);         // Left wheel counterclockwise
  servoRight.writeMicroseconds(1300);        // Right wheel clockwise
  delay(time);                               // Maneuver for time ms
}
void turnLeft(int time)                      // Left turn function
{
  servoLeft.writeMicroseconds(1300);         // Left wheel clockwise
  servoRight.writeMicroseconds(1300);        // Right wheel clockwise
  delay(time);                               // Maneuver for time ms
}
void turnRight(int time)                     // Right turn function
{
  servoLeft.writeMicroseconds(1700);         // Left wheel counterclockwise
  servoRight.writeMicroseconds(1700);        // Right wheel counterclockwise
  delay(time);                               // Maneuver for time ms
}
void backward(int time)                      // Backward function
{
  servoLeft.writeMicroseconds(1300);         // Left wheel clockwise
  servoRight.writeMicroseconds(1700);        // Right wheel counterclockwise
  delay(time);                               // Maneuver for time ms
}
unsigned long ping() {
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW); //Send a low pulse
  delayMicroseconds(2); // wait for two microseconds
  digitalWrite(pingPin, HIGH); // Send a high pulse
  delayMicroseconds(5); // wait for 5 micro seconds
  digitalWrite(pingPin, LOW); // send a low pulse
  pinMode(pingPin,INPUT); // switch the Pingpin to input
  duration = pulseIn(pingPin, HIGH); //listen for echo
  /*Convert micro seconds to Inches
   -------------------------------------*/
  cm = microsecondsToCentimeters(duration);
  inches = microsecondsToInches(duration);
}
long microsecondsToInches(long microseconds) // converts time to a distance
{
  return microseconds / 74 / 2;
}
long microsecondsToCentimeters(long microseconds) // converts time to a distance
{
  return microseconds / 29 / 2;
}
void LookAhead() {
  PingServo.write(90);// angle to look forward
  delay(175); // wait 0.175 seconds
  ping();
}
void LookAround(){
  PingServo.write(20); // 20° angle
  delay(320); // wait 0.32 seconds
  ping();
  rightDist = inches; //get the right distance
  PingServo.write(160); // look to the other side
  delay(620); // wait 0.62 seconds
  ping();
  leftDist = inches; // get the left distance
  PingServo.write(90); // 90° angle
  delay(275); // wait 0.275 seconds
}
---Daniel Gentleman
Open source projects: http://thoughtfix.com
thoughtfix
 
Posts: 67
Joined: Mon May 23, 2011 2:44 pm

Re: BOE Shield FAQ

by peter.sayer on Fri Nov 02, 2012 7:07 am

There have been a few new Arduinos launched since this thread was started.

Anyone know whether the new Arduino Due is compatible with the BOE Bot shield?
peter.sayer
 
Posts: 2
Joined: Fri Nov 02, 2012 7:05 am

Re: BOE Shield FAQ

by adafruit_support_bill on Fri Nov 02, 2012 8:11 am

We don't have any of the Due in-house yet. But they are 3.3v devices, so you will likely need to do some level-shifting if you have any 5v logic attached to the shield.
User avatar
adafruit_support_bill
 
Posts: 29814
Joined: Sat Feb 07, 2009 9:11 am

Re: BOE Shield FAQ

by peter.sayer on Thu Nov 15, 2012 8:16 am

Thanks. I had noted from reading the specs of the Arduino Due that it was a 3.3V board, which is what prompted my question.

Closer inspection of the photos in the extremely limited Boe Bot documentation at http://www.parallax.com/Portals/0/Downl ... d-v1.2.pdf suggests there is no 5V logic on the Boe Bot board, just a stonking great 5V power regulator, a breadboard area and some pass-throughs of the various logic pins (and of the Arduino's power supply pins: the Due has both 3.3V and 5V pass-throughs, even though the processor only runs at 3.3V.)

Most likely, then, simply plugging a naked Boe Bot shield into a Due is not going to harm it.

On the other hand, constructing some of the sample circuits in the Boe Bot tutorials at http://learn.parallax.com/ShieldRobot on the shield's breadboard may cause problems for the Due (too much voltage from sensors or too much current draw from servos) or the Boe Bot (insufficient voltage or current for correct operation of sensors or servos) so if I buy one, I will have to think carefully before applying power.

If anyone else tries this out before I get around to it, I'd be delighted to hear about your experiments and experience.
peter.sayer
 
Posts: 2
Joined: Fri Nov 02, 2012 7:05 am

Re: BOE Shield FAQ

by Syn7 on Mon Dec 31, 2012 11:17 pm

Why is the Due only 3.3V? Just trying to be more efficient? I like the 3.3 and 5V choice on the Uno. Aside from battery life, is there any reason why I would want only 3.3 on a protodevice?
Syn7
 
Posts: 152
Joined: Sat Nov 17, 2012 2:06 am

Re: BOE Shield FAQ

by adafruit_support_bill on Tue Jan 01, 2013 7:03 am

A lot of the newer controllers are 3.3v and there are many 3.3v sensors and peripherals out there too. 3.3v uses less power overall and makes it easy to power the whole circuit directly from a single LiPo cell.
User avatar
adafruit_support_bill
 
Posts: 29814
Joined: Sat Feb 07, 2009 9:11 am