ThisCalculator

Everyday

Smallest Arduino Board: Meet the ATtiny85

Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Finish time
50 min
You entered
Distance
10 km
You entered

Smallest Arduino Board: Meet the ATtiny85

The smallest Arduino-compatible board you can buy is the Digispark, which is built around the ATtiny85 microcontroller. It measures about 18 x 18 mm (0.7 x 0.7 inches) and costs only a few dollars, making it a popular choice for tiny, low-cost projects. This article explains what makes it so small, how to program it, and where it fits compared to other miniature boards.

What Is the Digispark?

The Digispark is a development board that uses the ATtiny85 microcontroller, an 8-bit chip from Microchip (formerly Atmel). It has 8 KB of flash memory, 512 bytes of SRAM, and 512 bytes of EEPROM. The board itself is a small PCB that includes a USB connector, a voltage regulator, and a few GPIO pins. It is designed to be programmed using the Arduino IDE, so you can write sketches (Arduino programs) and upload them via a USB cable.

The key feature is its size: it is significantly smaller than a standard Arduino Uno (which measures about 68.6 x 53.4 mm). The Digispark is often sold as a bare board, without headers, so you can solder wires directly to the pads. This makes it ideal for embedding in wearables, drones, or other compact projects.

How to Program the Digispark

Programming the Digispark is slightly different from a standard Arduino because it does not have a built-in USB-to-serial chip. Instead, it uses a software USB library that runs on the ATtiny85 itself. This means you need to install the Digispark board definitions in the Arduino IDE and then upload your sketch using a special method:

  1. Install the Digispark board package: In the Arduino IDE, go to File > Preferences and add the URL http://digistump.com/package_digistump_index.json to the Additional Boards Manager URLs field. Then go to Tools > Board > Boards Manager, search for “Digispark�, and install it.
  2. Select the board: Choose “Digispark (Default – 16.5MHz)� from the Tools > Board menu. Also set the programmer to “Digispark� (Tools > Programmer).
  3. Upload your sketch: Click Upload. The IDE will compile the sketch and then wait for you to plug in the Digispark. You must plug it in within about 60 seconds, and the upload will start automatically.
  4. Unplug and replug: After the upload finishes, you may need to unplug and replug the board to run the new sketch.

This is a common source of confusion for beginners because the upload process is not instantaneous like with a Uno. You have to wait for the IDE to say “Plug in device now� before connecting the board.

Key Specifications and Limitations

The ATtiny85 is a very capable chip for its size, but it has limitations compared to larger Arduinos:

  • Memory: 8 KB of flash (about 6 KB available for sketches after bootloader), 512 bytes SRAM, 512 bytes EEPROM. This is enough for simple programs, but not for complex ones that use arrays or strings.
  • Speed: Runs at 16.5 MHz (or 1 MHz by default in some configurations). It is an 8-bit processor, so it cannot handle heavy math as fast as a 32-bit board.
  • GPIO pins: 6 I/O pins (P0-P5), but P3 and P4 are also used for USB communication. When you use the USB, you lose those two pins for other purposes. So effectively you have 4 usable pins for your project.
  • Analog inputs: 3 analog input pins (P0, P2, P3) with 10-bit resolution (0-1023).
  • PWM: 2 PWM channels (P0 and P1) for controlling LEDs, motors, or servos.
  • No hardware serial: The Digispark does not have a hardware UART, so you cannot use the standard Serial library. Instead, you use the SoftwareSerial library to create a virtual serial port on other pins.

These limitations mean the Digispark is best for small, dedicated tasks like reading a sensor and sending a signal, or controlling a few LEDs. It is not suitable for projects that require WiFi, Bluetooth, or large amounts of data storage.

How to Choose the Right Small Board

If you are deciding between a Digispark and other small boards, consider what you need:

  • If you need the absolute smallest size and lowest cost: The Digispark is a good choice. It is cheaper than most other Arduino-compatible boards and is tiny.
  • If you need more pins or memory: Look at the Arduino Nano (which is still relatively small, about 45 x 18 mm) or the Seeeduino XIAO (about 20 x 17.5 mm) which has a more powerful ARM Cortex-M0+ processor and more memory.
  • If you need wireless connectivity: Consider the ESP8266 or ESP32 boards, which have built-in WiFi and are still quite small (e.g., Wemos D1 Mini is about 25 x 34 mm).
  • If you need to use standard Arduino shields: Stick with the Uno or Nano form factor.

Also note that the Digispark is a clone of the original Digispark by Digistump, but many compatible versions are available from various sellers. They all work the same way, but quality can vary. It is a good idea to buy from a reputable seller.

Common Problems and How to Fix Them

Many users encounter issues when using a Digispark for the first time. Here are the most common ones:

  • Upload fails: This usually happens because you did not plug in the board at the right time. Make sure you wait for the IDE to say “Plug in device nowâ€� before connecting the USB. Also, try a different USB cable (some cables are power-only).
  • Board not recognized: On Windows, you may need to install drivers. The Digispark uses a generic HID driver, but some clones require a separate driver. Check the device manager and install the driver from the Digistump website if needed.
  • Pins not working: Remember that P3 and P4 are used for USB. If you try to use them as outputs, they may interfere with the USB connection. Use P0, P1, P2, and P5 for your project.
  • No serial output: Since there is no hardware serial, you must use SoftwareSerial. Also, the default baud rate for the Digispark’s software serial is 9600, but you can change it in the library.
  • Brownouts: The Digispark has a voltage regulator that can supply about 500 mA, but if your project draws too much current, the board may reset. Keep the total current under 500 mA and use an external power source for high-power components.

Cost and Where to Buy

The Digispark is one of the cheapest Arduino-compatible boards available. Prices vary, but you can often find them for around $2 to $5 per board, especially when buying in bulk from online marketplaces. They are widely available on sites like eBay, AliExpress, and Amazon. Because they are so cheap, many hobbyists buy several at a time for experiments.

Note that the original Digistump board is a bit more expensive, but the clones are functionally identical. The main difference is the quality of the USB connector and the voltage regulator. For most projects, a clone will work fine.

Alternatives to the Digispark

If you need something even smaller or more powerful, consider these alternatives:

  • Seeeduino XIAO: This is about the same size as the Digispark (20 x 17.5 mm) but uses a SAMD21 microcontroller (32-bit ARM Cortex-M0+) with 256 KB flash and 32 KB SRAM. It also has more pins (11 GPIO) and a hardware serial. It costs a bit more, around $5-10.
  • Adafruit Trinket: Another ATtiny85-based board, but with a different form factor and a built-in USB bootloader. It is similar in capability to the Digispark but is a bit larger and more expensive.
  • Arduino Nano: If you need more pins and memory, the Nano is a classic choice. It has the same ATmega328P as the Uno but in a smaller package (45 x 18 mm). It is a good step up from the Digispark.
  • ESP32 boards: For projects that need WiFi or Bluetooth, the ESP32 is a great option. Boards like the Wemos D1 Mini (ESP8266) or the ESP32 DevKit are small and have plenty of memory.

Each of these has its own trade-offs in size, cost, and capability. The best one depends on your specific project requirements.

Safety and Best Practices

When working with the Digispark, keep these safety tips in mind:

  • Voltage: The Digispark can be powered via USB (5V) or via the 5V pin. Do not apply more than 5.5V to the VIN pin, as it may damage the regulator.
  • Current: The GPIO pins can source or sink up to 40 mA each, but the total current through the chip should not exceed 200 mA. For LEDs, use a resistor (e.g., 220 ohms) to limit current.
  • Short circuits: Avoid shorting the 5V and GND pins, as this can damage the board.
  • ESD: Handle the board with care to avoid static discharge, which can damage the chip.

Also, be aware that the Digispark does not have a reset button. To reset it, you can unplug and replug the USB, or use a small wire to briefly connect the reset pin to GND (if available).

Frequently Asked Questions

Can I use the Digispark with the Arduino IDE?

Yes, that is its main purpose. You need to install the Digispark board definitions in the Arduino IDE (version 1.6.5 or later) and then select the board from the Tools menu. The process is a bit different from a standard Arduino because you have to plug in the board after the IDE is ready to upload.

How many pins can I use on the Digispark?

There are 6 GPIO pins (P0-P5), but P3 and P4 are used for USB communication. When you are not using USB (e.g., after uploading), you can use P3 and P4 as regular pins, but they will be connected to the USB data lines, which may cause issues. In practice, you have 4 reliable pins (P0, P1, P2, P5) for your project.

Can I power the Digispark with a battery?

Yes, you can power it with a 5V source, such as a USB power bank or a 5V battery pack. You can also use a 3.7V LiPo battery, but the voltage regulator will drop it to about 3.3V, and the board will run at a lower speed. For best performance, use a regulated 5V supply.

Is the Digispark good for beginners?

It is a great second board for beginners who have already used an Arduino Uno. The upload process is a bit tricky, and the limited pins can be frustrating for complex projects. But for simple projects like blinking LEDs or reading a temperature sensor, it is perfect.

Can I use Arduino libraries with the Digispark?

Most libraries that work with the ATtiny85 will work, but you need to check the pin definitions. Some libraries are not compatible because they require more memory or use features not available on the ATtiny85. Always test the library with a simple sketch first.

How do I reset the Digispark?

There is no reset button on the standard Digispark. To reset it, simply unplug the USB cable and plug it back in. If your board has a reset pad, you can briefly touch it to GND to reset.

Related

Formula used
in t | Finish time | min | 50 | 0
in d | Distance | km | 10 | 0
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.