Showing posts with label arrbot. Show all posts
Showing posts with label arrbot. Show all posts

Sunday, September 7, 2014

ArrBot Rally Day!

 We got to the end of the ArrBot class, and 6 ArrBots showed up for the rally!  Sadly, a seventh ArrBot was stuck in a meeting with its driver.

I'm really pleased with how everybody did.  We started off with a soldering class, raw plastic for the 3D printer, the literally cheapest parts we could find on the internet, and a partially finished prototype.

We printed the bodies, modified cheap 9 gram servos into continuous rotation units for power, and worked through some pretty tricky electrical problems.  Everybody make prints and modified the servos.  Most were able to run the tread test program.  There's a few that just need some radio work (much easier now that we've had a couple of successful units under our belt!), and that should be ready in the next week or two.

From the class comment forms the students seemed to like everything as well.  The hardest parts were the servo modification (honestly, a pretty challenging task with that size of servo) and the radio setup.  There was a bit of a time crunch as well.  In future classes we may schedule a class alternating with a lab so that there's no expectation of anybody having to work at home.  We'll also be better on differentiating between 3.3V and 5V requirements.  We needlessly burned some time having to work around that.
We'll continue to work on the ArrBot software.  I think it will be a useful contribution to various two-wheel and two-tread robots.  Some upcoming features:
  • gyro stabilized calibration
  • battle lights
  • onboard sound
  • Bluetooth control
  • ArrLang, the ArrBot robot control language

 We'll also continue to study the radio hardware. There's some interference problems with the Bluetooth, and we had to add a capacitor to the nRF units.

But the end resulting units worked well and were a lot of fun to drive around.  I definitely think that adding RC capabilities to educational robots is the way to go.



Notes to self for next session:

  • get all 3.3V pro mini's.
  • get switchable 3.3V/5V FTDI units instead of the FTDI cables, which were more expensive and not of particularly good quality.
  • get two FTDI units per student for ease of debugging radio communications.  This can be done with the cost savings of eliminating the FTDI cable.
  • get 20mm header pins, as they held into the breadboards much more tightly.
  • have students provide two USB "B" cables for the FTDI connector.
  • get a stock of male and female crimps and covers.
  • have students provide their own wii nunchucks.
  • investigate SMD resistors for servo modification use.


Here's some video of the rally: The first item is trailer-style, the rest are are more traditional EastBay RC style videos. If anybody's an expert at embedding playlists on blogspot please give me a call!



Here's a quick overview of both the ArrBot and ArrMote.




blogodex = {"toc" : "ArrBot", "idx" : ["ArrBot Rally Day", "Robot Class"]};

Monday, September 1, 2014

ArrBot Assembled and Driving with Preliminary Software

 Here's the Phase 1 ArrBot and ArrMote, completed and running.
I put the ArrMote electronics in a box to keep everything tidy. A plastic box  There's a small hole for the Nunchuck wire, providing strain relief for the unit.  The Nunchuck adapter is likewise twist-tied to the Nunchuck Connector.  I think I'll put a switch on the outside... right now you have to open the box and attach the battery to the Pro Mini.  The battery could be smaller, as low as 3.3V.
I did some fiddling with getting the nRF chip a bit tidier.  I ended up using some short servo wires which were just long enough to raise the radio above the other wires.  The 1000uF capacitor is way overkill but I had a bunch sitting around.
 Here's the nRF24L01+.  It is really neat and provides some pretty amazing capabilities considering its $1 price tag!
 I think the Pro Mini 3.3V running at 8MHz is officially my favorite Arduino chip these days.  Be sure and get a 3.3V FTDI cable!

The bracelet treads seem to be holding up pretty well.  If you have a dud bracelet it will separate almost as soon as you start using it.  If that doesn't happen it seems it will keep going for quite a while.







Here it is rolling around!!



blogodex = {"toc" : ["ArrBot", "ArrMote"]};

Thursday, August 21, 2014

Hooking up the ArrMote

Here's how to set up the Arrmote.  Pictures forthcoming!  This page a Work in Progress!

Parts

Base

  • Arduino Pro Mini 3.3
  • Battery, 3.3V - 12V
The Pro Mini should have pins A4 and A5 on the top.
The Pro Mini should have a splitter on VCC, or a "long pin" on VCC.
The Pro Mini can optionally have a "long pin" on GND for ease of connection.

If you have two "long pins" it tidies up the assembly since the Nunchuck can be wired from the top and the nRF24L01+ can be wired from the bottom.

Nunchuck
  • Nunchuck
  • Nunchuck Adapter with header pins
  • 4 wire F-F cable
Radio
  • nRF24L01+
  • 100nF ceramic capacitor
  • 7 wire F-F cable
(tentative) solder the capacitor across GND and 3.3V on the nRF board.

Software Setup


You can start by testing your Nunchuck and Radio as described (here and here, coming).
  • Edit the sketch (name)
  • Modify the radio channel assignment.  If you are in the robotics class, your robot kit has a number.  Use use channel 3*RobotNumber (e.g. robot 1 = channel 3, robot 2 = channel 6, etc).
  • Upload this sketch AND DISCONNECT YOUR FTDI CABLE.

Connections

Attach the Nunchuck to the Pro Mini using the 4 wire cable and Nunchuck Adapter. (details here)
  • "+" : VCC
  • "-"  : GND
  • "d"  : A4 (top, farthest from header)
  • "c"  : A5 (top, closest to header)

    Attach the nRF24L01+ to the Pro Mini  (details here)
    • 1 : GND
    • 2 : VCC
    • 3 : pin 9
    • 4 : pin 10
    • 5 : pin 13
    • 6 : pin 11
    • 7 : pin 12
    • 8 : UNUSED
    Attach the battery to the Pro Mini
    • "+" : RAW
    • "-" : GND
    One the power is attached, your unit should be operational.  (test program tba)

    blogodex = {"toc" : ["ArrBot", "ArrBot Syllabus"], "idx" : ["nRF24L01+", "Nunchuck"]};

    FTDI, VCC, and the Arduino Pro Mini

    This project has been the first one where I've used a 3.3V Pro Mini.  There's some important things to keep in mind regarding power input.
    • Power input on RAW can be 3.3V - 12V.  It will be regulated to 3.3V.  Specifically, VCC will be 3.3V
    • Power input from the FTDI connector is not regulated. If you are using a 5V FTDI connector VCC will be 5V!
    • In general you can get by with using a 5V FTDI cable on a 3.3V Pro Mini.  It's out of spec but is generally accepted as working.
    • You can't use a 5V FTDI if you are powering a 3.3V device from VCC!

    Here's a workaround if you're stuck with a 5V cable and want to use it to power a Mini that has a 3.3V device on VCC.






    Remove the VCC line from the FTDI cable.  Gently lift the plastic tab and the  wire with attached connector will slide out.  If you have an extra single-ping cable protector (take one off a female-female breadboard wire if you've got one) you can insert the VCC connector in there.  You could also use some small heatshrink to cover it.  You could let it go bare, but be careful not to short it out.




    Attach the FTDI cable (minus the removed VCC) to the Pro Mini as usual.  Attach FTDI VCC to Pro Mini RAW.

    Check the voltage on Pro Mini VCC.  It should be 3.3V, regulated by the Pro Mini.





    The Sparkfun product page has this note in the comments:

    Q: Are the rx/tx lines 5V tolerant? I want to know if it is possible to program this with a 5V FTDI board, without needing to get an additional 3.3V FTDI just for this board. 
    A: Yes, the only difference in the 3.3V and 5V Pro Minis is the crystal and the voltage regulator. Since the FTDI bypasses the regulator the only difference is the speed the run at. The ATMega328 is fine at 5V. Keep in mind if you have 3.3V on VCC and 5V on the I/O pins that is technically out of spec (you shouldn't put more than VCC on the I/O pins), but will probably work as well. Keep in mind that the 5V FTDI will put 5V on the VCC line, so make sure you don't have any 3.3V only devices connected when you do this.

    blogodex = {"toc" = ["FTDI", "Arduino"], "idx" = {"ArrBot", "Electronics", "Voltage", "No Hack Too Cheap"]};

    Saturday, August 16, 2014

    ArrBot: Catchup Class

    We inserted an extra class after class 3 to give everybody a chance to catch up.  Here's everybody hard at work.

     The goal was to have these parts ready

    • 3D printed body
    • two working continuous rotation servos
    • Arduino micro
    and get everything assembled.

    Here's a few ArrBots in various states of completion.  This one is running the servo testing program to get the calibration values.
     Servos in place.  You can assemble the drive wheels either before or after they're attached to the servos.
     More servo testing!  Get that right and everything is easy.
     Here's the battery case mounted on the frame.  With this type of battery case you should use the wide body.
     We're using 3M Dual Lock to put everything together.  It snaps together and gives a better fit than Velcro, but just about anything will work if it holds the pieces together.
     Downloading the test drive program.  With all the pieces assembled, you can write an Arduino program to drive the ArrBot around.
     We're using 5V Arduino Pro Micro clones.  That's a mistake.  We'll be swapping them out for 3.3V units so that we can use either a Bluetooth or nRF24L01+ unit.  I think using a Mini is also better, since we're using a Mini in the remote control unit and we already have FTDI cables.
     Getting ready for the next class, attaching the nRF unit.








    blogodex =  {"toc" : "ArrBot", "idx" : "ArrBot Class"};

    Wednesday, August 13, 2014

    ArrBot: nRF24L01+ notes

    Some random notes.  Pay attention to the orientation of this illustration.  The pins are usually on the other side.

                                pins     pin names         arduino connections
     --------------------------------
    | antenna                   2  1 |   (2=VCC,  1=GND)   (2=VCC,    1=GND)
    | antenna                   4  3 |   (4=CS,   3=CE)    (4=pin 10, 3=pin 9)
    | antenna                   6  5 |   (6=MOSI, 5=SCK)   (6=pin 11, 5=pin 13)
    | antenna      crystal      8  7 |   (8=IRQ,  7=MISO)  (8=none,   7=pin 12)

     --------------------------------

    //   1 - GND
    //   2 - VCC 3.3V !!! NOT 5V
    //   3 - CE to Arduino pin 9
    //   4 - CSN to Arduino pin 10
    //   5 - SCK to Arduino pin 13
    //   6 - MOSI to Arduino pin 11
    //   7 - MISO to Arduino pin 12
    //   8 - UNUSED

    Saturday, August 9, 2014

    ArrBot: Downloading and Setting Up the Software

    The ArrBot software lives here. and is zipped up here.

    After you fetch it, you need to install three libraries.  Do this three times in the Arduino IDE:
    • Sketch / Import Library / Add Library
    and select each of these folders in turn.
    • ArrHeader
    • ArrServos
    • ArrNunchuck


    If you're familiar with installing libraries manually, you can just copy those three folders to your Documents/Arduino/library folder.

    Once you have done that, you should be able to build and upload any of the programs in the ArrBot distribution.

    blogodex = {"toc" : "ArrBot", "idx" = "Arduino"};


    Thursday, August 7, 2014

    ArrBot: Class 3 Notes

    Today's class will be a bit more entertaining than the last two classes.  Now that we have the components, we're going to assemble the robots!

    (pictures forthcoming!!)

    You should have prepared for class:
    • Robot body and wheels
    • Two CR servos
    Bring to class:
    • Robotics kit, including the above
    • Soldering stuff
    • Small (but not tiny) phillips screwdriver.  Look at the screws in the servo kit.
    • Sandpaper, medium and fine grit.
    • Hot glue gun, if you have it.  I'll bring some extra hot glue sticks if you don't mind sharing your hot glue gun.
    Building the Robot

    tl;dr: put all the 3D printed parts together and put the battery and breadboard on top.

    Front Wheels

    Fit the front wheels onto the axles.  Most likely they won't fit, and will need to be sanded down.  Even if they do fit, you will want to sand them to make the axle and the interior bearing surface of the wheel as smooth as possible.

    When each front wheel turns smoothly on its axle, use one of the "large" servo screws to attach the wheel to the axle.  You might have to open up the hole in the wheel a bit so that the wheel will turn freely.  Heating the screw a bit will allow it to screw smoothly into the axle.  Tighten the screws so that the wheels don't wobble, but not so tightly that they bind against the wheel.

    Put some dry silicone/teflon lubricant between the axle and the wheel.  Not too much, it gets a bit messy if you use too much.

    Drive Wheels

    The drive wheels come in two pieces.  Take the long servo arm and fit it into the slot.  Press the outside part of the wheel tight so that the servo arm is held firmly in place.  Trim any excess plastic off the servo arm.  Add a bit of hot glue to hold everything together.  The teeth should be centered on the wheel.  Attach the servo arm to the servo with the small screw in the servo package.

    Note that there's a wrong way to put the drive wheels together.  The gears should end up in the middle.  If the gears are touching the side, you've done it wrong.

    Mounting Servos

    You can do this in either of two ways.  If you have some extra screws, you can screw the servo onto the body.  There's a flat surface that will accept the screws.

    You can also just hot glue the servo to the body.  This seems to work fine as well.  Use a thin layer of hot glue, and press it tight with your fingers to ensure a square, tight fit.

    Battery Pack

    Solder or crimp a servo lead onto the battery pack.  Put "+" in the center and "-" on one side.  This will allow you to attach the battery to the breadboard on pins inserted into RAW and GND.

    Make sure your battery pack fits within the ArrBot treads.  If not, hot glue a bit of cardboard or other material the bottom of the breadboard (remove the paper backing covering the adhesive first) so that it clears the treads.

    The Stack

    Pull the paper off of the adhesive on the breadboard.  Put some Dual Lock on the top of robot body, top and bottom of the battery holder, and bottom of the breadboard.  Stack all this up and lock it tight.

    If you don't have Dual Lock, use some Velcro or any other stuff that looks like it might hold everything together.

    The Treads

    Finally, put the treads on the wheels.  Note that there's an indentation on one side of the tread, that should be on the inside and line up with the gear teeth.

    blogodex = {"toc" : ["ArrBot", "ArrBot Syllabus"]};

    Sunday, August 3, 2014

    ArrBot: Dual Servo Calibration

    Here's the process we'll use to calibrate the servos.  In phase 1, we'll do this the simplest way possible. There's two reasons for this:
    • Practically, we're coding the first iteration in a limited amount of time.  Tending towards simplicity is a good thing at this time.
    • For teaching purposes, it's good to have a couple of small single-purpose programs.  Later we'll combine everything into one program and put a cross-platform GUI.
    Measure the Left Servo

    Load the  Basic ArrBot Servo Tester.  There's a couple of values we're trying to find.
    • Find the midpoint where the servo is stopped.  Write down this value as MID.
    • Increase the value until the servo is at its maximum speed. Write down this value as HI.
    • Decrease the value until the servo is at its maximum speed in the other direction.  Write down this value as LO.
    • Calculate SPAN as HI - MID.
    • Hopefully, SPAN = MID - LO as well.  If not, choose the lower balue.

    Measure the Right Servo

    Get MID and SPAN for the right servo as above.

    Write the Calibration Data to the Arduino
    • Grab the Basic Servo Calibrator.
    • Fill in MID and SPAN for the left and right servos.
    • Don't worry about REVERSE.  You may need to set that later.
    • Run the program and the calibration data will be written to the EEPROM.
    • Watch the serial monitor and it will confirm.
    Now we're going to switch things up a bit.  First, we want to start thinking of motor speed in terms of percentage.
    • -100% = maximum speed reverse
    • 0% = full stop
    • 100% = maximum speed forward
    And we want to see if  if the two servos are working well together, i.e. if -100%,0%,100% produces the same speed on both motors.  We'll modify our servo test in two ways:
    • Add a second servo control.  Now we can test the left and right servos at the same time.
    • Change the control values to percentages.

    Assemble the Enhanced Servo Tester

    Start with the ArrBot Servo Tester. Duplicate the connections, so you have this configuration:
    • left servo: RAW, GND, Pin 9
    • right servo: RAW, GND, Pin 10
    This will be the basic ArrBot configuration.

    Test the Two Servos Together

    Run the ArrBot Dual Servo Tester (coming!)  It has the following controls.
    • v -- variable sweep from -100% to 100%
    • c -- set 0%
    • j, k -- subtract, add 1%
    • r -- cycle through channel reversal combinations

    blogodex = {"toc" : ["ArrBot", "ArrBot Syllabus"], "idx" = "Servo Calibration"};

    Thursday, July 31, 2014

    ArrBot: Assembling the Arduinos

    Assemble The Arduino Micro

    Solder the male pins down each long row.
    • Put the pins in the breadboard.
    • Long end of pins go into the breadboard.
    • Line up the Arduino Micro so that it sits on the pins.
    • CPU goes on top.
    Assemble The Arduino Mini

    Solder the male pins down each row.  Same as for the Micro.

    Solder the end pins.
    • Those are the 90 degree pins.
    • They go into the 6 through holes on the short end.
    • Use the helping hands.
    • Flip the board over, the CPU should be on the bottom.
    • The short end of the 90 degree pins should come through the holes.

    ArrBot Parts List

    Here's a cut and paste.  Sorry it's so ugly... I'll clean it up, but I wanted to get the parts available for people following along on the web.


    ArrBot Class 2 Notes

    Today's class will consist of of setting up your Arduino environment, testing the Arduinos we made last time, and making "continous rotation" servos.

    Syllabus: http://eastbay-rc.blogspot.com/2014/07/arrbot-syllabus.html

    Bring:
    • Soldering stuff
    • Laptop computer, if you have it
    • USB "Micro B" cable to fit your Arduino
    • Tiny #000 Phillips screwdriver (fits tiny servo screws), if you have one.
    • Small tweezers, if you have them.
    • Bring extra tools if you have them and don't mind sharing.

    Thursday, July 24, 2014

    ArrBot Class 1 Notes

    Today's class will consist of two activities, 3D printer training and Arduino soldering.

    Notes

    • BRING YOUR SOLDERING IRON AND STUFF
    • Drop your stuff off in Big Art
    • Proceed to the 3D Printer
    • Be sure and sign the signup sheet
    • Pick up your kit
    • Don't be late, we're pressed for time!!
    • some of these notes are specific for this class.  Ignore the ones that don't make sense to you.
    • Syllabus is here: http://eastbay-rc.blogspot.com/2014/07/arrbot-syllabus.html

    Monday, July 21, 2014

    ArrBot: Servo Tester


    When you're ready to modify your servos to be continuous rotation servos, it's important to test the servos at three stages of the work:

    • before you start. Make sure you're starting with a working servo!
    • after you've soldered the two resistors in place, while the case is open.
    • after you've reassembled the case.


    Here's a simple servo tester you can use if you don't have a store-bought tester.  Wiring is simple:

    servo ground (black or brown) to Arduino GND.
    servo power (red) to Arduino RAW.
    servo signal (white or yellow) to Arduino pin 9.

    and then run the ServoTester sketch.


    Once the sketch is downloaded and running, you will need to use Putty (Windows) or screen (Mac) to talk to the program, with commands similar to these.  You will need to set the com port (Windows) or serial device (Mac) appropriately
    • windows:  putty com8 115200
    • mac:      screen /dev/tty.usbmodem1421 115200
    Default operation is to move the servo continuously, but you can also change the specified position manually.  Commands are:
    • v -- variable sweep mode
    • c -- center at 1500
    • j -- subtract one from position
    • k -- add one to position
    • J -- subtract ten from position
    • K -- add ten to position
    blogodex = {"toc" : "ArrBot", "idx" : "Servo  Tester"};

    Thursday, July 17, 2014

    ArrBot Syllabus

    (note)
    The first ArrBot session has been scheduled.  It will tentatively run for 5 2-hour sessions, meeting once per week.  This first session is highly experimental.  If we're crunched for time, we may add an extra class at the end.

    The ArrBoteers and I are working on the first pass of the software, and there's a couple of "known unknowns" along with (I'm sure) a ton of other things we'll discover along the way.  It will be a journey for all of us!

    I'll be revising this as we go along... when we've finished the first session, it should be a somewhat reliable guide as to what can be accomplished by a class in this timeframe.
    (end note)

    Prerequisites
    • Basic Electronic Soldering.  Should be able to solder wires and through-hole.
    • Not required, but familiarity with Arduino is a plus.
    Student Tools
    • Soldering iron
    • #000 screwdriver for servos
    • small screwdriver for wheels
    • side cutters
    • laptop w/ micro USB cable
    Scheduling

    Time is tight, since we have a hard out after two hours.  I will start talking at the top of the hour.  Don't be late!


    Introducing the ArrBot!

    Over the next couple of weeks, you may see the eyes of EastBay RC turn from the skies we love and focus on cute little ground-based vehicles.  That's because I'm getting ready to teach a robotics class, and I'll be blogging all the notes, assignments, etc.  You may have noticed the past couple of big posts have been oriented in this direction.

    What's an ArrBot?

    ArrBot stands for "Autonomous something something Robot", or maybe "Advanced"?  Haven't quite figured that out yet, but we'll bravely solder (get it??) forward anyways.

    The idea is a robot that is:
    • good for education
    • fun
    • attractive
    • cheap
    • has excellent software
    I'm kind of excited about this.  Let me tell you a bit more about each of these goals.


    Saturday, July 12, 2014

    Cheap 2.4GHz Wireless with the nRF24L01

    We'll be using these in the robotics class to make a Wiimote based controller.  Here's a few notes, courtesy of Alonso.


    More to come, but I wanted to get this jotted down.

    blogodex = { "toc" : ["ArrBot", "nRF24L01"]};