Part 1: Variable Input & Output
For the first part of this lab, we had to build a circuit with one potentiometer, one other variable resistor and two LEDs as outputs. For my second variable resistor, I used a photoresistor. For each LED, I mapped the values from one of the variable resistors to control the brightness.
Part 2: Tone Output
For the second part of the lab, we created a voltage divider circuit with 2 photoresistors to control the tone output of a speaker. First, I mapped the output to just vary with the values from the photoresistor (first part of video), but then I decided to use an array and if-statements to create a discrete scale of notes that would be played based on a range of values for each note.
PART 3: Sensor box
For our sensor box, my partner Corbin and I decided to make a strength-tester type game using a force sensitive resistor, a potentiometer, an LED strip, and a speaker. Depending on how hard the force-sensitive resistor is pressed, a certain number of LEDs will light up to indicate the "strength". If the max value is reached, the speaker gives off a tone. The potentiometer controls which color the LEDs light up with, and loops through the rainbow based on position.
For our enclosure, we laser cut an L-shaped box out of wood with the plan shown below. We cut spaces for the LEDs and potentiometer to fit, and enough room to enclose the circuit inside.
Next, we created out circuit according the the following schematic. We first prototyped it on a breadboard (shown in the video), and then, after very many hours of soldering failed circuits, finally soldered the final circuit using multiple pieces of perf board.
Once the circuit was complete, we attached all the components to the laser cut pieces very carefully and put the entire thing together. I don't have a picture of the final circuit because we were worried taking the box apart will break it, but you can see it in my partner Corbin's process video.
I also made a tiktok of out process, it's short but so far I've gotten a bunch of likes.