Wiki

Clone wiki

Pipsta / Rudolph

Some images below were created by Fritzing. We love Fritzing for its breadboard layouts - please support them!

Student's Tutorial

Difficulty Level

pipsta_mono.pngpipsta_mono_empty.pngpipsta_mono_empty.pngpipsta_mono_empty.pngpipsta_mono_empty.png

• You do not need to understand electronics to complete this tutorial

• Your teacher will inspect your circuits and test them for you

Time to Complete

pipsta_mono.pngpipsta_mono_empty.pngpipsta_mono_empty.pngpipsta_mono_empty.pngpipsta_mono_empty.png

• This lesson can take about 30 minutes

Overview

Following the last lesson in which you made your holly berry circuit, this time you will make two circuits to explore current, voltage and LEDs more deeply.

Both circuits will cause an LED to glow (go brighter and dimmer over and over again), but each circuit uses different methods to do this.

Equipment

  • 'breadboards' for creating your circuits

half+breadboard.png

  • A label stuck on top of your breadboards to show how the circuits are put together:

nose_cct1_small.png

nose_cct2_small.png

DO NOT REMOVE THESE LABELS!

  • A label with a QR Code that can be scanned to bring you to this tutorial and a Reindeer label to decorate your circuits when they are complete:

reindeer_small.png

  • 2x Link wires

  • 3x 1k ohm resistors

  • 1x 330 ohm resistor

  • 1x or 2x red LEDs (depending on your teacher's plan)

Assembly

1) You will need to know how to identify the components you have been given

  • Resistors have two legs. They are beige or blue and have coloured stripes on them. You should have three resistors with the same coloured stripe pattern in your kit and one that has a different coloured stripe pattern. See hereto read about how to read resistor colours and work out their resistance values.

  • LEDs are clear and domed and have two legs. In this lesson, your LEDs are red. You should have either one or two LEDs, depending on how your teacher will run the lesson.

  • Link wires can be of any colour and length. You should have two link wires.

2) Fit the resistors, LEDs and link wires to Rudolph Nose Circuit 1 breadboard. When doing this, consider the following 'rules':

  • Double-check the flat sides are the right way around

  • Make sure the legs are not bent

  • Push the legs straight down into the breadboard

  • Make sure the legs are pushed all the way down

  • Make sure not to knock any legs out when you put more in

  • Don't worry about the things marked GND, GPIO2, GPIO3, GPIO4 for now

4) When you are finished, ask the teacher to check your circuit. The teacher may explain to you how to fix your circuit.

Testing

1) The teacher will connect each circuit to the Raspberry Pi computer.

2) The Raspberry Pi will control your circuit using 4 wires:

  • 3 wires are used to provide different amounts of current to the LED, causing its brightness to change

  • 1 wire is used for current to return to the Raspberry Pi

  • The LED will not light if the current cannot return to the Raspberry Pi.

  • If your circuit does not work, don't worry! Even Electronic Engineers have to fix problems like this all the time! Check the above 'rules' and see if your circuit works now. Remember that your teacher may be able to spot the problem.

3) This circuit changes the amount of current that is flowing into the LED by turning more GPIO lines on and providing more current down each 'branch'. When all three lines are 'high' the LED will be at the maximum possible illumination. When all three lines are 'low', the LED will be off

4) Once the teacher has disconnected your circuit from the Raspberry Pi, carefully pull the LEDs out of the circuit

5) Making sure your hands are out of the way for the next step!

6) Make sure that the flat side of the LED match those on the Reindeer label, push your LEDs through the label.

7) Your teacher will help put the LED and label back onto your circuit

8) Your teacher will help you test your circuit again

9) You have now completed the first part of the lesson. Now let's look at another way of controlling the LED brightness.

10) Fit the resistors, LEDs and link wires to Rudolph Nose Circuit 2 breadboard. Remember the above advice to ensure your circuit will work!

11) When you are finished, ask the teacher to check your circuit. The teacher may explain to you how to fix your circuit.

Testing

1) The teacher will connect each circuit to the Raspberry Pi computer.

2) The Raspberry Pi will control your circuit using just 2 wires:

  • The software on the Raspberry Pi pulses the level on the GPIO2 wire in such a way that the amount of time that the pin is 'high' varies. When the line spends most of its time high, the LED will be bright; when it spends most of its time low, the LED will be dim. We can think of this as varying the average amount of current going through the LED. This is caused Pulse Width Modulation:

pwm.png

Note that the LED brightness varies more smoothly for the circuit that uses the PWM

Conclusions

You have made two circuits to do the same job: change the current flowing through an LED.

  • Which circuit do you prefer, and why?

  • Discuss how you could make the first circuit have more levels of illumination

  • What would happen if you ran the first script (the one that does not use Pulse Width Modulation) on the second circuit?

[END]

Updated