Author Topic: Smallest arduino compatible chip with ability to connect to CH340  (Read 1774 times)

0 Members and 1 Guest are viewing this topic.

Offline RanaynaTopic starter

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: de
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 it

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

Offline webgiorgio

  • Regular Contributor
  • *
  • Posts: 70
  • Country: dk
Re: Smallest arduino compatible chip with ability to connect to CH340
« Reply #1 on: October 16, 2018, 01:03:31 pm »
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?
 

Offline RanaynaTopic starter

  • Frequent Contributor
  • **
  • Posts: 913
  • Country: de
Re: Smallest arduino compatible chip with ability to connect to CH340
« Reply #2 on: October 16, 2018, 01:09:07 pm »
You are right, that was not clearly expressed.
To be honest, I mainly mean hopefully cheaper because the chip has less pins ;)
The TQFP ATMEGA328P on the Nano clones is close to the maximum physical size anyway.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3046
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Smallest arduino compatible chip with ability to connect to CH340
« Reply #3 on: October 16, 2018, 01:33:04 pm »
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
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline kosine

  • Regular Contributor
  • *
  • Posts: 158
  • Country: gb
Re: Smallest arduino compatible chip with ability to connect to CH340
« Reply #4 on: October 16, 2018, 02:40:37 pm »
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.
 

Offline mbest

  • Contributor
  • Posts: 19
  • Country: ca
Re: Smallest arduino compatible chip with ability to connect to CH340
« Reply #5 on: October 16, 2018, 02:49:18 pm »
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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf