{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# Simple Circuits"],"metadata":{"id":"YhH6aukqPlIc"}},{"cell_type":"markdown","source":["In this lab, we'll test and build models of simple circuits.\n","\n","**By the end of this session, you will present to your TA your claim and evidence about the extent to which several circuit components can be modeled through Ohm's Law.**\n","\n","# **Learning goals**\n","\n","By the end of this unit, you should be able to:\n","* Use proposed models to make predictions and justify experimental design decisions such as how much data to collect and how to space data collection.\n","* Manage time by conducting pilot experiments and plotting as you go.\n","* Set up a simple circuit and troubleshoot the circuit by systematically isolating and testing different components (not ``trial and error'').\n","* Use results to propose new or modified models to explain and represent the phenomena being investigated.\n","\n","**Reminder**\n","As we move back into experiments related to electricity and magnetism, the goal is to explore the physical world and use our experimentation tools and skills to make sense of what may be happening. We are not seeking to verify textbook physics. We are seeking to discover physics from your experiments.\n","\n","**You are not expected to know anything about electricity to perform these experiments. The pioneers of the field in the 19th century didn't know much either and did experiments like these. You're in good company!**\n"],"metadata":{"id":"EuEjQd2UpYo4"}},{"cell_type":"code","source":["# Run this code cell to mount your Google Drive.\n","from google.colab import drive\n","drive.mount('/content/drive')\n","\n","#Fill in the appropriate directory info in the ``...``\n","%run \"/content/drive/My Drive/.../utilities.ipynb\""],"metadata":{"id":"AJdqi2AxPn2q","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1726972089916,"user_tz":240,"elapsed":8640,"user":{"displayName":"Selena Wang","userId":"05211511538179112309"}},"outputId":"4acb979e-fb4c-447d-aa4a-0a2f2144cdea"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Mounted at /content/drive\n"]}]},{"cell_type":"markdown","source":["## **A. What is a circuit?**\n","A circuit is a closed loop through which electricity flows. This closed loop consists of *circuit components* (things like batteries and light bulbs) and *wires* which connect circuit components together. Circuit components either supply or absorb electrical energy, while wires transmit electrical energy (and absorb a little energy as well but usually a negligible amount).\n","\n","You will combine all of these elements in the circuits you'll build today. Your circuit will include:\n","* a power supply, aptly named since it supplies electrical power/energy,\n","* a resistor, which absorbs electrical energy, and\n","* wires, which permit the flow of electricity through the circuit.\n","\n","If electricity feels unintuitive and unfamiliar, do not fear. It is! We cannot see electrons and often the behavior of electrical phenomena seems mysterious or complicated. While imperfect, a helpful analogy is the \"water pipe\" analogy. See details of this [analogy on HyperPhysics](http://hyperphysics.phy-astr.gsu.edu/hbase/electric/watcir.html). If you're having trouble conceptualizing what a power supply or resistor does, try using the water pipe analogy.\n","\n","\n"],"metadata":{"id":"g6vn80J4NBxk"}},{"cell_type":"markdown","source":["## **B. Familiarizing yourself with the equipment**\n","\n","This first activity aims to familiarize you with equipment that will allow you to design and carry out experiments with circuits. Check in with other groups if you need additional assistance with the set up and refer to the cheat sheet on your table. If you quickly get through this exercise, help out your peers in other groups. Your instructor is also available to help but there are more of you than there are instructors, so help each other out!\n","\n","Your TA will draw a diagram of a circuit on the board for you to set up. Before setting up the physical equipment, [visit this simulation](https://phet.colorado.edu/sims/html/circuit-construction-kit-dc/latest/circuit-construction-kit-dc_all.html) and set up the same circuit using the simulated equipment.\n","\n","**Q.** Describe what you see in the simulation, in terms of how electrons flow in the wires between the circuit components.\n"],"metadata":{"id":"GZNkDsoUlzzn"}},{"cell_type":"markdown","source":["**[Your answer here]**\n","\n","---"],"metadata":{"id":"gWkFJk9ojHVv"}},{"cell_type":"markdown","source":["\n","\n","After exploring the simulation a bit, read the information below carefully to understand what you'll be measuring and how. Then connect the physical circuit using the lab equipment."],"metadata":{"id":"B75sYicWjJJl"}},{"cell_type":"markdown","source":["## **C. What are you measuring?**\n","\n","So far we've mentioned a few ideas relevant to simple circuits. We've mentioned that electrical energy flows or is transmitted around a circuit. This flow of electricity is called **current**, denoted by $I$. The units of current are Amperes or Amps, denoted by $A$.\n","\n","Current is a result of electrical potential energy, which is supplied by things like batteries and power supplies. We can measure this difference in electrical potential energy between distinct points in a circuit to get a sense of the \"force\" that drives the current between those points. This \"force\" that drives the current is called a **voltage difference**, denoted by $\\Delta V$. (Strictly speaking, voltage is not a force, which is why I've used scare quotes. Here we mean to imply the colloquial usage of \"force\" rather than the technical physics usage.) The units of voltage difference are Volts, denoted by $V$. Yes, the symbol for voltage is the same as the symbol for its units. Yes, this is bad notation. Sorry!\n","\n","We will be introducing elements that absorb energy in our circuit, such as the resistor. To measure the extent to which a circuit element restricts current flow, we measure its **resistance**, denoted by $R$. Resistance is a property of the resistor itself; what material it's made of and its size and shape. Therefore you should measure the resistance of a resistor when it is not connected to a circuit. The units of resistance are Ohms, denoted by $\\Omega$.\n","\n","## **D. How are measurements made**\n","You will be using a handy tool called a Digital Multi-Meter (DMM). As its name implies, a multimeter measures multiple quantities (current, voltage, resistance, and more). But since these physical quantities are different, do not expect to use the multimeter in the same way for different measurements. Think of it this way--if you had an apparatus that measured both time and length, you'd probably expect to have to change the settings and the configuration depending on which quantity you were measuring. The same goes for the DMM.\n","\n","You may see or hear the terms **ammeter** or **voltmeter** which refer to tools that measure current or voltage, respectively. Your multimeter measures **both** and therefore can be used anywhere an ammeter or voltmeter is required.\n","\n","The DMM will connect to your circuit either in **series** or in **parallel** with some part of your circuit depending on whether you are measuring voltage (parallel) or current (series). Your TA will show you how to make these connections.\n","\n","To measure voltage and current, electricity needs to be flowing which means your circuit should be on.\n","\n","To measure resistance, no electricity should be flowing through your resistor.\n","\n"],"metadata":{"id":"l-Xxt3zQo7Bj"}},{"cell_type":"markdown","source":["## **D. Check your understanding**\n","Answer the following questions based on the simulation, the real equipment, and conversation with your TA. You may come back and revise your answers as you learn more throughout the session.\n","\n","\n","\n","\n"],"metadata":{"id":"QFagUAJaeAjs"}},{"cell_type":"markdown","source":["**Q.** How do you set up the mulitmeter to measure the voltage supplied by the power supply?\n","\n","\n"],"metadata":{"id":"U2lhS82vf-js"}},{"cell_type":"markdown","source":["**[Your response here]**\n","\n","---"],"metadata":{"id":"pee5oDHUgO7K"}},{"cell_type":"markdown","source":["**Q.** What does the multimeter read when the power supply is (a) turned off and (b) turned on?"],"metadata":{"id":"XF7YJkgQjzpX"}},{"cell_type":"markdown","source":["**[Your response here]**\n","\n","---"],"metadata":{"id":"Q49EqnIsj48h"}},{"cell_type":"markdown","source":["**Q.** What do the voltage settings on the multimeter do (e.g. the ones that say 200m, 2, 20, etc)?"],"metadata":{"id":"ihoqkHUtfjCi"}},{"cell_type":"markdown","source":["**[Your response here]**\n","\n","---"],"metadata":{"id":"csbpgzhifkhl"}},{"cell_type":"markdown","source":["**Q.** What happens if you swap the terminals on the multimeter while measuring voltage?"],"metadata":{"id":"bqxjbbo-gOJs"}},{"cell_type":"markdown","source":["**[Your response here]**\n","\n","---"],"metadata":{"id":"JU1oOw8YfODm"}},{"cell_type":"markdown","source":["\n","## **Beware Excess Current: Equipment Safety Basics**\n","\n","**Do not let the resistance in your circuit go below 20$k\\Omega$!**\n","\n","Applying the water pipe analogy rather loosely, imagine cutting a hole in your water pipe so that all the water rushes out. This is what happens there is not enough resistance in your circuit to prevent a current surge. When current surges, components can become damaged.\n","\n","To protect circuits from too much current, make sure to do the following:\n","* **Maintain resistances in your circuit above 20$k\\Omega$!** Make sure you see the difference between 20$k\\Omega$ and 20$\\Omega$ on your resistor board and turn resistances new resistances *on* before turning other ones *off*.\n","* **Keep your power supply off until you have double checked your circuit.** Have team members or your TA double check that your circuit is set up correctly before turning on your power supply.\n","* **Start with your current at 0$Amps$ and your power supply set to 0$V$.** As you change resistances, an earlier power supply voltage difference may cause a different current through the circuit, so you should not assume the old settings are safe. Before turning on your power supply, always turn the dials back to zero and start tuning up.\n","\n","Lastly, our DMMs use **fuses** to protect against excess current. When too much current flows, the fuse takes the hit and blocks current from passing.\n","\n","**If the multimeters seem to not be working, check the fuse.** There is a screw driver in the toolbox. Unscrew and remove the lower back panel. Check the bottom fuse for a sear mark. If it looks seared, pop it out, throw it in the garbage, and replace it with one in the baggy at the front of the room. Ask your TA for help if you are not sure how to locate/remove the fuse.\n","\n","**Please do not be wasteful with fuses.** The section with the fewest blown fuses will win a prize!\n","\n","\n","---\n","---"],"metadata":{"id":"Tkbt-ToAfFr2"}},{"cell_type":"markdown","source":["\n","## **E. Begin Your Experiment: Testing Ohm's Law**\n","\n","According to a model called Ohm's Law, the ratio of the *voltage across* a circuit component with resistance $R$ to the *current through* that component is equal to the component's resistance, or $V/I=R$. Put another way, $V=IR$.\n","\n","There are all sorts of circuit components that exist (resistors, thermistors, capacitors, diodes, transistors, inductors...). We will begin by testing Ohm's Law for resistors by collecting current and voltage data. Next session, we'll test Ohm's Law for other types of circuit components.\n","\n","**Q.** If Ohm's law applies to a system under investigation, what do you predict a plot of the current, $I$, on the $y$-axis and voltage, $V$, on the $x$-axis will look like?"],"metadata":{"id":"kwA9PgbgosF5"}},{"cell_type":"markdown","source":["**[Your prediction here]**\n","\n","---"],"metadata":{"id":"_7goeYuzg3kX"}},{"cell_type":"markdown","source":["**Q.** Work with your group to design an experiment to test your prediction for the relationship between the current, $I$ through your circuit and voltage, $V$, across the resistor.\n","\n","Questions to consider in your design:\n","* You have three variables, $V$, $I$, and $R$. Which are dependent, independent, or constant variables? Please explain your reasoning based on your experience measuring them in the previous exercises.\n","* What are your dominant sources of uncertainty? How will you characterize, quantify, and minimize those sources?\n","* What ranges of values will you explore? How many data points will you collect within that range, given the minimum allowable resistance (20 $k\\Omega$)? How many repeated trials for each value of the independent variable will you need? Justify your choice in each case.\n","* How will you plot and analyze the data to evaluate whether the system is consistent with the model? See the [Analysis Toolbox](#analysis) at the end of this notebook.\n","\n"],"metadata":{"id":"b_ETi0pN5U4A"}},{"cell_type":"markdown","source":["**[Your design here]**"],"metadata":{"id":"eBznM3gz7SM2"}},{"cell_type":"code","source":["#Create as many code cells as you need"],"metadata":{"id":"-JI5o1rx7Yq8"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["**[Your iterations here]**"],"metadata":{"id":"AHxsNSLt7kck"}},{"cell_type":"code","source":["#More analysis here"],"metadata":{"id":"ex2E4Wcd7n4e"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["\n","## **F. Extend**\n","As always, iterate on your design informed by preliminary analyses (plot as you go!!).\n","\n","\n","Once you are confident with your claim about resistors, explore the relationship for other types of resistive elements (e.g., light bulbs or Light Emitting Diodes).\n","\n","\n"],"metadata":{"id":"4b9lazhv7cVc"}},{"cell_type":"markdown","source":["\n","\n","---\n","\n","## **Lab Checkout**\n","\n","By the end of the lab session, document below a claim about **the extent to which the voltage difference across a resistor is proportional to the current through the resistor** and briefly summarize your evidence that supports your claim. Present your claim to your TA or (if you are out of time), they will look over these notes to evaluate your claim.\n","\n","In the checkout, they will be looking for:\n","* Whether the claim is supported by evidence,\n","* Whether that evidence is sufficient, and\n","* Whether it is clear that you collected the data.\n"],"metadata":{"id":"pnM1-jwAknqf"}},{"cell_type":"markdown","source":["**[Your answer here]**\n","\n","---"],"metadata":{"id":"eG10EoxfnWxe"}},{"cell_type":"markdown","source":["# **Analysis toolbox**"],"metadata":{"id":"0SzGTOt6oqyR"}},{"cell_type":"markdown","source":["## **Code to input your data**"],"metadata":{"id":"eCZ4Y88No-Ep"}},{"cell_type":"code","source":["## Enter your ordered voltage difference values:\n","deltaV = np.array([...])\n","\n","## Enter your ordered current values, such that each entry corresponds to a voltage difference value in the deltaV array in the same position\n","## (i.e., the third entry in the current array corresponds to the third extension in the deltaV array):\n","current = np.array([...])\n","\n","## Enter your estimates of the uncertainty in your current measurements, which should be your dependent variable, again ordered:\n","current_unc = np.array([...])\n","\n","## Print the output to check your work - make sure there are the same number of entries in each array\n","## (e.g., one current and uncertainty in current corresponding to each voltage difference)\n","print(\"Voltage difference:\")\n","print(deltaV)\n","\n","print(\"Current:\")\n","print(current)\n","\n","print(\"Uncertainty in current:\")\n","print(current_unc)"],"metadata":{"id":"usDgDbeuo-YR"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## **Code to make a plot**"],"metadata":{"id":"Hs4hRshz5LlE"}},{"cell_type":"code","source":["# Plot the graph of voltage difference versus current with uncertainties\n","# Indicate the appropriate units for each axis label where it says [units]\n","%matplotlib inline\n","\n","plt.figure()\n","plt.errorbar(deltaV,current, current_unc, fmt='.')\n","plt.plot(deltaV,current,linestyle='None')\n","plt.xlabel('Voltage Difference ([units])')\n","plt.ylabel('Current ([units]')\n","plt.show()"],"metadata":{"id":"yxvLTzDFYyDw"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## **Code to find the line of best fit**"],"metadata":{"id":"u21NRhC95Ohs"}},{"cell_type":"code","source":["# Find the line of best fit\n","autoFit(x=deltaV, y=current, dy=current_unc, title=\"Current through a [object] with various voltage differences applied\",\n"," xaxis=\"Voltage Difference ([units])\", yaxis=\"Current ([units])\")"],"metadata":{"id":"wJD4HLtvdiK1"},"execution_count":null,"outputs":[]}]}