Microprocessors, microcontrollers, and other useful hardware and software

C. Alex Simpkins, Jr., Ph.D.

Navigation
HOME
RESEARCH
TEACHING
PAPERS
PROGRAMS AND CODE
RAPID PROTOTYPING
MICROPROCESSORS
PICTURES
GALLERY
CRX
LINKS

 

Here is a list of hardware I often use and some that I have seen used. I'm not going to explain it all, so I give you the name, and you can search the web. You'll come up with links galore. I always find it's just a matter of knowing the name to search for. The door is open, now you may walk through it...

Useful hardware reference index

H-bridges, Relays, MOSFET, FET, Soleniod, optoisolator, led, resistor, capacitor, diode, voltage divider, voltage regulator, decoupling capacitors, lcd, serial to parallel chips, gyro, accelerometer, strain gauge, load cell, tachometer, photodiode, photoresistor, ir emitter-detector, stepper motor, permanent magnet motor, encoder.

Basic Stamp

basic stamp 2

A basic stamp 2 module has everything needed to create many projects quite rapidly. The lack of a built in A to D and timer functionality limits things somewhat, but there are additional circuits and workarounds that make this a great product. At $50, it's a little expensive for large volume projects.

The basic stamp is a type of PIC microprocessor (family) which has been packaged with an easy to learn and use language dubbed PBASIC by its creators, PARALLAX Inc. One writes the program on their Macintosh, Unix or Windows PC then sends the compiled machine language program to the stamp through a serial cable. Users who do not have a serial interface can connect through a USB-serial converter, available from several companies such as Belkin and Kensington.

Parallax has made the necessary libraries to download to the stamp available on their website for free. If you are so inclined, you may write your own program and use their libraries! Happy day!

www.parallax.com

If you are serious about learning how to make use of the stamp, start with the UCSD Mechanical and Aerospace Engineering department's tutorial to orient you, then read the stamp manual, a couple hundred pages. Parallax has many wonderful tutorials and articles on their website. See their nuts and volts section for some useful applications.

 

Useful additional hardware:

Analog to digital conversion

  • LTC1298 for data acquisition of up to two lines per chip. 2 Single ended or 1 differential input
  • ADC0838 - 8 bits, 8 channels.

ULN2803A Darlington Transistor array for buffering the outputs

NTE3094 JFET op amp, high input impedance, low leakage current

There are more inexpensive forms of chips, this is only one possible to get you started.

 

PIC Microcontrollers

pic microcontroolers

PIC microcontrollers come in all sorts of shapes and sizes, and with a variety of internal hardware

I have become quite familiar with PIC microcontrollers, which are made by Microchip Technology. These processors are not quite as easy as basic stamps to get started with, but there are massive amounts of resources to draw on from the web. These resources are ever-increasing. The processors are quite inexpensive, costing as little as a single dollar (or in many cases only pennies for one time programmable ones in quantity). Many have built in data acquisition chips, timers, resonators, and various other interesting features. Generally you need to connect them with a regulated voltage - I've had good luck with L7805's, which regulate 9-24V down to 5V, able to supply up to 1 Amp, which is sufficient for many needs. The best way to select a microprocessor is to go to the website of microchip technology, www.microchip.com. How do you select the right one from the huge list?

  • Consider memory - are you going to write a huge, complex program, or is it relatively simple? Realize program space and RAM are not the same.
  • Consider input/output (I/O) - how many inputs do you need? How many outputs? Do you need to take in analog signals? How many? What about some of the other advanced features?
  • Interested in a processor? Download and read the datasheet. Look on the web and see if you can find someone else who has done what you are doing.
  • Read through any related application notes on the microchip.com site, or find something similar on the web generally

Another difference from basic stamps is the software. The basic stamp is programmed with PBASIC, a similar language to basic with a few additions. The PIC is programmed in assembly, or you can get compilers which will allow you to program in pretty much any language, then compile to a HEX file, which is what the microchip understands. Finally you'll need to download to the chip somehow. You can purchase an off the shelf programmer from microchip technologies, or one of several others. Microchip also has a nice IDE with which you can write your code and compile (you can install third party compilers), and even download to the chip. It is called MPLAB. MPLAB even has a simple software simulator. Since it is written by the company who makes the microchips, you are guaranteed compatibility and updates. You can't get cheaper than free. In addition, you can wire in a line level converter, then add a section into the program called a bootloader. What this does is allow you to send a program to the PIC through serial communication from a PC or another microprocessor, etc. This is similar to what the Basic Stamp is set up to do. If you are developing a device which is going to end up in the field, and you wish to be able to periodically provide updates easily, a bootloader avoids the need for a programmer.

There is a definite learning curve with these as there is much more setup that is needed to use various functions, however that is improving daily. Once you get beyond that these can do a lot. I've implemented everything from small LED controllers to multi-level hierarchical controllers with artificial neural networks. I've created networked vibration controllers that communicate to a computer system for new haptics, created robotic controllers for hands, legs, heads, eyes, arms, legs and more that integrated motor control, sensory feedback, controller implementation, wireless interfaces, serial communication etc, sensor networks, servers (yes you can run a web server on these!), pan-tilt-zoom camera controllers interfacing with a sony visca system. These have all been implemented with PIC microcontrollers. I have of course worked with a wide variety of other microcontrollers and computers, but these examples demonstrate teh versatility of these devices.

 

Arduino

arduino r3

An Arduino Uno R3, one of the early and common boards, still very popular

The arduino is a useful and rapidly expanding open source development platform. It basically uses an open source C compiler which has many pre-written libraries (and many many aftermarket ones as well) designed to simplify the setup and development process. The microcontrollers are Atmel based, but the arduino has been ported to a few platforms now. These microcontrollers don't typically have some of the advanced hardware available in PICs but it's hard to beat when it comes to speed of development. They can be programmed typically over a serial line (they use a bootloader typically preinstalled), and many boards come with a USB-Serial adapter chip built in. Another nice thing about these is you can take many common Atmel chips (many of which are cheap enough for industrial projects) and incorporate them into your PCB design, so the cost can be kept low while benefitting from teh rapid development time.

 

FPGA

Fast programmable gate arrays are an alternative to traditional microcontrollers, and have several advantages - speed and flexibility being two of them. These have a radically different approach to processing than microcontrollers, as they are similarly sized physically, but essentially consist of a matrix of 'gate' switches that can be programmed to take on various functions. In this way you don't purchase a chip with, for example, a hardware serial port. Instead you instantiate that hardware, along with any others you need, then a special programmer sets all the switches as needed internally. As with all things FPGAs have advantages and disadvantages, but being able to select a module and instantiate it with minimal coding is a big advantage. I will add to this section as time permits but it's a fascinating branch of the processing world. I have written a book review for IEEE RAM a few years ago that discusses an introduction to FPGAs and in the meantime you can read about them there.

 

OOPIC (Object-oriented Programmable Integrated Circuit)

The OOPIC is somewhat similar to a basic stamp except that it is less expensive than a stamp and carrier board, generally, and it has a few useful features which differ. The OOPIC has several 8 bit A/D (analog to digital converter) channels, along with a larger number of digital I/O's than a stamp.

The language used to program the OOPIC is object oriented, basically a form of C++. However, at the time of this writing (May 2004) the only objects one can use are those that come as part of the given library of software which comes with the OOPIC. These objects are wired together in a virtual circuit. If this sounds vague, go download their manual and peruse through it. It is a relatively quick read, and can be more thorough than I will be here.