ATtiny Arduino: A Tiny But Mighty Microcontroller for Your Next DIY Project

About ATtiny Arduino, In the ever-expanding world of technology, the smallest devices often make the biggest impact. One such game-changer is the ATtiny Arduino, a tiny yet powerful microcontroller that has taken the maker community …

ATtiny Arduino

About ATtiny Arduino, In the ever-expanding world of technology, the smallest devices often make the biggest impact.

One such game-changer is the ATtiny Arduino, a tiny yet powerful microcontroller that has taken the maker community by storm.  

This versatile hardware can run complex projects while remaining incredibly cost-effective and compact.

In this article, we’ll delve into the world of ATtiny Arduino, its capabilities, and how you can utilize it for various applications.

Table of Contents

What are ATtiny Microcontrollers?

ATtiny Microcontrollers belong to the AVR family, known for their compact size, low power consumption, and versatility in various applications.

These microcontroller boards have gained popularity among hobbyists and professionals for simple to moderately complex projects that involve simple inputs.

Featuring an 8-bit RISC architecture, ATtiny Microcontrollers offer adequate performance for tasks like reading sensors, controlling board LEDs, etc.

They also come in multiple memory configurations, such as Flash, EEPROM, and SRAM, providing flexibility for different needs.

Moreover, they offer a range of built-in peripherals, including GPIO pins, ADCs, timers, PWM channels, and serial communication interfaces like serial and USB ports.

Their support for in-system programming (ISP programming) and various development tools, such as the Arduino platform or Atmel Studio, make them easy to use and program. 

ATtiny Microcontrollers are available in various packages, from small SMD types to larger DIPs, fitting different form factors and requirements.

Low power consumption and minimum voltage requirements make them ideal for battery-powered devices, embedded systems, wearables, and IoT applications with a dedicated power supply.

An ATtiny 32 MCU

Why Pick ATtiny Over a Regular Arduino Board?

Arduino’s Downsides

First, Arduino boards are larger than microcontroller ICs like the ATTiny board. Integrating them into projects is tough.

People often use shields for bigger projects, which plug into Arduino headers.

However, this creates a bulky, unwieldy setup that doesn’t always fit well. 

Second, Arduinos cost more than custom boards with microcontroller ICs and passive components.

Depending on the model, Arduinos range from $20 to $30, while microcontrollers cost around $2.

Lastly, Arduino boards can be overkill for some projects.

Many Arduino projects leave most I/O pins unused, and the code barely fills the controller’s flash memory.

An Arduino Uno board

An Arduino Uno board

ATtiny AVR Microcontrollers: A Better Option

Starting a project? Want a cheaper, simpler, more compact alternative to Arduino Uno? Choose AVR microcontrollers by Microchip Technology! 

These chips share many features with Arduino boards.

The Arduino Uno even uses one: the ATmega328P.

You can program these microcontrollers with the Arduino IDE and libraries and access the Tools and Programmer menu for easier programming. 

Like Arduinos, ATtiny microcontrollers have I/O pins, store programs on-chip, and operate on 3.3V or 5V power input through the Supply Voltage Pin.

Plus, a large community is ready to help if you face any issues.

Many AVR microcontroller options exist, but let’s focus on ATtiny84, ATtiny85, and ATtiny2313.

We’ll compare them to the ATmega328 found in the Uno.

These ATtiny chips are great for bringing projects to life without breaking the bank or taking up too much space.

They also offer impressive functionality and versatility.

On the plus side, ATtiny85 chips offer many cool advantages:

  • Smaller: Shrink your prototype! 
  • Cheaper: Get 6 ATtiny85s for an Arduino Uno’s price! 
  • Low Power: Use a coin cell easily! 
  • Ideal for simple projects (with fewer GPI pins)

A Quick Look at ATtiny MCUs: A Side-by-Side Comparison

Let’s explore this comparison and clarify these microcontrollers’ datasheet terms while referring to the list of boards available.

I/O Pins 6231218
Flash Memory 8Kb32Kb8Kb2Kb
ADC Inputs 46 on PTH; 8 on SMD80
PWM Outputs6644

I/O Pins: The Connection Hub

Each ATtiny AVR microcontroller has a distinct number of I/O pins that connect inputs and outputs like sensors, buttons, LEDs, and motors.

Select the right microcontroller by assessing the pins needed for your project and the board type. 

When selecting the right microcontroller, consider the pins needed.

For instance, building a robot arm with four servos and a Bluetooth module requires more than the six I/O pins available on ATtiny85.

However, the ATtiny85 is ideal for a serially controlled LED light.

LEDs connected to Arduino

LEDs connected to Arduino

Flash Memory: Size Matters

When using Arduino boards, flash memory might not cross your mind.

However, microcontrollers depend on it to store running sketches.

While the Arduino Uno features 32 kB of flash memory, the Arduino Mega boasts a sizable 256 kB – enough for most projects.

Imagine a six-legged walking robot controlled by a PlayStation 2 controller and powered by inverse kinematics.

The Arduino Uno can handle this complex project, using only 72% of its stores.

You can check memory usage in the Arduino IDE.

However, ATtiny microcontrollers with only 2 KB of program memory require optimized sketches.

To fit your code, reduce libraries, use fewer variables, and select the smallest data types.

A robot car

A robot car

ADC Inputs: Closing the Analog-Digital Gap

ADC inputs labeled A0, A1, A2, and so on are pins on an Arduino board.

Their purpose is to enable communication between digital microprocessors and analog sensors through analog-to-digital conversion.

A thermistor, for example, produces a variable voltage dependent on temperature.

This analog signal converts to digital form by the ADC so that microcontrollers, like ATtiny and Arduino, can understand it.

PWM Outputs: Analog Mastery in a Digital Realm

PWM addresses a problem analogous to ADC inputs.

While ADC channels enable microcontrollers to process inputs from analog devices, PWM channels regulate components that receive analog signals as outputs.

Multiple ways exist for microcontrollers to deploy PWM outputs to control devices that require more than digital signals alone.

  • Adjusting LED brightness
  • Changing the speed of motors
  • Servos can be controlled
  • Generating audio signals
  • Infrared LEDs for remote controls need to be powered

Using Arduino Uno to program ATtiny85 Microcontroller IC

Circuit Diagram


To program an ATtiny85, you’ll need the following components:

1) Arduino UNO

2) ATtiny85 IC

3) breadboard

4) jumper wires

5) LED

6) 220-ohm resistor


Step 1: Setting up your Arduino Uno as an ISP

Plug the Arduino Uno into your laptop using a USB cable.

Then, open the Arduino IDE, go to File > Example > ArduinoISP, and upload the code.

Step 2: Get ATtiny85 going with Arduino IDE

Follow these steps to program ATtiny85 with Arduino IDE:

  1. In File > Preferences, paste the required link into the Additional Boards Manager URLs field.
  2. Install the latest ‘at tiny’ version in Tools > Board > Board Manager.
  3. Locate the new entry in the Board menu.
  4. Open the Blink example in File > Examples > Basics, then change the PIN to 0.
  5. Select “Attiny25/45/85” in Tools > Board and “ATtiny85” in Tools > Processor.
  6. Upload and watch the LED on Pin 0 blink.

ATtiny MCU Integration Methods

For seamless ATtiny microcontroller integration in projects, prototypes, or products, consider three main methods based on production volume:

  1. Program microcontrollers using an IC test socket for small-scale projects or prototypes.
  2. Transition to ISP headers and an AVR programmer for late-stage prototypes or full production. 
  3. Opt for pre-programmed microcontrollers for large-scale production or space-constrained projects.

Wrap Up

In a nutshell, ATtiny microcontrollers are the game-changer you’ve been waiting for!

Their compact design, low power demands, and flexibility make them perfect for everything from sleek wearables to cutting-edge IoT devices.

ATtiny microcontrollers come with I/O pins, flash memory options, and built-in peripherals.

And this allows them to meet different project requirements while maintaining the familiar programming environment on the Arduino IDE.

When choosing an ATtiny microcontroller, consider your project’s specific requirements.

Once set up and programmed, you’ll have a highly efficient and streamlined solution.