CW>

Projects / Getting Started

Getting Started with Breadboard Electronics

Breadboards are small plastic boards with lots of holes in, that are used to connect up electronic components without any soldering. You can buy a half-size breadboard like the one I use in my projects for £3. Once you have a breadboard, you're going to need something to put on it and to learn a few things to connect them up.

Batteries

Firstly you need a power source, if you're going to do anything that isn't powered by the Raspberry Pi, which is probably a good idea to start with. For small electronics projects, like the ones on this page, you're going to need a battery holder for 3 or 4 AA batteries. Approximately 5V (volts) is good for many projects like these. This can be provided by 4 AA rechargable (1.2V) batteries or 3 non-rechargable (1.5V). A battery holder with header wires so you can easily connect it to the breadboard is best. Obviously you need some batteries to put in it too!

Wires

To connect things up on your breadboard you need some wires. You can buy packs of jumper wires for a few pounds. It's good to have some with pins on the end (male connectors) for connecting to the breadboard, and some without (female connectors) for connecting to the Raspberry Pi GPIO (input/output) pins. You can also just use solid core wire to connect things up on a breadboard. But you will also need some wire cutters to cut and strip the ends of your wires.

LEDs, Resistors and Switches

Once you have a breadboard, a power supply and wires, you need something to connect. LEDs are a good place to start. You can buy packs of them for a few pounds. To connect up LEDs you should use a small resistor to limit the current through them and avoid damaging them. A 330Ω (ohm) resistor is normally more than enough for this with a 5V power supply, but some LEDs will be quite dim and need a smaller value resistor, like 220Ω or even 100Ω. I won't go into the electronics theory for calculating this here. I would just start with a 330Ω resistor and try a smaller one if the LED is very dim. You can buy packs with many different resistances, which are useful for all sorts of electronics projects. Some switches or push buttons that are suitable for use on a breadboard are also useful to have, so you can turn your circuit on and off, as shown in the following example.

First Breadboard Circuit

Once you have these components you can connect them up on the breadboard to make a circuit and see something happen. A breadboard has two lines of holes along each side, labelled + and -, for connecting power, and numbered rows across the middle section for connecting components. These rows of holes are all connected underneath, as shown in the first picture below. Note that the rows aren't connected across the gap down the middle of the board.

In the second picture I've made a simple circuit with a push button to light up an LED. The power from the batteries is connected to the power lines down the side of the board. Red is positive (+) and black negative (-) or often called ground. The 330 Ω resistor connects the 5V power (+) to the push button switch. The other end of the button is connected to the LED and the other leg of the LED connects back to the power supply ground (-). Note that LEDs only work one way, so if it doesn't light up, try it the other way round. If it has one longer leg this should usually be connected to the positive (+) power, from the button here. If you've set it all up correctly, the LED should light when you press the button, as in picture 3.

Breadboard connected rows
Circuit layout
Pushing button to light LED

Next Step

Once you've got your LED lighting up, you can use a similar method to connect up other components like a buzzer or a motor as shown below. Make sure to use components suitable for the power supply you are using. Parts that work with 3 to 5 volt power are good for using with the Raspberry Pi as they can often be powered directly from the power pins on the Pi.

Buzzer circuit
Motor circuit

When you're happy with connecting up components on the breadboard you can move on to connecting things up to the Raspberry Pi and controlling them using a program. Have a look at the next page to get started with the Raspberry Pi.