# For instructors: teaching with the Voltecx course

This course is built to drop into an existing undergraduate or graduate power electronics class. Each lesson is three things that agree with each other: a circuit that ships with Voltecx, a guided lesson in the app that checks every exercise against the student's own run, and a page here with the theory, the answers and a one-page lab handout. Every number on the pages is checked against a simulation by an automated test, so the pages cannot drift from the program.

## The course at a glance

| # | Lesson | Status |
|---|---|---|
| 1 | [Diodes and rectifiers](https://voltecx-web.nguyenvanqui291.workers.dev/course/diodes-and-rectifiers) | Ready |
| 2 | [The buck converter](https://voltecx-web.nguyenvanqui291.workers.dev/course/buck-converter) | Ready |
| 3 | [Boost and buck-boost](https://voltecx-web.nguyenvanqui291.workers.dev/course/boost-and-buck-boost) | Ready |
| 4 | [The flyback converter](https://voltecx-web.nguyenvanqui291.workers.dev/course/flyback-converter) | Ready |
| 7 | [The single-phase inverter and sine PWM](https://voltecx-web.nguyenvanqui291.workers.dev/course/single-phase-inverter) | Ready (page and example; no guided lesson in the app yet) |
| 5–6, 8–11 | Averaged models, loop design, three-phase inverters and SVPWM, magnetics, thermal, conducted EMI | Planned |
| 12–16 | Graduate topics: resonant and soft-switching converters, power factor correction, motor drives, grid-tied inverters, digital control | Planned |

The [course page](https://voltecx-web.nguyenvanqui291.workers.dev/course) lists them with what each one covers. Until a planned lesson is ready, the [tutorials](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials) and the built-in examples cover most of the same circuits, without the graded exercises.

## How students install

1. Download Voltecx for their platform from the [download page](https://voltecx-web.nguyenvanqui291.workers.dev/download): macOS, Windows or Linux.
2. Install it as the [installation chapter of the manual](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/01-install) describes. Beta builds are not yet notarised on macOS; the chapter shows the one-time step to open them.
3. Start it and click **Guided Lessons** in the activity bar on the left. The course lessons are listed as **Course 1** to **Course 4**.

The free tier runs offline with no account and no licence key, so students can install it on their own laptops and work without the campus network. The terms of the academic plan are not published yet; see the [academic program](https://voltecx-web.nguyenvanqui291.workers.dev/academic) page.

## How a lesson runs in class

- **Before class**, students read the lesson page up to the exercises and fill in the "Predicted" column of the lab handout.
- **In the lab**, they open the guided lesson. Each step says what to change and what to predict; **Next** stays locked until the student's own run gives the right number, and a hint says what to look at when it does not. A step that asks for a design (the capacitor in lesson 2) only passes on the right answer, not on any answer that works.
- **After the lab**, they hand in the handout and the saved circuit (`.pcraft`). The answers on each lesson page are for you; they are on the public page, so assign the report questions, or change the values, for marked work.

## Assignment template

Copy this into your course page and fill in the brackets.

```text
Lab [N]: [lesson title]

Learning outcomes
  After this lab you can [derive / predict / size] [quantity] for [converter]
  and check it against a simulation.

Before the lab (20 %)
  Read [lesson page]. Fill in the "Predicted" column of the lab handout,
  showing each calculation.

In the lab (40 %)
  Complete "Course [N]" in Voltecx's Guided Lessons. Record the simulated
  values in the handout. Save your final circuit as [lab-N-studentid].pcraft.

Report (40 %)
  Answer the report questions on the handout. Include the scope figures
  the procedure asks for, exported as SVG or PNG.

Hand in
  The handout (PDF) and [lab-N-studentid].pcraft by [date].

Changed values for this term
  [e.g. Vin = 36 V, L1 = 68 µH: recompute every predicted value]
```

## Grading the circuits automatically

`powercraft-cli`, the command-line program that ships with Voltecx, runs the same checks as the guided lesson on a student's saved file. For example, to grade the capacitor step of lesson 2 (step index 4, counting from 0):

```sh
powercraft-cli run --accept-terms --root submissions \
  --cmd file.open --param path=lab-2-s1234567.pcraft \
  --cmd simulation.run \
  --cmd lesson.check --params '{"id":"course-buck","step":4}'
```

The last line it prints is a JSON object with `"passed": true` or `false`, and the reason for each check that failed. The Test Bench step is graded the same way, after listing and running its case:

```sh
powercraft-cli run --accept-terms --root submissions \
  --cmd file.open --param path=lab-2-s1234567.pcraft \
  --cmd testbench.list --params '{"spec":{"vin":48,"vout":{"nom":12,"tolPct":2},"iout":{"min":5,"max":5},"ripple":{"maxPp":0.05}}}' \
  --cmd testbench.run --param case=all \
  --cmd lesson.check --params '{"id":"course-buck","step":5}'
```

A loop over the folder grades a whole class. `powercraft-cli run --cmd lesson.get --param id=course-buck` prints every step with its checks, so you can see what each one requires. If you change the values for your term, write your own pass bands with `scope.measure` or a Test Bench spec; the [Test Bench chapter](https://voltecx-web.nguyenvanqui291.workers.dev/docs/manual/18-test-bench) describes the specs it reads.

## Lab kit list

The course runs on laptops alone. What each seat needs:

- A computer that runs Voltecx (macOS, Windows or Linux) with the program installed.
- A copy of the lesson's lab handout, on paper or as a PDF.
- Optional: a mouse; the schematic editor is easier with one than with a trackpad.

If your lab follows a simulation with the same circuit on a bench, the usual kit for these four lessons is a low-voltage AC source (a mains isolation transformer with a 12 V secondary for lesson 1), a current-limited DC bench supply, a two-channel oscilloscope with a current probe, a multimeter, and an evaluation board or breadboard for each converter. Choose the parts and their ratings from your own lab's safety rules; Voltecx does not supply kits.

## Questions and pilots

We are looking for a few university labs to pilot the course and tell us what to change. Write to us through the [contact page](https://voltecx-web.nguyenvanqui291.workers.dev/contact) with your course, the topics you teach and the number of seats.
