Nano DIP: The Smallest Arduino-Compatible ATtiny3217 Board
- Selling at Elecrow
- Why use the ATtiny3217?
- Arduino Nano DIP features
- Nano DIP pinout
- Arduino Nano DIP circuit
- Why did you build the Nano DIP?
- PCB design
- ATtiny with more memory
- QFN24 package transformed into DIP26 package
- 5V regulator
- Upload sketches with the Arduino IDE
- How to burn a bootloader into the ATtiny3217
- ATtiny3227 vs ATtiny3217
- Calibration of the internal RC oscillator
- Checking the clock speed
- Links
- The Arduino Nano DIP is similar to other Nano boards but it uses the new generation 8-bit ATtiny3217 processor instead of the older ATmega328P.
- It maintains compatibility with the Arduino Nano while offering additional features.
- Moreover, it is the smallest complete Arduino board ever made, measuring just 33 x 10 mm - the same size as the ATmega328P 26pin DIP package.
Selling at Elecrow
I sell to all countries via Elecrow.
Why use the ATtiny3217?
The ATtiny3217 is ideal for embedded projects that can be handled by just an 8-bit processor. While more powerful processors as the STM32 are not significantly more expensive, an 8-bit processor is often a better choice, due to the availability of smaller packages with fewer pins. It is a good choice when the following characteristics are important:
- A small package, like the SOT23-6
- 5V operating voltage instead of 3.3V
- Very low cost
That is why for many applications, I prefer a cheaper microcontroller with smaller dimensions than the STM32 or the ATmega328P.
The Nano DIP is a nice development board for the ATtiny family of processors.
In addition, the ATtiny3217 has a number of features that are not present in the ATmega328P:
- Smaller package options for compact designs
- Fast 350ksps 8-bit real DAC
- Peripheral Touch Controller
- Configurable custom logic
There are more features of the ATtiny3217, see here: Microchip ATtiny3217 Features.
Arduino Nano DIP features
- DIP26 size, 33 x 10 mm
- Arduino Nano compatible
- New generation ATtiny3217 processor instead of the old generation ATmega328P
- Supply voltage 1.8V - 5.5V
- Supply voltage V+ max = 18V
- Straightforward pinout
- An extra 2-pole header, which is connected to D2, can be used as a jumper
- The LED at D0 can be disabled by a jumper
- 0V voltage drop instead of 0.7V from the USB supply, because a MOSFET is used as a diode.
Nano DIP pinout
Arduino Nano DIP circuit
The circuit diagram uses a handy ATtiny3217 symbol for Eagle, which shows also the function of the pins.
Why did you build the Nano DIP?
First of all, the ATmega328P-PU chip is too large for some of my mini PCB designs, the ATtiny3217 is available in a smaller package. Also the ATmega328P is dated, it doesn't even have a DAC. In addition, the ATtiny3217 also has quite a few extra features compared to the older ATmega328P.
PCB design
It was a challenge to get all parts on a PCB with the size of a DIP26 chip. Moreover, I wanted a solid groundplane, thus as few tracks as possible at the bottom side. To make this job easy, I could have opted for small 0201 SMD parts and thin 2 mil traces. However, I chose not to do this. I wanted the PCB to be cheap to produce, which imposed restrictive conditions:
- PCB trace width / space 6/6 mil.
- Via drill / outer diameter 12/24 mil.
- All SMD parts 0402 or larger.
Here is an video of the Nano DIP old version without the USB connector.
It controls 21 LEDs in this demonstration video on YouTube:
ATtiny with more memory
Until the year 2018, the small and cheap ATtiny microcontroller series, such as the ATtiny85, had less memory (8k/512). This was often a serious problem, sometimes you need a microcontroller with a larger memory but small in size. But in 2018, more powerful ATtiny chips were introduced, such as the ATtiny3217. It has 32kByte program memory and 2048Byte SRAM equal to the ATmega328P which is used on the Arduino Uno.
QFN24 package transformed into DIP26 package
For hobbyists, the drawback of the ATtiny3217 is that it is only available in a QFN24 package, with a pin spacing of 0.5 mm, which can only be soldered using a solder mask. Since there is no breadboard-friendly DIL package of the ATtiny3217, you always need a development board. That's why I made the small DIP board, just like I did with the SAM15x15.
5V regulator
The maximum input voltage on the V+ pin is 18V.
Upload sketches with the Arduino IDE
Step 1
- File > Preferences > Additional board manager URLs = http://drazzy.com/package_drazzy.com_index.json
- Tools > Boards -> Boards Manager
- Select "megaTinyCore by Spence Konde" and click "Install"
Step 2
- Tools > Board = ATtiny3217 (Optiboot).
- Board = First set Tools > Clock Speed = 16MHz.
- Upload the sketch
Note that the bootloader is already burned by me.
How to burn a bootloader into the ATtiny3217
Note that you don't need this step because the bootloader is already burned by me. Read here how you can burn a bootloader yourself: Burning a bootloader into the ATtiny3217.
ATtiny3227 vs ATtiny3217
My preference is the ATtiny3217 because it has an extra DAC. These are the main differences:
- ATtiny3217: 1-series, DAC
- ATtiny3227: 2-series, no DAC,12 bit ADC, 3kbyte RAM, differential ADC, 2 UARTs
See more:
Calibration of the internal RC oscillator
The accuracy of the internal RC oscillator is factory calibrated within ±4%. This only applies for 0-70ºC 16MHz or 20MHz and voltage between 1.8 and 3.6V. It is possible to perform a secondary calibration of the RC oscillator to obtain a frequency accuracy within ±1% see here. Note that the oscillator temperature coefficient is also corrected and calibrated.
Checking the clock speed
If you forget to set the clock speed with tools> Clock Speed, it can have serious consequences. For example, at the Yamaha battery dongle, to reduce power consumption, I use a clock frequency of 5MHz instead of 20MHz. If the factory forgets to set the frequency, the dongle will still work. While the dongle still passes the test, the electronics will overheat. That is why it is important to add a test in the software. In this example, the program stops if the clock frequency is not 5Mhz.
while(checkClockSpeed()) blinkError(5)
bool checkClockSpeed() { byte b = CLKCTRL.MCLKCTRLB; // 0=20MHz 1=10MHz 11=5MHz not allowed: 16, 8, 4, 1 MHz return b!= 3; }
Links