Robotics Projects

After building the Dust Detector and discovering Raspberry pi and Arduino, I ran across a lot of info about hobby robotics.   Betty and I had been wondering about getting some toys for our great grands, since they were getting older and what we had were for small children.   I thought one of the simpler robot cars would be interesting to them, so ...  

When I started the first project (Avoidance Car), I didn't know anything about hobby robotics, so I bought several different types of actuators (DC Motor, Stepper, and Servo) along with driver boards and an extra Arduino Uno, installed the IDE (uses gcc as cross compiler) on my Ubuntu work station and began learning about actuators, drivers, Arduinos in general, and Arduino PWM.   I had had a thought, earlier, about possibly making some animated Christmas decorations and this robotics fits the bill perfectly.   I was surprised about how inexpensive robotics parts are: a robot arm servo is about $5.50 an Arduino Uno is about $15, the driver boards and breakout boards are cheap also.  
If I were to build another of these I would give some thought to putting the batteries directly above the drive motor axle to provide more traction.   You would still need to keep the car balanced (only 3 wheels) and some weight on he back caster.  

The coding is a combination of C and C++ so that wasn't a problem, I just needed to get familiar with some of their libraries.    

After spending a little time searching the web, I ran across maze solving (micromouse and half size micromouse) and line following cars.   These things are really keen.   I am especially intrigued buy the various algorithms for solving mazes both wall and line.      

Test Setup

My test setup on the typewriter shelf of my desk.   Note the board on the left with a small breadboard and the Arduino Uno, the drivers in front, and the actuators back right.



Closer look at the Arduino Uno R3 I use for all the actuator tests.  



Drivers

The L298 Stepper / DcMotor driver.   I use this to drive the TT DcMotor and it'll driver steppers too.   This driver has two H bridges so I can reverse polarity of the DcMotors.



Sensor Shield V5.0: isn't actually a driver, it's more of a breakout, but I use it to connect to all the actuators/drivers and, it allows Arduino PWM on all the digital I/O pins.   I use the PWM pins as the enables for the L298 (ENA1, ENA2) for speed control.



The PCA9685 16 channel driver breakout.   You talk to this over IIC, it does 12 bit PWM.   Since it uses IIC, you can talk to it with Arduino or Raspberry pi.



Actuators

There are several types of Actuators: Steppers , Servos, and DcMotors they all come in a wide variety of sizes and torques.  
Steppers come in a wide varity of torques and directions.   Unipolar steppers only go in one direction, they have 5 wire connectors.   Bipolar steppers go both directions, they have 4 wire connectors (no ground).
Servos are smart motors, you give them a pulse on their control wire and the width tells them what angle to go to and they immediately go to that angle.   Steppers usually only rotate 180°, but thats OK for things that emulate human movements, since most of our joints don't usually go farther than that.   Us humans are smarter than the average bear, when we need to turn more than 180° we use more than one joint.
DcMotors are simpler, they will go either direction but you have to reverse the polarity of their two leads.   PWM (Pulse Width Modulation) is used to control DcMotor's speed.

This is a NEMA 17 Bipolar Stepper, it'll go both directions and has a lot of torque.  



The MG996 (on left) is a popular servo for robot arms and such.   Blue SG90, right low.



This is the SG90 servo, a small servo, it is used in the Avoidance Car to turn the distance sensor from side to side.  



This TT is a DcMotor, this was used as the driver motors in the Avoidance Car.   PWM can be used to control speed, polarity controls direction.