Go Down

Topic: How do I select a microcontroller? (Read 789 times) previous topic - next topic

wherewolfe

May 27, 2013, 12:53 am Last Edit: May 27, 2013, 12:59 am by wherewolfe Reason: 1
Hello

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)

CrossRoads

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.
http://www.crossroadsfencing.com/BobuinoRev17/
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

wherewolfe

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.

KirAsh4

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).

irappa

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

Visit : http://www.tenettech.com/category/158/arduino

wherewolfe

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?

Thanks!

KirAsh4

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 ...

CrossRoads

Check here for needed cores
http://www.avr-developers.com/
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

wherewolfe

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

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up