Skip to content

Commit 0d73cfc

Browse files
committed
Add weekly summaries for weeks 3 to 8; update resistance measurement section; enhance CSS for admonitions; fix notebook for aliasing example
1 parent f1eaca5 commit 0d73cfc

26 files changed

Lines changed: 810 additions & 121 deletions

AGENTS.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Repository instructions for AI agents
2+
3+
These rules apply to any AI assistant (Claude Code, Cursor, Copilot, Codex, etc.) when generating, editing, or reviewing prose in this repository (notebooks, README, comments, docstrings, commit messages, PR descriptions).
4+
5+
## Punctuation: no em or en dashes
6+
7+
**Do not use em dashes (``, U+2014) or en dashes (``, U+2013) anywhere in prose.**
8+
9+
When you would naturally reach for one, choose one of:
10+
11+
1. A comma, when the inserted clause is parenthetical.
12+
2. A colon, when introducing a list, definition, or explanation.
13+
3. A semicolon, when joining two related independent clauses.
14+
4. A period, splitting into two sentences.
15+
5. Parentheses, for asides.
16+
17+
**Do not substitute a regular hyphen (`-`) for an em or en dash either.** A hyphen is only correct in:
18+
19+
- Compound modifiers and compound nouns: `current-correct`, `voltage-correct`, `2-wire`, `5-1/2-digit`, `BNC-to-banana`, `Y-Δ`, `cross-check`.
20+
- Markdown bullet lists (`- item`).
21+
- Markdown horizontal rules (`---`).
22+
- YAML separators inside MyST/Jupyter Book figure directives (`---`).
23+
- Math expressions and identifiers (minus signs, negative exponents).
24+
25+
### Replacements for common dash idioms
26+
27+
| Dash usage | Replace with |
28+
|---|---|
29+
| `1–2 %`, `Tasks I1–I5`, `pages 10–14` | `1 to 2 %`, `Tasks I1 to I5`, `pages 10 to 14` |
30+
| `voltmeter–ammeter`, `series–parallel` | `voltmeter and ammeter`, `series-parallel` (regular hyphen, since these are compound modifiers) |
31+
| `... briefly — keep ...` | `... briefly. Keep ...` |
32+
| `... node N — having a name ...` | `... node N. Having a name ...` |
33+
| `e.g. — about 0.43 V` | `e.g., about 0.43 V` |
34+
35+
### Quick self-check before saving
36+
37+
Before writing or committing a file, search your output for the literal characters `` and ``. If either appears outside of a code block, math, or a quoted external source, rewrite that sentence.
38+
39+
## Other writing conventions
40+
41+
- Use straight quotes (`"`, `'`), not typographic quotes (`"`, `"`, `'`, `'`).
42+
- Use `e.g.` and `i.e.` followed by a comma.
43+
- Prefer short sentences over long ones connected by stacked clauses; this also makes it easier to avoid dashes.
44+
- In notebooks, keep the existing voice: instructional, second-person ("you"), present tense.
45+
46+
## Scope
47+
48+
These rules govern *all* prose. They do require rewriting historical content the user has not asked to touch. If you are already editing a paragraph, fix any dashes you encounter in it. Only leave these untouched if user strictly requested that.

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CLAUDE.md
2+
3+
See [AGENTS.md](AGENTS.md) for the repository-wide instructions that apply to all AI assistants, including the strict rule against em (``) and en (``) dashes in prose.

book/_config.yml

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
11
# Book Settings
22
title: "NB2420 practical manuals"
3-
author: Margreet Docter, Jeroen Bastemeijer, Ashley Jacobi, Krzysztof Zabłocki <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer"">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt=""></a>
3+
author: Margreet Docter, Jeroen Bastemeijer <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer"">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt=""></a>
44
description: "Collection of practical manuals for the NB2420 course"
55
copyright: "Delft University of Technology, CC BY 4.0"
6-
exclude_patterns: [_build, Thumbs.db, .DS_Store, "**.ipynb_checkpoints", .conda/**, .mamba/**, .venv/**]
6+
exclude_patterns:
7+
# Build outputs and editor / OS junk
8+
- _build
9+
- "**/Thumbs.db"
10+
- "**/.DS_Store"
11+
- "**/.ipynb_checkpoints"
12+
- "**/*.bak"
13+
- "**/*.tmp"
14+
- "**/*~"
15+
- "**/*.swp"
16+
- "**/*.swo"
17+
# Python helper / extension files (kept on disk for Sphinx, never rendered as content)
18+
- "**/__pycache__"
19+
- "**/*.pyc"
20+
- "**/no_content_admonition.py"
21+
# Environment directories
22+
- .conda/**
23+
- .mamba/**
24+
- .venv/**
25+
# Legacy material that lives outside book/ but listed here defensively in case build root changes
26+
- "../old/**"
27+
- "../AGENTS.md"
28+
- "../CLAUDE.md"
29+
- "../README.md"
730

831
# Only build files in the ToC to avoid building README, etc.
932
only_build_toc_files: true
@@ -102,7 +125,25 @@ sphinx:
102125
iframe_background: "#ffffff" # default value
103126
iframe_width: calc(100% - 2.8rem) # default value
104127
iframe_aspectratio: auto 2 / 1 # default value
105-
exclude_patterns: [.conda/**, .mamba/**, _build/**, "**/.ipynb_checkpoints", .venv/**]
128+
exclude_patterns:
129+
- .conda/**
130+
- .mamba/**
131+
- _build/**
132+
- "**/.ipynb_checkpoints"
133+
- "**/__pycache__"
134+
- "**/*.pyc"
135+
- "**/*.bak"
136+
- "**/*.tmp"
137+
- "**/*~"
138+
- "**/*.swp"
139+
- "**/*.swo"
140+
- "**/Thumbs.db"
141+
- "**/.DS_Store"
142+
- .venv/**
143+
- "../old/**"
144+
- "../AGENTS.md"
145+
- "../CLAUDE.md"
146+
- "../README.md"
106147
html_extra_path: []
107148
language: en # To identify the language.
108149
html_js_files:

book/_toc.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ root: miscellaneous/intro.md
44
parts:
55
- caption: Instrument introductions
66
chapters:
7-
- file: manuals/intros/intro_testboards.ipynb
8-
- file: manuals/intros/intro_power_supply_Siglent.ipynb
9-
- file: manuals/intros/intro_DMM_Siglent+handheld.ipynb
10-
- file: manuals/intros/intro_function_generator_Siglent.ipynb
11-
- file: manuals/intros/intro_scope_Siglent.ipynb
12-
- file: manuals/intros/intro_LTSpice.ipynb
13-
- file: manuals/intros/intro_ALPACA.ipynb
7+
- file: manuals/intros/testboards.ipynb
8+
- file: manuals/intros/power_supply.ipynb
9+
- file: manuals/intros/digital_multimeter.ipynb
10+
- file: manuals/intros/function_generator.ipynb
11+
- file: manuals/intros/oscilloscope.ipynb
12+
- file: manuals/intros/ltspice.ipynb
13+
- file: manuals/intros/alpaca.ipynb
1414
- file: manuals/intros/breadboard.ipynb
1515

1616
- caption: Lab manuals
@@ -24,6 +24,12 @@ parts:
2424
sections:
2525
- file: manuals/week2/2.1_Whack_a_mole.ipynb
2626
- file: manuals/week2/2.2_Timed_acquisitions.ipynb
27+
- file: manuals/week3/_summary.ipynb
28+
- file: manuals/week4/_summary.ipynb
29+
- file: manuals/week5/_summary.ipynb
30+
- file: manuals/week6/_summary.ipynb
31+
- file: manuals/week7/_summary.ipynb
32+
- file: manuals/week8/_summary.ipynb
2733

2834

2935
- caption: Miscellaneous

book/manuals/intros/_summary.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
"\n",
1212
"The topics are as follows:\n",
1313
"\n",
14-
"- intro testboards\n",
15-
"- intro power supply\n",
16-
"- intro DMM\n",
17-
"- intro scope & triggering\n",
18-
"- intro LTSpice\n",
19-
"- intro ALPACA\n"
14+
"- Testboards\n",
15+
"- Power supply\n",
16+
"- Digital multimeter\n",
17+
"- Oscilloscope\n",
18+
"- LTSpice\n",
19+
"- ALPACA\n",
20+
"- Breadboard\n"
2021
]
2122
}
2223
],
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"id": "5a75e4a4",
66
"metadata": {},
77
"source": [
8-
"# intro ALPACA\n",
9-
"This intro supports manuals 2C, 12B, 13C, voltammetry\n",
8+
"# ALPACA\n",
9+
"\n",
10+
"This intro supports manuals 2C, 12B, 13C, voltammetry.\n",
1011
"\n",
1112
"In this course ALPACA means **Advanced Learning Platform for Analog Circuits and Automation** (https://zenodo.org/record/5615137) which is developed specifically for this course by Jeroen Bastemeijer. In short: the ALPACA is a \"pocket Studio Classroom\" with devices on board you can use to do experiments. \n",
1213
"The ALPACA has (among others):\n",
@@ -122,7 +123,7 @@
122123
"1. Download the firmware for the Alpaca (`Alpaca_firmware.uf2`) from <a href=\"https://brightspace.tudelft.nl/d2l/le/content/775335/viewContent/4586102/View\" target=\"_blank\">Brightspace</a> (hyperlink). \n",
123124
"2. Remove the USB-B connector (AKA printer cable/power cable) from the ALPACA board.\n",
124125
"3. Unplug the micro-USB cable that attaches to the ALPACA from your PC.\n",
125-
"4. While pressing the BOOTSEL button on the ALPACA, reinsert the USB cable into the PC. Let go of the BOOTSEL button after a few seconds. The white, small round \"BOOTSEL\" button is located on the larger green rectangular Raspberry Pi Pico.\n",
126+
"4. While pressing the \"BOOTSEL\" button on the ALPACA, reinsert the USB cable into the PC. Let go of the \"BOOTSEL\" button after a few seconds. The white, small round \"BOOTSEL\" button is located on the larger green rectangular Raspberry Pi Pico.\n",
126127
"5. When everything is okay, the ALPACA will appear as an flash drive in File Explorer (Windows)/Finder (MacOS)\n",
127128
"\n",
128129
"6. The `Alpaca_firmware.utf` downloaded file must be stored on the ALPACA by dragging and dropping it (or copy it in another way).\n",
@@ -522,7 +523,7 @@
522523
"\n",
523524
"The potentiometer above AMP0 IN can now be used to regulate the DC offset that is added to the signal. <br>\n",
524525
"Regulate the DC offset of the signal such that the entire output signal can now be visualized. To make it easy to find the right setting for the potentiometer, you can use a special plotting mode unique to NB2211 that allows you to plot the data live. <br>\n",
525-
"This function is called `plt.liveplot`. When a number is put into `plt.liveplot`, e.g. `plt.liveplot(x)`, the value `x` will be added as a point on the plot. Note: this only works if the cell containing `plt.liveplot` starts with the \"magic command\" `%plot --mode live`\n",
526+
"This function is called `plt.liveplot`. When a number is put into `plt.liveplot`, e.g., `plt.liveplot(x)`, the value `x` will be added as a point on the plot. Note: this only works if the cell containing `plt.liveplot` starts with the \"magic command\" `%plot --mode live`\n",
526527
" \n",
527528
"> <font size=6>🔥</font> \n",
528529
">\n",

book/manuals/intros/intro_DMM_Siglent+handheld.ipynb renamed to book/manuals/intros/digital_multimeter.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Intro Digital multimeter \n",
8-
"This intro supports labmanual 1A\n",
7+
"# Digital multimeter\n",
8+
"\n",
9+
"This intro supports labmanual 1A.\n",
910
"\n",
1011
"There are two digital multimeters: a handheld one, and one in the caddie.\n",
1112
"\n",

book/manuals/intros/intro_function_generator_Siglent.ipynb renamed to book/manuals/intros/function_generator.ipynb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Introduction to the function generator \n",
8-
"A function generator is an electronic instrument that generates electrical signals of different waveforms. It is an important complement to the [power supply](intro_power_supply_Siglent.ipynb). While the power supply can provide a constant (DC) voltage, the function generator is capable of producing time-varying (AC) signals. The most common signals produced are the sine, triangle, square and sawtooth waves. \n",
7+
"# Function generator\n",
8+
"\n",
9+
"A function generator is an electronic instrument that generates electrical signals of different waveforms. It is an important complement to the [power supply](power_supply.ipynb). While the power supply can provide a constant (DC) voltage, the function generator is capable of producing time-varying (AC) signals. The most common signals produced are the sine, triangle, square and sawtooth waves. \n",
910
"\n",
1011
"The function generator allows you to select a waveform and adjust the amplitude and frequency of the signal to any value in the operation range of the generator. The function generator we will be using in this course is the *Siglent SDG1000X Series*, as seen in the image below:\n",
1112
"\n",
@@ -113,7 +114,7 @@
113114
"### Utility - Output Setup\n",
114115
"\n",
115116
"Under Utility - Output Setup - Load, you find two options:\n",
116-
"- HighZ: default (e.g. upon startup), the function generator assumes an infinite load resistance (for example a DMM, or scope)\n",
117+
"- HighZ: default (e.g., upon startup), the function generator assumes an infinite load resistance (for example a DMM, or scope)\n",
117118
"- 50 $\\Omega$: the generator assumes that the load resistance is 50 Ω (for example the rotary switch)\n",
118119
"\n",
119120
"If the wrong load is selected, you might be off by a **factor of 2** in the output signal.\n",
@@ -146,7 +147,7 @@
146147
"metadata": {
147148
"celltoolbar": "Create Assignment",
148149
"kernelspec": {
149-
"display_name": "electronic-instrumentation (3.13.12)",
150+
"display_name": "electronic-instrumentation (3.14.4)",
150151
"language": "python",
151152
"name": "python3"
152153
},
@@ -160,7 +161,7 @@
160161
"name": "python",
161162
"nbconvert_exporter": "python",
162163
"pygments_lexer": "ipython3",
163-
"version": "3.13.12"
164+
"version": "3.14.4"
164165
},
165166
"latex_envs": {
166167
"LaTeX_envs_menu_present": true,
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# intro LTSpice\n",
8-
"This intro supports labmanual 1C, and 3A (freq. analysis)"
7+
"# LTSpice\n",
8+
"\n",
9+
"This intro supports labmanual 1C, and 3A (freq. analysis)."
910
]
1011
},
1112
{
@@ -53,7 +54,7 @@
5354
"<img src=\"https://gitlab.tudelft.nl/mwdocter/nb2214-images/-/raw/main/LTS24/LTS0_topmenu_LTSpice-121.JPG\" width=30%></img> \n",
5455
"\n",
5556
"You need ___components___: \n",
56-
"* Press “R” or Left-click the resistor icon \n",
57+
"* Press \"R\" or Left-click the resistor icon \n",
5758
"* move the resistor symbol to the drawing area\n",
5859
"* left click again to create R1\n",
5960
"\n",
@@ -66,15 +67,15 @@
6667
"<img src=\"https://gitlab.tudelft.nl/mwdocter/nb2214-images/-/raw/main/LTS24/LTS0_rightclick_value_resistor.JPG\" width=40%></img> \n",
6768
"\n",
6869
"___Edit___ the component's value by:\n",
69-
"* Move the mouse over a resistor until the cursor changes into a hand symbol. \n",
70+
"* Move the mouse over a resistor until the cursor changes into a \"hand\" symbol. \n",
7071
"* Then right-click to open the edit menu. \n",
7172
"* Set/Change the resistor value\n",
7273
"\n",
7374
"Note: You can use the following prefixes: f/F (femto), p/P (pico), n/N (nano), u/U (micro), m/M (milli), k/K (kilo), meg/MEG (mega), g/G (giga), t/T (terra). So for a 1 kΩ resistor type 1k, and for 1Ω simply 1.\n",
7475
"\n",
7576
"___Moving___ components\n",
7677
"* left-click the move icon. \n",
77-
"* Position the hand cursor over the component and left-click. Now the component can be moved. \n",
78+
"* Position the \"hand\" cursor over the component and left-click. Now the component can be moved. \n",
7879
"* Click again to fix the new position. \n",
7980
"* Press ESC/right-click to stop moving components.\n",
8081
"\n",
@@ -94,7 +95,7 @@
9495
"Note: to change the polarity or the orientation of the source, left-click the rotation icon one or more times before placement.\n",
9596
"* Press ESC to stop placing voltage sources.\n",
9697
"Setting voltage source values\n",
97-
"* Hover the cursor over the voltage source until the hand cursor appears. Then click right to open the edit menu. Set: DC-value to 0 V and the series-resistance to 0.\n",
98+
"* Hover the cursor over the voltage source until the \"hand\" cursor appears. Then click right to open the edit menu. Set: DC-value to 0 V and the series-resistance to 0.\n",
9899
"\n",
99100
"#### AC Voltage source (for transient analysis)\n",
100101
"Right-click on the voltage source and make the following (advanced) settings:\n",
@@ -153,7 +154,7 @@
153154
"<img src=\"https://gitlab.tudelft.nl/mwdocter/nb2214-images/-/raw/main/LTS24/LTS0_topmenu_LTSpice-125.jpg\" width=30%></img> \n",
154155
"\n",
155156
"In order to help interpretation of results it is good practice to label the important nodes in the network. Otherwise LTspice does automatic naming, which is often unclear.\n",
156-
"* Right-Click on each of the blue lines on top and choose Label Net from the pop-up menu.\n",
157+
"* Right-Click on each of the blue lines on top and choose \"Label Net\" from the pop-up menu.\n",
157158
"* Name them VA, VB respectively and connect the text-symbol that appears to the line.\n",
158159
"\n",
159160
"**Note: do not use duplicate names, LTSpice will not be able to distinguish these labels (and identical names on components will return an error)**\n"
@@ -174,7 +175,7 @@
174175
"metadata": {},
175176
"source": [
176177
"### Saving graphics\n",
177-
"You can save your LTspice schematics and graphic results as graphics by selecting the corresponding windows and follow the menu: Tools > Write image to .emf file. Or use Windows snipping tools, or just print screen. \n",
178+
"You can save your LTspice schematics and graphic results as graphics by selecting the corresponding windows and follow the menu: \"Tools\" > \"Write image to .emf file\". Or use Windows snipping tools, or just print screen. \n",
178179
"<img src=\"https://gitlab.tudelft.nl/mwdocter/nb2214-images/-/raw/main/LTS24/LTS0-color_palette_background.JPG\" width=25%></img> \n",
179180
"Tip: Normally the graphs have a black background which is OK on screen but inconvenient on paper. You can change the background to white by setting the Color preferences:\n",
180181
"* Choose from the menu: Tools > Color Preferences \n",
@@ -204,8 +205,8 @@
204205
"### DC-Analysis\n",
205206
"<img src=\"https://gitlab.tudelft.nl/mwdocter/nb2214-images/-/raw/main/LTS24/DC_op_pnt.JPG\" width=60%></img> \n",
206207
"* Follow the menu: Simulate > Edit Simulation Cmd. \n",
207-
"* In the pop-menu select the tab DC op pnt (DC at point) and click OK. \n",
208-
"* Left-click in the drawing area to drop the command .op \n",
208+
"* In the pop-menu select the tab \"DC op pnt\" (DC at point) and click OK. \n",
209+
"* Left-click in the drawing area to drop the command \".op\" \n",
209210
" \n",
210211
"* Click the RUN icon to start the simulation, the solution (currents and voltages) are shown in a pop-up window, similar to the above one\n",
211212
"* From the currents and the nodes you can derive the total current, total voltage and therefore total resistance. \n",
@@ -223,8 +224,8 @@
223224
"#### Transient simulation\n",
224225
"Change the simulation settings through: Simulate > Edit Simulation Cmd\n",
225226
"* Select the Transient tab (leasing to an intensity vs. time display)\n",
226-
"* set the total simulation time to e.g. 100 us; \n",
227-
"* and the maximum steps to make to a large value, e.g. 1000 (see figure)\n",
227+
"* set the total simulation time to e.g., 100 us; \n",
228+
"* and the maximum steps to make to a large value, e.g., 1000 (see figure)\n",
228229
"<img src=\"https://gitlab.tudelft.nl/mwdocter/nb2214-images/-/raw/main/LTS24/LTS2-RL_transient_simulation.JPG\" width=60%></img>\n",
229230
"\n",
230231
"**For Mac-users**, the Spice objective to use is: **.tran 0 100u 0 1000** <br>\n",

book/manuals/intros/intro_scope_Siglent.ipynb renamed to book/manuals/intros/oscilloscope.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Introduction to the oscilloscope (scope)\n",
7+
"# Oscilloscope\n",
8+
"\n",
89
"The oscilloscope is an indispensable device to test electronic circuits and is an important complement to the DMM. \n",
910
"\n",
1011
"The DMM provides a reading of a circuit at a single point in time. This means that if you are trying to measure a signal that is changing over time, the DMM won't be able to visualise it. When you measure an alternating current (AC) signal such as a sine wave using the DMM, the reading will only show the $U_{rms}$ of the signal. \n",

0 commit comments

Comments
 (0)