← MICROELECTRONICSME-6 · 4 LESSONS + CAPSTONE

Interfacing the real world

ADCs, PWM, drivers — the bridge to PCB Studio.

  1. ME-6.1ADC & samplingOPEN →
  2. ME-6.2PWMOPEN →
  3. ME-6.3Driving loads safelyOPEN →
  4. ME-6.4Pull-ups, debouncing, protectionOPEN →
ME-6 CAPSTONE

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.

  1. The LDR divider feeds a follower (ME-4), then an anti-aliasing filter (CA-6), then the ADC, sampled at 1010 Hz. State the highest cutoff frequency Nyquist permits. Then compute how much a single-pole RC at that cutoff actually attenuates the 120120 Hz lamp flicker — you will find it is a factor of roughly f120/fcf_{120}/f_c, not elimination. Now find where the residue goes: 120120 Hz is an exact multiple of the 1010 Hz sampling rate, so it aliases to 00 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.
  2. Digital input. Specify the button: pull-up value and its current, debounce RR and CC for 22 ms of bounce, and name the two ME-5 treatments the signal still needs after the RC.
  3. PWM output. The board dims an LED by PWM. Choose a frequency and justify it against flicker perception (above about 200200 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.
  4. Power output. The board also switches a 1212 V relay coil (3030 mA, 100100 mH) from a GPIO. Specify the MOSFET (logic-level, RDS(on)R_{DS(on)} at 3.33.3 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.
  5. 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.
  6. Build it. In PCB Studio, place the Pico 2 W, the ldr_divider on an ADC pin, a pushbutton, a led_5mm, and the motor_driver_header for 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.
ME-6 · Interfacing the real world · iLearnSTEM Electronics