Pages: [1]   Go Down
Author Topic: How do I select a microcontroller?  (Read 688 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
// no comment
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
« Last Edit: May 26, 2013, 05:59:54 pm by wherewolfe » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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/
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 27
// no comment
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Offline Offline
Newbie
*
Karma: 0
Posts: 27
// no comment
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Check here for needed cores
http://www.avr-developers.com/
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 27
// no comment
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: