Specify the whole interface
This is the last unit of Microelectronics, and its capstone is a full specification rather than a single calculation. You have designed, at various points across two tracks, a light sensor, a filter, a buffer, a scaling amplifier, an LED driver, a MOSFET switch, and a debounced button. Here you assemble them into one interface board and check every item on Lesson 4's checklist — the work an engineer does before committing a design to copper.
- The LDR divider feeds a follower (ME-4), then an anti-aliasing filter (CA-6), then the ADC, sampled at Hz. State the highest cutoff frequency Nyquist permits. Then compute how much a single-pole RC at that cutoff actually attenuates the Hz lamp flicker — you will find it is a factor of roughly , not elimination. Now find where the residue goes: Hz is an exact multiple of the Hz sampling rate, so it aliases to Hz and appears as a steady offset on the light reading rather than as visible ripple. State two ways to reduce it — a lower cutoff, or a second filter pole — and what each costs.
- Digital input. Specify the button: pull-up value and its current, debounce and for ms of bounce, and name the two ME-5 treatments the signal still needs after the RC.
- PWM output. The board dims an LED by PWM. Choose a frequency and justify it against flicker perception (above about Hz for steady light, higher if the LED will ever be seen in motion or on camera). State why no filter is required here, and what would change if the same output had to produce an analogue control voltage instead.
- Power output. The board also switches a V relay coil ( mA, mH) from a GPIO. Specify the MOSFET (logic-level, at V), the gate resistor, the gate pull-down, and the flyback diode — including the spike voltage that would occur without it, and the clamped voltage with it.
- The checklist. Walk all six rows of Lesson 4's table against your board and state, for each, either the component that addresses it or an explicit argument for why that hazard does not apply. Any row you cannot answer is an unfinished design.
- Build it. In PCB Studio, place the Pico 2 W, the
ldr_divideron an ADC pin, apushbutton, aled_5mm, and themotor_driver_headerfor the relay drive. Generate the schematic, run "Generate + PCB layout", and export the Gerbers. Then compare the board against your specification and list what the curated parts library does NOT let you place — the op-amp, the flyback diode, the debounce RC, the gate resistor. Those omissions are the honest boundary between what the engine can validate today and the design you actually specified, and PS-1 is where you learn to describe a board precisely enough to close that gap.