Class 3: Electronics and Tools


Home


The first part of the assignment for the third class was to make a circuit on a breadboard using components from the kit. I made the circuit pictured below, using the two 1k Ω resistors to divide the voltage. I first attached the red wire to the 3.3 V on the microcontroller and connected it to the + on the breadboard, and then I attached the black wire to the GND port and connected it to the - on the breadboard. I then used more wires and two resistors to complete the circuit.

MCC1
BB1C1
BB2C1

Once I had this circuit built, I used the multimeter to measure the voltages in the circuit. Before the resistors the voltage was 3.3 V, after the first one it was 1.65 V (half of the starting voltage), and after the second resistor it was 0 V. Once I figured out the voltages, I used Ohm's law to calculate the current in the spot in between the two resistors. Since the voltage was 1.65 V and the resistor was 1000 Ω, the current was 1.65 / 1000, which is 0.00165 A (1.65 mA). I haven't worked with Ohm's Law in over a year (back when I was in sophmore physics), so it was very helpful for me to use the suggested reading to learn more about Ohm's law and how it works with my explorations.


The next part of the assignment was to simulate my circuit on TinkerCad, which is shown below. I replicated it exactly to make sure it would work. I have never used TinkerCad before, so learning the layout, how to add the breadboard/microcontroller, how to add in and change the color of wires, and how to simulate the circuit and use the virtual multimeter was very useful to me. I feel much more confident using Tinkercad now.

Simulation

The third part of the assignment was to use the Microcontroller Analog in (ADC) using the Arduino software to measure the voltage of a potentiometer in a circuit. The first thing I did was remove the resistors and add in the potentiometer, which would allow me to spin a dial to control the voltage. I connected a yellow wire from the A0 port on the microcontroller to spot in front of the middle leg of the potentiometer, allowing the voltage change to occur. I then opened the AnalogReadSerial Arduino code and altered the print statment to print the actual voltage instead of a number 1-1023. I edited it to this: Serial.println(sensorValue * 3.3) / 1024). Pictures of the new circuit and recorded voltage values can be seen below. I took an Arduino course in 7th grade but didn't remember most of it, so it was really cool to relearn it and see how I could apply the code to my own circuits.

MCC2
BBC2
Analog