Microcontroller


There are many, many microcontrollers in the world today.  Some are better than others, chances are pretty good there is one specific to what you want to do.  For the hobbyist things like Stamp, Handyboard and Arduino are appealing since they reduce the total amount of low-level knowledge required.  PIC is another one that is pretty common for the tinkerer, but with a slightly higher learning curve. A new possible platform for fun is the TI MSP430 development kit.  Part of it depends on how hardcore your project is, at the moment I am attempting to do things with the Arduino platform.

Arduino

The arduino is appealing since it is an encapsulated hardware and software platform that is also open-source. It also interfaces with the Processing programming language that I am enamored with at the moment. I am using the Duemilanove version which has the following specs:

Microcontroller ATmega328 (Data sheet)
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB of which 2 KB used by bootloader
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz

Pinout


Interrupts

In order to do fancy stuff I will need to mess with the interrupts.  Check out this site about interrupts.

Connections to Peripherals

To control the double pendulum I would like to interface with two H-bridges and two quadrature decoders.  The current mapping of the pins to the Arduino are as follows:

 Arduino Pin  Arduino Function  Double Pendulum Function
 2  Digital 0 (RX)  
 3  Digital 1 (TX)  
 4  Digital 2  
 5  Digital 3 (PWM)  
 6  Digital 4  
 11  Digital 5 (PWM)  
 12  Digital 6 (PWM)  
 13  Digital 7  Quadrature Serial Select 0
 14  Digital 8  Quadrature Serial Select 1
 15  Digital 9 (PWM)  Drive H-Bridge 0 (31 kHz)
 16  Digital 10 (PWM)  Drive H-Bridge 1 (31 kHz)
 17  Digital 11 (MOSI)  Quadrature Serial Line In
 18  Digital 12 (MISO)  Quadrature Serial Line Out
 19  Digital 13 (SCK)  Quadrature Serial Clock
 23  Analog Input 0  
 24  Analog Input 1  
 25  Analog Input 2  
 26  Analog Input 3  
 27  Analog Input 4  
 28  Analog Input 5  
 7  VCC  
 8  Ground  
 9  Crystal  Quadrature Clock Driver
 10  Crystal  Quadrature Clock Driver

Comments