Arduino Lesson 2: Using a Breadboard

Breadboard
Breadboard for prototyping your Arduino Circuits

In this lesson we will begin to build our first circuits that will be controlled by the Arduino. We will start out with simple circuits and build from there. It is important for you to learn the basics before moving on, and one of the most important basics is how to use a Breadboard.  In this lesson we will learn the ins and outs of breadboards, and by the end of the lesson you will have your first circuit built, and it will be controlled by the arduino.  Watch the video below for in depth description of how the breadboard works.

In order to build a circuit, you have to connect circuit elements together. You could run a bunch of wires to connect components, but you find that very quickly you end up with a rats nest of wires, and it becomes impossible to debug. In order to keep your circuit organized you need to use a breadboard, pictured above. The breadboard allows you to connect components together by plugging them into the little holes. The key is to understand how the holes are connected. As you can see in the diagram, the holes in a column (when oriented as shown in the picture) are connected together.  So to connect components together you need to plug the leads you want connected into the same column. Note that the columns are not connected across the “trench” in the center of the board. Also notice that as the long rows at the top and bottom are connected together. These are typically used to create “rails”.  These are typically used for grounds and supply voltages you might need to connect many components to. Notice some rows are marked (+) and some(-). These are just markings. The row will be set at whatever voltage YOU connect to it.

LED Circuit
Simple LED Circuit for blinking an LED

So, lets look at a real example. In this circuit we have a voltage supply connected to an LED through a resistor. We will need to take this circuit schematic and figure out how to connect it up in the real world. As mentioned above this should be done using a breadboard. You can see that you need to connect the voltage supply to one leg of the resistor. The other leg of the resistor is connected to the LED. Note that the LED is directional, meaning it has to be connected in a certain orientation. You must connect the Cathode to the positive voltage. The Cathode is typically the longer of the two leads on the LED. If you put the LED in upside down, it will not light up. The other leg of the LED needs to be connected to the negative terminal of the voltage supply. For this project we will supply the voltage from the Arduino microcontroller. That way, we can turn the LED on and off from our program.

Look at the diagram at the top of this post to see how the holes are connected in the breadboard, and figure out a way you could connect the circuit up using the PC board. There are many ways to hook it up, but one that will work is shown here.

Arduino LED Circuit
This shows how you can hook an LED to the arduino through a current limiting resistor

When you hook your circuit up in real life, it should look something like this:

LED Arduino Circuit
Photograph of the circuit. Your LED will not come on until you write your program

Remember that it is the long leg of the LED that is connected to the resistor and the short leg to the black wire going to ground.

Now, if you follow along and develop the code as outlined in the video you should be able to do amazing things with the LED.

RESOURCES: On all these lessons I will include resources on where you can purchase the items mentioned in the lecture.

Arduino Microcontroller: You can get a good deal on the arduino on Amazon. Arduinos are open source and many are cheap chinese knockoffs, so you want to make sure you get an “official” version, which you can at the link above.

Arduino Beginner’s Kit: While the bare arduino will get you started, I really suggest getting the complete Beginner’s Kit. The projects I will feature in this tutorial set will use the components in this kit, and it is probably cheaper to go ahead and get the kit than to buy the individual components as you go along. The kit is under $100 on Amazon.

28 thoughts on “Arduino Lesson 2: Using a Breadboard”

  1. Great tutorials, very clear instructions. I’m sure someone has commented on this before, but you mention in the written lesson that the Cathode of the LED needs to be connected to the positive voltage. That should be changed to Anode or longer leg of the LED.

    Thanks for the great Tutorials,

    Brad

  2. My name is Eddie I am using a windows 7 machine I downloaded
    the Arduino 1.6.5. My set up is o.k. but I am having problems with
    the code Any suggestions will be welcomed.

  3. The lessons are incredibly amazing. You’re really a great teacher. Per your advice, I bought the Smartfun inventors toolkit but when I connect my Arduino UNO with the USB cable, Arduino IDE doesn’t detect the USB connection. Under tools-> ports option, it gives me only bluetooth port. Am I missing anything?
    Thanks!

    1. Make sure you install the device drivers. Look at the “Getting Started” pages on the arduino WEB site and make sure you install the arduino drivers, and check device manager on windows to make sure the com port with the arduino has the right driver assigned.

  4. Hi there! I’m realy enjoying your tutorials, and I’m playing a lot with an Arduino UNO.
    My question : Is there any difference conectin the resistor to Vcc or GRND?
    If I have only one resistor may I conect Pin 9 to redLED Pin 8 to YellowLED and both to the same GRND by a 330 Resistor?

    Sorry for my English.
    Alfred

    1. If you have two LED you should use 2 resistors. The resistor can be put on either side of the LED.
      PJM

  5. I’m very happy , because you teacher also same wire and breadboard and wires that made by China ^^ . Haha how about Arduino board ? Are you using Italy one or Chinese one ? Just kidding ^^

  6. Thankkyou for your lessons. im a refrigeration techcian, and im getting into electronics and understanding them more. these lessons really help look at every detail step by step.

  7. Paul your lessons are excellent for me as an arduino/electronics beginner. Only thing is you are storing the pinnumber in an integer saying its a variable. Although working fine imho that’s not 100% correct ( I know i’m splitting hairs maybe). During the program execution these values never change so actually they are constants. I think you’d better use #define LEDPIN valueX . In that case the value substitution is during program compilation, not during runtime.

  8. Hi Paul, thanks for extending your knowledge world wide. Am a south Sudanese. I bought some Arduino basic package through. Ur channel trying to extend Ur knowledge to my niece in refugee camp.

    I want a rest from you about the software you. Are using for your teaching. I would. Appreciate.

    1. Peter,
      I have never been to South Sudan, but have spent lots of time in Kenya and Uganda. I want to move to Uganda. I really love Africa. The African people are unlike any other in the world.
      PJM

  9. I did try with the resistor on led, used a 220 ohm resistor, but the LED doesn’t ON/OFF. Why would it be

  10. By far your tutorials are the best that I found on internet. Thank you so much for sharing your knowledge .

  11. Thanks for a nice and effective tutorial.

    I wanted to try out the independent control of the red and yellow LEDs using the Arduino class/library options, instead of writing the code flat inside the setup/loop of my sketch. Was able to compile it on the IDE, after tinkering around with the directories a bit. Once it compiled on the IDE, I pasted the library and sketch code into the online simulator in the Arduino simulator for circuits.io.circuits.

    It works but I am not sure how to make the two completely independent – right now the functions for the two LEDs are invoked serially. I guess that is as independent as it can get.

    Here is the link, if anyone wants to comment on it:
    https://circuits.io/circuits/2692734-blink-leds-using-arduino-user-library

    1. Hi SG and Paul,
      I too was able to get two LEDs to start to blink but I was only able to get them to work in series too. Got frustrated,but guessing that we will work round this problem in coming lessons.

  12. As i am on a cellular network, I have limited bandwidth and data. Is there somewhere i can read the tutorials rather than watching the videos?

    P.s. good job on the videos.

Comments are closed.