Electronics File 1
Electronics File 1
AND
ROBOTICS
KRISHNA MARIE V. TAGAILO
SOURCES OF ELECTRICITY
What is the definition of sources of Electricity?
A source from which useful energy can be extracted or recovered either directly or by means of a conversion or
transformation process.
1. Hydropower Energy Hydropower or hydroelectric power, is one of the oldest and largest sources of
renewable energy, which uses the natural flow of moving water to generate electricity.
Impoundment Facility Water released from the reservoir flows through a turbine, spinning it, which in turn
activates a generator to produce electricity.
2. Wind Power It is the process by which the wind is used to generate mechanical power of electricity.
Wind Pump wind turns the propeller-like blades of a turbine around a rotor, which spins a generaator, which
creates electricity.
4.Geothermal Energy
Geothermal energy is heat that is generated within the Earth. Geothermal Power Plant Geothermal power plants
draw fluids from underground reservoirs to the surface to produce steam. This steam then drives turbines that
generatend electricity.
5. Coal Energy coal is a combustible black or brownish-black sedimentary rock with a high amount of carbon
and hydrocarbons. Coal Power Plants The heat produced by the combustible of the coal is used to convert water
into high-pressure steam, which drives a turbine, which produces electricity.
ELECTRONIC DIAGRAM
What is an electronic diagram?
A circuit diagram, also known as an electrical diagram, elementary diagram, or electronic schematic, is a
graphical representation that simplifies an electrical circuit. It serves as a visual tool for the design,
construction, and maintenance of electrical and electronic equipment.
Schematic Diagrams
The schematic diagram often called a ladder diagram, is intended to be the simplest form of an electrical circuit.
This diagram shows the circuit components on horizontal lines without regard to their physical location. It is
used for troubleshooting because it is easy to understand the operation of the circuit. The loads are located on
the far right of the diagram, and the controls for each load are located to the left. To understand the sequence of
operation, the drawing is read from the upper left corner and then from left to right, and from top to bottom.
Wiring diagrams
The wiring diagram shows the relative layout of the circuit components using the appropriate symbols and the
wire connections. Although a wiring diagram is the easiest to use for wiring an installation, it is sometimes
difficult to understand circuit operation and is not as applicable for troubleshooting.
Wiring diagrams
The block diagram, also called a functional block diagram, is used to describe the sequence of circuit
operations. This diagram indicates by functional descriptions, showing which components must operate first in
order to get a final outcome. They do not refer to specifics like device symbols or related wire connections.
Wiring diagrams example
Electric circuits: Series Parallel and Series Parallel Combinations
What are electric circuits?
In electronics, an electric circuit is a complete circular path that electricity flows through.E
1. SERIES CIRCUITS
With simple series circuits, all components are connected end-to-end to form only one path for the current to
flow through the circuit:
2. PARALLEL CIRCUITS
With simple parallel circuits, all components are connected between the same two sets of electrically common
points, creating multiple paths for the current to flow from one end of the battery to the other:
Examples Of Series Circuits
The series circuit examples are as follows:
Water heater
Freezers
Refrigerators
Lamps
Bulb
Flashlights
The disadvantages of a series circuit: since there is only a single path for the flow of current, if the circuit
breaks, the appliance will be cut out of the current.
A parallel circuit is a type of circuit that includes more than two separate paths, allowing the flow of current
from the negative terminal of the component to the positive terminal of the component.
A Series-Parallel Combination
Series Circuits:
Voltage drops add to equal total voltage.
All components share the same (equal) current.
Resistances add to equal total resistance.
Parallel Circuits:
All components share the same (equal) voltage.
Branch currents add to equal total current.
Resistances diminish to equal total resistance.
ELECTRONIC THEORY
ELECTRON THEORY Result of groundbreaking work by scientists J.J Thomson and many more.
Quantum Mechanics:
Electron theory is closely linked to quantum mechanics
Explaining the quantum states and energy levels of electrons in
atoms and molecules.
Solving Practical Problems:
Electron theory is used to solve real-world
problems, such as;
-optimizing power distribution networks,
-improving electronic devices' efficiency,
-and developing new materials with specific
electronic properties.
Magnetic Properties:
Electrons are also responsible for the magnetic properties of materials
Electron theory explains how magnetic domains align and influence the
behavior of magnets.
Innovation and Technology:
Electron theory continues to drive innovation in electronics and technology
It's the foundation of advancements in areas like:
microelectronics, nanotechnology, and quantum computing
ELECTRON THEORY HISTORY
EARLY NOTIONS OF
ELECTRICITY:
The exploration of electricity
began in ancient Greece.
The term "electricity" itself
derives from the Greek word
"elektron, " which means amber.
Thales of Miletus observed that
amber could attract small objects
when rubbed.
Rutherford's Nuclear
Model:
-In 1911, Ernest Rutherford performed
the famous gold foil experiment.
-Revealed that atoms had a small,
dense nucleus at their center.
-This discovery contradicted
Thomson's model and suggested
that electrons orbited the nucleus.
Quantum Mechanics:
In the early 20th century, a
new framework for
understanding the behavior
of electrons emerged.
Pioneers like Max Planck
and Niels Bohr made
significant contributions to
this field, developing
models that explained
electron behavior in
discrete energy levels.
To solder the components, you need a soldering iron tool. To connect various components on the
board, wires are utilized. To cut and strip the wires, you
mayneed hand tools such as a wire cutter or wire stripper. Once the circuit is wired up, you can
ensure the continuity in the circuit using a multimeter.
Soldering iron
Used to melt solder and create connections between components
on a circuit board.
Multimeter
Measures voltage, current, and resistance in circuits, helping
troubleshoot and test components.
Oscilloscope
Displays waveforms of electronic signals, aiding in analyzing
signals ' frequency, amplitude, and timing.
Fucntion Generator
Produces various waveforms like sine, square, or triangle, used for testing and calibrating circuits.
BreadBoard
Allows temporary circuit prototyping without soldering,
enabling easy testing and modification.
Power Supply
Provides controlled voltage/current to power electronic
circuits
Logic Analyzer
Captures and analyzes digital signals in a circuit,
useful for debugging complex digital
systems.
Wire Strippers/Cutters
Tools to strip insulation from wires and cut them to
desired lengths.
Desoldering Pump/Braid
Used to remove solder from components and circuit
boards.
Digital Calipers
Precise measurement of components ' dimensions.
Wire Crimper
Used for attaching connectors to wires securely.
Tweezers
Helps handle and place small components accurately
Soldering Station
A more advanced tool with adjustable temperature
control for precise solderin.
HISTORYOFLOGICGATES
The history of logic gates dates back to the early 19th century, when mathematicians began to
develop Boolean algebra. This algebraic system, developed by George Boole in the mid-1800s,
provided a way to represent logical statements and operations using mathematic symbols and
equations.
The first practical application of Boolean algebra came in the form of vacuum tube circuitry, which
was used in early computers and other electronic devices. In the 1930s, Clauder Shannon, a
mathematician and electrical engineer, applied Boolean algebra to the design of switching circuits,
laying the foundation for modern
digital electronics.
Today, logic gates are used in a wide range of applications, from
simple calculators and digital clocks to complex computer
systems and telecommunicatons network.
INVENTOR/FOUNDER OF LOGICGATES
Claude Shannon is widely considered to be the founder of digital circuit design theory and the
inventor of the first electronic digital circuit. Born in Petoskey, Michigan in 1916, Shannon studied
electrical engineering and mathematics at the University of Michigan and MIT. In 1937, he wrote his
master’s thesis, which introduced the concept of Boolean algebra and laid the foundation for modern
digital circuit design. Shannon’s work revolutionized the field of electrical engineering and paved the
way for the development of modern computers.
BASIC LOGIC GATES
There are seven basic logic gates:
AND, OR, XOR, NOT, NAND, NOR, and XNOR.
AND G A T E
The AND gate is so named because, if 0 is called “false” and 1 is called “true” , the gate acts in the
same way as the logical “and” operator. The following illustration and table show the circuit symbol
and logic combinations for an AND gate. (In
the symbol, the input terminals are at left and the output terminal is at right.) The output is “true”
when both input are “true”. Otherwise, the output is “false”. In other words, the output is only 1 when
both inputs one AND two are 1.
OR GATE
The OR gate gets its name from the fact that it behaves after the fashion of the logical inclusive “or”.
The output is “true” if both inputs are “true”. If both inputs are “false” , then the output is “false”. In
other words, for the output to be 1, at least input one OR two must be 1.
XOR GATE
The XOR (exclusive-OR) gate acts in the same way as the logical “either/or”. The output is “true” if
either, but not both, of the inputs are “true”. The output is “false” if both inputs are “false” or if both
inputs are “true”. Another way of looking at this
circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same.
NOTGATE
A logical inverter, sometimes called a NOT gate to differentiate it from other types of electronic
inverter devices, has only one input. It reverses the logic state. If the input is 1, then the output is 0. If
the input is 0, then the output is 1.
N A N D GATE
The NAND gate operates as an AND gate followed by a NOT gate. It acts in the manner of the logical
operation “and” followed by negation. The output is “false” if both inputs are “true”. Otherwise, the
output.
NOR GATE
The NOR gate is a combination of OR gate followed by an inverter. Its output
is “true” if both inputs are “false”. Otherwise, the output is “false”.
XNORGATE
The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an
inverter. Its output is “true” if the inputs are the same, and “false” if the inputs are
different.
Logic gates can be made of resistors and transistors or diodes. A resistor can commonly be usede as
a pull-up or pull-down resistors are used when there are any unused logic gate inputs to connect to a
logic level 1 or 0. This prevents any false switching of the gate. Pull-up resistors are connected to Vcc
(+5 V), and pulldown resistors are connected to ground (0 V) .
Commonly used logic gates are TTL and CMOS. TTL, or Transistor-Transistor Logic, ICs will use NPN
and PNP type Bipolar Junction Transistors. CMOS, or Complementary Metal-Oxide-Silicon, ICs are
constructed from MOSFET or JFET type
Field Effect Transistors. TTL ICs may commonly be labeled as the 7400 series of chips, while CMOS ICs
may often be marked as a 400 series of
chips.
An IC is the fundamental building block of all modern electronic devices. As the name suggests, it's
an integrated system of multiple miniaturized and interconnected components embedded into a thin
substrate of semiconductor material (usually silicon crystal).
An IC is the fundamental building block of all modern electronic devices. As the name suggests, it's
an integrated system of multiple miniaturized and interconnected components embedded into a thin
substrate of semiconductor material (usually silicon crystal).
2. Due to fabrication of the various components on the integrated circuits, the components became much
smaller. This makes integrated circuits much lighter than discrete circuits. The integrated circuits thus
consume much less space than discrete circuits.
3. Integrated circuits are encapsulated with a silicon oxide layer during manufacture. This layer is tough and
resistant and thus gives the integrated an ability to operate at extremes of temperatures and other extreme
environmental conditions.
4. Integrated circuits are constrained to minimize the number of external connection. This has greatly
simplified the layout of these circuits and makes them easier to use.
5. Integrated circuits have been notice to use less power for operations.
Disadvantages of Integrated Circuits
1.If one component in an integrated fails, that means the whole circuit has to be replaced.
2. Integrated circuits have limited capacitances. This calls for external components if the capacitance needs an
extension.
3. It is impossible to fabricate transformers or any other kind of inductor onto the integrated circuits and
again calling for a discrete circuit.
4. Power that integrated circuits can produce is limited and calls for extension.
5. Integrated circuits are not flexible. Their components cannot be modified and neither can the parameters
of operation.
Second, and the more significant advantage is that they can reduce the size of components to allow a far
higher component density. Processor and memory chips contain millions of components in a package that is
only an inch or two across. The same circuit in discrete components would fill a room. We benefit by seeing
tiny products such as cell phones or laptop computers that simply wouldn't exist without integrated circuits.
Digital Circuit
digital electronic circuits, electric signals take on discrete values, which are not dependent upon time,
to represent logical and numeric values. These values represent the information that is being
processed.
The transistor is one of the primary electronic components used in discrete circuits, and combinations
of these can be used to create logic gates. These logic gates may then be used in combination to
create a desired output from an input.
Larger circuits may contain several complex components, such as FPGAs (Field-programmable gate
array) or Microprocessors. These along with several other components may be interconnected to
create a large circuit that operates
on large amount of data.
For ease of designing and understanding, Digital Circuits are divided into following 2 Types:
1. Combinational Circuits
A Circuit that gives the same output when given the same inputs. It is represents a set of logic
functions.
Examples:
Multiplexers, De-multiplexers, Encoders, Decoders, Full and Half Adders etc.
2. Sequential Circuits
A sequential circuit is a combinational circuit with some
of the outputs fed back as inputs. These circuits perform a sequence of operations.
Examples:
Shift Registers, Counter, Flip-Flop
PS: Both Combinational Circuits and Sequential Circuits can further be classified into smaller
types. But for ease of understanding I am not mentioning them here or things will get
confusing.
PS: Both Combinational Circuits and Sequential Circuits can further be classified into smaller types.
But for ease of understanding I am not mentioning them here or things will get confusing.
Digital circuits are less susceptible to noise, easier to manipulate, and offer greater precision, making
them suitable for computation and communication tasks, whereas analog circuits are used for tasks
like amplification and signal processing.
In the decimal number system, we have ten digits from zero to nine, and that’s how we all learn to
count. In the binary number system, we only have two digits: zero and one. With these two digits, we
can count up to any number.
Decimal Number System
In a decimal number system, we’re all used to, each position in a decimal number has different value.
There’s a 1 position, the 10 positions, the 100 positions, and so on.
For example, the number in binary is 1001. To calculate the value, we add 1 times 8, plus 0 times 4,
plus 0 times 2, plus 1 times 1. Almost no body does this math because computer do it for us.
Whats important is that any number can be represented with only ones and zeros or by a bunch of
wire that are on or off. The more wire you use the larger the numbers you can store.
With 8 wires, you can store between 0 and 255.
With just 32 wires, you can store all the way from 0 to over 4 billion. Using the
binary number system, you can represent any number you like.
STEPS IN CONVERTING BINARY TO DECIMAL
2. Write the digits of the binary number below their corresponding powers of
two.
Now, just write 10011011 below the numbers 128, 64, 32, 16, 8, 4, 2, and 1 so that each binary digit
corresponds with its power of two. The "1" to the right of the binary number should correspond with
the "1" on the right of the listed powers of two, and so on. You can also write the binary digits above
the powers of two, if you prefer it that way. What's important is that they match up.
3. Connect the digits in the binary number with their corresponding powers of
two.
Draw lines, starting from the right, connecting each consecutive digit of the binary
number to the power of two that is next in the list above it. Begin by drawing a line from the first digit
of the binary number to the first power of two in the list above it. Then, draw a line from the second
digit of the binary number to the second power of two in the list. Continue connecting each digit with
its corresponding power of two. This will help you visually see the relationship between the two sets
of numbers.
7. Use this method to convert a binary number with a decimal point to decimal
form.
You can use this method even when you want to covert a binary number such as 1.12 to decimal. All
you have to do is know that the number on the left side of the decimal is in the unit’s position, like
normal, while the number on the right side of the decimal is in the "halves" position, or 1 x (1/2).The
"1" to the left of the decimal point is equal to 20, or 1. The 1 to the right of the decimal is equal to 2-
1, or .5. Add up 1 and .5 and you get 1.5, which is 1.12 in decimal notation.
Method 2: Doubling
This method can be modified to convert from decimal to any base. The divisor is 2 because the
desired destination is base 2 (binary). If the desired destination is a different base, replace the 2 in
the method with the desired base. For example, if the desired destination is base 9, replace the 2
with 9. The final result will then be in the desired base.
Method 2:
Note: Most Arduino boards use the Atmel 8-bit AVR microelectronic.
What is Arduino?
At the heart of the Arduino is the microcontroller. A microcontroller is a standalone, singlechip
integrated circuit that contains a CPU, read-only memory, random access memory and various 1/0
busses. The Arduino UNO R3 which we will be using uses the ATmega328 chip.
Specs are:
However do not be too concerned if you do not understand all those specifications because we
will be interacting with the microcontroller using the interface that the Arduino board provides us.
It is good to know these specifications as you begin to develop more complex applications
because they do put limits on what we can do.
What is Arduino?
Voltage Regulator: The Arduino uses a linear regulator to control the voltage going
into the board.
USB Port: The USB port can be used to power and program the board.
RESET button: This button, when pressed, will reset the board.
ICSP for USB: The in-circuit serial programming pins are used to flash the
firmware on the USB interface chip.
ICSP for ATmega328: The in-circuit serial programming pins are used to flash the
firmware on the ATmega microcontroller.
ATmega328: The microcontroller for the Arduino Uno board.
Digital and PWM connectors: These pins, labeled 0 to 13, can be used as either a
digital input or output pins. The pins labeled with the tilde (-) can also be used for
Pulse-Width Modulation (PWM) output.
Power and External Reset: These pins in this header, provide ground and power
for external devices and sensors from the Arduino. The Arduino can also be
powered through these pins. There is also a reset pin that can be used to reset
the Arduino.
Analog In Connectors: The pins, labeled A0 to A5, can be used for analog input.
These pins can be used to read the output from analog sensors.
Arduino shields
An Arduino shield is a modular circuit board that plugs directly into the pin
headers of the Arduino board.
These shields will add extra functionality to the Arduino board.
If we are looking to connect to the internet, do speech recognition, control DC
motors or add other functionality to the Arduino, there is probably a shield that
can help us.
While you don't have to use shields, they do make adding extra functionality to
our Arduino boards very easy.
Arduino looks with two shields attached:
A shield fits on top of the Arduino by plugging directly into the pin headers.
We can also stack one shield on top of another if they do not use the same
resources. Here is how an
Arduino pin
There is a total of 31 pins in the Arduino
Uno pin headers.
Most of these pins can be configured to
perform different functions.
Digital pins
Used the most when connecting external sensors.
These pins can be configured for either input or output.
These pins default to an input state
The digital pins will have one of two values: HIGH (1), which is 5V, or LOW (0),
which is OV. PWM ARDUINO 12 DEGETAL ALPH (UNO) PWM ANALOG D 16
PWM pins
Where the analog input pins are designed to read analog sensors (input), the
PWM pins are designed for output. PWM is a technique for obtaining analog
results with digital output.
Since a digital output can be either on or off, to obtain the analog output the
digital output is switch between HIGH and LOW rapidly.
The percentage of the time that the signal is high is called the duty cycle.
Duty cycle
We have the ability to set the frequency of how fast
the signal can switch between HIGH and LOW.
4 This frequency is measured in Hertz and sets how
many times the signal can switch per second.
For example, if we set the frequency to 500 Hz, that
would mean that the signal could switch 500 times a
second.
This will be come clearer as we use the pins.
Arduino Installation
Step 1
− First you must have your Arduino board (you
can choose your favorite board) and a USB
cable. In case you use Arduino UNO, Arduino
Duemilanove, Nano, Arduino Mega 2560, or
Diecimila, you will need a standard USB cable
(A plug to B plug), the kind you would connect
to a USB printer as shown in the following
image.
Open Project
Here, we are selecting just one of the examples with the name Blink.
It turns the LED on and off with some time delay.
You can select any other example from the list.
The Arduino program is divided into three main parts that are structure,
values, and functions.
When writing a code, the important thing is following the syntax of the language
being used because in order to run the code successfully the correct syntax is necessary. So, when writing a
program for Arduino following syntax should be followed:
To enclose the block parenthesis “{}” are used. Block in a program contains some statements, declaration of
the variables, functions, or loops.
Comments can be written for each statement in the code to better understand the statement functionality. It can
be done by using double forward slash “//” at the start of the comment if there is only a single line comment.
However, if there are multi line comments in a row, a forward slash asterisk “/*” at the start and asterisk
forward slash “*/” at the end of the comment. Comments can also be used to exclude any statement.
ARDUINO SYNTAX
The figure below given gives a much better understanding of the syntax used for coding in
Arduino software
ARDUINO PROGRAM
Using the variables gives the option of saving, changing, updating and accessing the information when the
program is running. There are different types of variables that can be used including char, int, double, string,
float, unsigned int, long and unsigned long
The following are operators used in the programing of Arduino: For assigning any value to a variable or a
character equal to “ = ” sign is used There are different mathematical operators like percentage, multiply,
subtraction, addition can be used (%, +, * , -, /) For comparison of the different values the operators like less
than equal to, greater than equal to, equal to, less than, greater than are used (==, ,=) Logical operators are used
to define the conditional statements such as AND (&&), NOT(!) and OR (||) operators.
The setup() function contains initialization of the libraries, variables used for the code.
Similarly, pin modes of the Arduino are also declared in this function. It also initializes
the communication between the Arduino board and the computer. It only runs once.
First in the setup function the pin mode is initialized, pin 8 has been set
as OUTPUT. Coming to the loop function, the state (HIGH/LOW) of the
LED changes after the delay of 1000 milliseconds. Similarly, we can say
that the implementation of the setup function is carried out in a loop
function. The Arduino code for blinking of LED is given as:
ARDUINO - DATA
TYPES
Data types in C refers to an extensive system used for declaring variables or functions of different types. The
type of a variable determines how much space it occupies in the storage and how the bit pattern stored is
interpreted.
* void
* Boolean
* Char
* unsigned char
* byte
* int
* Unsigned int
* Word
* Long
* unsigned long
* short
* float
* double