This is the first of a multi-part series on how to build a simple robot. I will not be covering a lot of theory but instead will cover the nuts and bolts of building a robot. In this first instalment I will cover some of the different options in building this robot.
You have several options for the base material.
You can use wheels from toys or you can buy wheels from a hobby shop they have pneumatic or foam wheels for model aircraft that are very easy to use.
Batteries You will need to decide what type of batteries to use. It can quickly become very expensive replacing batteries. Rechargeable batteries are best; there are a number of different types to choose from. Electronic supply stores or Hobby shops are good places to look, you will need batteries and a charger to charge them with.
Power supply We will need a voltage regulator to drop the voltage from the battery to the 5 volts needed by the Microcontroller and other parts of the Brain for the robot.
I will cover using two different voltage regulators both are available FREE from National Semiconductor as samples. Each part has its good and bad points:
LM2825 Integrated Power Supply 1A DC-DC Converter is a complete switching power supply on a 24 pin DIP although a little large it requires no other components and has an efficiency of 80%. It does require at least 7 volts on the input but your batteries will last much longer than with a linear regulator.
LM2940 1A Low Dropout Regulator is a linear regulator in a TO 220 package it requires a couple of filter capacitors it is not as efficient as the LM2825 the big up point is it only requires 5.5 volts input to give a regulated 5 volts out.
For the brain, lets have a look at three different microcontroller’s. I will admit I am bias when it comes to Basic Micro products as I have been using them for quit a while now and have always been very happy with the products and the support.
You can also buy the Atom28 28 Pin Interpreter Chip and build it up on a solderless bread board.
Basic Stamp from Parrallax the old workhorse of the list has a well-established base of users and resources. Their educational resources are outstanding and nothing else really compares they have texts on Robotics, Earth Measurements, Industrial Control, and more.
PIC16F876 Programmed with Mbasic compiler also from Basic Micro version 5.0 is basically syntax compatible with the Atom most of the differences being pin designations with Mbasic you can use any one of a number of PIC Micros. I will provide a hex file of the program so that those who don’t want to buy a compiler at this time can still build the robot. I will have PIC16F876 chips programmed with a boot loader available to those who don’t have the ability to program pic’s you can download the ISP-PRO Programmer software Ver 184.108.40.206 from Basic Micro to program the chips using the boot loader. If you purchase an ISP-PRO you can make all the boot loader chips you want for free.
Any of the micro controllers above are a good choice so which should you choose? I personally like the Atom it is superior to the Basic Stamp. Below are the prices for both the module and the development kit with module for each. Though you don’t have to buy the development kit it will make the project much simpler and really is money well spent.
You could also just buy the module and a solderless breadboard or piece of perf board to build on instead of a development board and save a little money.
A third choice is to buy a Basic compiler; I will be using Basic Micro’s 2840 Combo w/ Pro Compiler. This development board lets you use either 28 or 40 pin PIC’s. I will be using the 5.0 beta Version of the Mbasic compiler which is still in beta the current version is 4.0.3 but the 5.0 should be available by the time we start the programming and updates are free.
Below are some things that make the Atom or Mbasic compiler far superior to the Basic stamp they are speed, Basic interrupts, and hardware pulse width modulation.
The first speed is obvious; you can’t have too much speed. The second Basic interrupts we will use by connecting whiskers so they generate an interrupt if something is bumped and the program will jump to a subroutine that will determine the correct course of action and after it completes that returning to continue the program from where it was when the interrupt was generated.
The third hardware pulse width modulation will really shine if you use gear motors instead of servos. With the Basic Stamp we will just be able to turn the motors on at one speed because we have other things to do. We will not be able to do variable speed but the Atom or a PIC16F876 both have 2 hardware pulse width modulation channels which means we can set the pulse width and it continues until we change or stop it which will give us variable speed.
For gear motors we can use the same HPWM command on the Atom to get a variable speed. The Basic stamp has a PWM command but it is done with software and the Stamp cannot do anything else so it is not really usable for variable motor speed because we will not get smooth movement so all we can do is turn the motor on full speed
We will use infrared obstacle avoidance and bump sensors we will use the PNA4612M it is easy to use and inexpensive you could substitute the infrared detection module from Radio
Shack. So what will you need to complete a robot as described in this series of articles? Material for a base a piece of material 8″ x 8″ will be more than enough.
In short, you will need: