Tutorials: Breaboards, LEDs, and Resistors Basics

Today, I’m going to introduce to you some fundamental concepts in building electric circuits. First off, what are we going to use to build our circuits?

Electronic Prototyping
In order to build any circuit, you need something to not only hold all of the components, but also to direct the current in the electric circuit. Most electrical engineers, computer systems engineers, and even electronic hobbyists use several parts to accomplish this. They use either PCBs (printed circuit boards) that have all of the connections pre-determined and you just have to solder the parts to the pcb, veroboards (or stripboards as they’re often referred to) which you have to solder the connections and the components, and breadboards, which requires no soldering of any kind and you just have to route insert your desired components to the board, and connect them together using wires. 95% of the time, I will test out most of the circuits here on the blog using breadboards.

Standard Breadboard

Here are two things you should know about breadboards. Breadboards usually have a specific amount of terminal strips and power buses. Terminal Strips are the horizontal rows on the breadboard that you insert your components to. All of the terminal strips on the breadboard are no interconnected. To connect one terminal strip to another, you must connect them together using wires or another electronic component. The power buses on the breadboard are the vertical columns that hold the VCC, positive power, and the ground, zero power or the returning path of the power supply.

LEDS

Standard LED

LEDs , or light emitting diodes, are considered far better than the standard light bulb. They consume very little power, they can be found in almost every electronic appliance today, and they’re affordable. LED’s can be found in a wide assortment of colors such as red, yellow, blue, green, etc. There are even some LEDs that can emit infrared or ultraviolet light. To power a simple LED, simply connect the positive side of the power to the anode (the really long lead of the LED) and connect the cathode (the short end of the LED) to ground. If you get the connections mixed up, then the LED will not turn on. This is simply because LEDs have a positive polarity. Also, you cannot directly wire an LED to your power supply otherwise it will be blown.To prevent this, you often use a current limiting resistor to do this.

Resistors

Standard Resistor

Like a nozzle on a water hose, a resistor simply cut down the amount of current flowing through it. This is done to protect some electronic components like voltage sensitive ICs (integrated circuits) , to control the charge and discharge for a capacitor, etc. All resistors are measured in ohms which is used in every country. To find the resistance of a resistor, you can simply look at the color strips on it. To make things easier, here’s a link to an easy to understand resistor color chart.

To wrap up this post, I’m going to show you how to wire your very first circuit! You will need the following components.

Basic Electronics Tutorial Parts List

• A Power Supply greater than 3 volts
• A Small LED
• A 1k ohm Resistor (the resistor in the picture is 220 ohms)

First connect the positive end of your power supply to one of the power buses of the breadboard. Connect the returning end to the other bus. For the sake of consistency, we’re going to call the bus connected the positive end of the power supply the power rail and the returning end the ground rail.

Basic Electronics Tutorial Step 1

Connect the resistor from the positive rail to an unconnected terminal of the breadboard.

Basic Electronics Tutorial Step 2

Finally connect the LED from the resistor to the ground rail. Remember to connect the anode of the LED to the resistor and the LEDs cathode to the ground rail.

Basic Electronics Tutorial Step 3

You should see that the LED should instantly light up. Here’s the result I got when I connected the very simple circuit to the power of a USB FTDI cable.

Basic Electronics Tutorial Result

Well, that’s it for me! I hope you guys would be able to try out the simplest of electric circuits on your own. I’ll see you guys later!

PSA-Under Construction!!!

Hello! This is Casual Engineer, or Robot Overlord back when Casual Electronics was Robot Overlord on blogspot.com. Casual Electronics is nothing more than Robot Overlord with a new name and a .com domain. I’m sorry if you’re expecting a new post immediately upon visiting this page, but I decided to take this time to prepare for you some great content to be published on this blog. You can expect content from this blog starting September 3rd! In the meantime, please be patient!

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Old Posts:How To Connect A Tri Color LED To Arduino Tutorial

Note: I republished this article based on a request! I will post a better tutorial on wiring a tri color LED later on!

Weeks ago, I showed a little video of my Arduino board controlling the colors of a tri-color LED. I mentioned that I’ll show you how to control a tri-color LED in the future. Well, today, the future finally came. For today’s post, I’m going to show you how to connect an Arduino board to a tri-color LED. Afterwards, I will show you the proper method of programming the Arduino board to control this special LED. Anyway, you will need the following….

  • Arduino (1x)
  • Breadboard (1x)
  • A Tri-Color LED (1x)
  • Wires (MISC.)

Keep in mind the pin layout for the Tri-color LED. Pin 1 is Red, Pin 2 is Cathode, Pin 3 is Blue, and Pin 4 is Green. To make things easier for you, the longest pin is the cathode pin. With that said, let’s get started.

First, insert the LED onto the breadboard. Now, connect Pin 2 of the LED to the Arduino board’s ground.*

Next, connect the LED’s Pin 1 to Digital Pin 9 of the Arduino board.

Afterwards, connect the LED’s Pin 4 to Digital Pin 10 of the Arduino board.

Finally, connect the LED’s Pin 3 to Digital Pin 11 of the Arduino board.

Done! Now here comes the hardest part, programming. In order to properly change the colors of a tri-color LED using Arduino, you will need to make use of Arduino’s IDE’s analogWrite command. Here’s an example code of my Arduino board telling the LED to change to gold.

int redPin   = 9;
int greenPin = 10;
int bluePin  = 11;

void setup()
{
pinMode(redPin,   OUTPUT);   // sets the pins as output
pinMode(greenPin, OUTPUT);
pinMode(bluePin,  OUTPUT);
}

void loop(){
analogWrite(redPin,255);
analogWrite(greenPin,215);
analogWrite(bluePin,0);
delay(1000);
}

And here’s a pic of the program in action.

I won’t go into detail on how to program other colors. In order to change the colors of the Tri-color LED, you need to know RGB codes. Fortunately I found this website which lists various RGB color codes for almost every single color in the spectrum.

Well, that’s it for me! See you guys later!

* I realized in other guides that many people connect this pin to 5 volts or 3 volts. When I did it for this LED, it shined very dimly or it did not shine at all. Connecting it to ground was the way to go for me.

Old Posts:Controlling A DC Motor Using Arduino (USB Powered) Tutorial

Note: I republished this article based on a request. I will upload a better tutorial on this later on!
Last Monday, I showed you guys a video showing my Arduino Board controlling a small DC Motor. Also, I mentioned that later on this week, I’ll post a tutorial on how to do the same. Well, today is the day! You will need the following parts….

Keep in mind that the circuit will be powered via USB. If the circuit was powered by small batteries, then the layout of the circuit and the needed parts will be completely different. In the meantime, just enjoy this tutorial!Also, for the sake of sanity, instead of calling it SN754410 Quad Half H-Bridge, we’ll simply refer to it as the motor driver.

Here’s the picture of the motor driver. Use it if you you’re lost in this tutorial. Anyway, let’s get started!

Insert the Motor Driver in the breadboard’s middle notch.


Connect pin 1, pin 8, pin 9, and pin 16 to the left bus. The left bus will serve as the 5 volt power supply’s bus.

Connect pins 4,5,12, and 13 to the right bus. The right bus will serve as the bus for ground.

Now breakout your Arduino board. Connect the Arduino board’s 5 volt power supply to the left bus of the breadboard. Afterwards, connect the Arduino board’s ground to the right bus of the breadboard.

Connect pin 5 of the Arduino board to pin 7 of the Motor Driver. Then connect pin 6 of the Arduino board to pin 2 of the Motor Driver.

Finally, connect the motor to pin 6 and 3 of the Motor Driver.

Yeah…um…there are a lot of wires that obstruct the pins in the tutorial. So, that’s why for the first time in Robot Overlord history, I posted a Fritzing picture of final result of the tutorial.
Okay, now connect your Arduino board to your computer using the USB cable. Open the Arduino Development Environment, and upload the following code.

int motor_one_pin_one=6;
int motor_one_pin_two=5;

void setup(){
pinMode(motor_one_pin_one,OUTPUT);
pinMode(motor_one_pin_two,OUTPUT);
}

void loop(){
digitalWrite(motor_one_pin_one,HIGH);
delay(1000);
digitalWrite(motor_one_pin_one,LOW);
delay(1000);
digitalWrite(motor_one_pin_two,HIGH);
delay(1000);
digitalWrite(motor_one_pin_two,LOW);
delay(1000);
}

Once you upload the code, your DC motor should turn on for one second, then pause for one second. Afterwards, it will turn on again, but it will rotate in a completely different direction. Finally, it will pause again.

Well, that’s it for me! I’ll see you guys on Monday! Have an awesome weekend