Pages: [1]   Go Down
Author Topic: How to choose cheapest AVR for a task  (Read 707 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are there any good resources out there for choosing the cheapest AVR that fits a set of requirements?

I'm currently working on a project that requires 4 PWM outputs, 3 other outputs, 1 analog input, and probably 8kb of program memory (it seems I'd have to write some existing libraries in order to get <4kb, and I don't really have the time for that).  Right now I'm testing this out with an ATTiny84, but these seem to be relatively expensive, the cheapest I see them is for ~$2.50 on Ebay vs $3 for a full ATMega328.
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1422
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"Cheapest" in monetary terms overlook your investment in time which directly translate to the probability of greater frustration.

Consider the Atmega328P-PU for projects..., same uC as the UNO.  In 25 qty, these are just $2.10 and will support anything code-wise that an UNO, Nano, or Mini will.  Clones of the Mini are easily found on eBay for $3-$4 and will save you construction time and the need to stock 16MHz crystals, load caps, voltage regulators...

I develop on the UNO or Nano and then, if the project warrants, I move the code to a naked 328 or Mini clone.  A regimented software development cycle with standard Arduino hardware will provide the widest use of existing libraries and the ability to request assistance from forum users with similar test environments!

Ray
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

are the mini clones like this one http://www.ebay.com/itm/Pro-Mini-atmega328-5V-16M-Replace-ATmega128-Arduino-Compatible-Nano-NEW-/131053554958 completely compatible with the code from an arduino uno?
Logged

Offline Offline
Sr. Member
****
Karma: 7
Posts: 348
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am for the mini clone.
ebay   1112526853  only 2.77

the cost of the chip and crystal and reset button would cost more.

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"Cheapest" in monetary terms overlook your investment in time which directly translate to the probability of greater frustration.

Consider the Atmega328P-PU for projects..., same uC as the UNO.  In 25 qty, these are just $2.10 and will support anything code-wise that an UNO, Nano, or Mini will.  Clones of the Mini are easily found on eBay for $3-$4 and will save you construction time and the need to stock 16MHz crystals, load caps, voltage regulators...

So one of the reason's I'm looking at the ATTiny's is that I'm trying to fit this into as small as space as possible and will be imbedding it into a PCB I'm working on.  I've got some Atmega328P-PU's I've used elsewhere and could just copy the appropriate bits from my Eagle sketches for those, but the ATTiny84 is half the size.  One day I'll get around to learning to use SMDs and setup a reflow toaster, at which point a SMD ATMega328 would be an obvious choice.

Quote
I develop on the UNO or Nano and then, if the project warrants, I move the code to a naked 328 or Mini clone.

I hadn't seen how cheap the Mini clones were on eBay.  Looking at them, once I've added a crystal+capacitors and a reset switch to the attiny it would probably take about the same amount of space as the Pro Mini.  I'll order a few of those and try it out.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3502
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Right now I'm testing this out with an ATTiny84, but these seem to be relatively expensive, the cheapest I see them is for ~$2.50 on Ebay vs $3 for a full ATMega328.

Mouser's prices for ATtiny84A-PU:

1:      $1.41   
10:     $1.28   
25:     $0.896 
50:     $0.832 
100:    $0.80
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

are the mini clones like this one http://www.ebay.com/itm/Pro-Mini-atmega328-5V-16M-Replace-ATmega128-Arduino-Compatible-Nano-NEW-/131053554958 completely compatible with the code from an arduino uno?

Yes.
Logged

No, I don't answer questions sent in private messages...

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are there any good resources out there for choosing the cheapest AVR that fits a set of requirements?

I'm currently working on a project that requires 4 PWM outputs, 3 other outputs, 1 analog input, and probably 8kb of program memory (it seems I'd have to write some existing libraries in order to get <4kb, and I don't really have the time for that).  Right now I'm testing this out with an ATTiny84, but these seem to be relatively expensive, the cheapest I see them is for ~$2.50 on Ebay vs $3 for a full ATMega328.

I gave up using Tiny84s when the $3 Pro Minis appeared on eBay.

But... it all depends on how many you want to build, if you're using your own PCB, etc.

For small quantities? Simply not worth the effort of (re)writing libraries, etc. A Pro-Mini is 100% Arduino Uno compatible and that saves a LOT of time.
Logged

No, I don't answer questions sent in private messages...

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6365
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Are there any good resources out there for choosing the cheapest AVR that fits a set of requirements?
Well, the major distributors have "parametric search" where you can specify things like "6 to 20 IOs, 8k of program memory, DIP14, DIP16, DIP18, DIP20 packages", and then sort  the results by price.
Digikey says the tiny84 is it, as far as AVRs go.  And it's about $1.63 in tens.  Tiny861 is another alternative.

Understand that prices are subject to random influences, and subject to significant changes over short periods of time.
I wouldn't use eBay as an indication of chip pricing unless that's really the only place you intend to buy chips (which is a bad idea, too.)  Certain "popular" chips become artificially expensive, and everything is distorted by postage issues (some eBay sellers seem to make their profits by mailing things cheaply, so that you can buy one chip for $3 including postage, whereas a real distributor will frequently have postage fees that start at $7+ (minimum sized UPS package.)  But, like I said, that's "distorted" from real pricing.
Logged

Denmark
Offline Offline
Full Member
***
Karma: 8
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

.......
I gave up using Tiny84s when the $3 Pro Minis appeared on eBay.
.......

Same for me, with the exception for power saving.

I am  fascinated by stand alone  chips in sleep mode!
Logged

Bob Pease: "My favorite programming language is ... solder."

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

.......
I gave up using Tiny84s when the $3 Pro Minis appeared on eBay.
.......

Same for me, with the exception for power saving.

I am  fascinated by stand alone  chips in sleep mode!

Grab a hot soldering iron and poke the power components off the Pro Mini PCB and they sleep perfectly. It only takes 30 seconds to do.

All you need to keep is the crystal and the two capacitors right next to it. You can also keep the Pin13 LED if you want that.

Logged

No, I don't answer questions sent in private messages...

Denmark
Offline Offline
Full Member
***
Karma: 8
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Grab a hot soldering iron and poke the power components off the Pro Mini PCB and they sleep perfectly. It only takes 30 seconds to do.
All you need to keep is the crystal and the two capacitors right next to it. You can also keep the Pin13 LED if you want that.

I hadn't thought of that!
Now I have to try that too.
Logged

Bob Pease: "My favorite programming language is ... solder."

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Grab a hot soldering iron and poke the power components off the Pro Mini PCB and they sleep perfectly. It only takes 30 seconds to do.
All you need to keep is the crystal and the two capacitors right next to it. You can also keep the Pin13 LED if you want that.

I hadn't thought of that!
Now I have to try that too.

If you're using FTDI programmer you have to run a wire across from the FTDI connector to the Vcc pin after you remove the power components.

Logged

No, I don't answer questions sent in private messages...

Pages: [1]   Go Up
Jump to: