To the Home Page

EclairM0, the pocket notepad – the build guide

Published on April 24, 2025 · Reading time: 6 minutes

Updated for hardware revision D and firmware version 1.1.

Thank you for considering building EclairM0.

Read the entire guide first! I do not take the responsibility for any problems or damages.

WARNING: This device contains a rechargeable lithium-ion battery. Do not drop, puncture, throw, reshape, or overheat the battery. Do not charge unattended. Do not keep fully charged or discharged for extended periods of time. Do not short-circuit or perform any modifications.


Make sure you have 3–4 hours of spare time and all the necessary equipment (including any safety measures):

Schematic and PCB design as a KiCad project, a 3D-printable enclosure as OpenSCAD files, and the firmware source code are all in the GitHub repository.

Let’s set the expectations first: this may not be a task for total newcomers. You will need to study device’s circuitry a little (to figure out the correct location and orientation for all components) and debug potential issues using a multimeter. You should also have enough experience with drag soldering and SMD reflow soldering.

Table of Contents

Bill of materials

I’ve tried to remove some characters from part numbers if these describe only the packaging information, serial numbers, or other minor differences. If in doubt, please look for “ordering information” in a datasheet.

Usually, it’s cheaper to buy parts for more than one board, and this also gets you some spares if something goes wrong.

(This table can be scrolled horizontally on mobile.)

Qty Part Part No.(s) Manufacturer Notes
1 Microcontroller ATSAMD21E18x-A MICROCHIP TQFP32, 0.8 mm pitch, 32 kB RAM, 256 kB flash
1 Charging controller MCP73831-2 MICROCHIP SOT23-5, VREG=4.2 V
1 LDO voltage regulator AP2112K-3.3 DIODES INC SOT23-5, VOUT=3.3 V
1 SPI display 012832DYPP3N (yellow)
012832DWPP3N (white)
WINSTAR 15-pin FFC, 0.65 mm pitch, SSD1306, 128×32
2 Schottky diode MBR120(V)LSF
MBR130(V)LSF
ONSEMI SOD123F, low dropout
1 USB‑C receptacle USB4105-xx-x-060 GCT -
14 Tactile switch EVQQ2B03 (50 gf)
EVQQ2F03 (100 gf)
PANASONIC H=3.1 mm, HBASE=1.8 mm
1 Slide switch CUS-12TB NIDEC COPAL -
4 1 µF capacitor - - SMD0805, MLCC, X7R
6 4.7 µF capacitor - - SMD0805, MLCC, X7R
3 5.1 kΩ ±1% resistor - - SMD0805
1 22 kΩ ±1% resistor - - SMD0805
2 68 kΩ ±1% resistor - - SMD0805
1 560 kΩ resistor - - SMD0805
1 LIR2025 holder BK-6219-TR MPD (see below)
1 LIR2025 battery - - (see below)

LIR2025H (high-capacity) is recommended, but LIR2025 is also OK. Make sure the battery holder has correct diameter, and its total height does not exceed 3.1 mm.

If your battery has terminals welded in, you may be able to solder it directly, but it won’t look as good. Use the top “+” pad, located near the ON/OFF switch. (The bottom one is only for keeping the battery holder in place.)

PCB assembly

Spread some solder paste on the bottom of the PCB, using stencil as a helper. If it does not look okay, use a paper towel to wipe it off the board and try again.

Solder paste applied
Solder paste applied

Place components according to the schematic, heat the board up to 250—270°C so the solder paste melts and becomes shiny (it may take some time!), then continue for 15 seconds or so. Remove any unwanted bridges with a solder wick, soldering iron, or tweezers. Add the battery holder, but do not install OLED yet.

The R1 programming resistor has the recommended value of 68 kΩ, which results in 15 mA charging current. You can make charging twice as fast by placing another 68 kΩ on top (parallel) – check in datasheet if your battery can handle 30 mA. Do not change anything if you’re unsure.

Core components installed
Core components installed

Let the board cool down, then connect it to PC using a USB‑C data cable. If you get the “USB device not recognized” notification, ignore it for now. Make sure that there are valid voltages on the 5V (4.9-5.1 V) and 3V (3.2-3.3 V) test points.

5 V and 3.3 V test points
5 V and 3.3 V test points

Flip the board and repeat the reflow soldering process for buttons on the top. The components on the bottom will be held in place with the surface tension, but do not touch the board (or any plastic parts) while it’s hot. Once again, wait for the board to fully cool down.

Buttons installed
Buttons installed

At last, install the OLED with a regular soldering iron. Make sure there is a connection between each pin on the flex cable and the respective PCB pad. Remember to use thin double-sided tape later, to lock the screen in place (you can add some CA glue just to be sure).

I’ve cheated a little and re-used the microcontroller from another prototype board, so I can already see that everything works just fine.

OLED installed and working
OLED installed and working

Flashing the bootloader

The UF2 bootloader is required for uploading new firmware without using a SAMD21 hardware debugger later on.

You can use a Raspberry Pi with OpenOCD software installed as a hardware debugger. Tested with Pi Zero W and Pi 4, it will not work with Pi 5 which uses the RP1 coprocessor for GPIO. Use Raspberry Pi Imager to prepare an SD card with Wi‑Fi and SSH preconfigured.

Raspberry Pi Imager
Raspberry Pi Imager

Connect the board to Pi (only data, clock and ground signals are required) and to PC. Make sure the USB‑C cable supports data transfer.

EclairM0-Raspberry Pi wiring
EclairM0-Raspberry Pi wiring

Use the SSH client to access Pi. The command-line SSH client is preinstalled on all modern operating systems, including Windows 10 and later.

In the remote session, run the following commands one by one to install OpenOCD, clone the code repository, and flash the bootloader. A new TRINKETBOOT drive should appear. (EclairM0 uses the bootloader of Adafruit Trinket M0.)

sudo apt update
sudo apt install git openocd wget -y

git clone https://github.com/mateusznowakdev/eclair
cd eclair/bootloader
wget https://github.com/adafruit/uf2-samdx1/releases/download/v3.16.0/bootloader-trinket_m0-v3.16.0.bin

sudo openocd

Output of OpenOCD flashing command
Output of OpenOCD flashing command

Installing the firmware

The notes demo app, written in TinyGo and shown on the project description page, can be downloaded from Releases tab in my GitHub repository. You can also compile it from source, please read the repo’s README for more information.

Copy the .uf2 file to the TRINKETBOOT drive, and the device will reboot automatically.

If TRINKETBOOT is not present, unplug the board from PC temporarily and try again. Still no luck? Try entering bootloader’s mass storage mode manually by shorting “R” and “G” pads twice in a short succession, using a wire or a pair of tweezers.

If TRINKETBOOT is present, but you can’t open it, try uploading the firmware via another device.

Now you can insert the battery (make sure the polarity is correct), and you’re good to go! 🍪

Check out other blog posts: