Go Down

Topic: How to choose the chip I need? (Read 11495 times) previous topic - next topic

dave84

Sep 15, 2013, 03:01 pm Last Edit: Sep 15, 2013, 03:05 pm by dave84 Reason: 1
Hi,

I'm new to the whole arduino scene, and electronics in general and could use some advice please.  I've got a couple of simple-ish projects that I would like to switch from the arduino to a more permanent and smaller micro-controller (atmel preferably) but I don't know how to pick which ones are suitable, or overkill etc.

As an example I've got an obstacle avoiding robot that uses 6 digital pins (5 output, 1 input) and 1 analogue pin, the sketch size is 6.5k.  Does that mean I need a chip with a flash memory of 6.5k or less? How do I know the breakdown of a chips pins?  ie: How many are digital, how many are analogue, and how many PWM?  Could somebody recommend me a suitable chip for this robot and explain its attributes please?

e2a: I plan to only use chips I can program with the arduino and then transport into my projects

Many thanks

JChristensen


Hi,

I'm new to the whole arduino scene, and electronics in general and could use some advice please.  I've got a couple of simple-ish projects that I would like to switch from the arduino to a more permanent and smaller micro-controller (atmel preferably) but I don't know how to pick which ones are suitable, or overkill etc.


You don't say which Arduino you are currently using, but the ATmega328P as used in the Uno etc. has a lot to recommend it. It costs a bit more than some of the ATtinys but this hardly makes a difference unless dozens are involved. When you say "smaller", do you mean the physical size of the chip itself, or the entire board?

Quote

As an example I've got an obstacle avoiding robot that uses 6 digital pins (5 output, 1 input) and 1 analogue pin, the sketch size is 6.5k.  Does that mean I need a chip with a flash memory of 6.5k or less?


A chip with more than 6.5K would be needed. An ATtiny84 might work, with 8K of flash, but not much room for growth. An ATtiny85 doesn't have enough pins for your requirements. If it were me, the question I'd be asking is what reasons would I have not to use an ATmega328P?

Quote

How do I know the breakdown of a chips pins?  ie: How many are digital, how many are analogue, and how many PWM?  Could somebody recommend me a suitable chip for this robot and explain its attributes please?


By reading the datasheet. Attributes are summarized on the first page.
ATmega328P et al
ATtiny84 et al
ATtiny85 et al

pito

Quote
..the sketch size is 6.5k.  Does that mean I need a chip with a flash memory of 6.5k or less?

You mean the size of sketch source (the text you see in the IDE), or the compiled binary size?
From the source size you cannot judge on the flash memory required, as a 6.5k source code may create binary of any size..

dave84


You don't say which Arduino you are currently using, but the ATmega328P as used in the Uno etc. has a lot to recommend it. It costs a bit more than some of the ATtinys but this hardly makes a difference unless dozens are involved. When you say "smaller", do you mean the physical size of the chip itself, or the entire board?


Thanks for the reply, I'm using the Uno, and I meant that the uno board is basically bulky and has a lot of features that the robot doesn't need so I wanted something physically smaller and near enough only has the capacity for its intended use.

I may well end up doing the ATMega328p route, but its also a large chip and I assumed it was overkill? They are very reasonably priced though so it will probably save all the agro. I also meant more flash than 6.5k not less, my bad.

Quote

By reading the datasheet. Attributes are summarized on the first page.
ATmega328P et al
ATtiny84 et al
ATtiny85 et al



Ah, thats much better thanks, I was looking at some comparison table on atmels website that didn't list everything I needed to know

dave84


Quote
..the sketch size is 6.5k.  Does that mean I need a chip with a flash memory of 6.5k or less?

You mean the size of sketch source (the text you see in the IDE), or the compiled binary size?
From the source size you cannot judge on the flash memory required, as a 6.5k source code may create binary of any size..


I assumed it was compiled size as when you upload or verify code in the IDE the console window says at the end how large the code is out of a maximum of 32k (the UNO's flash size).

dc42


I may well end up doing the ATMega328p route, but its also a large chip and I assumed it was overkill?


If you really want to make a physically small unit, then you will need to design a PCB using SMD components. In that case, you can use the atmega328p-au surface mount version of the chip, which is smaller than the -pu DIP version.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Paul__B

#6
Sep 15, 2013, 11:25 pm Last Edit: Sep 15, 2013, 11:27 pm by Paul__B Reason: 1

Thanks for the reply, I'm using the Uno, and I meant that the uno board is basically bulky and has a lot of features that the robot doesn't need so I wanted something physically smaller and near enough only has the capacity for its intended use.

I may well end up doing the ATMega328p route, but its also a large chip and I assumed it was overkill? They are very reasonably priced though so it will probably save all the agro. I also meant more flash than 6.5k not less, my bad.


Oh come on now!  Have you not done the basic searching?

It sounds as if you want a "Pro Mini" which is an implementation using the same Mega328 SMD chip but without the USB interface of which there are several versions available which you connect only when you need to program it.

It's not worth the bother to design or assemble your own version (at least in your case, for a "one-off").

dc42


It's not worth the bother to design or assemble your own version (at least in your case, for a "one-off").


That depends on whether he needs a PCB to hold whatever other components he will be using.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

westfw

Quote
the ATmega328P as used in the Uno etc. has a lot to recommend it.

The 328p is also enjoying (at least at the moment) a "cost blip" - it's cheaper (in small quantities, from the usual distributors) than processors with less memory.

1ChicagoDave

This page may be useful, too.
http://arduino.cc/en/Main/Products

This is essentially an UNO (same chip, pins, flash, etc..)...but about the size of a postage stamp. And costs only $10.
https://www.sparkfun.com/products/11113

Paul__B

#10
Sep 16, 2013, 05:22 am Last Edit: Sep 16, 2013, 06:05 am by Paul__B Reason: 1

This is essentially a UNO (same chip, pins, flash, etc..)...but about the size of a postage stamp. And costs only $10.
https://www.sparkfun.com/products/11113


That would of course be the "Pro Mini" which I cited earlier.


That depends on whether he needs a PCB to hold whatever other components he will be using.


Well, he is presently using a Uno and simply wishes to make it more compact.  There would be few other PCB mounted components that would be required.

aarondc

+1 to Pro mini. It'll easily fit on a strip board, allowing other components to be soldered in and wired up also.

dave84

Thanks everyone, I had no idea on the Pro-Mini.  Whilst its not exactly what I'm looking for it is a good alternative and it'll come in handy for something.  The chap who mentioned PCB's and other components had the right idea.  As I want something more permanent I'll either have a PCB or protoboard connecting the brain to the various components and devices and I'd planned to just solder a holder onto the board to be able to easily remove the chip for programming adjustments or if I wanted to use it in another semi-prototype for a brief time. In-Out, nice and compact, and basically cheap easily replaceable should it get damaged.

Plenty of options now though, thanks folks

aarondc

The pro-mini fits into a 24-pin wide (0.6") socket :D

dc42


As I want something more permanent I'll either have a PCB or protoboard connecting the brain to the various components and devices and I'd planned to just solder a holder onto the board to be able to easily remove the chip for programming adjustments


A much better way is to include a 6-pin ICSP header on your PCB, then you can (re)program the chip in-situ.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up