Lab 5: More on circuits

In this lab, you’re going to learn more about circuits. First, you’re going to use a relay — an electrical switch — that allows you to turn on and off parts of your circuit. Then, you’re going to practice calculating resistance. Finally, you’re going to diagram your circuit.

1. Complete Circuit 11, Relays, in your Vilros Ultimate Starter Guide.  If your relay doesn’t work, check all your wires. Trace the circuitry and think about how the current is flowing. Look at the axon drawing to see how the relay should be oriented. If that still doesn’t work, flip the orientation of the diode (for me, I needed the dark side of the diode on the right).

2. Make your circuit a little more exciting. On one side of the switch, run 2 LEDs in series. One the other side, run 2 LEDs in parallel. When each side is activated, write to your serial monitor: “Parallel On” or “Series On.”

3. What resistors do you need for your circuit, according to Ohm’s Law?  You’ll need to calculate this separately for each side of the switch. Show me your math. Make sure your circuit uses the most appropriate resistors. (4 points)

4. Take a short video of your circuit in action. Be sure to show the wiring well enough that I can actually see one side is wired in series and one in parallel. Also, be sure to show the serial monitor. In your video, feel free to talk and point to things.  (8 points)

5. Draw a circuit diagram for your new circuit. Label everything, just as it’s done in the circuit diagram in your starter guide. (6 points)

Note that there are several different ways to go about drawing a circuit. This software, Fritzing, seems to be popular in the Arduino community. There are many other options available — just search around. You can even use a pen and paper (and a scanner). Whatever you use, make sure your circuit is clear.

6. Read about the why your resistors are colored as they are.

7. Read about how to destroy an Arduino. This link is a little strange because it’s an advertisement for an Arduino spin-off called a “Ruggeduino” that can supposedly withstand all the things you can do to kill your Arduino. But, it’s also a clear list. (If you think your circuit diagram was complicated, check out the ones they show on this page.)

8. If you’d like to read more about the basics, check out this primer on voltage, current and resistance at Sparkfun. It also includes links to tutorials on electricity and circuitry.

9. Or, check out this one on Adafruit. Start here and then keep clicking through to read “Revisiting Resistors,” “Revisiting Volts,” and “What to Adjust?”.

10. As always, post your assignment on bSpace.

4 thoughts on “Lab 5: More on circuits”

  1. For your resistance calculations, assume that there is 5V exiting the relay.

    All the accessories that you need for the switching (transistor, diode, additional pin, etc.) are really a distraction from the very simple LED circuits on this board.

    Look at the LEDs in the circuit diagram. Where does the voltage come from? Where does it ground?

  2. Also, someone pointed out that the plan diagram of the relay and the table have a couple differences. In particular, the suggested location of the diode differ.

    I followed the plan diagram, with the diode going from e7 to f7. This worked and makes sense to me. The alternate location suggested in the table (b7 to b11) doesn’t make sense to me. There a couple reasons, but the most intuitive is likely that, in the b7 to b11 orientation, the diode does not create a complete circuit. It dead-ends in row 11, since there are no other wires/connections departing from row 11.

  3. Has anyone had trouble writing to the serial monitor? I can get the parallel circuit to write, but not the serial one for some reason.

    1. That sounds like an issue with the code. Arduino’s probably not executing that line for some reason (this is a great example of how the serial monitor can be useful in debugging). Try moving the print line around in the sketch and see where it does or does not print.

Leave a Reply

Your email address will not be published. Required fields are marked *