How do I select a microcontroller?


I am trying to create a circuitboard to put into my hex bug spider. I'm not exactly sure how to select a microcontroller, so I need some help. Here are the things I need to control with it:

  • A dual H-bridge
  • A couple of LEDs
  • An ultrasound ping))) sensor
  • And a couple of pins left over

The microcontroller needs to be able to be programmed by my Arduino UNO and it needs to be as small as possible. Can anyone tell me the best kind of microcontroller to buy?

I'm not really sure if this is enough to specify what I need, so if anyone needs additional information, please let me know. Thanks!

EDIT: oh yeah, and I will be supplying the board with around 4.5 V, and my program will need the Arduino's motor library, so I should need a fair amount of memory from a microcontroller of that size. ("that size" being approximately a 3x4 or 4x5 rectangle on a breadboard)

You looking for a surface mount little breakout board? I show a couple here, one to take 32 pin '328P type parts and one to take 44 pin '1284P type parts.

Unfortunately, I don't think I'm looking for a breakout board. I am actually looking for advice on selecting a microchip itself, such as the ATmegas or ATtinys. I want to know which model to buy to use in creating my board.

Figure out how many pins each one of your devices use, specifically the sensor and bridge. How do you plan on driving the LEDs? One pin per LED? Or an IC that can drive multiple LEDs? Either way, you have to figure out how many that needs as well. Then decide what else you need and go from there.

The other thing to determine is memory: the ATTiny series have a smaller memory space than the ATMega series. That's not to say you couldn't fit all of your code on an ATtiny167 which has 16K of flash memory (20 pins, 16MHz). Or even an ATTiny88 which has 8K of flash memory (32 pins, 12MHz).

Better to you can go with Atmega328 controller. you will more support and more libraries.

Visit :

Thanks for the help, guys.

I think I will go with either the ATtiny167 that kirash suggested - 20 pins and 16K should probably be all I need. However, I would like it to fit on a breadboard for me to program it with the UNO, which brings me to my next problem: can any of these be programmed by the Arduino UNO?


That's the next issue: the Arduino IDE only supports a specific set of ATMegas and no ATTinys. You will have to download and install the tiny-core and check for support for the 167 (I don't remember if it had it off the top of my head.) And I program those using Atmel Studio so ...

Check here for needed cores

Sorry if this is a noobie question, but what is a core?

This may not be totally technically correct, but I think of them as the set of files that basically translate the instruction set for a particular chip into the C/C++ that the compiler recognizes.