---
title: "STM32 Blue Pill and Teensy enclosures: 3D printed cases for boards with no mounting holes"
description: "The Blue Pill (53 x 22.5 mm) and Teensy 4.0 (35.5 x 17.8 mm) have no holes and live on headers. How to hold them with rails or pin channels, and prompts for both."
canonical: https://speakcad.com/blog/stm32-blue-pill-teensy-case-3d-print
published: 2026-09-08
updated: 2026-09-08
publisher: SpeakCAD
---

# STM32 Blue Pill and Teensy enclosures: 3D printed cases for boards with no mounting holes

> The Blue Pill (53 x 22.5 mm) and Teensy 4.0 (35.5 x 17.8 mm) have no holes and live on headers. How to hold them with rails or pin channels, and prompts for both.

## The boards

| Board | Outline | USB | Pin rows | Holes |
|---|---|---|---|---|
| STM32F103 Blue Pill | 53 x 22.5 mm | Micro-B on the short edge | 2 x 20, 15.2 mm apart, plus a 4-pin SWD header on the far edge | None |
| Black Pill (F401/F411) | 53 x 21 mm | USB-C on the short edge | 2 x 20 | None |
| Teensy 4.0 | 35.5 x 17.8 mm | Micro-B on the short edge | 2 x 14, 15.2 mm apart | None |
| Teensy 4.1 | 61 x 17.8 mm | Micro-B on the short edge, microSD on the far edge | 2 x 24, 15.2 mm apart | None |
| Teensy LC / 3.2 | 35.5 x 17.8 mm | Micro-B | 2 x 14 | None |

The Blue Pill also has two jumper blocks (BOOT0 and BOOT1) on top and a reset button near the USB end, both worth reaching.

## Holding a hole-less board

**Pin-row channels** are the best answer for these boards because they are almost always used with headers. Two channels in the base, 15.2 mm apart, 2.6 mm wide and 8 mm deep, capture the pin rows; the board rests on its pin shoulders and cannot slide. The channels double as feet.

**Edge rails** work when the board is bare: grooves 1.8 mm wide along the long edges, with the USB end open.

**A carrier PCB** is the cleanest: if the Teensy sits on a perfboard or a custom carrier, give the carrier's dimensions and holes and treat the Teensy as the tallest component.

## The prompt (Blue Pill)

> **Prompt** An enclosure for an STM32 Blue Pill, board 53 x 22.5 mm with 2 x 20 headers soldered pointing down, rows 15.2 mm apart. Two 2.6 x 8 mm pin channels in the base, 1.8 mm walls, 0.5 mm clearance, 14 mm internal height above the pin shoulders. A 9 x 4 mm micro USB cutout on the short edge, a 6 mm hole in the lid above the reset button 8 mm from the USB edge, a 12 x 8 mm slot in the lid above the BOOT jumpers, and a 12 x 5 mm slot on the far short edge for the SWD header. Snap-fit lid.

## The prompt (Teensy 4.1)

> **Prompt** A case for a Teensy 4.1, board 61 x 17.8 mm with headers pointing down, rows 15.2 mm apart. Pin channels in the base, 1.6 mm walls, 12 mm internal height, micro USB cutout on one short edge, a 15 x 3 mm microSD slot on the other short edge at board level, an 8 x 4 mm slot on one long side for the USB host cable, sliding lid.

## Debug access

Both families are programmed through a debug header: SWD on the STM32, the built-in bootloader over USB on the Teensy (with a program button on top). Leave a hole or slot for whichever you use, or you will open the case on every firmware change. "A 6 mm hole above the program button" is enough for the Teensy.

## Printing

Pin channels are narrow vertical slots and print cleanly. Keep the channel width at 2.6 mm; 2.54 mm pins plus the plastic shoulders need it. If the board rocks, ask for "a 1 mm rib along the channel floor" to raise it.

## Prompts to try

- An enclosure for an STM32 Blue Pill, board 53 x 22.5 mm with 2 x 20 headers soldered pointing down, rows 15.2 mm apart. Two 2.6 x 8 mm pin channels in the base, 1.8 mm walls, 0.5 mm clearance, 14 mm internal height above the pin shoulders. A 9 x 4 mm micro USB cutout on the short edge, a 6 mm hole in the lid above the reset button 8 mm from the USB edge, a 12 x 8 mm slot in the lid above the BOOT jumpers, and a 12 x 5 mm slot on the far short edge for the SWD header. Snap-fit lid. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DAn%2520enclosure%2520for%2520an%2520STM32%2520Blue%2520Pill%252C%2520board%252053%2520x%252022.5%2520mm%2520with%25202%2520x%252020%2520headers%2520soldered%2520pointing%2520down%252C%2520rows%252015.2%2520mm%2520apart.%2520Two%25202.6%2520x%25208%2520mm%2520pin%2520channels%2520in%2520the%2520base%252C%25201.8%2520mm%2520walls%252C%25200.5%2520mm%2520clearance%252C%252014%2520mm%2520internal%2520height%2520above%2520the%2520pin%2520shoulders.%2520A%25209%2520x%25204%2520mm%2520micro%2520USB%2520cutout%2520on%2520the%2520short%2520edge%252C%2520a%25206%2520mm%2520hole%2520in%2520the%2520lid%2520above%2520the%2520reset%2520button%25208%2520mm%2520from%2520the%2520USB%2520edge%252C%2520a%252012%2520x%25208%2520mm%2520slot%2520in%2520the%2520lid%2520above%2520the%2520BOOT%2520jumpers%252C%2520and%2520a%252012%2520x%25205%2520mm%2520slot%2520on%2520the%2520far%2520short%2520edge%2520for%2520the%2520SWD%2520header.%2520Snap-fit%2520lid.))
- A case for a Teensy 4.1, board 61 x 17.8 mm with headers pointing down, rows 15.2 mm apart. Pin channels in the base, 1.6 mm walls, 12 mm internal height, micro USB cutout on one short edge, a 15 x 3 mm microSD slot on the other short edge at board level, an 8 x 4 mm slot on one long side for the USB host cable, sliding lid. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520case%2520for%2520a%2520Teensy%25204.1%252C%2520board%252061%2520x%252017.8%2520mm%2520with%2520headers%2520pointing%2520down%252C%2520rows%252015.2%2520mm%2520apart.%2520Pin%2520channels%2520in%2520the%2520base%252C%25201.6%2520mm%2520walls%252C%252012%2520mm%2520internal%2520height%252C%2520micro%2520USB%2520cutout%2520on%2520one%2520short%2520edge%252C%2520a%252015%2520x%25203%2520mm%2520microSD%2520slot%2520on%2520the%2520other%2520short%2520edge%2520at%2520board%2520level%252C%2520an%25208%2520x%25204%2520mm%2520slot%2520on%2520one%2520long%2520side%2520for%2520the%2520USB%2520host%2520cable%252C%2520sliding%2520lid.))
- A tiny case for a bare Teensy 4.0, board 35.5 x 17.8 mm, no headers: edge rails with 0.4 mm clearance, 1.5 mm walls, 7 mm internal height, micro USB cutout on the short edge, a 6 mm hole in the lid above the program button, friction lid. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520tiny%2520case%2520for%2520a%2520bare%2520Teensy%25204.0%252C%2520board%252035.5%2520x%252017.8%2520mm%252C%2520no%2520headers%253A%2520edge%2520rails%2520with%25200.4%2520mm%2520clearance%252C%25201.5%2520mm%2520walls%252C%25207%2520mm%2520internal%2520height%252C%2520micro%2520USB%2520cutout%2520on%2520the%2520short%2520edge%252C%2520a%25206%2520mm%2520hole%2520in%2520the%2520lid%2520above%2520the%2520program%2520button%252C%2520friction%2520lid.))

## FAQ

### How does a case hold a board with no mounting holes?

Three ways: channels in the base that capture the soldered pin rows, edge rails that the bare board slides into, or a carrier PCB with its own holes. Pin channels are the usual choice for Blue Pill and Teensy boards.

### Will I still be able to flash the board?

Yes, if you leave access: a slot for the SWD header on the STM32, a hole above the program button on the Teensy, and the USB cutout on both. Ask for them in the prompt.

### Can it do the Black Pill too?

Yes. Give its outline (53 x 21 mm) and say USB-C; the rest of the prompt is the same as the Blue Pill.

## About SpeakCAD

SpeakCAD is the most intuitive CAD for 3D printing, made for people who own a 3D printer and need a part that fits something they have: tap a face and type a size to shape it with simple tools, or describe it to the AI, on your phone or computer, and download a print-ready STL, 3MF or G-code sliced for your printer.

SpeakCAD works inside ChatGPT and Claude as a plugin (an MCP server): ask the assistant for a part with its measurements and SpeakCAD's own CAD AI designs it, shows it in 3D in the chat and hands over a print-ready STL, 3MF or G-code sliced for your printer.

- Live demo, no account: https://speakcad.com/demo
- In ChatGPT, Claude and other MCP clients: https://speakcad.com/chatgpt-plugin, https://speakcad.com/claude-connector, https://speakcad.com/mcp-server
- Pricing: https://speakcad.com/pricing
- FAQ: https://speakcad.com/faq
- Site index for AI assistants: https://speakcad.com/llms.txt
