BOE Shield for Arduino from Parallax
Moderators: adafruit_support_bill, adafruit

BOE Shield for Arduino from Parallax

by aristides on Sun Feb 26, 2012 7:42 pm

Hello,

I think this Announcements forum should be the right place for this message, but if it’s not I hope the moderator can relocate it to the right forum.

Parallax customers (teachers) from schools that switched to Arduino have been asking Parallax Education staff for a while about generating some Parallax hardware and documentation that would be compatible with Arduino.

Our answer was the Board of Education Shield for Arduino (or BOE Shield for short). The new BOE Shield was just listed for pre-order and we’re beginning to post material that not only explains how to use the Parallax BOE Shield, but also Arduino in general.
http://www.parallax.com/BOEShield

We will print the “Robotics with the BOE Shield for Arduino” book soon but first will be posting the whole book online (for free access) as it comes available chapter by chapter at learn.parallax.com:
http://learn.parallax.com/ShieldRobot

You can currently access the first chapter of the book which shows an introduction on Arduino and students can follow this chapter with just an Arduino hooked to their PC (they don’t even need any Parallax hardware in Chapter 1).

Adafruit is already setup as Parallax distributor and if Adafruit customers are interested in buying these products I’m sure Adafruit could carry them.

I hope you find this information useful and a good fit and use of your Announcements forum.

Regards,
Ari
Ari Alvarez
Education Manager - Parallax US
President - Parallax Hong Kong
User avatar
aristides
 
Posts: 1
Joined: Sun Feb 26, 2012 7:28 pm

Re: BOE Shield for Arduino from Parallax

by adafruit on Sun Feb 26, 2012 8:09 pm

hey ari!

thanks for the post! we are actually going to carry these VERY soon!

we'll follow up with you via email as well!

cheers,
adafruit support
User avatar
adafruit
 
Posts: 11671
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: BOE Shield for Arduino from Parallax

by jlew13 on Mon Sep 01, 2014 6:07 am

Hello! I recently purchased the Parallax Robotics Shield Kit for Arduino. I am a beginner but bought this kit to familiarize myself with Arduino & robotics in general.

My question is: can the BOE shield be used in conjunction with the Arduino to handle two servos AND a linear actuator? I am building an articulated arm and I am hoping the BOE shield can do the job since I've already got it.

Also, I am looking at this thumb joystick: https://www.sparkfun.com/products/9032

Is it possible to program one servo for up down, and my other servo for left right (like one per pontentiometer) to control both servos with a single joystick?

Being a beginner, I have many questions and I sincerely appreciate your guidance.
jlew13
 
Posts: 5
Joined: Mon Jul 28, 2014 10:29 am

Re: BOE Shield for Arduino from Parallax

by adafruit_support_bill on Mon Sep 01, 2014 6:17 am

My question is: can the BOE shield be used in conjunction with the Arduino to handle two servos AND a linear actuator?

Yes. Assuming that your linear actuator is controlled by servo PWM signals (e.g. the Firgelli actuators with the RC Servo interface)

Is it possible to program one servo for up down, and my other servo for left right (like one per pontentiometer) to control both servos with a single joystick?

I haven't used the joystick you linked, but I assume it is similar to this one: https://www.adafruit.com/product/512
You should be able to connect that to control your 2 servos.
User avatar
adafruit_support_bill
 
Posts: 29192
Joined: Sat Feb 07, 2009 9:11 am

Re: BOE Shield for Arduino from Parallax

by jlew13 on Mon Sep 01, 2014 6:36 am

Thank you, Bill.

Yes, it is an L12 50mm 100:1 Linear Actuator by Firgelli. I am learning about incremental control here: http://learn.robotgeek.com/demo-code/12 ... uator.html

As mentioned, my project also has two standard servos. Do you know of any example code that is close in nature to the control I described (servo 1: up & down, servo 2: left & right of a single analog 2-axis thumb joystick)?

Also, how does one set limits to the servos movement? For example, I only wish for the servos to move + or - 45 degrees from center (my apparatus will not physically support continuous movement).

Sincere thanks.
jlew13
 
Posts: 5
Joined: Mon Jul 28, 2014 10:29 am

Re: BOE Shield for Arduino from Parallax

by adafruit_support_bill on Mon Sep 01, 2014 8:00 am

The "Knob" example from the servo library is a good place to start: http://arduino.cc/en/Tutorial/Knob

Knob uses one potentiometer to control one servo. Since a joystick is simply two potentiometers, you can just replicate the code for the second potentiometer and servo.

In the code you will see a "map" statement like this:
Code: Select all | TOGGLE FULL SIZE
 val = map(val, 0, 1023, 0, 179);

The last two parameters: 0 and 179 define the range of motion of the servo in degrees. To limit the range, just change these values.

Code: Select all | TOGGLE FULL SIZE
// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

#include <Servo.h>
 
Servo myservo;  // create servo object to control a servo
 
int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin
 
void setup()
{
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}
 
void loop()
{
  val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 1023, 0, 179);     // scale it to use it with the servo (value between 0 and 180)
  myservo.write(val);                  // sets the servo position according to the scaled value
  delay(15);                           // waits for the servo to get there
}
User avatar
adafruit_support_bill
 
Posts: 29192
Joined: Sat Feb 07, 2009 9:11 am

Re: BOE Shield for Arduino from Parallax

by jlew13 on Mon Sep 01, 2014 8:21 am

Thank you again - this is excellent.

I understand, to limit my servo range I would change:
val = map(val, 0, 1023, 45, 135); (This is assuming 90 is my baseline/zero position)

Further, how would I control the rate at which the servos move? For example, my articulated arm is purposed to hold a mirror for precision optics. Is there a way to make very fine adjustments - like one degree at a time?

Idea:
val = map(val, 0, 5115, 45, 135); <~Would changing 0,1023 to 0,5115 make the rate at which the potentiometer move 5X slower (making it very user friendly to make fine adjustments)?

I appreciate your patience.
jlew13
 
Posts: 5
Joined: Mon Jul 28, 2014 10:29 am

Re: BOE Shield for Arduino from Parallax

by adafruit_support_bill on Mon Sep 01, 2014 8:34 am

The 0 and 1023 parameters to the map function represent the raw range (10 bits) of the analog input. Changing that would not affect the speed. To control the speed of an RC servo, you have to move it in small increments over time: e.g.:

Code: Select all | TOGGLE FULL SIZE
for(int pos = startPos; pos < endPos; pos++)
{
    servo.write(pos);
    delay(10);  // adjust the delay to control the speed.
}


my articulated arm is purposed to hold a mirror for precision optics.

RC servos may not be your best choice for precision optics. Servo precision varies, but +/- 1 degree is typical. Incremental movement as described above tends to be a little jerky and you will likely have a bit of vibration and jitter even when not moving. You might be better off with a geared stepper, or a gearmotor with an encoder.
https://learn.adafruit.com/adafruit-mot ... tion-guide
User avatar
adafruit_support_bill
 
Posts: 29192
Joined: Sat Feb 07, 2009 9:11 am