Saturday, November 08, 2014

Robot Kits for CoderDojo Labs

For a few months our CoderDojo project in Minnesota had access to several finch robots.  These were wonderful introductory systems with many different programming languages (C, JavaScript, Python, Snap, etc.), however they were expensive (about $100), and lacked extensibility.  There was no way to enhance the robots with new sensors or change the motors.  They were theather by the USB which limited their motion.  And in an ironic twist of fate, we found the finch robots simply can't evolve with our kids as they learn and grow.

The SparkFun Inventor's Kit that we use in our current Arduino labs do have the basics for robot control.  There are labs for controlling a servo and a useful one-way rotation motor lab.  However the kit does not have a basic H-bridge lab so I often bring some basic L293D chips and have the kids google "L239D Arduino" and show them this page which has a nice lab on the Instructables site.  In this lab they learn how to make a motor turn both forward and backward, a key skill for controlling the robot motion.

Working with kids, I know how important it is to keep them motivated to lean more and find the hooks that keep them interested and want to come back for more.  So I have taken it upon myself to try to replace the finch robots with an more open and cost effective platform. 

Here are some of my selection criteria.
  1. Extend the current CoderDojo Arduino Labs
  2. Use the same Arduino IDE to program the robot (more on this later)
  3. Keep the total price under $100 and under $75 if possible
In doing my research I came across the book "Make an Arduino-Controlled Robot" by Michael Margolis.   This book which has a list price of around $25 (Amazon has it for $17) has most of the things that we are looking for.  Low cost and extensibility.  The book is not perfect (see the support questions) and does have examples from an older version of a motor shield from Adafruit.  We hope a revised version comes out soon.  However, the book does have some good ideas and we have a good general instructors guide to start with.

The next step is to find a basic robot kit for a reasonable price.  I came across a kit on ebay called UNO R3 2WD smarter Car Speed Encoder L298N HC-SR04 Sensor Kit Robot for Arduino that lists for $47.99:

Here are the parts that the kit comes with:

1 Car chassis
2 x Gear motor, tire, encoders
1 Universal wheel
1 Battery box (batteries not included)
1 BUONO UNO R3  
1 L298N Motor Driver        
1 HC-SR04 Ultrasonic Ranging Sensor    
1 Sensor Kit V05    
1 female to female cable
1 male to female cable
1 male to male cable

I should also note that the motor drive is a bit different then the Adafruit driver.  The L297N we can get for about $5.00 on eBay.  The Adafruit version 2 motor shield is about $20.00 + shipping.

I have one of these kits on order and I will see how it goes to get it working.  I think the key is that the kits are reasonably priced and barring any barring any integration issues we should be able to use the parts to get us started on the basic forward, reverse, turn left and turn right labs.  Getting all the sensors the to work will still require some work on our part.  And if we get approval to purchase the kits I would want to get at least five of the mentors some training on how to use them.  We will also need to purchase four, AA batteries for each of the robots.

I should also mention that I asked everyone at the Arduino.mn meeting for suggestion and I got many of them.  There are many more options for kits from sites like DFRobot.   There are literally 100s of kits and options in the $100 to $200 range. The basic Arduino Robot from Radio Shack runs for $274.00.  However none of them really seem to have better value for parts then the basic ebay kit listed above.

Many people suggested that kids would love to "drive" their robots with a bluetooth remote control.  One person told me that the IR remotes were too hard to use since you had to stand in front of the robot to get them to work.  These are all options that we can evolve into once we have the robot platforms picked out.

IDEs, Robots and the Limitations of the Arduino

I should also mention that many of the limitations on getting the robots to work is the noise reduction code in the sensors.  Sensors are inherently noisy and the kids really need to master the art of cleaning up the noise in their code to get the robots to perform.

The Arduino Integrated Development Environment (IDE) has a limited ability for the kids to see the actual signal from the sensors.  Which is sad.  Putting a simple graph option in the serial log should be about two pages of Java code.  The students can print the values of the sensors on the serial port, but their is no way to graph them and see the noise levels.  The lack of plugins for the IDE really make it limited, something the Eclipse team learned many years ago.

My friend, Eric Palmer, is also looking into a better "Universal IDE" called, wait for it...The Universal Embedded Computing IDE or the UECIDE.  This IDE will work with both the basic inexpensive Arduino chips as well as the newer and MUCH more powerful mbed chips. 

Since the Arduino chips really are somewhat limited in terms of memory and speed, many of the advanced robotics labs may need to leave the safe world of Arduino and use one of the much more powerful and low-cost MBED chips.  The ARM chips are 6x faster and have 16x the memory as well as options for built-in bluetooth and WiFi.   Here is a nice article on a comparison.

Eric has also mentioned that he is building a popular "self balancing robot" using the mbed processor.  These robots are great ways to teach robot control and dynamic feedback. They demonstrate how to apply both derivatives and integral that we teach in typical freshman Calculus classes.  This is something that our little Arduino may not able to do. If we want to do self balancing robots we need to take our Arduino training wheels off (literally) and move to a better IDE and a faster board.  However our platforms should still be useable with this software and hardware.

Although this IDE is much more "Eclipse" like, I did get it to run the blink lab in about 5 minutes.  So the setup is not too much more difficult.

No comments: