Friday, 26 October 2018
Thursday, 6 July 2017
Thursday, 22 June 2017
Thursday, 16 March 2017
INTRO ABOUT ARDUINO
Arduino
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.
Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments. A worldwide community of makers - students, hobbyists, artists, programmers, and professionals - has gathered around this open-source platform, their contributions have added up to an incredible amount of accessible knowledge that can be of great help to novices and experts alike.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast prototyping, aimed at students without a background in electronics and programming. As soon as it reached a wider community, the Arduino board started changing to adapt to new needs and challenges, differentiating its offer from simple 8-bit boards to products for IoT applications, wearable, 3D printing, and embedded environments. All Arduino boards are completely open-source, empowering users to build them independently and eventually adapt them to their particular needs. Thesoftware, too, is open-source, and it is growing through the contributions of users worldwide.
Why Arduino?
Thanks to its simple and accessible user experience, Arduino has been used in thousands of different projects and applications. The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux. Teachers and students use it to build low cost scientific instruments, to prove chemistry and physics principles, or to get started with programming and robotics. Designers and architects build interactive prototypes, musicians and artists use it for installations and to experiment with new musical instruments. Makers, of course, use it to build many of the projects exhibited at the Maker Faire, for example. Arduino is a key tool to learn new things. Anyone - children, hobbyists, artists, programmers - can start tinkering just following the step by step instructions of a kit, or sharing ideas online with other members of the Arduino community.
There are many other microcontrollers and microcontroller platforms available for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar functionality. All of these tools take the messy details of microcontroller programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of working with microcontrollers, but it offers some advantage for teachers, students, and interested amateurs over other systems:
· Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least expensive version of the Arduino module can be assembled by hand, and even the pre-assembled Arduino modules cost less than $50
· Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows.
· Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers, it's conveniently based on the Processing programming environment, so students learning to program in that environment will be familiar with how the Arduino IDE works.
· Open source and extensible software - The Arduino software is published as open source tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to.
· Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it. Even relatively inexperienced users can build the breadboard version of the module in order to understand how it works and save money.
Arduino - Multiple Servo Control With Arduino
In this tutorial, we will learn how to use multi-servo with Arduino. We will control 4 servo motors with Arduino PWM outputs.
You can implement your robotic arm projects with reference to this tutorial. Of course we will use external battery / power when doing this. In the next tutorial, I'll show you how to use multiple servos with potentiometers.
You can implement your robotic arm projects with reference to this tutorial. Of course we will use external battery / power when doing this. In the next tutorial, I'll show you how to use multiple servos with potentiometers.
Step 1: Hardware Required
- Arduino Board
- Servo Motor x4
- Battery
- Wires and Breadboard
- Servo Motor x4
- Battery
- Wires and Breadboard
Step 2: Connections
- The external battery VCC / GND connect to the breadboard.
- The Arduino GND connect to the breadboard's GND input
- The servo connections we use in this project are as follows;
Orange Input -Signal Input
Red Input -Power Input (VCC)
Brown Input -Ground Input(GND)
- The Servo1 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo1 Signal connect to the Arduino Digital PWM 3
- The Servo2 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo2 Signal connect to the Arduino Digital PWM 5
- The Servo3 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo3 Signal connect to the Arduino Digital PWM 6
- The Servo4 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo4 Signal connect to the Arduino Digital PWM 9
The potentiometer
Two outer pins are power (VCC) and ground (GND)
Middle pin is signal pin
- Potentiometer's one outer pin connect to the breadboard VCC input
- Potentiometer's other outer pin connect to the breadboard GND input
- Potentiometer's middle pin connect to the Arduino Analog 1 input
- The Arduino GND connect to the breadboard's GND input
- The servo connections we use in this project are as follows;
Orange Input -Signal Input
Red Input -Power Input (VCC)
Brown Input -Ground Input(GND)
- The Servo1 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo1 Signal connect to the Arduino Digital PWM 3
- The Servo2 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo2 Signal connect to the Arduino Digital PWM 5
- The Servo3 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo3 Signal connect to the Arduino Digital PWM 6
- The Servo4 VCC and GND connect to the breadboard's VCC / GND inputs
- The Servo4 Signal connect to the Arduino Digital PWM 9
The potentiometer
Two outer pins are power (VCC) and ground (GND)
Middle pin is signal pin
- Potentiometer's one outer pin connect to the breadboard VCC input
- Potentiometer's other outer pin connect to the breadboard GND input
- Potentiometer's middle pin connect to the Arduino Analog 1 input
I did not share the code because it is short and it varies according to the number of servos.
You can write code by watching the tutorial. This is a better way to learn.
I will continue to share long and complex codes.
You can write code by watching the tutorial. This is a better way to learn.
I will continue to share long and complex codes.
LED BLINK TUTORIAL ARDUINO
The Arduino is a great platform for learning circuits and micro controller programming. For those who don't have experience with circuits or micro controllers it can be hard to know where to start. We'll set up the basics here so that you can get experimenting and learn how much fun can be had with circuits.
Step 1: Installing the Arduino Software
The first thing we'll need to do in order to get things moving is to install the Arduino IDE. This software is where you'll write all of the code that will control the micro controller and the attached circuit components. You can download the IDE at the official Arduino Download Page. Once downloaded you'll need to unzip the folder into a convenient location. Then run the Arduino.EXE file. Once you've done that, you should see the above window.Step 2: Write Your First Sketch
We'll want to open the example sketch that can get us started. To
do so click File -> Examples -> Basics -> BareMinimum. This
will open a new window with a small amount of code. This code acts as
the framework for our program. The Setup method will be run a single
time right as the micro controller is turned on. You should place code
in here that you want to run once to configure the Arduino and get it
ready to run your program.
A common first project to do is to light an LED. There are multiple ways to do this, but an easy way is this. Connect an LED with its anode pin in pin 13 on the Arduino board and the cathode in the adjacent GND pin. Now add the following code to the setup section of the sketch:
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
This will set the 13th pin to an output pin, and set it to a high (5 volt) voltage level. With a high voltage on the anode and a low voltage on the cathode the LED will now light. Note that it is best practice to put a resistor in-line with the LED to control the amount of current flowing through the LED to ensure that the LED does not burn out. For this simple example we didn't do it, but keep in mind that you should do this on any real project.
A common first project to do is to light an LED. There are multiple ways to do this, but an easy way is this. Connect an LED with its anode pin in pin 13 on the Arduino board and the cathode in the adjacent GND pin. Now add the following code to the setup section of the sketch:
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
This will set the 13th pin to an output pin, and set it to a high (5 volt) voltage level. With a high voltage on the anode and a low voltage on the cathode the LED will now light. Note that it is best practice to put a resistor in-line with the LED to control the amount of current flowing through the LED to ensure that the LED does not burn out. For this simple example we didn't do it, but keep in mind that you should do this on any real project.
Step 3: Keep Going
Now that you've got the very basics down there's a great deal more to learn about circuits. There are all sorts of tutorials online to help you build and learn how to create exciting things.Sunday, 8 January 2017
Ohms Law and Power
Ohms Law and
Power
The
relationship between Voltage, Current and Resistance in any DC electrical circuit was firstly
discovered by the German physicist Georg Ohm.
Georg
Ohm found that, at a constant temperature, the electrical current flowing through
a fixed linear resistance is directly proportional to the voltage applied
across it, and also inversely proportional to the resistance. This relationship
between the Voltage, Current and Resistance forms the basis of Ohms Law and is shown below.
Ohms Law Relationship
By
knowing any two values of the Voltage, Current or Resistance quantities we can
use Ohms Law to find the third missing value. Ohms Law is used extensively
in electronics formulas and calculations so it is “very important to understand
and accurately remember these formulas”.
To find the Voltage, ( V )
[ V = I x R ] V (volts) = I (amps) x R (Ω)
To find the Current, ( I )
[ I = V ÷ R ] I (amps) = V (volts) ÷ R (Ω)
To find the Resistance, ( R )
[ R = V ÷ I ] R (Ω) = V (volts) ÷ I (amps)
It
is sometimes easier to remember this Ohms law relationship by using pictures.
Here the three quantities of V, I and R have
been superimposed into a triangle (affectionately called the Ohms Law
Triangle) giving voltage at the top with
current and resistance below. This arrangement represents the actual position
of each quantity within the Ohms law formulas.
Ohms Law Triangle
Transposing
the standard Ohms Law equation above will give us the following combinations of
the same equation:
Then
by using Ohms Law we can see that a voltage of 1V applied to a resistor of 1Ω
will cause a current of 1A to flow and the greater the resistance value, the
less current that will flow for a given applied voltage. Any Electrical device
or component that obeys “Ohms Law” that is, the current flowing through it is
proportional to the voltage across it ( I α V ), such as resistors or cables, are said to
be “Ohmic” in nature, and devices that do not, such as
transistors or diodes, are said to be “Non-ohmic” devices.
Electrical Power in Circuits
Electrical
Power, ( P ) in a circuit is the rate at which energy is
absorbed or produced within a circuit. A source of energy such as a voltage
will produce or deliver power while the connected load absorbs it. Light bulbs
and heaters for example, absorb electrical power and convert it into either
heat, or light, or both. The higher their value or rating in watts the more
electrical power they are likely to consume.
The
quantity symbol for power is P and
is the product of voltage multiplied by the current with the unit of
measurement being the Watt ( W ). Prefixes are used to denote the various
multiples or sub-multiples of a watt, such as: milliwatts (mW = 10-3W) or kilowatts (kW = 103W).
Then
by using Ohm’s law and substituting for the values of V, I and R the formula for electrical power can be found
as:
To find the Power (P)
[ P = V x I
] P (watts) = V (volts) x I (amps)
Also,
[ P = V2 ÷ R
] P (watts) = V2 (volts) ÷ R (Ω)
Also,
[ P = I2 x R
] P (watts) = I2 (amps) x R (Ω)
Again,
the three quantities have been superimposed into a triangle this time called a Power Triangle with power at the top and current and voltage at
the bottom. Again, this arrangement represents the actual position of each
quantity within the Ohms law power formulas.
The Power Triangle
and
again, transposing the basic Ohms Law equation above for power gives us the
following combinations of the same equation to find the various individual
quantities:
So
we can see that there are three possible formulas for calculating electrical
power in a circuit. If the calculated power is positive, (+P) in value for any
formula the component absorbs the power, that is it is consuming or using
power. But if the calculated power is negative, (-P) in value the component
produces or generates power, in other words it is a source of electrical power
such as batteries and generators.
Electrical Power Rating
Electrical
components are given a “power rating” in watts that indicates the maximum rate
at which the component converts the electrical power into other forms of energy
such as heat, light or motion. For example, a 1/4W resistor, a 100W light bulb
etc.
Electrical
devices convert one form of power into another. So for example, an electrical
motor will covert electrical energy into a mechanical force, while an
electrical generator converts mechanical force into electrical energy. A light
bulb converts electrical energy into both light and heat.
Also,
we now know that the unit of power is the WATT, but some electrical
devices such as electric motors have a power rating in the old measurement of
“Horsepower” or hp. The relationship between horsepower and watts is given
as: 1hp = 746W. So for example, a two-horsepower
motor has a rating of 1492W, (2 x 746) or 1.5kW.
Ohms Law Pie Chart
To
help us understand the the relationship between the various values a little
further, we can take all of the Ohm’s Law equations from above for
finding Voltage, Current, Resistance and of course Power and condense them into a simple Ohms Law pie
chart for use in AC and
DC circuits and calculations as shown.
Ohms Law Pie Chart
As
well as using the Ohm’s Law Pie Chart shown above, we can also
put the individual Ohm’s Law equations into a simple matrix table as shown for
easy reference when calculating an unknown value.
Ohms Law Matrix Table
Ohms Law Example No1
For
the circuit shown below find the Voltage (V), the Current (I), the Resistance
(R) and the Power (P).
Voltage [ V = I x R ] = 2 x 12Ω = 24V
Current [ I = V ÷ R ] = 24 ÷ 12Ω = 2A
Resistance [ R = V ÷ I ] = 24 ÷ 2 = 12
Ω
Power [ P = V x I ] = 24 x 2 = 48W
Power
within an electrical circuit is only present when BOTH voltage and current are present. For example, in an
open-circuit condition, voltage is present but there is no current flow I = 0 (zero), therefore V x 0 is 0 so
the power dissipated within the circuit must also be 0. Likewise, if we have a short-circuit condition,
current flow is present but there is no voltage V = 0, therefore 0 x I = 0 so again the power dissipated within the
circuit is 0.
As
electrical power is the product of V x I, the power dissipated in a circuit is the same
whether the circuit contains high voltage and low current or low voltage and
high current flow. Generally, electrical power is dissipated in the form
of Heat (heaters), Mechanical Work such as motors, Energy in the form of radiated (Lamps) or as stored
energy (Batteries).
Electrical Energy in Circuits
Electrical Energy is the capacity to
do work, and the unit of work or energy is the joule ( J ).
Electrical energy is the product of power multiplied by the length of time it
was consumed. So if we know how much power, in Watts is being consumed and the
time, in seconds for which it is used, we can find the total energy used in
watt-seconds. In other words, Energy = power x time and
Power = voltage x current. Therefore electrical power is
related to energy and the unit given for electrical energy is the watt-seconds
or joules.
Electrical
power can also be defined as the rate of by which energy is transferred. If one
joule of work is either absorbed or delivered at a constant rate of one second,
then the corresponding power will be equivalent to one watt so power can be
defined as “1Joule/sec = 1Watt”. Then we can say that one watt is equal to one
joule per second and electrical power can be defined as the rate of doing work
or the transferring of energy.
Electrical Power and Energy Triangle
or
to find the various individual quantities:
We
said previously that electrical energy is define as being watts per second
or joules. Although electrical energy is measured in Joules it can
become a very large value when used to calculate the energy consumed by a
component.
For
example, if a 100 watt light bulb is left-“ON” for 24 hours, the energy
consumed will be 8,640,000 Joules (100W x 86,400 seconds), so prefixes such
as kilojoules (kJ = 103J) or megajoules (MJ = 106J) are used instead and in this simple example, the
energy consumed will be 8.64MJ (mega-joules).
But
dealing with joules, kilojoules or megajoules to express electrical energy, the
maths involved can end up with some big numbers and lots of zero’s, so it is much
more easier to express electrical energy consumed in Kilowatt-hours.
If
the electrical power consumed (or generated) is measured in watts or kilowatts
(thousands of watts) and the time is measure in hours not seconds, then the
unit of electrical energy will be the kilowatt-hours,(kWhr). Then our 100 watt light bulb above will
consume 2,400 watt hours or 2.4kWhr, which is much easier to understand the
8,640,000 joules.
1
kWhr is the amount of electricity used by a device rated at 1000 watts in one
hour and is commonly called a “Unit of Electricity”. This is what is measured
by the utility meter and is what we as consumers purchase from our electricity
suppliers when we receive our bills.
Kilowatt-hours
are the standard units of energy used by the electricity meter in our homes to
calculate the amount of electrical energy we use and therefore how much we pay.
So if you switch ON an electric fire with a heating element rated at 1000 watts
and left it on for 1 hour you will have consumed 1 kWhr of electricity. If you
switched on two electric fires each with 1000 watt elements for half an hour
the total consumption would be exactly the same amount of electricity – 1kWhr.
So,
consuming 1000 watts for one hour uses the same amount of power as 2000 watts
(twice as much) for half an hour (half the time). Then for a 100 watt light
bulb to use 1 kWhr or one unit of electrical energy it would need to be
switched on for a total of 10 hours (10 x 100 = 1000 = 1kWhr).
Now that we know what is the
relationship between voltage, current and resistance in a circuit, in the next
tutorial relating to DC
Circuits, we will look at the Standard Electrical Units used in electrical
and electronic engineering to enable us to calculate these values and see that
each value can be represented by either multiples or sub-multiples of the
standard unit.
DECLARATION:
OUR BLOG IS NOT FOR COMMERCIAL PURPOSE.ONLY FOR EDUCATIONAL PURPOSE.ALL CREDITS GOES TO BLOG AND RESPECTIVE AUTHOR.CLICK HERETO GO ORGINAL PAGE.
Subscribe to:
Posts (Atom)























