< back 🛠

Fix a PCB Board (Input)

This week I fixed my PCB board from week 6 as it already had an input sensor. It was a worthwhile learning experience.

These are the errors from Anthony's helpful guidance:

1. I soldered the LED wrong. The green mark should be in the direction of the current downstream. This prompted a whole new deepdive into cathode, anode and diode in circuits, in which I also lost a bet to Harrison. Diode is a two part electrical component / two terminals (like an LED), with an anode and a cathode (the direction switches based on the type of current).
I soldered the LED on with the green line going the wrong way, and also upside down.

2. The resistor was too big at 250 Ohms (and overstepping its board footprint). I had previously used a 250R resister which translates to .25W. Anthony suggested defaulting to a 1kOhm / 1W for baseline tasks like this.

3. My Motion Sensor:
I had accidentally flipped the part, and Anthony was worried that I had plugged GND to Voltage, and that it would fry (?) the circuit. To my luck, I hadn't and we were able to resolder the board. Anthony came up with an important workaround: since I had connected the GND and 5V (first pin), we mirrored the board so that the correct components were aligned. However, now the VIN was going to 5V, and we decided it was better to reroute it to 3v3 (Pin#3). Board-surgery was invovled to patch the connection with wire: cut the copper connection between VIN and 5V, and reconnect VIN and 3V3.

*Learning to use the heat pad to remove large amounts of solder: Heating the connections from 1-2" away, and pulling delicately the parts. This was extremely useful as I was not able to get the braid to work last time. Dismantling the Motion Sensor was delicate as it meant extracting the 5 pins without damaging them. Thankfully, it was successful. *cue image*

The Final Board: PCB Board Closeup

The next part was rechecking the code. I had plugged in the dim metrics to chatgpt, so that the red LED would dim and turn on based on the motion sensor's readings. Anthony explained that light does not ever really 'dim' but essentially flicker at a slower and faster rate so that our eye would perceive it different. He explained wave phase control and my mind was slighly blown.

See the light motion in action:


And the code.

< back