To design a working model we need hardware .the basic building blog of a circuit are electronic components:
Various components, such as the Arduino’s LED, require only a small amount of current to function—usually around 10 mA. When the LEDreceives excess current, it converts the excess to heat—too much of whichcan kill an LED. To reduce the flow of current to components such asLEDs, we can add a resistor between the voltage source and the component.Current flows freely along normal copper wire, but when it encounters aresistor, its movement is slowed. Some current is converted into a small amount of heat energy, which is proportional to the value of the resistor.
given is an example of commonly used resistors
The level of resistance can be either fixed or variable. Resistance is measured in ohms and can range from zero to thousands of ohms (kiloohms,or k W) to millions of ohms (megohms, or M W).
Reading Resistance Values
Resistors are very small, so their resistance value usually cannot be printedon the components themselves. Although you can test resistance with a multimeter,you can also read resistance directly from a physical resistor ,even without numbers.One common way to show the component’s resistanceis witha seriesofcolor-codedbands ,read from left to right,as follows:
First band Represents the first digit of the resistance
Second band Represents the second digit of the resistance
Third band Represents the multiplier (for four-band resistors) or the third digit (for five-band resistors)
Fourth band Represents the multiplier for five-band resistors
Fifth band Shows the tolerance (accuracy)
Table 3-1 lists the colors of resistors and their corresponding values
Yel low 4
The Light-Emitting Diode
“World is beautiful when we add colours”
The LED is a very common, infinitely useful component that converts elec-trical current into light. LEDs come in various shapes, sizes, and colors.Here fig shows a common LED.
Connecting LEDs in a circuit takes some care, because they are polarized;this means that current can enter and leave the LED in one direction only.The current enters via the anode (positive) side and leaves via the cathode(negative) side, as shown in Figure 3-7. Any attempt to make too muchcurrent flow through an LED in the opposite direction will break the component.Thankfully, LEDs are designed so that you can tell which end is which.The leg on the anode side is longer, and the rim at the base of the LED is flat on the cathode side, as shown below:
When using LED for your ARDUINO Project . you need to consider the operatingvoltage and current. For example, common red LEDs require around 1.7 Vand 5 to 20 mA of current. This presents a slight problem for us, becausethe Arduino outputs a set 5 V and a much higher current. Luckily, we canuse a current-limiting resistor to reduce the current flow into an LED. But which value resistor do we use? That’s where Ohm’s Law comes in.
To calculate the required current-limiting resistor for an LED, use thisformula:
Where Vs = Arduino output 5 voltage Vf = Led forward voltage
When in doubt, always choose a slightly higher value resistor, because it’s better to have a dim LED than a dead one!
A transistor can turn on or off the flow of a much larger current than the Arduino can handle. We can, however, safelycontrol a transistor using an Arduino digital output pin.A popular example is the BC548, shown below:
Operation of transistor can be understood using the tap as the value behaves as the base when we off the value no water flows and when value is switched on water flows through it.