nanohub

Optiboot for Nanos


on blog

Optiboot is a smaller and faster bootloader for Arduino, which is already used for Arduino Unos in recent versions of the standard Arduino IDE. Unfortunately the same cannot be said for the other Arduino Boards, so in this article we will use a spare Arduino Uno as an ISP programmer and burn the optiboot bootloader into an Arduino Nano. Let's go.

First, we need to upload the ArduinoISP sketch to the Uno board (to use it as a programmer). Connect the Arduino Uno to the USB port. Open the menu File > Examples > 11.ArduinoISP > ArduinoISP, then select the Uno board (Tools > Board > Arduino/Genuino Uno) and its COM port (e.g. Tools > Port > COM3). Finally, click Sketch > Upload.

Now we need to install the Optiboot boards in the Arduino IDE. In the menu File > Preferences, copy and paste the URL https://github.com/Optiboot/optiboot/releases/download/v6.2/package_optiboot_optiboot-additional_index.json to the Additional Boards Manager URLs text box, then click OK and go to Tools > Board > Boards Manager... where you can search and install the Optiboot 6.2 package.

When the process is complete, connect the ICSP Nano pins to the Uno board: pins MOSI (11), MISO (12), SCK (13), 5V and GND of the Uno to the respective pins in the Nano; and pin 10 of the Uno to the RST (reset) pin in the Nano.

After this, restart the Arduino IDE, change the board type to Tools > Board > Optiboot on 32-pin CPUs, the Tools > Port to the Uno serial port, the programmer to Tools > Programmer > Arduino as ISP and click Tools > Burn Bootloader.

Now that the Nano has the Optiboot bootloader, you can disconnect the Uno and use the Nano normally. Just remember to set the board to one of the Optiboot options and change Tools > Port to the Nano COM port before uploading your sketch.

Daniel Lima