Getting Started With MH-ET LIVE Tiny88 Arduino Board: Installing and Fixing Micronucleus 2.2 Issue

by arduinocelentano in Circuits > Arduino

1675 Views, 1 Favorites, 0 Comments

Getting Started With MH-ET LIVE Tiny88 Arduino Board: Installing and Fixing Micronucleus 2.2 Issue

01.JPG

Why MH-ET LIVE Tiny88? Recently I started designing a $5 robot concept and selected this board as its “brain”. ATtiny88 microcontroller has decent GPIOs and could be purchased for as cheap as $1 in bulk or on sale. Moreover, with some hacks, its power consumption could be reduced. This board might be also interesting for you as a cheap platform for USB devices. Low speed USB devices, I mean. Since it only has software USB implementation. And of course do not expect this board to be an Arduino Nano replacement. The ATtiny microcontroller series has a lot of restrictions compared to ATmega.

The board does not have a USB-TTL interface, so it uses a bootloader for firmware uploading. It makes the installation process somewhat nontrivial. Since I found no MH-ET LIVE Tiny88 setup tutorial here, I created this one as a recap for myself or everyone who wants to quickly start using this board.

🔗 If you are interested in power consumption optimization of this board, I suggest that you also read this instructable. If you are looking for USB applications ideas, you might check out my wireless input device project and this BadUSB tutorial.

Supplies

002.JPG

You'll need a devboard itself, a MicroUSB cable and a computer with Arduino IDE installed.

Configuring the Additional Boards Manager

01.png

Open Arduino IDE preferences and add the following URL for additional boards manager:

https://raw.githubusercontent.com/MHEtLive/arduino-boards-index/master/package_mhetlive_index.json

Installing the Board Support in Arduino IDE

02.png
03.png

Open the board manager in Arduino IDE and start typing in the search line something like “MH-ET”. When you find the package, click “Install”. Wait until the installation finishes and close the dialog.

⚠️DO NOT CONNECT THE BOARD YET!


Selecting the Board

05.png

Now select MH-ET LIVE Tiny88 in the boards list.

⚠️DO NOT CONNECT THE BOARD YET!

Uploading the Blink Sketch

06.png

Open the Blink example from File menu. Click the “Upload” button and wait until you see the message that asks you to connect the board to a USB port:

Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)

Do as it says. If you are lucky enough, that’s the final step. However if you see the following warning message, read the next step.

Warning: device with unknown new version of Micronucleus detected.
This tool doesn't know how to upload to this new device. Updates may be available.
Device reports version as: 2.2

Fixing the Micronucleus Version Issue

07.png

The message does not look very helpful, especially if it’s your first Attiny development board. This board does not have any USB-TTL interface like other Arduino boards. Neither has ATtiny88 USB native support. So the software USB implementation is included into a bootloader which is known as Micronucleus. By the way, this firmware takes about 2Kb of the microcontroller's flash memory, so only 6Kb are available for your sketches.

The message says literally that the bootloader version does not correspond to the version of the code which tries to communicate with it. For some reason MHEtLive Arduino package contains outdated software. To fix it, you could compile it yourself from the source code. If you use Debian or Ubuntu compatible OS, open the terminal and type the following lines.

sudo apt install git libusb-dev
git clone https://github.com/micronucleus/micronucleus
cd micronucleus/commandline
make
cp ./micronucleus ~/.arduino15/packages/mhetlive/tools/micronucleus/2.0a4/

The first command installs the git and libusb library. You could omit this step if you already have them. The second command downloads the official source code from GitHub. The next two commands build it. And the final line copies the binary to the Arduino directory. Please change the version if needed.

Fixing the USB Permission Error

08.png

If now you are able to upload the Blink sketch, the installation procedure is finished. However if you see the following error, you should finish this step as well.

usb_open(): Permission denied. For Linux, copy file https://github.com/micronucleus/micronucleus/blob/master/commandline/49-micronucleus.rules to /etc/udev/rules.d

This message is pretty much straightforward. For security reasons your Linux system (udev service, to be more precise) does not allow a random user to connect random USB devices. So you should create the rule for this particular board. To do so, execute the following commands in the terminal:

wget https://raw.githubusercontent.com/micronucleus/micronucleus/master/commandline/49-micronucleus.rules
sudo mv 49-micronucleus.rules /etc/udev/rules.d
sudo udevadm control --reload-rules && udevadm trigger

Enjoy Your New Development Board

09.png

Now you should be able to upload the Blink sketch or any other sketch to your board.

⚠️Note that the bootloader listens to USB connection only on startup, so you always must connect the board only when Arduino IDE asks to do it, otherwise the bootloader jumps to your last sketch execution until the next reset.