Sunteți pe pagina 1din 14

TECHNOGADGET SESSION 2

Overview

The first part of the mechatronic system is the input that also known as the measurement system. The
measurement system takes any form of input taken from the physical world, processes it and
responds through an electrical signal. The signal is usually inputted to the system (Micro-controller or
PLC) wherein the system will decide and respond based on the input given by the sensor or switch.

Sensor definition

A sensor is a part of the measurement system which senses the magnitude or dimension of a physical
property. In other words, the sensor just converts physical parameters taken from the environment
into an electrical signal that can be easily read by the system controller. The physical parameters that
can be measured by a sensor can be distance, speed, dimensions, force/mass, temperature,
pressure, humidity, electrical properties, amount of light and others. Also, sensors are categorized
according to the raw physical parameter that they can measure. Some of the most popular ones
are discussed in this chapter.

Figure 5: Sensor Block diagram

Introduction to digital circuits

Most of the activities in this workbook are direct current circuits (DC). Electricity that comes out
from a wall socket is called Alternating current. Before we move on to the rest of the book, it is
important to learn the basics of DC.

DC electricity flows from the positive (+) or from a point of high potential to a point of low
potential energy which is called the ground. The flow is in one direction only unlike in AC circuits.
Voltage (V) is the difference in energy between two points in the circuit. This is measured in terms
of volts. On the other hand, current (I) measured in amperes is the amount of electrical energy
that passes through a circuit. Finally, resistance (R) measured in ohms is how much a component
in the circuit resists the electrical energy or current. The three are related with the Ohm’s law.
Ohm’s law states that the current is directly proportional to the voltage across two points. The
proportionality constant is what we call the resistance (R). This relationship is shown in equation 1.

V IR eq. 1

Where V is voltage in volts


I is current in amperes
R is resistance in ohms (Ω)

TECHNOKIDS INC. 15
INPUT - SENSORS

The concept of DC electricity flow is almost the same with water current in the river. The river’s water
flow also known as current flows in one direction from a higher ground to a lower ground. Higher
currents are expected if the river’s source is situated at a higher location. Therefore, higher elevation
results to bigger current. Obstructions or rocks resist the flow of water that subsequently reduce the
current. If you compare this with DC electricity, the river’s height is voltage, water current is current
and rocks are resistance. This is explained better in figure 6.

Figure 6: River flow (source: clipgid.com)

The circuit has to be continuous; otherwise, it will not work. In other words, there has to be a
complete path from the source to the ground for the energy to travel. As the electrical
energy flows through the circuit, the components or devices present in the circuit will utilize all
the electrical energy. Electricity will always look for a path with the least resistance so if you
connect the circuit from the source to the ground without any components or resistance, the
electrical energy will be converted into heat and light also called as sparks. This is called a
short circuit- a scenario that should be avoided.

Breadboards

A breadboard is a tool for prototyping electronic circuits. The board that will be in use is a
solderless breadboard. There is no need for soldering components as you will just plug and
pull out electronic components and wires in your breadboard holes. The rows and columns
of your breadboard are internally connected. An explanation is briefly illustrated in figure 7.

16 TECHNOKIDS INC.
TECHNOGADGET SESSION 2

+ - + -

Horizontal runs are


connected (one
section of 5 slots). This
Vertical runs are is where you put in
connected. your electrical
Typically, this is components.
used for power (+)
and ground (-) The middle row
connections.

Power bus Power bus


Figure 7: Breadboard

Electrical components

You will use a lot of electrical components to design your mechatronic systems such as a
variety of sensors, resistors, switches, LED, buzzer and small motors. The most commonly used
devices will be discussed in detail in this section. The rest will be tackled in the succeeding
sessions as you build your circuits.

Light emitting diode (LED)

The light emitting diode or LED converts electrical energy into light. It is essentially the same as
your incandescent light bulb but it is more efficient as it converts almost all of the electrical
energy into light energy. On the other hand, light bulbs are more inefficient as some of the
energy are wasted in the form of heat. Due to its high efficiency and improvement in
technology, LEDs are widely used in lighting homes and building; thus, slowly replacing
incandescent and fluorescent light bulbs. It is also used in flat screen televisions, computer
monitors and large electronic billboards. Take note that LEDs allow electricity to flow in one
direction. The flow starts from the anode (+) which is connected to the power to the
cathode (-) connected to the ground. The longer leg of the LED is the anode and the shorter
one is the cathode.

TECHNOKIDS INC. 17
INPUT - SENSORS

- +
Figure 8: LED and schematic

Resistors

Resistors resist the flow of electricity that passes through it; thus, changing the voltage and
current. The resistance is measured in terms of the ohms (Ω). Higher value of ohms means
higher resistance. This component converts some of the electrical energy to heat. If you
connect a resistor to another component such as a LED, the LED will receive less energy due
to the resistor. If the LED is not connected to a resistor, the component will receive more
energy resulting into a burn out LED.

Figure 9: 220 Ω Resistor and schematic

Resistor color codes

Resistors are tiny and it is very impractical to write the actual resistance into the component
itself. Thus, resistors are color coded to determine the actual resistance. There are two types
of color coded resistors: 4 band and 5 band resistors. In a 4 band resistor, the first two bands
indicate the first two digits of the value, the 3rd band is the multiplier and 4th band is the
tolerance. The multiplier multiplies a certain value to the first two digits. For a 5 band resistor,
the first three bands are the 3 digits in the value, the fourth band is the multiplier and the 5th
band is the tolerance. Table 1 shows the different values matched with corresponding colors.
You will use 4 band and 5 band types of resistors in this workbook so it is pertinent that you will
be familiar with both types.

18 TECHNOKIDS INC.
TECHNOGADGET SESSION 2

4 band 2 2 x 101 ± 5% = 220Ω ± 5%

1st band 2nd band Multiplier Tolerance

5 band
0
2 2 0 x 10 ± 5% = 220Ω ± 5%

1st band 2nd band 3rd band Multiplier Tolerance

Table 1: Resistor standard color code

Color 1st band 2nd band 3rd band Multiplier Tolerance


Black 0 0 0 1
Brown 1 1 1 10 ±1%
Red 2 2 2 100 ±2%
Orange 3 3 3 1000
Yellow 4 4 4 10000
Green 5 5 5 100000 ±0.5%
Blue 6 6 6 1000000 ±0.25%
Violet 7 7 7 10000000 ±0.10%
Grey 8 8 8 ±0.05%
White 9 9 9
Gold ±5%
Silver ±10%

TECHNOKIDS INC. 19
INPUT - SENSORS

Power Supply/Battery

DC electrical circuits cannot run without an energy source. These energy sources usually
come in a form of a battery or a power supply. Most of the circuits in this workbook can be
powered by a 5V supply via the Arduino microcontroller or supplemented by a 9V battery.
The schematic for a battery is shown in Fig. 11.

Figure 11: Battery and schematic


Switches

Switches are devices that interrupt the flow of electricity. This is done by breaking the circuit if the
switch is open and connecting the circuit when the switch is closed. There are many types of
switches and they vary according to the stimulus that they can detect. Some devices that can
detect light, temperature and presence of a magnetic field can be used as switches, too.
Switches that are explained in this section are activated by human actions.

Momentary/Push button switch

Momentary or push button switches are closed when there is an external force or pressure
that is applied. In simpler terms, whenever you push/press the button the switch will be
actuated. Usually, this type of switch is used to turn on/off cellphones, appliances, computers
and others.

Figure 12: Momentary switch

20 TECHNOKIDS INC.
TECHNOGADGET SESSION 2

Toggle switch

This switch is activated (open/closed) by the movement of its lever or handle. It is used for
high current and voltage applications. A common application is a light switch.

Figure 13: Toggle switch

Tilt switch

This is a type of switch that will open or close depending on its position or orientation. Basically,
this switch is a hollow cylinder with a metal ball that will make contact with the leads when
tilted in the proper direction. There will be a dedicated activity for the tilt switch in session 3.

Figure 12: Tilt switch

TECHNOKIDS INC. 21
INPUT - SENSORS

General Precautions in handling electronic circuits

There might be some occasions that a power surge might occur on your USB port
due to a faulty breadboard or bad connection. This might potentially damage your
computer and your Arduino. Unplug the USB cable immediately when the warning is
displayed on your monitor.

All circuits in this workbook work on DC electricity. Do not use AC electricity from the
outlet unless you have a power supply adaptor that can output 5 VDC.

Never attempt to make a short circuit in your breadboard. Make sure that the
current in the circuit will flow through electrical loads (resistors, LEDs, motors, etc.)
before closing it in the ground. A short circuit is dangerous and can cause fire.

22 TECHNOKIDS INC.
TECHNOGADGET SESSION 2

Assignment 2: Light switch


Learn how to make a simple light switch using a LED and push button switch.

You will be creating your first circuit through this activity. This activity will involve switching on a LED
through a push button switch. Later on, the circuit will be modified to form series and parallel circuits
in order for you to create more complex circuits as we move along with this book. The Arduino will be
used only as a power supply thus no programming is required. This will enable you to supply 5V to your
circuit.

Materials

Arduino Uno Breadboard


(to be used as power supply)

220 Ω resistor LED lights Wires Push button switch

TECHNOKIDS INC. 23
INPUT - SENSORS

Figure 13: Light switch

Figure 14: Schematic


24 TECHNOKIDS INC.
TECHNOGADGET SESSION 2

1. For safety, check if your Arduino is disconnected from USB power or battery. Connect your
wire to the 5V pin on the Arduino and the other end to the + power bus of your breadboard.
Do the same for your ground wire and connect it to the breadboard ground bus (-). The
Arduino will supply 5V power to your breadboard and its connected components to the
ground. It is important that you follow color coding for your wires that is red for power (+) and
black for the ground (-) to avoid possible confusion.

2. Connect one end of a 220 ohm resistor to your power supply with the other end connected
to the switch.

3. Place your switch on the center of your board with one leg connected to the resistor and the
other leg to the anode of the LED.

4. Put your LED on your board with the anode (longer leg) connected to the other side of the
switch and connect your cathode to the ground.

5. Connect your Arduino to the PC’s USB port via the cable supplied. This will provide power to
your microcontroller and a 5 V supply to your circuit.

Upon completion of the circuit, push the button and your LED will light up. Push again to close it. This is
how a simple light switch operates. This is typically seen in your own homes. Let us make some
variations of this circuit by making series and parallel circuits.

Series Circuit

A series circuit is one type of circuit with all of its components connected in a single path; thus, the
current is the same for all connected components. If one component is removed, then no current will
flow through the circuit as there is one path. Old Christmas lights operate through a series circuit so if
one bulb is busted, then the rest will not light up. Figure 15 shows a typical series circuit.

Figure 15: Series circuit

Let us try to implement the series circuit by modifying our light switch. This time, we will connect two
LEDs in series.

TECHNOKIDS INC. 25
INPUT - SENSORS

Figure 16: Light switch in series

Figure 17: Series schematic

26 TECHNOKIDS INC.
TECHNOGADGET SESSION 2
Power your Arduino by plugging it to the USB port and push the switch to turn on your LEDs. Assuming
nothing is wrong, both LEDs will light up simultaneously. Try removing one of the LEDs and see if the
other LED will light up. Please note that you have to disconnect power first for safety purposes.

Parallel circuits

Parallel circuits differ from series circuits as parallel circuits contain multiple paths while a series has
one. Due to the nature of multiple paths, one defective circuit will not damage the other. This is a
common circuitry in households. For instance, the wiring in the television and lights are parallel. Hence,
if one is off, the other would still function. The voltage drop across all circuits is the same with the
source. The total current is the sum of all the currents in the branches.

Figure 18: Parallel circuit

Modify your series circuit into a parallel circuit by doing the circuit as illustrated below.

Figure 19: Light switch in parallel

TECHNOKIDS INC. 27
INPUT - SENSORS

Figure 20: Parallel schematic

Try operating the circuit using the same procedure for the series connection. The circuit should be
able to light up the two LEDs and even if one component is inoperative, the other should still function.
Take the same necessary precautions when removing one electrical component from the circuit.

Exercise

1. Try making a series and parallel connections using 3 LEDs and multiple switches. Take note of
your observations.

28 TECHNOKIDS INC.

S-ar putea să vă placă și