Changes and Additions

Obsolete

Well isn’t that always the way, you use a perfectly good part and the company that makes it decides to obsolete the part. The Panasonic PNA4602M has been discontinued so I am searching for a suitable replacement. You can still get the part from different hobby electronic outlets. Parallax is still selling them along with Hobby Engineering and Adafruit Industries. Right now it is looking like the Vishay TSOP34838 is a possible replacement. It has the same pin out as the Panasonic part with lower current requirements. That is a good thing. I am just trying to understand the data sheet as how to work with the part. I wonder if it will have the same issue as the Sharp GP1UX series that I talked about in my last post.

Ring Sensor

I forgot to mention the sensors that detect the edge of the sumo ring. In mini sumo the edge of the ring has a white line around it, while the rest of the ring is black. Most mini sumo robots use IR reflector sensors to detect this white edge to know if they are about to drive out of the ring.  Pololu makes a nice series of sensors they call the QTR sensor. This is the sensor I plan to use as they are inexpensive and easy to get. If I made a circuit board and bought the components to populate the PCBs, it would cost way more than just purchasing the sensors. I forgot these because they are not mounted on the main board, but attach to the front under body of the robot. The board will have headers on it to connect to the QTR sensors.

Odds and Ends

Make:

So I was at a local electronics store yesterday. They happen to have a book section, and what did I notice but “Maker’s Notebook”. It is a cool blue, semi-hard covered notebook. It is blank for you to put all your project notes in. There is a table of contents, numbered project pages that are graph paper, a few pages with basic electronics information, and it has a back pocket with sheets of stickers. I like it because of the page numbering and table of contents. Now I can organize my ideas for the different projects I am working on. With the graph pages I can draw schematics, write notes, even come up with some mechanical design.

This cool little notebook measures about 5 3/4 inches by 8 3/4 inches. For those of you who use the metric system it measures approximately 14 1/2 cm by 23 cm. You can also purchase it from the Make magazine website by clicking the store tab.

Ordering Parts

It may seem like it would be too soon to order any parts for this project, but it is not. I have a good idea what parts I am going to be using, plus I have a list of parts for other projects. I will look over my list and the requirements for the robot brain and try to combine the common parts. This is so I can get a bigger discount on buying in bulk. Think of it this way, if 10 resistors cost me 10 cents and 100 resistors only cost 75 cents, I am going to buy the 100 resistors. I like to have spare parts and extras for other projects. Two of the biggest catalog suppliers are Digikey and Mouser. You can search their websites for all kinds of parts.

I am also planning a purchase from Sparkfun. I am going to get an Arduino Uno, the motor shield, and a prototyping shield. I have not messed around with the Arduino before so I am going to play with one. Later I will write-up posts on the Arduino from a newbies perspective.

Time

Time is fleeting as they say. Hopefully you will bear with me, because of time constraints I cannot post everyday. The reality is I need time to draw the project’s schematics (which can take days if not a week) and prototype/breadboard the circuits to check the functionality. After which comes the board layout (again it can take a week) and don’t get me started on the software. I have some software routines that I will be able to reuse from my first robot brain. I plan to be able to reuse most of the software I write as I try to code the interface to be generic. Then the specific robot implements the interface in its own way. So I just wanted to thank you for your patience.

What is next?

Like I have said before, my next post will be the final design. In reality I can change the design anytime until I have sent the files out to have circuit boards made. In addition I will talk about the schematic capture software I am using and show you the progress on the schematic. I will include a parts list with part numbers and Digikey/Mouser part numbers so you can follow along.

With the limitations of how much storage I am limited too with WordPress.com, I might start linking the pictures from my posts to pictures on a service like Flickr or Picasa Web Album. We will see. Until then have fun.

Brain Design

Microcontroller

Atmel microcontroller atmega328

An Atmel ATmega328 microcontroller

Last time I said I was going to use 2 microcontrollers – a mega328 and a tiny24. If I feel like I am going to run out of code space on the tiny24, I can quickly swap it out for tiny44 or 84. The surface mount vs. through hole debate has morphed into “why not both”. The schematic will be the same for both, just the PCB layout will be different.

Serial Port

Having a USB port would be nice, but it is not a main requirement. Neither is having an RS-232 level serial port. I can get by with a TTL level serial port. I have USB to serial port adapters that provide RS-232 and TTL voltage levels. I will think about these some more.

Driving Motors

motor driver circuit board for an Arduino

Sparkfun Motor Shield

One of the big decisions to make is about a motor driver. The design of my first robot brain had headers to plug-in a motor driver daughter board. Sparkfun makes a motor shield for the Arduino that plugs in as a daughter board. The issue that comes up is how much prototyping space do I want. If I leave off the motor driver circuit, then I leave myself a larger area for prototyping. Then again I could include the motor driver and make a prototype expansion board. Pololu makes the 3pi robot and they offer an expansion board that mounts on top to give you a good-sized prototyping area. The 3pi has a cool look to it when the expansion board is mounted. It is a good idea to give yourself some area to experiment with. I like to add a few LEDs for debugging purposes or other circuitry for more functions.

Pololu 3pi robot with expansion board mounted on top

A Pololu 3pi with expansion board mounted

So if I put the driver circuit on the main board, which motor driver should I use? I can use the old standby chips like the L293D/SN754410, the L298, a pair of LMD18200Ts, or a FAN8200 if I could find them. These are bipolar transistor parts that have a voltage drop and a bit of current draw while conducting. Looking into MOSFET drivers appeals to me for the lower voltage drop and less current wasted while driving motors. I could use something like a TC4427 or more exotic parts from Allegro and Freescale. They make motor driver chips with extra features. I just have to decide which components I want to use. Either way I have decided that like the Pololu 3pi robot, I will have a separate expansion board for prototyping. This way I can plug it in only when I need to and the robot’s main circuit board does not have to change.

So I still have a few more things to think about. Next time I will go through the pros and cons of having the motor driver circuit on the main controller board. I will also post a few more pictures and details on my current mini sumo robots. At some point talking about the software tools will come up. Schematics, PCB layout, and parts lists are going to be required at some point. Check back for the next exciting article, or at the very least better than average.

Programmers and Debuggers – Part 2

Programmers and Debuggers Continued

I am going to finish up with programmers and debuggers this time. I went through the different offerings from Atmel, so now I will focus on other sources. When you start searching for other AVR programmers and debuggers, you tend to find them in three categories: Parallel port interface with resistors only or including a logic chip; Serial port programmers that have a few components; or USB style programmers which tend to have more features. I have also found kits and D.I.Y. schematics for low-cost programmers.

Pololu

Pololu started out with their Orangutan Programmer, which plugged into the USB port and had a 6 pin ISP cable. It was designed for the Orangutan series of robot controllers. This programmer emulated the serial port version of the Atmel AVRISP. Recently Pololu added a newer programmer to its ever-growing list of electronic devices. The new USB AVR Programmer is similar to the original Orangutan programmer, but emulates the AVRISP mkII. One of the other great features is this programmer creates a separate serial port. The serial port is a TTL level serial port you can attach right to the RX and TX pins of your AVR. Then you can send debug messages through the port to any terminal program. It is a nice debugging feature. Pololu also includes an application called Slo-Scope. It is a frequency limited oscilloscope app with A and B channels brought out to solder pads. At the time of this writing, it looks like the Orangutan programmer will be replaced with the USB AVR programmer.

Sparkfun

I could spend several days talking about and explaining Sparkfun’s offerings, but I will not bore you with the details you can look up yourself. Sparkfun has programmers and debuggers that cost from $6 to $90. Some are serial port versions, several use the USB port, and a couple are even ICE (in-circuit emulators). You’ll have to just check them out to see if you find something you like. Just click on this Sparfun Link and it will take you right to the page.

Wright Hobbies

Eddy Wright provides 2 different programmers through his store. The first programmer only comes in kits and is the simplest. It is a parallel port programmer that only uses a few resistors. His second programmer that you can purchase alone is the logic circuit version of the parallel port programmer. The best feature is their low-cost. Take a look at Wright Hobbies and see if either of them would work for you.

Adafruit

Adafruit Industries is a company that is similar to Sparkfun. The real difference is Adafruit is smaller, and Sparkfun sells some of Adafruit’s items. Adafruit carries 2 different programmers. The first is a standard serial port programmer for $7.50. It is just your bare minimum programmer with a couple of resistors. The other unit is a USB programmer they call the USBtinyISP AVR programmer. It is a nice unit, and low-cost at $22. The USBtinyISP is a popular choice along with the Pololu programmer mentioned earlier. The only issue is it is a kit you have to build.

D.I.Y.

Some other choices are do-it-yourself kits and schematics. It is possible to build your own. Electronics-DIY provides schematics and instructions on how to build a programmer. Again, this is just the simple resistor parallel port programmer that others sell. There is not much else to say on this unit, except they do explain how the programmer works.

Research

Type “avr programmer” into your favorite search engine and you will be swamped with programmers. Take a look around and you are bound to find something you’ll like.

Join me next time when we finish this up with different languages and programming environments. See you next time.