logo elektroda
logo elektroda
X
logo elektroda

DigiSpark mini Arduino ATtiny85 module, commissioning, test

TechEkspert  32 12270 Cool? (+2)
📢 Listen (AI):

TL;DR

  • DigiSpark is a miniature Arduino-compatible module built around the ATtiny85, with USB handled in firmware instead of a USB-UART converter.
  • It includes a 5V stabilizer and exposes pins P0–P5, while setup requires adding the Digistump board URL, installing Digistump AVR Boards, and loading the driver.
  • The module offers 8kB flash memory, with 2kB occupied by the bootloader, and the DigiScope example reads analog input on P2 over a 0–4.75 V range.
  • The board worked with DigiUSB tools to show a 1Hz waveform and can emulate a keyboard, mouse, joystick, or serial port, but it has few pins and awkward breadboard compatibility.
DigiSpark is a miniature Arduino compatible module, based on the ATtiny85 microcontroller. The board is not equipped with a USB UART converter typical for Arduino. The USB lines have been connected with the pins of the microcontroller, while the USB support has been embedded in the firmware. The module is equipped with a 5V stabilizer and the PCB terminals work with this voltage. 8kB flash memory available (2kB occupied by bootloader). We have the following outputs:
P0 (SDA, PWM, AREF)
P1 (PWM, LED)
P2 (D / A, SCK)
P3 (D / A, USB +)
P4 (D / A, PWM, USB-)
P5 (D / A)

Integration with Arduino:
We choose:
File-> Preferences-> field Additional URLs to the tile manager, add the line:
http://digistump.com/package_digistump_index.json
Tools-> Tile> Tile manager-> search for "digistump" and install Digistamp AVR Boards library.
We download and install the driver for the device:
https://github.com/digistump/DigistumpArduino/releases/download/1.6.7/Digistump.Drivers.zip
After installation, select Tools-> Board-> Digispark (16.5MHz)

Loading the program is different than with standard Arduino boards:
-compile the program and start uploading
-when appropriate information appears in the console, connect the Digispark board



Let's open the example of DigiSparkUSB-> DigiScope
We compile the example and upload it to the board.
The analog signal is given on P2 (input voltage range 0-4.75v).



Using the tools https://github.com/digistump/DigisparkExamplePrograms (DigiUSB -> windows -> digiscope.exe) we can observe the analog signal given on pin P2. The 1Hz waveform is recorded below.



Depending on the program, digispark, when connected to USB, can emulate a keyboard (example with an I2C scanner), mouse, joystick, serial port. The advantage of the module are small dimensions, the disadvantage may be a small number of pins, and the layout of pins that makes it difficult to use the module on the contact plate. Earlier digispark versions were available on PCBs with a track pattern forming a USB plug, which allowed the PCB to be directly inserted into the USB socket.

What are your applications for digispark modules?

Source:
http://digistump.com/

About Author
TechEkspert
TechEkspert wrote 6923 posts with rating 5387 , helped 16 times. Been with us since 2014 year.

Comments

oskar777 16 Jul 2018 00:09

Hello. In my cellar, I will probably use the pressure sensor in the water system and then further data in series, can also be suitable for a water level sensor. [Read more]

RigelInOrion 16 Jul 2018 07:23

I don't know about you, but I had problems with the digispark at the start. In most cases, the computer did not recognize the device. After replacing the diodes zener at 3.3v the problem is gone. [Read more]

noel200 16 Jul 2018 11:40

For me, it often does not recognize this plate. Sometimes it takes a lot of patience to upload the program. [Read more]

TechEkspert 16 Jul 2018 19:13

@ oskar777 between the basement, the sensor and the apartment, it is worth using something like RS-485, or something equally "far-reaching". @RigelInOrion @ noel200 i.e. simplification of the... [Read more]

leonow32 16 Jul 2018 20:19

Isn't it better to try something like this? https://www.tme.eu/pl/details/attiny416-xnano/zecja-do-ukladow-microchip/microchip-technology/ Built in DEBUGGER and serial port via USB, full... [Read more]

pier 16 Jul 2018 20:45

Do you know any way how to run Digispark under WIN10? [Read more]

TechEkspert 16 Jul 2018 20:58

@ leonow32 interesting board, presentation of a new ATtiny series microcontroller. @pir the description in the first post was made during trials on WIN10. [Read more]

RigelInOrion 16 Jul 2018 21:28

The bootloader, which is responsible for loading the program, starts only for a moment emulating the "Digispark something" device and if nothing is sent to it, it starts the program. Hence, it is constantly... [Read more]

Anonymous 16 Jul 2018 21:31

Blue Pill costs 3 times less, offers 10 times more and is "a little" faster. Added after 1 [minutes]: The voltage on the USB lines must not exceed 3.6V. As it is bigger, errors can occur. [Read more]

fotomh-s 16 Jul 2018 23:14

This board and this microcontroller are a bit of nonsense. Who needs a USB microcontroller with such a small number of pins? In addition, the USB eats 2 ports ... The ADC is there, but it eats the port... [Read more]

tronics 16 Jul 2018 23:17

@nowyARM - bluepill is "dumped". Neither I nor you will buy the STM32F103 itself at the price at which this module is sold. What "economic magic" is behind it, I have no idea, GD32 probably not, although... [Read more]

Anonymous 16 Jul 2018 23:33

There are 6 pin uC, where 2 is power. Used in intelligent optical sensor. uC 8 pin are often used in models where miniaturization is important. In model railroads, model airplanes. [Read more]

leonow32 17 Jul 2018 07:15

It is not expensive ;) the original Arduino Uno costs about PLN 91 :P and you will not experience debugging there https://www.tme.eu/pl/details/a000066/zecja-arduino/arduino/arduino-uno-rev3/# ATiny416... [Read more]

noel200 17 Jul 2018 07:26

Recently, I had to disassemble an oral-b vitality electric toothbrush because the switch did not work as it should. There is a microcontroller inside. Not in the plcc44 housing, but a tiny one. This is... [Read more]

Anonymous 17 Jul 2018 09:22

Comparison in the style of the ruling party. Compares colleague alone uC in quantity wholesale down starting tile in quantities retail . Is this comparison reliable? Is it there to prove... [Read more]

leonow32 17 Jul 2018 09:38

You started comparing the small ATina board to the STM32 board :P [Read more]

Anonymous 17 Jul 2018 10:18

I compared retail prices. I can also compare the price of the tile with a small AtTina for PLN 45.51 (PLN 37.56 net) with NUCLEO for PLN 55 gross. For 20% more, we have 100 times better set. Let's... [Read more]

fotomh-s 17 Jul 2018 19:39

Even in aviation models, the weight of the microcontroller itself does not matter as long as we are talking about SMD. The antenna itself from the receiver weighs a lot more, and no one in modeling cares... [Read more]

TechEkspert 17 Jul 2018 20:35

It is worth remembering that USB is not hardware-based, but software-based, which significantly limits the capabilities of such a USB. As for the AREF, it can be used, but you can also select internal... [Read more]

FAQ

TL;DR: DigiSpark offers 8 kB flash (2 kB bootloader) in a 26 × 18 mm board [Elektroda, TechEkspert, post #17330915]; "After replacing the Zener diodes the problem is gone" [Elektroda, RigelInOrion, post #17331317] This FAQ streamlines drivers, Windows 10, programming tricks, and troubleshooting.

Why it matters: A two-euro board can emulate USB HID, sense analog signals and run in minutes—if you know the quirks.

Quick Facts

• MCU: ATtiny85, 8 kB flash, 512 B SRAM, 6 GPIO/PWM/ADC lines [Elektroda, TechEkspert, post #17330915] • USB: V-USB software stack, low-speed 1.5 Mbit/s, shared on P3/P4 [V-USB Factsheet] • Power: On-board 5 V LDO; analog input range 0–4.75 V on P2 [Elektroda, TechEkspert, post #17330915] • Driver package: Digistump.Drivers v1.6.7 for Win7-10 [Digistump, 2019] • Street price: US $1.8–2.5 per clone module [AliExpress listing, 2023]

What is the correct upload procedure?

Compile first, click Upload, then plug the board in when the IDE shows “Plug in device”. The bootloader listens for ~5 s, then runs the previous sketch, so timing matters [Elektroda, TechEkspert, post #17330915]

Does DigiSpark run under Windows 10, and how do I install drivers?

Yes. Unzip Digistump.Drivers 1.6.7, right-click DPInst64.exe (or 32-bit) and install. Plug the board only after installation; Windows then enumerates it as “Digispark Bootloader” [Digistump, 2019].

Can I program the board while it is wired into my system?

Yes. Ensure the external 5 V rail is isolated with a diode so USB can power the module during upload, and keep P3/P4 free of other loads during the short boot phase [Elektroda, pier, post #18429878]

What are typical applications of a Digispark?

Common uses include USB Rubber-Ducky-style keyboards, capacitive touch buttons, WS2812 LED drivers, miniature oscilloscope (DigiScope example), water-level sensors and RS-485 basement telemetry [Elektroda, TechEkspert, #17330915; oskar777, #17331218].

How do I read an analog signal on P2?

Load the Arduino example File → Examples → DigisparkUSB → DigiScope. Feed 0–4.75 V into P2; view live data with digiscope.exe from the DigisparkExamplePrograms repo [Elektroda, TechEkspert, post #17330915]

Can the board act as a USB keyboard or mouse?

Yes. The V-USB stack lets sketches enumerate as HID. Example: emulate a keyboard to send shortcuts; no driver needed on host PCs because HID is class-compliant [Elektroda, RigelInOrion, post #17332863]

How can I flash firmware without the bootloader?

Use a standard 6-pin ISP header: connect MOSI, MISO, SCK, RESET, VCC, GND to a USBasp or AVR-ISP MKII. This frees the 2 kB bootloader space, giving the full 8 kB and removes the 5-second start delay [Elektroda, RigelInOrion, post #17332863]

What’s the recommended way to place remote sensors like in a cellar?

Add an RS-485 transceiver (e.g., MAX485) on P0/P1. Two-wire twisted pair lets you span 1200 m while rejecting noise—ideal between basement sensors and upstairs controller [Elektroda, TechEkspert, post #17332528]

What limits should I know about the software USB implementation?

V-USB is low-speed only, maximum 1.5 Mbit/s and one transaction per USB frame. Isochronous and high-bandwidth endpoints are unavailable. CPU spends ~10 % time in USB interrupt service at 16.5 MHz, reducing real-time performance [V-USB Factsheet].
%}