What is the smallest useful thing from a microcontroller?

Assuming you already had GPIO / PWM pins from an embedded Linux PC what is the smallest additional functionality from a microcontroller that you would find useful?

For example, 1) the strict timing, no OS overhead 2) a single analog 10-bit analog input pin maybe 3) lower power and ability to wake the embedded Linux side from sleep? 3) naturally some kind of timekeeping 4) some tiny flash to log from the pin maybe

Is that accurate? Would this already confer a benefit? A single analog input pin and ultra low power??

Note: as you can see from my other post I'm thinking in wild, blue-sky terms about an integrated super-cheap embedded Linux/micontroller dual board with two subsystems. Whats the minimum functionality that would provide any value at all?

A digispark or equivalent has three or four pins, and is sufficient for some purposes. But an ATmega8 runs about the same cost...
Most likely current applications: driving "Neopixel" arrays (which require strict timing.)

westfw:
A digispark or equivalent has three or four pins, and is sufficient for some purposes. But an ATmega8 runs about the same cost...
Most likely current applications: driving "Neopixel" arrays (which require strict timing.)

these seem very expensive, over $2 in moderate quantity (1ku via digikey), whereas a Raspberry Pi Zero is $5 (qty of 1).

There isn't anything smaller that would do? something that has maybe just 2 pins? Nothing smaller and cheaper than an atmega8 would do? (like some attiny chip).

It seems like a large ask, if people are expected to plug in a more serious arduino anyway...

these seem very expensive, over $2 in moderate quantity

Well under $1 from Chinese vendors like AliExpress (and yes, the 28pin Atmega8s are cheaper than the 8pin Attiny85s with worse specs.) Aside from such "creative sourcing", there are very few microcontrollers that cost less than $1...

whereas a Raspberry Pi Zero is $5 (qty of 1).

The price that the RPi Foundation (with its non-profit status, massive quantities shipped, and big vendor connections) charges for a teaser product whose general availability is close to Nil, is nearly irrelevant to anyone else. I wouldn't be surprised if RPi/etc pays for Zero production out of the same sort of "marketing" budget(s) that chip companies usually use to pay for their "free samples." (ok, maybe I'm just bitter that I haven't been able to get any...)
You can also get Arduino Nano clones (full boards with USB converter, atmega328p, and voltage regulator) for less than $2. (no, I don't understand how they do that.)

Sure, a board that is slightly bigger than an RPi Zero that includes an Arduino "Co-processor" as well as the Broadcom chip, and still sold for less than $10 would be "interesting." But I don't think that it's possible for any small-to-medium sized vendor to actually do, and you definitely won't get there by using a smaller chip. (there have been "products" that were interesting because they could be (theoretically) assembled by a hobbyist very cheaply, even if they weren't "very cheap" from vendors. (The original serial-port Arduinos are an example.) But you're clearly out of this league when you start talking about linux-capable SoCs. It's all very well that a BeagleBone (for example) is "Open Source Hardware", but I can't come close to actually making one myself for any amount even close to "list price.")

That said, I have designed an RPi0 "hat" (Hairclip?) that would connect a 28pin AVR (m8, m328, whatever; a 328pb would be interesting) with Nano footprint to an RPi0. It's pretty much what I consider the minimum... It didn't require any particular cleverness, and the same vendors that sell $2 nanos should be able to sell this for $2 as well. (I rather lost interest when I couldn't actually get an RPi0.)

westfw:
Well under $1 from Chinese vendors like AliExpress (and yes, the 28pin Atmega8s are cheaper than the 8pin Attiny85s with worse specs.) Aside from such "creative sourcing", there are very few microcontrollers that cost less than $1...

The price that the RPi Foundation (with its non-profit status, massive quantities shipped, and big vendor connections) charges for a teaser product whose general availability is close to Nil, is nearly irrelevant to anyone else. I wouldn't be surprised if RPi/etc pays for Zero production out of the same sort of "marketing" budget(s) that chip companies usually use to pay for their "free samples." (ok, maybe I'm just bitter that I haven't been able to get any...)
You can also get Arduino Nano clones (full boards with USB converter, atmega328p, and voltage regulator) for less than $2. (no, I don't understand how they do that.)

Sure, a board that is slightly bigger than an RPi Zero that includes an Arduino "Co-processor" as well as the Broadcom chip, and still sold for less than $10 would be "interesting." But I don't think that it's possible for any small-to-medium sized vendor to actually do, and you definitely won't get there by using a smaller chip. (there have been "products" that were interesting because they could be (theoretically) assembled by a hobbyist very cheaply, even if they weren't "very cheap" from vendors. (The original serial-port Arduinos are an example.) But you're clearly out of this league when you start talking about linux-capable SoCs. It's all very well that a BeagleBone (for example) is "Open Source Hardware", but I can't come close to actually making one myself for any amount even close to "list price.")

That said, I have designed an RPi0 "hat" (Hairclip?) that would connect a 28pin AVR (m8, m328, whatever; a 328pb would be interesting) with Nano footprint to an RPi0. It's pretty much what I consider the minimum... It didn't require any particular cleverness, and the same vendors that sell $2 nanos should be able to sell this for $2 as well. (I rather lost interest when I couldn't actually get an RPi0.)

That hat looks fantastic, great work. I hope you'll watch my posts around here, I hope to take this forward seriously and you seem to have thought along some similar lines.

the specs of the raspberry pi zero are incredibly aggressive, it's 512 MB of RAM and a 1 ghz processor (albeit a rather old arm architecture) and full HD GPU. I bet some people would have a use for a module with an even poorer GPU, with half (or a quarter! or an eighth!) of the ram and two thirds (or half!) the CPU performance -- as long as it was still the same tiny form factor and power profile and cost $5.

Out of curiosity what size run do you think coudl get you (or anybody) "raspberry pi zero" like prices? (Even with worse specs, a different cpu like allwinner, etc)? a few million? a few ten million?

I'm a beginner to be sure :smiley: It would be an interesting journey to take with other small-run manufacturers, though. If you have some form of contact you'd liket o list here (obfuscated) I'd love to get in touch with you and work together.

The most striking thing to remember is that a microcontroller can run for a year on an AA battery (easily), waking occasionally from low-power mode. A raspberry pi zero has a huge factor more constant consumption and no low-power mode. Also the pi zero has nothing on the analog side.

so I think the smart thing to do would be to make something where the microcontroller side could wake the embedded linux side forcefully, or stay in low-power mode. it could also do stuff like dump readings to flash and ocassionally wake the system for upload, that sort of thing. a huuuuuuuuuuuuuuuuuuuuuuge number of applications would open up around $5 + $1 or $2...

drop me some contact info and I'll write you a few lines :wink: Good work on the above.

curious48:
these seem very expensive, over $2 in moderate quantity (1ku via digikey), whereas a Raspberry Pi Zero is $5 (qty of 1).

like bill says rpi zero is effectively vaporware. basically a marketing scam from rpi company to promote the magazine and excite interest in new release of unrelated products like rpi3. nobody has ever obtained one for the advertised $5 or able to buy more than one at a time even at the inflated 3x-4x prices. and never will i predict. not normal production backlog but, as i said, marketing scam.

btw digispark are $1 on ebay and m8 with considerably more resources about half that in small qty. its m328 based boards like promini that run $2.

arm products like maple etc even more speed, io, and memory, about the same cost but like pi has nasty architecture and toolset. at least compared to avr/arduino which will not be going away soon contrary to predictions from internet pundits.

john1993:
like bill says rpi zero is effectively vaporware. basically a marketing scam from rpi company to promote the magazine and excite interest in new release of unrelated products like rpi3. nobody has ever obtained one for the advertised $5 or able to buy more than one at a time even at the inflated 3x-4x prices. and never will i predict. not normal production backlog but, as i said, marketing scam.

btw digispark are $1 on ebay and m8 with considerably more resources about half that in small qty. its m328 based boards like promini that run $2.

arm products like maple etc even more speed, io, and memory, about the same cost but like pi has nasty architecture and toolset. at least compared to avr/arduino which will not be going away soon contrary to predictions from internet pundits.

@john1993, I found your response very useful!!

like bill says rpi zero is effectively vaporware.

I have one on my desk. True, I had to pay 4 GBP for air shipping about 20 grams, of which 9 grams was the board and the rest the bubble-wrapped ridiculously oversized envelope. It's hard to emphasize how small and light this is: A standard sheet of laser-printer paper of the usual thickness, either US "letter" size or international "A4" size, weighs 4.5 grams. So board itself weighs the equivalent of 2 sheets of printing paper. Packaged in packaging weighing an additional 2 sheets of paper for a total of 4 sheets of printing paper in weight, I was charged 4 GBP for this shipping cost. I checked the shipping company and it should have been 1 GBP. So, I paid 7 GBP (1 GBP actual shipping costs, 3 GBP of price hidden into the shipping cost, and 4 GBP of price.) I'm not complaining.

All that said, I am curious whether $5 is enough to actually produce a board. In a quantity of 1m could an ARM chip be produced in your opinion?

Requirements:

  • Same size or smaller in every dimension as Raspberry Pi Zero. PCB can be thinner. No camera connector required.

  • Same pinout (HAT).

  • Same connectors

  • Best specs possible that come as close, even if ultimately falling short (such as 256MB ram or even half or a quarter of it)

  • Price as close to $4.99 + $1.20 as possible.

  • Lower weight if possible

  • Same power profile or lower

Secondly, I'd like to talk about the $1.20 part.

You mentioned the digispark which is based on an attiny85, available in for $0.68 in modest quantity (2.5 ku).

I think that is a great board, but I notice it's only 8-bit. This means that it's limited to a range of 256 analog values, which seems low to me.

How much higher is the price jump to move into the exact same thing but with the requirement that it run at 10, 12, 14, or 16 bits?

Can that still come in at under $1.20?

In summary, I'm asking whether in a quantity of 1m or 10m a board like the raspberry pi zero with an attached subsystem like the digispark but at 10, 12, 14 or 16 bits, could be made for $4.99 + $1.20 for the two subsytems printed on the same board? Is it possible to get even lower than that?

Assume zero profit or margin.

Thanks for any information.

john1993:
like bill says rpi zero is effectively vaporware. basically a marketing scam from rpi company to promote the magazine and excite interest in new release of unrelated products like rpi3. nobody has ever obtained one for the advertised $5 or able to buy more than one at a time even at the inflated 3x-4x prices. and never will i predict. not normal production backlog but, as i said, marketing scam.

Hyperbole. Raspberry Pi Zeros certainly been in short supply, though they're starting to catch up a bit in the last couple weeks, but people have certainly purchased them at Micro-Center (US in store pickup) for $5 + tax and via retailors that will ship for $5 + shipping fee. Shipping looks pretty expensive on any $5 item. Since I occasionally travel to places that have Micro Center stores, I've elected to wait until general availability and pick one up at retail (hopefully Dallas next week).

For what it's worth, the pair of $9 NTC C.H.I.P. ARM computers (2 x $9 + $7 shipping = $25) I ordered in March are supposed to ship in the next few weeks. Kickstarter backers have been receiving their product the last week or two.

MrMark:
Since I occasionally travel to places that have Micro Center stores, I've elected to wait until general availability and pick one up at retail (hopefully Dallas next week).

Microcenter in Dallas (Really Richardson) has many of them:
http://www.microcenter.com/product/463189/Zero_Development_Board_-_Camera_Ready

I have one that I got with the magazine 6 months ago.
While it has a low cost point, to me it is a completely non interesting product since it really doesn't have any connectivity (beyond simple i/o pins) other than USB and only has a single micro USB connector. And the cost and size starts to go up to add the additional connectively since it requires adapters and additional components.
In my view if I want something with just i/o pins I'll use a simpler microntroller which can also be used in lower battery power applications like wireless IoT nodes that transmit sernsor data to a gateway used in a home automation system like openHAB.
If I'm needing a real os like linux, then I'm also needing additional connectivity like wireless internet.
So from my perspective the rPI 3 is so much more interesting as it has Wifi and Bluetooth built in.

To me, the rPI zero would have been much more interesting and useful with built in wifi or blue-tooth or at least a standard sized USB connector so you could connect a cheap readily available wireless device, but without that, I'd rather use a much simpler and lower power micro controller.

--- bill

Frankly, I think that the ~$25 price of a standard Arduino is a realistic goal. That can support all sorts of the "related" necessities without a lot of pain. See https://www.eevblog.com/2016/06/03/eevblog-887-the-economics-of-selling-hardware/
Yes, the price can be lower if you're willing for forgo various "luxuries" like distributors or profits, or if you're subsidizing things with other income sources.

Let me say that again, more explicitly. A $25 AVR Arduino is well priced. Boards with similar or better specifications and a lower price are mostly "cheating" in one or more ways (mostly by not providing any of the user support that a product of that complexity requires.)

A low-cost board that requires that you spend more on cables, other parts, and shipping that the cost of the board itself is a "marketing gimmick." (I won't call it a scam...)

You mentioned the digispark which is based on an attiny85 ... but I notice it's only 8-bit. This means that it's limited to a range of 256 analog values, which seems low to me.

Um. You demonstrate a poor understanding of "this stuff." Why are are you even contemplating a hardware venture of this nature.

bperrybap:
To me, the rPI zero would have been much more interesting and useful with built in wifi or blue-tooth or at least a standard sized USB connector so you could connect a cheap readily available wireless device, but without that, I'd rather use a much simpler and lower power micro controller.

--- bill

I tend to agree that lack of connectivity is likely to limit Pi Zero applications more than power consumption or the absence of native A/D. C.H.I.P. addresses this with wifi and Bluetooth so it will be interesting to see how well that goes, plus OS and program store is integral to the board so they're at least on par with the Zero cost. It looks to be much better supported than the various Chinese Pi wannabes which is also promising if they can be profitable.

You mentioned the digispark which is based on an attiny85 ... but I notice it's only 8-bit. This means that it's limited to a range of 256 analog values, which seems low to me.

Um. You demonstrate a poor understanding of "this stuff." Why are are you even contemplating a hardware venture of this nature.

You're right, I have a poor understanding of this stuff. I was being very hasty. I remembered that 8-bit sounds sounded like crap, and had just read the top of this page:

http://www.marcelpost.com/wiki/index.php/ATtiny85_ADC

Example #1 code:

  • assumes a clock speed of 8MHz on an ATtiny85
  • uses 8-bit resolution (values from 0-255)[/li]
  • - [/b]uses ADC2 on pin PB4*
  • - uses VCC as the reference voltage*
  • [/list][/quote]*
  • I said that it can read analog values between 0-255, which is 256 values as I stated.*
  • While true, a different example gives the full 10-bit scale that the ADC puts out. Which needs to be stored in two variables. At least I'm not the only one who had that brainfart*
  • Follow-on questions:*
  • - Could I ask, is an 8-bit microcontroller enough for most projects built on Arduino? It seems incredibly limiting.*
  • -*
  • - Also, does this require coding changes on the arduino sketch?*
  • It would be an intriguing possibility, but may be too limiting. Well, we'll see if a huge project like this ever gets anywehre :smiley: It would certainly requrie a lot of help from a lot of people!*

MrMark:
Hyperbole. Raspberry Pi Zeros certainly been in short supply, though they're starting to catch up a bit in the last couple weeks,

fanboy. little difference in availability since it hit the fan last year. except for that initial magazine promotion still only available one at a time and with ridiculous markup or part of a "kit" at 5x times the cost. microcenter also one at a time and you must go to the store (can you say "loss... leader...") which eliminates 99% of the population.

farnell and other regular pi dealers wont touch it with a ten foot pole. prices on ebay another indication of the true situation. just mentioning the product on "foundations" web site will get thread locked showing how sensitive they are about it.

i have 3 and took several calendar months and many man-hours refreshing pihut and pimoroni in middle of the night. it does run linux (sort of) and very cool gadget but for me more collectors item. careful to preserve the included line card with hand altered memory spec.

4 words: s... c... a... m...

You can do a lot with just an 8-bit AVR, I have done many complex projects since late 2010 with 328P, 1284P, 2560.
You'd be surprised what you can do.
If the code fits in a 328 but just needs more IO, can add shift registers & other hardware.
If the code needs more IO (32 vs 20), or a 2nd hardware serial, or more SRAM (16K) or flash (128K), use a 1284. Can also add shift registers & other hardware.
If the code needs more IO (up to 69) that the smaller chips can't do sufficiently with shift registers, etc. or up to 4 serial ports, or more flash (256K) or less SRAM (8K), go with a 2560.

Personally I find a 1284 to fit the bill for most designs needing more than a 328. A 2560 is rarely needed, except when one doesn't want to bother with the code for adding an SPI (or I2C) UART for more serial ports. A custom design with 1284 & a dual UART costs less in material than a 2560 chip. All depends on the project needs.

Getting off topic a bit:
Many people have done wonders with a 2560 Mega (Arduino brand or otherwise) and one of my screw shields for secure connections to non-shield components.
http://www.crossroadsfencing.com/BobuinoRev17/


Smaller versions of Mega screw shields and Uno screw shields are also available.

  • Could I ask, is an 8-bit microcontroller enough for most projects built on Arduino? It seems incredibly limiting.

The vast majority of existing Arduinos (Megas, Leonardo, Unos, Duemilanoves, Diecimillas, and earlier) all use 8-bit microcontrollers (with the same 10bit ADC as the tiny85.) The compiler handles treating multiple 8bit values as 16, 32, or even 64bit values, while maintaining "adequate" performance.

I'll also note that a 10bit ADC represents real-world values to within about 0.1%, which is much higher accuracy than most of the analog components that one fines in real-world circuits.

There's a widespread assumption that because a desktop computer has "64bits" and a 2+GHz CPU, that a much smaller and much slower "microcontroller" (8bit, 16MHz AVR, in most Arduinos. ~2000 times slower) can't do anything useful. It's not true. There are things you can't do with a small, slow, chip (image processing is the one that seems to show up most frequently), but there are a lot of things that CAN do.

westfw:
The vast majority of existing Arduinos (Megas, Leonardo, Unos, Duemilanoves, Diecimillas, and earlier) all use 8-bit microcontrollers (with the same 10bit ADC as the tiny85.) The compiler handles treating multiple 8bit values as 16, 32, or even 64bit values, while maintaining "adequate" performance.

I'll also note that a 10bit ADC represents real-world values to within about 0.1%, which is much higher accuracy than most of the analog components that one fines in real-world circuits.

There's a widespread assumption that because a desktop computer has "64bits" and a 2+GHz CPU, that a much smaller and much slower "microcontroller" (8bit, 16MHz AVR, in most Arduinos. ~2000 times slower) can't do anything useful. It's not true. There are things you can't do with a small, slow, chip (image processing is the one that seems to show up most frequently), but there are a lot of things that CAN do.

Wow, thanks so much for this. I had no idea this was the case. If the vast majority of existing Arduinos (Megas, Leonardo, Unos, Duemilanoves, Diecimillas, and earlier) use the same ADC as the tiny85, what are the limitations of the 85 versus those other ones? Just the number? Or can the tiny85 do everything that those other chips can do, just in a lower quantity? Are there no other large practical differences? Can you compare them or link to a comparison table?

I had no idea this was the case, and whoever told me I had very little understanding was certainly right :slight_smile: I've programmed some of the other Arduinos you mention, and never felt like I was doing 8-bit programming. so what's the big difference? (in quality, not quantity or speed.) sorry that this is a pretty basic question.

Oh, one more thing: is my assumption correct that the attin85 has one of the best power profiles and lowest sleep power usage? thanks.

what are the limitations of the 85 versus those other ones?

Let's see. Compared to ATmega328p, the tiny85 has less flash, less ram, less eeprom, no hardware multiplier, and no hardware uart, and less pins (If you tie up two pins for an accurate crystal, and two more for comm with the "unix core", you're left with only two pins, which is "not enough", IMO.) Part of the point of my "mega8" suggestion is that there are actually quite a few chips in the "about $1" price range... The main attraction of the tiny85 seems to have been the small, but old-school, package (DIP8, SO8) - but if you're dealing with ARM SoCs anyway you can easily use one of the QFN packages that fits many more pins into the same PCB area.

is my assumption correct that the attin85 has one of the best power profiles and lowest sleep power usage?

It's hard to tell. According to the datasheets, tiny85 and mega328p have very similar power-consumption specs. What you can achieve in a real design is a separate question (power supply voltage and which peripherals you need to leave on come into play.) If your main goal is to achieve timed wakeups of a larger CPU, you might not even need a microcontroller - there are RTC chips with truly microscopic power consumption that provide an "alarm" output that can do that sort of thing (maybe.)

westfw:
Let's see. Compared to ATmega328p, the tiny85 has less flash, less ram, less eeprom, no hardware multiplier, and no hardware uart, and less pins (If you tie up two pins for an accurate crystal, and two more for comm with the "unix core", you're left with only two pins, which is "not enough", IMO.) Part of the point of my "mega8" suggestion is that there are actually quite a few chips in the "about $1" price range... The main attraction of the tiny85 seems to have been the small, but old-school, package (DIP8, SO8) - but if you're dealing with ARM SoCs anyway you can easily use one of the QFN packages that fits many more pins into the same PCB area.

It's hard to tell. According to the datasheets, tiny85 and mega328p have very similar power-consumption specs. What you can achieve in a real design is a separate question (power supply voltage and which peripherals you need to leave on come into play.) If your main goal is to achieve timed wakeups of a larger CPU, you might not even need a microcontroller - there are s with truly microscopic power consumption that provide an "alarm" output that can do that sort of thing (maybe.)

@westfw this is an absolutely fascinating breakdown. Thank you very much for this. Perhaps there would be allowance for include multiple subsystems - how cheap do those RTC chips get in your opinion?

If there were a budget of $1.20- max $1.50 to include a complete arduino susbystem, possibly on the other side, of a a raspberry pi zero sized and spec'd board, just how much do you think could fit into that budget @ qqty of 1M to 10M units? I'm thinking if there were two subsystems, separate but equal and with either side controlling (or not controlling) the other side, and even possibly sharing some PINs. So that the work of either community could be used. This could be a bit of a pipe dream though :slight_smile: I'm just trying to think about possibilities...