ESE 123 · Laboratory 3 · TA walkthrough

SPICE Simulation & Soldering

Two big skills in one lab. First, LTspice: draw a circuit, let the computer solve it (.OP), and sweep the input (.DC). Second, your first soldering on the project board: five resistors, the J2 programming header and a ground loop. You then check the board against your hand calculation and your simulation, which is how real engineers catch mistakes before they get expensive.

Handout steps 1–14

1 · Building the divider in LTspice, one click at a time

SPICE solves circuits; LTspice is the drawing program around it. Step through the build below. The netlist on the right is the text file SPICE actually reads: one line per part, listing the two nodes it connects and its value. Node 0 is ground, the reference every voltage is measured from.


      

SPICE understands prefixes: k = 10³, m = 10⁻³ (milli!), u = 10⁻⁶, n = 10⁻⁹, and MEG = 10⁶. Typing 1M gives 1 milliohm, not 1 megohm.

Handout steps 15–26

2 · .OP gives one answer; .DC sweeps a whole range

.OP (operating point) solves the circuit once: with 3 V in, Vout = 3 × 2k/(1k + 2k) = 2 V. .DC V1 0 10 0.1 re-solves it for every input from 0 to 10 V in 0.1 V steps (101 solutions), so you see Vout as a line. Drag the cursor (like clicking the V(vout) label in LTspice) to find the input that gives Vout = π.

Why V(vout) is a straight line

A divider’s output is always the same fraction of its input: Vout = V1 × 2/3. Plotted against V1 that is a line through zero with slope 2/3, shallower than V(top), which has slope 1.

Why the source current is negative

SPICE uses the passive sign convention for every part, including sources: it reports current flowing into the + terminal. A source pushes current out of its +, so SPICE shows it as negative. 3 V / 3 kΩ = 1 mA appears as −1 mA.

Handout steps 27–30

3 · Solving the TP1 circuit by hand

This is the circuit you are about to solder. R1 and R2 both connect VDD to TP1, so they are in parallel. R3, R4 and R5 all connect TP1 to ground, so they are also in parallel. Collapse each group into one resistor and you are left with a plain voltage divider. Step through the reduction:

Enter your measured resistances (step 29) to get the prediction your SPICE model should match.

Handout steps 31–51

4 · Soldering: what a good joint looks like

Solder is a metal alloy that melts around 180–220 °C. The iron heats the pad and the component lead together; you feed solder into that hot joint (not onto the iron) and it flows around both. Press play to watch the sequence, then compare good and bad joints.

The five resistors (5% parts: 3 colour bands + gold)

Read bands from the end away from the gold band: digit, digit, multiplier (number of zeros). Example: red-red-orange = 2, 2, ×1000 = 22 kΩ.

Which side is which

Parts go on the component side (the side with “ATmega4809”) and are soldered on the solder side (the side with the white name box). J2 is the exception: it goes on the solder side, using the fixture to hold it straight.

J2: solder the middle pin first

One joint holds the header in place but can still be re-melted to straighten it. Check it sits flat, then solder the two outer pins after taking the board off the fixture.

Ground wire loop

A ~30 mm bare wire bent into a U with ~2.5 mm diameter, through the two GND holes, standing ~5 mm proud. Every later lab clips the scope and supply ground onto it.

Handout steps 52–64

5 · Verifying the board three ways

Check with the power off first (DMM in Ω), then power up from the programming tray and measure voltages. The final check sweeps VDD from 4 V to 6 V in LTspice and reads TP1 at the adapter voltage you actually measured.

If an unpowered resistance check disagrees with your calculation, find the problem (wrong resistor, missing joint, bridge) before powering up.
Keep this open during the lab

6 · Formula sheet: what, when, and an example

Report: one PDF

7 · Report guide

  1. Screenshot of your netlist (step 14).⊞+Shift+S on Windows, ⇧⌘5 on Mac.
  2. DC sweep screenshot with the cursor at V(vout) ≈ π and the coordinate box visible (step 24).Expect V1 ≈ 4.712 V.
  3. Photo of your hand calculation of TP1 (step 27).Show the two parallel reductions and the divider.
  4. Screenshot of the 4–6 V sweep with the cursor at your measured VDD (step 64), compared with your measured TP1.

Store your board in your section’s slot in the black box on the bench stanchion, and wash your hands (solder contains tin and sometimes lead).