Modern Experimental Techniques โ€“ Physics

The class project: a lab instrument everyone builds, and makes their own in software

The class instrument: NMR console, function generator / AWG & lab controller

Everyone builds the same instrument platform โ€” a bench "Swiss-army-knife" every lab can use. In 2026 it is one class board, the same for everyone; Project 3 is the instrument you build on it โ€” the firmware, the app and the housing โ€” presented on a great project website. The hardware is deliberately standardised so the workshops, the design review and the class PCB (printed circuit board) order all pull in one direction; where you excel is the software: the interfaces, automation and polish that turn a circuit board into an instrument people love.

Project 3: build the instrument

Project 3 is an instrument of your own choosing, built on the class board: the firmware that uses the board's capabilities, the app that controls it, and the housing designed in Workshop 3 โ€” presented on a great project website. What the instrument is, is up to you: an oscilloscope and generator, a data logger, a lock-in amplifier, a PID controller, an NMR console, a LINE or Telegram bot, a Python sweep, the camera unitโ€ฆ The firmware drivers you write follow from your instrument; the driver for the section you worked on in Workshop 2 is a natural start, not an obligation.

The project website is part of the instrument. It says what the app does and how to use it, shows what it can do with examples a user can follow, and demonstrates its capability โ€” screenshots, measured results, videos or animations, and a great interface. One repository, one project website and one card on the project wall for the whole of Project 3.

What the box does

The headline: it runs a nuclear magnetic resonance (NMR) experiment. The board is a small NMR console. A coil you wind yourself, around a tube of water in a 2 mT field, puts the protons at 89 kHz; the board sends a short pulse into the coil, blanks its own receiver, records the free induction decay the spins send back, and the app shows the spectrum. Everything else on the board โ€” the generator, the inputs, the switches โ€” is what such a console needs anyway. Rule of thumb: the field sets the frequency. The same console reaches a higher field, and a far larger signal, by changing only the coil, the power amplifier and the preamplifier.

The architecture

   โ”Œโ”€โ”€โ”€โ”€  the CLASS BOARD: base (instructor) + 3 sections, A ยท B ยท C ยท one design, JLCPCB-assembled ร—5, nothing to solder  โ”€โ”€โ”€โ”€โ”
 AO1 AO2 โ—„โ”€โ”€ ยฑ10 V stages โ—„โ”€โ”€ DAC8563 16-bit AWG โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”Œโ”€โ”€โ”€ ADS8688 8 ร— 16-bit ยฑ10 V โ—„โ”€โ”€ AI1โ€“AI8 (SMA)
 TX SMA โ—„โ”€โ”€ OPA564 power amp โ—„โ”€โ”€ AD9834 DDS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค          โ”œโ”€โ”€โ”€ NMR receiver โ—„โ”€โ”€ RX SMA โ—„โ”€โ”€ your coil
 8 TTL out ยท 2 fast trigger out ยท TRIG in/out โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค          โ”‚    preamp ยท blanking ยท I/Q mixer โ”€โ”€โ–บ ADC ch 7, 8
   [section B: generation, timing, NMR transmitter]     โ”‚          โ”‚    [section A: inputs and the NMR receiver]
                          ESP32-S3 dev board (socketed, u.FL antenna โ†’ SMA)
 USB-C 5 V + data (or 5 V jack) โ”€โ”€โ–บ ยฑ12 V ยท 5 VA ยท 3V3 โ”€โ”ค          โ”œโ”€โ”€โ”€ module header: MODULE OUT 1โ€“7 ยท 2 isolated inputs
 7โ€“18 V external input โ”€โ”€โ–บ H-bridge ยท MOSFET โ”€โ”€โ–บ coils โ”€โ”ค          โ””โ”€โ”€โ”€ 16 SMA ยท OLED ยท LEDs ยท TTL terminals ยท Qwiic
   [base: socket, buses, power entry and coil drivers]  โ”‚               [section C: the front panel board]
                                                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ WiFi (phone/web app ยท WebSocket ยท OTA) ยท native USB (Python API)
                    โ”‚                                                              โ”‚
       [Python host: API, logging, plots]                    [PWA on your phone ยท bot alerts ยท optional camera node]
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ GitHub class repository + your project website + video โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
      + main board 180 ร— 100 mm, 4 layers   + front panel 180 ร— 100 mm flat on its back: 16 SMA (3 ร— 6, two positions free), TTL terminals, module header, OLED, 3 LEDs   + 3D-printed box

MCU (microcontroller, the small computer on a chip) choice (frozen for 2026): an ESP32-S3 N16R8 dev board with the standard DevKitC-1 pinout and an external-antenna connector (Jinhua, NT$400), socketed on the class board and running the Arduino framework. WiFi unlocks the web/phone/bot directions; the u.FL antenna goes to an SMA bulkhead so WiFi works inside a closed metal or acrylic case; the dev board leaves 31 usable GPIO (general-purpose pins) and an 80 MHz SPI bus (a common wiring standard for chips to talk to the microcontroller) for the converters. The core circuit is standardised so the class order and design reviews stay manageable โ€” your creativity goes into the firmware (the program that runs on the microcontroller), host software, interfaces and the enclosure.

One class board, made together. The board is a single KiCad (circuit-design program) project in one class repository (a shared project folder whose complete history git keeps, stored online on GitHub). The main board is 180 ร— 100 mm with 4 layers; a second board of the same size mounts flat on its back, parallel to it, on three 2ร—20 pin headers, and its outer face is the front panel โ€” the face of the instrument, with 16 SMA connectors in a 3 ร— 6 grid (AO1 AO2 TRIG AUX TX FAST1 ยท AI1โ€“AI4 RX FAST2 ยท AI5โ€“AI8 and a spare position), the screw terminals for the eight TTL lines, the TX coil terminal, a Qwiic connector, the OLED, the three LEDs, the two isolated inputs and the module header. The back of the instrument is the main board's rear edge: USB-C, the 5 V jack, the external 7โ€“18 V input and the coil terminals. The instructor built the complete board first โ€” the base (dev-board socket, buses, power entry and rails, the external 7โ€“18 V input, the H-bridge and the MOSFET switch that drive the field coils, and the expansion header) and all three sections โ€” and the class finished it together in Workshop 2. The three sections: A โ€” inputs and the NMR receiver is everything the board listens with, the eight ยฑ10 V 16-bit inputs (ADS8688) and the receiver that turns what the coil hears into I and Q; B โ€” signal generation, timing and the NMR transmitter is everything the board speaks with, the ยฑ10 V outputs, the TTL and trigger outputs, and the synthesizer and power amplifier that drive the NMR coil; C โ€” the front panel board is the face of the instrument, a 4-layer board of its own: the SMA field, the OLED and the LEDs, the screw terminals for the eight TTL lines, the TX coil terminal, the Qwiic connector, the two isolated inputs, and the module header with its 5 V buffer. The merged design went into the class order on Monday 28 September, 2 pm, and is manufactured five times โ€” one assembled instrument each.

Rules: the instrument itself runs from USB-C or a 5 V supply, and the everyday case is โ‰ค 30 V DC. To switch something larger, the module header drives an opto-isolated module: the Jinhua 4-channel relay module (NT$150, about US$4.7) has opto-isolated inputs and needs about 5 mA per channel; the 12 V version needs its own 12 V supply for the relay coils, and a 5 V version is also sold that runs from the header's +5 V. Mains wiring is your own responsibility and must be done by someone qualified. Parts JLCPCB-stocked; dev board provided by the course. Cost: the class board is one design manufactured ร—5, and the parts were chosen for learning per dollar โ€” about NT$5k per student (โ‰ˆ US$155) all-in: dev board, parts, 4-layer PCB, front-panel PCB and complete assembly by JLCPCB, so there is nothing for you to solder โ€” the instructor adds the headers that join the two boards. Every part must earn its place, and the JLC quote is checked before the order.

Other ideas: add-on hardware for an ESP32-class development board

The class hardware is fixed โ€” one board design, ordered once for everyone; nothing on this list is part of the course or an extension for students. It is here for inspiration only: ideas for add-on hardware that could be attached to a development board like an ESP32 to create other useful tools for the lab โ€” after the course, or in your own work. The class board keeps a 2ร—10 expansion header, two Qwiic connectors and a few reserved footprints (copper patterns for parts not fitted), so such additions stay possible later. All use JLCPCB-stocked parts.

๐ŸŽ Fast capture

ADS9224R dual 16-bit 3 MSPS, or an AD9235 40 MSPS on the free LCD_CAM parallel port: capture fast transients โ€” the tier the 2026 core dropped for cost and time.

ใ€ฐ DDS sine source

AD9833 direct digital synthesis to 1 MHz on the expansion header's SPI: complements the 16-bit AWG and pushes the source's frequency ceiling up.

๐Ÿงฎ Precision ADC

ADS1115 / ADS1256: 16โ€“24 real bits for ยตV-level and sensor measurements. See what the MCU's own ADC can't โ€” then prove it with a noise-floor plot.

๐Ÿ”ข More channels

MCP23017 (+16 GPIO) and CD74HC4067 (16 analog inputs into one pin): beyond an Arduino Mega with two cheap chips on one bus.

๐ŸŽš Programmable gain / autorange

PGA113 or digipot-set gain: an input stage that re-ranges itself so weak and strong signals both land on scale.

โš–๏ธ Instrumentation-amp input

INA826/INA333-class differential front-end: bridges, thermocouples and small signals riding on noisy grounds โ€” measured cleanly.

๐ŸŒก Precision temperature channel

MAX31865 + PT100/PT1000 or a thermistor bridge: mK-resolution thermometry โ€” the sensing half of a lab PID.

๐Ÿ”ฅ Heater / TEC driver

MOSFET PWM stage with INA current sense: the actuating half โ€” closed-loop temperature control of a laser mount or sample stage.

๐Ÿšถ Motion driver

A4988/DRV8825 stepper driver or servo headers: shutters, filter wheels, choppers โ€” motion under your trigger engine.

โฐ Real timebase

TCXO (ยฑ1โ€“2 ppm) and an external 10 MHz reference input: turn the generator into a metrology-grade source โ€” then measure the improvement by beating two boards together.

๐Ÿ”— Isolated RS-485 / CAN

A proper multi-drop instrument bus across the lab, galvanically isolated โ€” how real facilities wire their boxes together.

๐Ÿ–ฅ Touch-screen front panel

The phone/web app is the instrument's face and a small OLED on the class board shows status; if you want a stand-alone panel, add a 3.5โ€ณ 480ร—320 TFT (ILI9488, SPI) with capacitive touch (FT6236/GT911, IยฒC โ€” another chip-to-chip bus) on the front-panel PCB, driven by LVGL. Lightweight version: OLED + rotary encoder.

๐Ÿ’พ Logging + clock

microSD slot + DS3231 RTC: weeks of time-stamped data with no host PC โ€” retrieve it over WiFi when you visit.

๐Ÿ”‹ Battery power

TP4056 charger + boost converter: portable field measurements, and logging that survives a power cut.

๐Ÿ’ก Photodiode / TIA input

A transimpedance light-measurement channel: laser power monitor, fluorescence pickup โ€” analog design where layout genuinely matters.

โšก Power monitor

INA226 on your own rails: the instrument measures its own current, voltage and energy โ€” self-diagnostics for free.

๐Ÿ”Š Audio-band codec

IยฒS ADC/DAC: a hi-fi analog path that upgrades the digital-filter and software lock-in directions to 24-bit quality.

๐Ÿ›ก More switching

The module header's seven MODULE OUT lines drive opto-isolated modules โ€” relay boards, solid-state relays, high-side switches, with the isolation on the module side: grow the alarm/interlock fan-out to a whole rack.

Beyond the baseline: build something great

The presentation and demonstration (26โ€“30 October, about 15 minutes each) shows your instrument, your app and your website. The software, the firmware, the app and everything around the instrument are yours to push as far as you like โ€” pick what would genuinely help your own lab, or simply what you would be proud to show:

๐Ÿ“ฑ Phone app / web UI

The ESP32 serves a polished web app (installable PWA โ€” a web page that behaves like an app): waveform controls, live readings, dark mode, multi-user. Control your instrument from the seminar room.

๐Ÿ”” Monitoring & alarms

Threshold rules on the analog inputs: switch a module output, latch an interlock, push a Telegram/LINE alert. Fail-safe defaults, manual reset, event log with timestamps.

โฑ Triggers & sequencing

Trigger input โ†’ waveform burst or a module output; programmable sequences and schedules; sync two units. Turn the generator into an experiment conductor.

๐Ÿ Python API & scripting

A clean instrument.sine(1e3, 0.5) API; automated sweeps; measure a filter's transfer function with your own generator + ADC and plot it.

๐Ÿ“ˆ Calibration & characterisation

Calibrate amplitude and frequency; measure bandwidth, distortion, output impedance on the scope; publish a datasheet-style spec page. The physics content lives here.

๐ŸŒ Multi-instrument systems

MQTT or REST across several units; one dashboard for the whole lab; a classmate's box as a client. Systems engineering in miniature.

๐Ÿ›  Firmware craft

Robust state machine, watchdog, settings that survive reboot, OTA (over-the-air, i.e. over WiFi) updates (ESP32), self-test on boot. The difference between a demo and a product.

๐ŸŽ› Front-panel & enclosure polish

PCB front panel with silkscreen labels, light pipes, the OLED status display and โ€” optionally โ€” a touch UI (LVGL) that speaks the same API as your phone app; a housing that looks bought, not built: printed from your OpenSCAD file, with a laser-cut acrylic lid if you like.

๐ŸŽฌ A great project website

What the app does and how to use it, examples a user can follow, a demonstration of what it can do โ€” screenshots, measured results, a video or an animation. Presenting well is a skill of its own. Just build something great.

Have a different idea from your own lab's needs? Great โ€” put it in your spec. The board itself does not change.

The demonstration

26โ€“30 October, about 15 minutes each. Show your instrument: what it is and what it is for, your app driving it, your project website and how a user would use it, your video if you made one. The order and the emphasis are yours โ€” this is a product you made, not an exercise; the tutor helps you plan the demonstration if you ask.

Fallback: the firmware's simulation mode runs the app and every panel on the bare dev board โ€” if the board is late or dead, you demonstrate that, no stigma.

Video: a video describing your app and your instrument is welcome, in the presentation and on your project website (for example through the Project 1 pipeline: Markdown โ†’ slides โ†’ website โ†’ YouTube); it is optional, and it plays if the live demonstration misbehaves.

Build plan (alongside the workshops)

The project runs during the workshop weeks, alongside your research โ€” not a second job after the course. Every session ends with a commit (a saved snapshot of your changes with a one-line message) and a handover note; Claude walks you through each chapter as your tutor.

When (2026)Milestone
Fri 11 Sep ยท Workshop 1Project 1: a web app of your choice (a simulator or a game), built with the "AI method", deployed, with its project website. Project 2: the reference firmware running on your ESP32 first (the hardware-validation baseline), then your own phone app that controls and measures from it over WiFi. Each project in its own public repository, on the project wall.
Wk of 14 Sep ยท between workshopsImprove your Project 1 and Project 2 apps, have fun and play. Before Workshop 2: install KiCad 10 and open it once; a JLCPCB account.
Fri 18 Sep ยท Workshop 2Electronics 101 on our schematic; KiCad live; the class board: each student completes and routes one section.
Wk of 21 Sep ยท between workshops, for the cutoff
(Fri 25 Sep: public holiday)
The class board finished: routing, DRC (KiCad's design-rule check) clean, pull requests reviewed and merged before the class order.
Mon 28 Sep, 2 pmCutoff for the class PCB order: the instructor merges the three sections and sends the Gerber files to JLCPCB. A hard cutoff.
Fri 2 Oct ยท Workshop 3Getting things made (the fabrication menu, tips for printed and cut parts, from an idea to a file); Project 3: your first firmware driver and app panel in simulation mode, and your housing, built together in OpenSCAD with Claude Code, or in another CAD program you already use.
Wk of 5 Oct ยท between workshops, for the cutoffDriver + panel pull request; housing files (STL for 3D printing and/or DXF for laser cutting) exported; your instrument's firmware, app and project website.
Fri 9 Oct, 2 pmCutoff for design files for 3D printing / laser cutting. A hard cutoff.
~Fri 16 OctCollect the printed enclosures and assembled PCBs; assemble your ESP32, PCB and housing; test and refine your firmware and app.
26โ€“30 OctPresentation and demonstration of your project, app, website and video โ€” about 15 minutes each.

Fabrication lead time is the hard constraint: PCB fabrication, assembly and shipping to Taiwan take about 2 weeks (boards back around 16 October), so the Monday 28 September, 2 pm class-order cutoff is non-negotiable. The housings are printed and cut in-house โ€” files in by Friday 9 October, 2 pm.

Presentation and demonstration (26โ€“30 October 2026)

Collect the manufactured PCBs and housings around Friday 16 October; assemble your ESP32, PCB and housing; test and refine your firmware and app. Then, in the week of 26โ€“30 October, present and demonstrate your project โ€” about 15 minutes each, in English; using AI to prepare is encouraged.

Every project is on the class project wall for how to add yours.

The idea archive

Earlier drafts of this course had a menu of sixteen instrument projects โ€” flow interlocks, beam shutters, PID controllers, lock-ins and more. We standardised on one platform for practicality, but the archive is worth browsing: it is a quarry of software directions (many map straight onto this instrument's inputs, outputs and triggers) and of ideas for what you might build after the course. โ†’ Browse the project idea archive.