BOE Shield for Arduino from Parallax

Forum announcements

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
aristides
 
Posts: 1
Joined: Sun Feb 26, 2012 8:28 pm

BOE Shield for Arduino from Parallax

Post by aristides »

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

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: BOE Shield for Arduino from Parallax

Post by adafruit »

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

jlew13
 
Posts: 5
Joined: Mon Jul 28, 2014 11:29 am

Re: BOE Shield for Arduino from Parallax

Post by jlew13 »

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.

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: BOE Shield for Arduino from Parallax

Post by adafruit_support_bill »

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.

jlew13
 
Posts: 5
Joined: Mon Jul 28, 2014 11:29 am

Re: BOE Shield for Arduino from Parallax

Post by jlew13 »

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.

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: BOE Shield for Arduino from Parallax

Post by adafruit_support_bill »

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

 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

// 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 
}

jlew13
 
Posts: 5
Joined: Mon Jul 28, 2014 11:29 am

Re: BOE Shield for Arduino from Parallax

Post by jlew13 »

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.

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: BOE Shield for Arduino from Parallax

Post by adafruit_support_bill »

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

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Announcements”