logo-mobile

ROHM

ROHM
Menu
  • Arduino –
  • Raspberry Pi –
  • Trending –
  • Others –
  • About –
  • Contact –

Arduino

What Is Current, Voltage, Resistors, and Ohm’s Law?

Device Plus Editorial Team
Published by Device Plus Editorial Team at September 16, 2015
Categories
  • Arduino
Tags
Arduino & Breadboard

In our previous article, we explained how to make LEDs twinkle using Arduino with an L circuit. I hope everybody had a chance to try it. That was a very basic circuit. This time, I would like to dive even further into the world of Arduino, starting with the LED and moving to various electronic components.

What is an electronic circuit?

In the last article, as shown in the picture, we directly plugged an LED into Arduino to make it light up. For those of you who have a little experience with electronic circuits, you probably already knew this, but actually, this sends more current through the LED than it should. To understand why, let’s learn a little bit more about a basic circuit.

When drawn out, the circuit would look like this. The current flows from the positive pin 13, through the LED and into the negative pin, GND.

Arduino LED

The keyword here is current. The most basic part of an electrical circuit is voltage and current.

Current? Voltage? What Is That?

What is this voltage and current we hear so much about when discussing electronic circuits? We all studied Ohm’s Law and other things in science class in elementary and junior high school. Let’s look back on those dear days and recap what we learned. Probably the most common analogy used to describe current and voltage is to compare it to water flowing through a pipe.

Using the previous circuit diagram, the water begins at the positive pin 13 (source) passes through the LED and flows downstream to the negative.

Arduino Voltage/Current explanation

I’m sure some of you have questions. As seen in the circuit diagram, we discussed earlier, the flow is from the positive to the negative terminals, but looking at the pipe diagram, it is not easy to see the direction of the flow of water. Let’s look at the concepts we learned in junior high school a little differently.

The water flows to GND, called ground, which is shown as the earth or solid ground. Water comes out of the pipe, flows through the electrical components, like the LED, and eventually flows out into the soil. The GND is the sewage line so to speak. Essentially, electronic circuit design is confirming that the current and voltage flow from positive in order to power the electrical components and finally ends up at the GND.
So, rather than a circuit diagram described above that we used in junior high school, I am going to use the diagram below where the GND is at the bottom to design a circuit.

Arduino

Although it may be hard to grasp this concept by just reading the explanation, don’t worry, as it will become apparent as you begin to assemble circuits.

If you want a more in-depth explanation, put the search terms’ current, voltage or current, voltage flow in the search engine of your choice.

What Is Required in a Circuit to Turn on an LED?

Let’s go back to talking about Arduino. We have inserted the LED into the Arduino circuit, but let’s consider what kind of circuit design do we need exactly to properly light the LED (actually, it is difficult to define what we mean properly).

What we need to properly light the LED is a resistor. I believe we have all been exposed to resistors in our junior high school classes. Just as its name suggests, a resistor plays the role to suppress or inhibit the electrical flow. Going back to the water pipe example, it would be like a stone or other obstruction in the pipe causing the water flow to decrease.

Resistor

In order to illuminate a LED, a suitable voltage (rated voltage) and current (rated current) are written on its side. Resistors must be added to the circuit, to meet the rated voltage of the LED.

Our LED is rated at 2 volts with a current of 20 mA, so we use that to calculate the required resistance.

Calculating Resistance: Ohm’s Law

First, the Arduino UNO we are using this time is specified with an operating voltage of 5V.
To determine the necessary current and resistance, we have to use what we all learned long ago, OhmÅfs law.

Current / voltage / resitance

1
<span style="color: #ffffff;">Current I (A) = voltage E (V) / resistance R (Ω)</span>

Here, the output voltage of the Arduino is 5V, and since the LED only needs 2V is rated at a voltage of 2V, we need to add resistance to reduce the voltage as follows: 5V-2V = 3V.

1
<span style="color: #ffffff;">I (A) = 3V/R (Ω)</span>

Next, since the LED wants a current of 20 mA, putting that into the equation determines the resistance value.

1
<span style="color: #ffffff;">0.02A = 3V/R(Ω)</span>

1
<span style="color: #ffffff;">R(Ω) = 150</span>

With that said, the resistance value required to illuminate the LED is 150É∂, so we will add that resistor to the circuit.

Arduino LED

So, we build the circuit in Arduino. This time, since the electronic components we will be adding are an LED and a resistor, we will use what is called a breadboard. It’s a tool that makes it easy to build an electric circuit without using solder. A breadboard has various lines on the back connecting points on the board making it possible build a circuit.

Arduino & Breadboard

(Left) Arduino and breadboard – (Right) back of the breadboard

Breadboard

※ There are various sizes and types of breadboards. As the circuit we are making does not have many components, so a small breadboard would not be a problem. But I recommend you getting a bigger board from the start, so when we do start making larger circuits you will still be able to use it.

Well, we will build our circuit with the LED and resistor on the breadboard.

Please wire your circuit, using the following diagram as a reference. If you wired your circuit correctly, the LED should be illuminated. You can see that the brightness is less than when we wired it directly to the circuit.

Arduino & Breadboard

Arduino & Breadboard

Now that you successfully wired your circuit, add a few more resistors. Doing this weakens the current through the LED, and you will notice the emitting light getting darker.

This time, we discussed how to use resistors to limit the voltage and current through our electronic components.
So far we have only used the Arduino as a power source, but next time we will have fun changing the parameters of the program itself to control the circuits.

1
2
3
4
5
6
7
8
9
10
11
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
 
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}

Device Plus Editorial Team
Device Plus Editorial Team
Device Plus is for everyone who loves electronics and mechatronics.

Check us out on Social Media

  • Facebook
  • Twitter

Recommended Posts

  • Arduino – Sketch, Taking a Look at ProgramsArduino – Sketch, Taking a Look at Programs
  • Let’s use Arduino with a light sensor!Let’s use Arduino with a light sensor!
  • Making an LED Light up with Raspberry Pi Before Making It BlinkMaking an LED Light up with Raspberry Pi Before Making It Blink
  • Using LEDs and Motors on Raspberry Pi: How to Handle Larger CurrentsUsing LEDs and Motors on Raspberry Pi: How to Handle Larger Currents
  • The Basics Of Arduino: Control LED Lighting with Digital OutputThe Basics Of Arduino: Control LED Lighting with Digital Output
  • How to Control a Light with a DimmerHow to Control a Light with a Dimmer
Receive update on new postsPrivacy Policy

Recommended Tutorials

  • How to integrate an RFID module with Raspberry Pi How to integrate an RFID module with Raspberry Pi
  • How to Use the NRF24l01+ Module with Arduino How to Use the NRF24l01+ Module with Arduino
  • How to Run Arduino Sketches on Raspberry Pi How to Run Arduino Sketches on Raspberry Pi
  • Setting Up Raspberry Pi as a Home Media Server Setting Up Raspberry Pi as a Home Media Server

Recommended Trends

  • SewBot Is Revolutionizing the Clothing Manufacturing Industry SewBot Is Revolutionizing the Clothing Manufacturing Industry
  • All About The Sumo Robot Competition And Technology All About The Sumo Robot Competition And Technology
  • 5 Interesting Tips to Calculating the Forward Kinematics of a Robot 5 Interesting Tips to Calculating the Forward Kinematics of a Robot
  • Go Inside the Drones That Are Changing Food Delivery Go Inside the Drones That Are Changing Food Delivery
Menu
  • Arduino –
    Arduino Beginner’s Guide
  • Raspberry Pi –
    Raspberry Pi Beginner's Guide
  • Trending –
    Updates on New Technologies
  • Others –
    Interviews / Events / Others

Check us out on Social Media

  • Facebook
  • Twitter
  • About
  • Company
  • Privacy Policy
  • Terms of Service
  • Contact
  • Japanese
  • 简体中文
  • 繁體中文
Don’t Forget to Follow Us!
© Copyright 2016-2023. Device Plus - Powered by ROHM
© 2023 Device Plus. All Rights Reserved. Muffin group

istanbul escort istanbul escort istanbul escort