Smallest arduino compatible chip with ability to connect to CH340 - Page 1
Forum section: electronics / projects

author: Ranayna
author_rank: Super Contributor
timestamp: October 16, 2018, 12:37:12 pm
content: Hi everyone,I am in the process of creating a small gadget with a WS2812 LED talking via USB Virtual COM Port with a PC.Currently, for prototyping, I am using various Arduino Nano clones, some with (supposedly) FT232, and some with CH340C.Looking at the prices of the chips alone, I find it almost ridiculous that a FT232 alone from a reputable seller is more expensive than the whole cloned Arduino Nano. At LCSC the CH340 is just about $0.35. The cheapest TQFP ATMEGA328P is $1.70. Add the required passives and the PCB, I think I might get the boards to around the same price as a clone Nano, not including assembly.But I am only using one GPIO for the LED, so are there smaller Arduino compatible chips?Requirements:- Arduino IDE compatible- Ability to interface with CH340, or ability to present a virtual COM Port directly- At least one spare GPIO to talk to a single WS2812 LED- TQFP or larger, I want to be able to hand solder itI am aware that I need to flash the Arduino bootloader manually.Current expected amount of finished boards is around 50 at most, and it will be used within my company, so i'm okay with manual assembly and using Arduino code.Please be aware that I have no experience at all building and programming a custom Arduino, but I want to learn and need some pointers if what I'm trying is reasonable or not.

author: webgiorgio
author_rank: Regular Contributor
timestamp: October 16, 2018, 01:03:31 pm
content: What do you mean for "smaller"? With fewer pins?You can have the Atmega328P in 5x5 mm package. Do you really need to save 5-10 square millimieters?

author: Ranayna
author_rank: Super Contributor
timestamp: October 16, 2018, 01:09:07 pm
content: You are right, that was not clearly expressed.To be honest, I mainly mean hopefully cheaper because the chip has less pinsThe TQFP ATMEGA328P on the Nano clones is close to the maximum physical size anyway.

author: sleemanj
author_rank: Super Contributor
timestamp: October 16, 2018, 01:33:04 pm
content: What do you mean compatible with the IDE, do you mean a chip that is included in the ide by default, or one that can be added via a boards manager URL? There are lots of chips supported by third party cores, for example an ATTiny84

author: kosine
author_rank: Regular Contributor
timestamp: October 16, 2018, 02:40:37 pm
content: If you're OK with the Arduino IDE, then an ATtiny is probably your best option, though the cheap 8-pin models only have 5 I/O channels. (6 if you disable the reset line.)There are a few versions, with the surface-mount ATtiny13s starting around 25c in small quantities. The DIP version is about 40c last time I checked (try ebay etc). The 13s only have 1k of memory. The 25/45/85s have more (2k/4k/8k) but are more expensive. The 48/88 versions also have more I/O but again it adds to the cost.You need to get the relevant "core files" for the chip and add them to your Arduino directory. You'll find plenty of info online about this, it's not too hard, but be aware that not every Arduino command might be supported.Programming any of these chips is quite easy. You load the "Arduino as ISP" sketch into a standard Arduino, and then hook up the ATtiny with 6 wires on a breadboard (power, ground, reset, clock, MOSI and MISO). When you upload your programme sketch it'll be transferred straight to the ATtiny ready for use.All the ATtinys I've used were set to 8MHz by default, so unless you need 16MHz there's no need to set fuses or anything. Bootloaders are also not needed.*A cheap ATtiny development board would be an easy way to get started, but considering how cheap some of the Nano clones are, you might already be using the simplest/cheapest/most versatile approach.* Something to be aware of is that the internal RC clocks on these raw microcontrollers are not very accurate. If you need anything time dependent then you need an external crystal. The Nano clones are again the winner in this respect.

author: mbest
author_rank: Contributor
timestamp: October 16, 2018, 02:49:18 pm
content: The ATTiny85/Digispark board clones are under $2 and quite small. I don't believe they have a serial chip at all and have the USB driver loaded into the chip, so programming via AVR/Arduino as ISP/Correct settings in Arduino will be required to program them.-Mike