Week 4: Embedded Programming
Regional Meeting
Yerlan Turgenbayev
Penguin as paper-fold
Teneth Vinyl cutter
Fiber-laser monportlaser
Mkhitar Evoyan
Crazy inclined cuts
[
Zhirayr Ghukasyan
beautiful origami fold
Patrick Dezséri
http://www.lasersaur.com/
svgsilh
Vinyl cut
Irja Linnerud
http://irja-ed23b9.waaglabs.nl/Assignments/week3/
Dylan Heneck
Fab Lab Hisar (Istanbul, Turkey)
Group assignment is not online yet
dora-tasci
Neil's Lecture
- Intro
- everybody now has a global evaluator. the global eval is not only an evaluation but its also a person to talk to when there are problems and they help you to fulfill fa standards
- there is a schedule for it
February 12: global eval started
March 9: US Daylight Savings Time
by March 1: student+local+global intro meetings
April 9-23:
- break, midterm
- preceding weekly assignments due
- student+local+global review meetings
- review assignments and final plan
- sort into likely/possible/unlikely to finish this cycle
June 4: weekly assignments due
June 9-13: final presentations
June 16-20: student+local+global review meetings
June 23: global eval decisions deadline
July 4-11: FAB25
Student Reviews
- ... ??? from charlotte latin
- button box
- https://fabacademy.org/2020/labs/oulu/students/anssi-heikkinen/finalproject.html
- reykjavik, evert
- https://fabacademy.org/2025/labs/reykjavik/students/evert-jensson/
- https://fabacademy.org/2021/labs/leon/students/alberto-gonzalez/finalproject.html
- works in the fablab, interested in using the fablab more an dimproves his teaching.
- include the prompts when you do LLM stuff!
- final project: some chair thingy
- but you can also do a final project that fly:
- kitagaya: https://fabacademy.org/2022/labs/kitakagaya/students/yusuke-takahashi/projects/final-project/
- ernesto castro
- https://fabacademy.org/2025/labs/ulima/students/ernesto-castro/
- final project: ...
- there is a mini mini tiny fab thingy neil showed
- concern: you need a material that easily dissolves, but the materaial would be very vulnerable
- you can also cut using hot wire.
- search: "pancake plotter"
- ahmet burhan bas
- https://fabacademy.org/2025/labs/hisar/students/ahmet-bas/
- does automata kit to teach people about automatic systems
- https://507movements.com/
- https://dl.acm.org/doi/fullHtml/10.1145/3701571.3703389
- https://dl.acm.org/doi/pdf/10.1145/3701571.3703389
- wants to do somethign with audio
- https://archive.fabacademy.org/fabacademy2016/fablabreykjavik/students/331/final_project.html
- final project:
- this in hardware: https://www.incredibox.com/
- the best music project ever: antonis cristion of htmaa: https://fab.cba.mit.edu/classes/863.24/people/AntonisChristou/about/
- he likes very abstract music
- it was a graphical game. while you were building the sahpes, you are synthesizing
- shintaro ito: node japan kannai
- data analysis
- https://fabacademy.org/2025/labs/kannai/students/shintaro-ito/
- fabacademy because: read some book from neil
- final project: cleaning wheels
- project to make a dishwasher by jfduval
- koharu takeda
- nice vinyl cutting design
- final project:
- some table tennis table
- Doaa Elbess
- jewelry holder
- Evelyn Cuadrado
- akash
- did flexible cardboard thing by engravign away the top layer of it.
- ofelia
- in week 3 sh built masks from vinyl cutter
Ferdi's Addendum
- option to have class in bigger classroom?
- yes why not
- tomorrow at 9:
- we all would be terribly bored with an arduino intro class
- arduino intro
- we should have a look at the few available microprocessors
- make a plan on what we have to do for the group assignment
- social modia appointment
- available boards
- xiao
- we will use the rp2040 a lot
- yes, we really should read all the manual
Microprocessors and -controllers
- audiobook of data sheet ATtiny212_412
- recitation
- literature explaining working with AVRs
- microcontroller vs -processor
- download platformio for vscode
MCU
An MCU is a group of microcontroller units that share a common architecture, design, and often the same core features
- ARM Cortex-M is a popular MCU family, where multiple manufacturers like STMicroelectronics, NXP, and Microchip produce MCUs that are based on the ARM Cortex-M core.
- AVR is another MCU family, famously used in the Arduino platform.
- PIC is a family of MCUs from Microchip Technology, with a range of devices from small 8-bit controllers to more powerful 16-bit and 32-bit versions.
Within each MCU family, you’ll typically see models that differ by features like:
- Flash memory size
- RAM size
- Clock speed
- Number of GPIO pins
- Peripheral support (e.g., UART, SPI, I2C, timers, etc.)
- the act of programming a microcontroller while it is already mounted on the board
- Contrary to Pre-Programming. You program the contro
CMSIS-DAP Devices are all devices that can write programs into a microcontroller's memory using JTAG or SWD. ler before soldering it somewhere.
Available Controllers
At least 5 of each:
- SEEEDSTUDIO XIAO SAMD21 NO HDRS
- SEEEDSTUDIO XIAO ESP32C3 NO HDRS
- SEEEDSTUDIO XIAO ESP32S3 NO HDRS
- SEEED STUDIO XIAO RP2040 ARDUINO
- ATSAMD11C14A-SSUT
- ATSAMD21E18A-AUT
- ATTINY412-SSFR
- ATTINY1624-SSFR
- ATTINY3226-SU
- AVR128DB32-I/PT
Xiao RP2040 | Pico RP2040 | ESP32C3 | ESP32S3 | SAMD21 | ATSAMD11C14A-SSUT | ATSAMD21E18A-AUT | ATTINY412-SSFR | ATTINY1624-SSFR | ATTINY3226-SU | AVR128DB32-I/PT | |
---|---|---|---|---|---|---|---|---|---|---|---|
Type | ARM Cortex M0+ 32Bit | ARM Cortex M0+ 32Bit | ESP-RISC-V 32Bit | Xtensa® 32-bit LX7 | ARM-Cortex M0+ 32Bit | ARM Cortex-M0+ 32Bit | ARM Cortex M0+ 32Bit | AVR® RISC 8-bit | AVR® RISC 8-bit | AVR® RISC 8-bit | AVR® RISC 8-bit |
Frequency | 133MHz | 133MHz | 160 MHz | 240 MHz | 48MHz | 48MHz | 48MHz | 20MHz | 20MHz | 20MHz | 24MHz |
SRAM | 264KB | 264KB | 400 KB | 8MB | 32KB | 4KB | 32KB | 256B | 2KB | 3KB | 16KB |
onboard memory | 2MB | 2MB | 4MB | 8MB | 256KB | 16KB | 256KB | 4KB | 16KB | 32KB | 128KB |
I/O-Pins | 11 | 26 | 11 | 11 | 11 | 12 | 26 | 6 | 12 | 18 | 25/26 (1x only In) |
ADC | 4 | 3 | 3 | 9 | 11 | 5 | 6 | 6 | 9 | 15 | 13 |
DAC | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
Package | SOIC-14 | TQFP-32 | SOIC-8 | SOIC-14 | SOIC-20 | TQFP-32 | |||||
Price | 4,68 $ | 5 $ | 4,99 $ | 7,49 $ | 5,4 $ | 1,58 $ | 4,03 $ | 0,59 $ | 1,01 $ | 1,29 $ | 2,06 $ |
FPU available? |
RP2040 (Raspberry Pi Pico)
Toolchain:
- Primary: Pico SDK (C/C++), CMake
- Alternatives: Arduino IDE (via Arduino-Pico Core), MicroPython/CircuitPython
Workflow:
- Write code in C/C++ or Python.
- Build with CMake (Pico SDK) or Arduino IDE.
- Flash via USB (UF2 bootloader) or SWD debugger (e.g., Picoprobe).
Efficiency Tips:
- Use Visual Studio Code with the Pico SDK extension for CMake integration.
- Leverage Picoprobe (a second Pico) for debugging.
ESP32 (Espressif)
Toolchain:
- Primary: ESP-IDF (C/C++), PlatformIO
- Alternatives: Arduino IDE (via ESP32 Core)
Workflow:
- Develop in C/C++ (ESP-IDF) or Arduino framework.
- Build with ESP-IDF CLI or PlatformIO.
- Flash via USB (esptool.py) or OTA updates.
Efficiency Tips:
- PlatformIO streamlines ESP-IDF/Arduino workflows.
- Use ESP-Prog or JTAG for advanced debugging.
SAMD21/SAMD11 (Atmel/Microchip)
Toolchain:
- Primary: Atmel/Microchip Studio (C/C++)
- Alternatives: Arduino IDE (via SAMD Core)
Workflow:
- Code in C/C++ (Microchip Studio) or Arduino.
- Build and flash via USB (UF2 bootloader) or EDBG/SWD.
Efficiency Tips:
- Use Arduino IDE for simplicity; enable verbose upload for debugging.
- For low-level control, use CMSIS libraries in Microchip Studio.
Attiny/AVR128 (AVR Family)
Toolchain:
- Primary: AVR-GCC + AVRdude
- Alternatives: Arduino IDE (via ATTiny Core)
Workflow:
- Write code in C/C++ or Arduino.
- Compile with AVR-GCC or Arduino IDE.
- Flash via ISP programmer (e.g., USBasp, Arduino-as-ISP).
Efficiency Tips:
- Use PlatformIO for project management.
- For tinyAVR (e.g., ATtiny85), optimize code size with
-Os
compiler flag.
General Workflow Optimization Tips
-
Unified Environments:
- PlatformIO (VS Code) supports all listed MCUs, reducing toolchain setup time.
- Arduino IDE (with board managers) simplifies entry-level development.
-
Debugging Tools:
- SWD/JTAG: Use for RP2040, ESP32, SAMD21 (e.g., Segger J-Link, CMSIS-DAP).
- Serial Monitor: Essential for ESP32/RP2040 debugging.
-
Version Control:
- Use
git
for code management; track dependencies (e.g., submodules for Pico SDK).
- Use
-
Automation:
- Write Makefiles or use PlatformIO scripts for CI/CD pipelines.
QFP mit Beinchen seitlich
TQFP ohne Beinchen
Soic-8 8 Beinchen
Punkt oder Kerbe kennzeichnen Pin 1
Putting code onto it
- the act of programming a microcontroller while it is already mounted on the board
- Contrary to Pre-Programming. You program the contro
CMSIS-DAP Devices are all devices that can write programs into a microcontroller's memory using JTAG or SWD. ler before soldering it somewhere.
Serial Peripheral Interface (SPI)
- A standard synchronous serial communication interface used for short-distance communication between a main device and one or more peripheral devices.
- synchronous (needs clock signal), serial communication
- multiple secondary devices are possible
- full-duplex
- pins:
- MOSI (main out secondary in)
- MISO (main in secondary out)
- SCK (clock)
- SS (secondary select): select which secondary device to communicate with
Serial Peripheral Data Interface (SPDI)
- do not find any source for it
- Good Article GERMAN
Joint Test Action Group (JTAG)
- eletronics manufacturers committee
- they developed a protocol with the same name
- mostly used for programming ARM cores
- daisy-chaining possible
- pins
- TMS: mode select
- TCLK: clock
- TDO: data out
- TDI: data in
- nRESET: reset (optional)
- two-pin variant of the JTAG protocol -> replaced JTAG
- daisy-chaining not possible
- most common on newer ARM chips
- pins:
- swdio: in/out
- swclk: clock
Unified Program and Debug Interface (UPDI)
- proprietary
- single-wire,
- bi-directional, half-duplex
- asynchronous
- can use off-the shelf UART adapters
- used to program AVR microcontrollers released since 2016, ATTINY412, ATTINY164.
- more detailed blog article
- debugging is hidden behind a proprietary interface, but even though you can snoop on the protocol with just a serial adapter and even though the large scale structure of the protocol is known too
- even more detailed article
- i did not find out what part of the protocol actually is proprietary and what not.
Difference between microcontroller and -processor
...
Programmierer:
ISP-Programmierer
JTAG-Programmierer
http://pub.fabcloud.io/programmers/summary/
Open time
the key word is "browse" the datasheet
multiple projects failed last year due to unknown reasons
blacklisted in our lab
try ESP32 C6
Ricardo Marques
I've only used the esp32's for test but I had a lot of problems with a couple SAMD21 xiaos a while back.
I only use xiaos for testing these days.
For Datasheet Newbies...seek and find the following...
- What chip?
- What speed (indicated in MHz)?
- What flash/SRAM memory (for storing programs)?
- How many GPIO pins?
- How many Analog pins?
- What communication protocols does the board "speak" (UART, ISP, SPI, I2C, I2S, etc.)?
- Does it have an ADC?
- What voltage requirement for the microcontroller?
- What is the microcontroller's Logic Voltage?
- What Voltage and Current can the GPIO pins OUTPUT...and tolerate? ...for starters
if you haven't started one...start your personal FabAcademy Jargon Dictionary.
micro-controllers datasheets are super overwhelming, but once you go into inputs and outputs you won't have a choice but really get into them. thankfully they're shorter.
How I plan to do it: I would go through the data sheet and note down what I found interesting, just like "oh see, the esp32 c3 has this little feature". I would consider the data sheet reading documentation "playing around with the data sheet" so to say. less as an exhaustive summary of the data sheet.
Additional Tips
Teaching from leo-kuipers
Notes from Nicolas Decoster
Some interesting tabs I have open
pieter-hijma leo-kuipers
getting-started-with-arduino-ide
a-guide-to-making-the-right-microcontroller-choice