The SAMD21 is a powerful and cost-effective Cortex M0 microcontroller from Microchip. The E-series variant offers 32 pins, including up to 26 I/O pins, and integrates built-in USB support, making it easy to implement in designs. Additionally, the SAMD21E series provides up to 256 capacitive touch channels without requiring additional hardware. With a clock speed of 48 MHz, up to 256KB of Flash memory, and 32KB of RAM, it delivers solid performance for a wide range of applications.
The SAMD21E18, with the highest RAM and Flash options in the E series, is priced competitively—often lower than or comparable to the ATMega32u4. However, it is important to note that the SAMD21 is not 5V tolerant. Therefore, caution is needed when interfacing with 5V systems to avoid damaging the chip. On the plus side, the built-in USB functionality simplifies design by eliminating the need for additional components, and USB-C is a commonly used interface for the SAMD21 series.
The SAMD21E18 is available in both TQFP32 and VQFN32 packages, giving you the flexibility to choose based on your available space. The most minimal design, consisting only of a reset button, USB-C connector, and the chip, requires only 11 components, including the button, connector, and chipset, making it cost-effective and efficient.
Below is a KiCAD schematic I created for a minimal design:
As you can see, the design is streamlined, with only the essential components.
Here’s a brief explanation of the design:
The USB-C connector is paired with 5.1kΩ resistors between CC1/CC2 and GND, following the standard USB-C protocol. A diode from VBUS to 5V provides protection to the power supply.
As mentioned earlier, the SAMD21E18 operates at a 3.3V logic level and does not support 5V directly. Using 5V without proper conversion will damage the chip.
To safely power the board, we must step down the 5V USB power to 3.3V. In this design, we use an AP2112K-3.3V voltage regulator. Alternative regulators, such as the MCP1700, will work as well. Two 10uF decoupling capacitors are used for input and output filtering on the AP2112. Additionally, a 1uF decoupling capacitor is placed on VDDCORE (as per standard usage for E18 models), and another 1uF capacitor is placed between 3.3V and GND.
While the SAMD21 typically requires a 32.768kHz crystal for the internal clock, it is not mandatory for this design. Therefore, the design remains simple and cost-effective by omitting the crystal.
Thanks to the low component count, this design is easy to route and assemble!
For example, here’s a routed version of the design:
For reference, the USB-C connector used is the USB-4085, a through-hole part that is easy to solder.
Additionally, I have shared several E18 designs on my GitHub repository, which might be helpful for your own projects:
The SAMD21 series is highly versatile, especially the E18 variant. The E-series offers various configurations with different Flash and RAM sizes, with the E18 being the most powerful. These come in TQFP32 and QFN32 packages, providing options depending on your design space constraints. The TQFP32 package, although larger, features a 0.8mm pitch, making it easy to solder with a standard iron. Prototyping PCBs is affordable—Wellcircuits, for example, offers 10 boards (100mm x 100mm) for just $5.
Alternatively, you can opt for a QFN design to save space. If you’re not able to solder QFN packages, you can either get a stencil from Wellcircuits or have them assemble up to 30 boards for just $30.
Thank you for reading this guide! I hope it proves useful. Feel free to reach out to me on Twitter (@rpitechguy) if you need any assistance with your design!
If you have any questions about PCB design or PCBA, don’t hesitate to contact me via email: info@wellcircuits.com