Drone 9 April 2015(1)
Transcript of Drone 9 April 2015(1)
-
8/17/2019 Drone 9 April 2015(1)
1/122
1. Abstract:
There are so many things that are happening around us that we can’t knowimmediately, after an hour or late we will come to know what is going on, not only
in the aspect of crime and also in some strange things that happen around us. This
project is about designing a system and method for facilitating measurement of
environmental conditions such as might be used in emergencies or other situational
awareness applications which contains weather monitoring, image sensing of the
unknown objects, voice and video transmission, sending !" positions
automatically to data base, all this features come together as a unit. This unit will
help us to sense the environment and help us to get the continuous feedback for
monitoring the environment.
-
8/17/2019 Drone 9 April 2015(1)
2/122
Voice Transmission:
The circuit is basically a radio fre#uency $%&' oscillator that operates around
1(()*+.
The audio signal that are given as a input through microphone is fed into the audio
amplifier stage.
That is builded in around first stage transistor.
The output of the first transistor, ie., collector is fed into the basic transistor where it
modulates the resonant fre#uency of the tank circuit. $1 col1 - trimpot', by
varying the junction capacitance by truimph of the transistor.
/unction 0apacitance is a function of the potential difference applied to the base of
the transistor T. The tank is connected in a *artley oscillator circuit. The final stage
build around T2 amplifies the output %& signal.
3n this, there are seven stages to complete the construction of the voice T4.
-
8/17/2019 Drone 9 April 2015(1)
3/122
-
8/17/2019 Drone 9 April 2015(1)
4/122
First amplification stage:
This is a standard self6biasing common emitter amplifier. The n capacitor isolates
the microphone from the base voltage of the transistor and only allows alternating
current signals to pass.
Oscillator stage:
5very oscillator needs an oscillator to generate the %& carrier waves. The tank
circuit, the transistor and the feedback capacitor are the oscillator circuits here. An
input signal is not needed to sustain the oscillation. The feedback signal makes the
base6emitter current of the transistor to vary at the resonant fre#uency.
This causes the emitter6collector current to vary at the same fre#uency. This signal
is fed to the aerial and radiated as radio waves.
The name 7tank7 circuit comes from the ability of the 0 circuit to store energy for
oscillations. in a pure 0 circuit $with no resistance' energy cannot be lost. 8ote that
the tank circuit does not oscillate just by having a 90 potential put across it. !ositive
feedback must be provided.
-
8/17/2019 Drone 9 April 2015(1)
5/122
Trimpot:
The slots inside the trimpot are shaped like the head of arrow. Tha ma4imum
capacitance value is when the arrow is in pointed to the 1o7clock position. A 1(
degrees turn brings the trimpot value to its minimum rated value. ;ith
e4perimentation we will be able to build up a table of total capacitance value to &m
fre#uency and also we can change the fre#uency by altering the space between the
coil of 1.
The 1(!f ceramic capacitor in parallel with the trimpot will enable us to tune the T4
in the range of !f' we want to move the fre#uency downwards the other end of the &m
band. This end generally has more commercial station in it.
-
8/17/2019 Drone 9 April 2015(1)
6/122
Final Amplification Stage:
This %& stage adds amplification to %& signal. 3t needs an %& transistor to do this
efficiently. 8ow, we use ?@ete4 @T42(?. $an %&0,radio fre#uency choke' and
1(p capacitor in parallel with it are designedto reduce ?harmonics? from the circuit.
utput power from this stage will be ma4imum when it is tuned to oscillate at the
same fre#uency as the previous stage.
Operating Voltage:
utput power is also increased by using a higher operating voltage.
-
8/17/2019 Drone 9 April 2015(1)
7/122
of on6board computers. ther names for these types of aircraft are remotely piloted
vehicle $%!B', remotely piloted aircraft $%!A', and remotely operated aircraft
$%A'.
9rones are commonly used by the military, but are also being implemented in search
and rescue operations and being utili+ed in other civil applications, such as policing
and firefighting. The technology is also allowing for hobbyists and other enthusiasts
to become avid drone operators, albeit on a relatively smaller scale.
A drone is capable of controlled, sustained level flight and is powered by a jet,
reciprocating, or electric engine. DABs differ from cruise missiles in that drones are
recovered after a mission is complete while a cruise missile impacts its target.
)ilitary DABs may carry and fire munitions, while a cruise missile is a munitions7.
History of Drone:
The concept of unmanned aerial flight is not a new one. The idea first came to light
on August
, 1E
-
8/17/2019 Drone 9 April 2015(1)
8/122
placed on a building. The bomb falls perpendicularly, and e4plodes on reaching the
ground.G
;hile these early drones do not generally meet today’s definition of a DAB, the
concept was strong enough that once winged aircraft had been invented, the concept
was still alive and kicking and would soon be implemented once again.
WORLD WAR :
The first pilotless aircraft were developed during and shortly after ;orld ;ar 3. The
first was the FAerial Target,G developed in 1
-
8/17/2019 Drone 9 April 2015(1)
9/122
torpedo, an early version of modern cruise missiles. 0ontrol of these aircraft was
achieved using gyroscopes.
3n 8ovember 1, the Automatic Airplane was demonstrated for the D" Army.
Dpon the success of this demonstration, the Army commissioned a project to
build an aerial torpedo, which became known as the Hettering Iug and flew in
1
-
8/17/2019 Drone 9 April 2015(1)
10/122
highly classified DAB program was launched under the code name F%ed ;agon.G
)odern6era DABs got their first use during the Aug and Aug E, 1
-
8/17/2019 Drone 9 April 2015(1)
11/122
primarily flown over Afghanistan, !akistan, Memen, and "omalia. The 03A’s first
DAB program was called the 5agle !rogram.
As of ((, The D"A& has employed =,221 DABs, which is twice the number of
manned planes. f these, the !redators have been the most commendable. Dnlike
other DABs, the !redator was armed with *ellfire missiles. The !redators were
used during the hunt for sama Iin aden and have demonstrated the capability
of pointing lasers at targets for pinpoint accuracy. The overall success of the
!redator missions is apparent because from /une ((= to /une ((C alone,
!redators carried out ,(>2 successful missions in E separate raids.
;hile !redator is remotely operated via satellites from more than >,=(( miles
away, the lobal *awk operates virtually autonomously. nce the user pushes a
button, alerting the DAB to take off, the only interaction between ground and the
DAB is directional instructions via !". lobal *awks have the ability to take
off from "an &rancisco, fly across the D", and map out the entire state of )aine
before having to return.
3n &ebruary (12, it was reported that DABs were used by at least =( countries,
several of which have made their own, including 3ran, 3srael and 0hina.
%ecently, DABs are becoming increasingly popular in the commercial and private
market. Ama+on.com, the largest online retailer, said in 9ecember (12 that it
was developing drone technology to one day deliver mail autonomously.
9rones are also being developed for hobbyists and other enthusiasts. 3n reality,these types of aircraft have been common since the 1
-
8/17/2019 Drone 9 April 2015(1)
12/122
'(iling of rone:
There are different types of auto pilot systems which are available . They are
8A@A6) ite
8A@A6) B1
8A@A6) B
;e are using 8A@A6) v in our project. &or building of a 9rone:
na+am v
building of #uad copter
*omponents:
1+ flight board$light version, v'
. pmu
2. gpsE. led
=. carbon frame $4 a4is'
C. brushless propulsion motors kv$
-
8/17/2019 Drone 9 April 2015(1)
13/122
spring TOJ every time you let go of the throttle stick it will hover. The 8A@A
!)D B has enhanced I50 functionality and provides e4tendable 0A8 ID"
ports, which can support i"9, @en muse *269 gimbals $pitch control'. "upport
is also included for optional Iluetooth 59 module to allow parameter
adjustment via a mobile A!! $future firmware upgrade re#uired for this
functionality'.
Feat(res:
All6in6one 9esign
8ine Types of )ulti6rotors "upported
8ew Assistant "oftware for "martphone
3ndependent !)D with ama+ing function e4tension
5nhanced &ailsafe )ode
Two evels of ow Boltage !rotections
)ulti6rotor ne6power utput &ail !rotection
Advanced - 3mproved Attitude "tabili+ation Algorithm
)ultiple &light 0ontrol )odesP3ntelligent "witching
8ew Assistant "oftware - &irmware nline Dpdate
!" )odule AvailablePAccurate !osition *old
3ntelligent rientation 0ontrol
)otor Arm and )otor 9is6arm
!!), "6ID" - rdinary %eceiver "upported
3ndependent 59 )odule
Iuilt6in imbal "tabili+ation &unction %emote ain Adjustment
Whats ifference of #A,A-! Lite& #A,A-! V1& #A,A-! V/
-
8/17/2019 Drone 9 April 2015(1)
14/122
-
8/17/2019 Drone 9 April 2015(1)
15/122
Assem6ly an *onnection:
)ain controller O1
!)DO1$power management unit'
!" O1 !" Iracket O1
59 O1, "ervo 0able O
)icro D"I 0ableO1
2) Adhesive Tape
-
8/17/2019 Drone 9 April 2015(1)
16/122
!ain *ontroller:
*irc(it iagram internally:
-
8/17/2019 Drone 9 April 2015(1)
17/122
-
8/17/2019 Drone 9 April 2015(1)
18/122
V1 $ort Description:
!lease remember the function of each port, which may help you to use the 8a+a6)efficiently.
-
8/17/2019 Drone 9 April 2015(1)
19/122
-
8/17/2019 Drone 9 April 2015(1)
20/122
5$S (nit:
The arrow mark indicated above is the pointer to navigate.
-
8/17/2019 Drone 9 April 2015(1)
21/122
Step/ Assem6ly 7 *onnection:
% T8$"S !9LTROTOR *O#F59RATO#S S9$$ORT"D:
The 8A@A6) B is a powerful flight controller for enthusiast, commercial and
industrial flyers. 3t’s easy to install, simple to configure and above all, e4tremely
stable. 8ine types of traditional motor mi4es are supported, making it ideal for every
setup.
The #A,A-! V/ s(pports % types of traitional motor mi3er:
-
8/17/2019 Drone 9 April 2015(1)
22/122
-
8/17/2019 Drone 9 April 2015(1)
23/122
8ew flight control performance, provides better flight e4perienceJ $flight control is
smoother, take‐off is easier'.
"upport for cto‐rotor ne‐motor stopped still can land safely $*e4a‐rotor, cto‐
rotor' Automatic course deviation compensation, reduced the effects of magnetic
disturbance interference around the compass detection - warning added 3)D
advanced calibration, error identification and warning, reduced the impact of sensor
error to the flight performance.
Feat(res:
All-in-one Design:
9/3 adheres to continuous innovating and improving, with the new firmware, new
attitude stabili+ation algorithm and optimi+ed hardware structure, the 8a+a6) B
provides better flight performance. The innovative All6in6one design simplifies
installation and saves space and weight. 3t contains inner damping, controllers, 26
a4is gyroscope, 26a4is accelerometer and barometer in its light and small )ain
0ontroller. 3t can measure flying altitude, attitude and therefore can be used for
autopilotPautomatic control.
nepenent $!9 2ith amaing f(nction e3tension:
The 8A@A !)D B has enhanced I50 functionality and provides e4tendable 0A8
ID" ports, which can support i"9, @en muse *269 gimbals $pitch control'.
"upport is also included for optional Iluetooth 59 module to allow parameter
adjustment via a mobile A!! $future firmware upgrade re#uired for this
functionality'.
$!9:
Advanced - 3mproved Attitude "tabili+ation Algorithm.
The latest fourth generation attitude stabili+ation algorithm not only inherits the
outstanding flight stability of 9/3 products, but also provides e4cellent
maneuverability even without the !" module. 3t is more fle4ible and stable, and
gives the hobbyists a wonderful flight e4perience. 8ew features have been included
such !" course automatic compensation, !" - 0ompass sensor calibration, new
take6off mode and so on.
-
8/17/2019 Drone 9 April 2015(1)
24/122
*ar6on frame:
The F)ini 9G is a 0leanP9irty plate design separated by )2 dampers that allows
you to take jello 6 free videos with your *9 camera. 3 have flown it numerous times
now but have never had any ?jello? issues. "o, what makes this frame differentR
; ifferent thic
-
8/17/2019 Drone 9 April 2015(1)
25/122
F)ini 9G also includes its own !ower 9istribution IoardS There are both ?Q? and
?6? poles which make it easy to attach your choice of up to 1A 5"0’s soldered
directly.
Adjustable 0 $0enter6of6ravity' via changeable dampener positions for the clean
section and also adjustable &0 $&light 0ontroller' positioning.
Different Varia6les for F$V&R"* camera:
009 0amera can be used naked with provided camera plate wP )obius on top plate.
009 camera in metal casing mounted $2 9ifferent position holes for 0ase'
%emovable !P2 plate can be easily attached to front.
Also, if you get m2 si+e thumb nuts for second arm hole placement, it can be
foldable as well.
=it incl(es:
E40& plates $9irty, new belt for afro 5"0s, clean and top plates'
E40& landings
E4%ivnuts , used as landings and foldable mechanism. $85;'
E4)2 vibration dampers $85; 54tra "oft'
C4Anodi+ed black standoffs
14opro,mobius *9 camera plate
14 8aked 009 camera plate
40opper plates for 5"0 power dist.
42mm belt standoffs
-
8/17/2019 Drone 9 April 2015(1)
26/122
"crews, nuts and cable tie for landings
Why 'r(shless D* !otors0
Irushless 90 electric motor $I90 motors, I motors' also known as
electronically commutated motors $50)s, 50 motors' are synchronous motors that
are powered by a 90 electric source via an integrated inverter Pswitching power
supply, which produces an A0 electric signal to drive the motor. 3n this conte4t, A0,
alternating current, does not imply a sinusoidal waveform, but rather a bi6directional
current with no restriction on waveform. Additional sensors and electronics control
the inverter output amplitude and waveform $and therefore percent of 90 bus
usagePefficiency' and fre#uency $i.e. rotor speed'.
"S* *onnectors:
Irushless motors offer several advantages over brushed 90 motors
more tor#ue per weight,
more tor#ue per watt $increased efficiency', increased reliability,
reduced noise,
longer lifetime $no brush and commutator erosion', elimination of ioni+ing
sparks from the commutator, and overall reduction of elect $5)3'.
"S* *onnectors:
An electronic spee control or "S* is an electronic circuit with the purpose to vary
an electric motor’s speed, its direction and possibly also to act as a dynamic brake.
-
8/17/2019 Drone 9 April 2015(1)
27/122
5"0s are often used on electrically powered radio controlled models, with the variety
most often used for brushless motors essentially providing an electronically
generated three6 phase electric power low voltage source of energy for the motor.
-
8/17/2019 Drone 9 April 2015(1)
28/122
-
8/17/2019 Drone 9 April 2015(1)
29/122
Step; Do(6le *hec:
1. 9ownload the Assistant installer in 9) format from the download page of
8A@A6) B on the 9/3 website.
. %un the installation software and follow the prompts to finish installation.
-
8/17/2019 Drone 9 April 2015(1)
30/122
2. ;hen
launching for the first time if use aunch pad to run the 8A@A6) B Assistant
"oftware, aunch pad won’t allow access because the software has not been reviewed
by )ac App "tore.
E. ocate the 8A@A6) B icon in the &inder and open the file by 0ontrol or right
clicking the icon and selecting FpenG from the menu.
-
8/17/2019 Drone 9 April 2015(1)
31/122
=. After the first successful launch, double6clicking the 8A@A6) B icon in the
&inder or using aunch pad will open the application.
3nstaller in 9) format is supported on )ac " O 1(.Cor above.
The 8A@A6)BAssistant on )ac " O and ;indows are e4actly the same. The
Assistant appear in other places of this manual is based on ;indows version.
-
8/17/2019 Drone 9 April 2015(1)
32/122
Step/ *onfig(ration 6y Assistant on a $*:
1. !ower on the !0. )ake sure your computer is connected to the 3nternet for the first
time you use.
. "witch on the transmitter first, and then power on the autopilot system. 0onnect
the autopilot system to the !0 with a )icro6D"I cable. 9 8T break the
connection until setup is finished.
2. %un the Assistant "oftware.
E. bserve the indicators on the left bottom of the software. $They are the connection
indicator and communication indicator in order.' 3f the communication indicator is
blinking, that the software is ready, please go to ne4t step.
-
8/17/2019 Drone 9 April 2015(1)
33/122
=. "elect the F3nfoG option. 0heck the software firmware version. 3f the upgrade is
available, you may update the assistant software.
C. "elect the FDpgradeG option. 0heck the )ain 0ontroller, !" and 3)D firmware
version.
>. "elect the FIasicG option. !lease follow step6by6step for your first6time6
configuration. Iasic configuration is necessary, including )i4er Type, )ounting,
%0, and ain settings.
. Mou can click the FAdvancedG option for more parameter settings. Advanced
setting is optional. There are settings of )otor, &ailsafe, 3ntelligent rientation
0ontrol $30', imbals, ow6Boltage Alert, and &light imits. %ead the instruction
in the assistant software to obtain more details.
-
8/17/2019 Drone 9 April 2015(1)
34/122
$1' 3f the firmware upgrade is available, please upgrade it by referring to the
&irmware Dpgrade in the Appendi4.
$' This step is re#uired to use together with the assistant software to obtain more
details.
%ecommended !arameters
%ecommended "ettings for using &22(P&E=(P&==(
*onfig(ration nformation Iasic ain
Attitude ain!otor 5"0 !ropell Iattery ;eight !itch %oll Maw Bertical !itch %oll
F;;? 9/36 9/36 9/36 2"6 >
-
8/17/2019 Drone 9 April 2015(1)
35/122
F? 9/36 9/36 9/36 E"6 1=2( 1>( 1>( 1=( 1E( 1>( 1>nc
Iasic &lying
0ontrol )ode Hnowledge
!lease read the 0ontrol )ode Hnowledge clearly before usage, to know how to control
the aircraft.
9ifferent control modes will give you different flight performances. !lease make sure
you
understand the features and differences of the three control modes.
!" ATT3.
)ode
(;ith !")odule)
ATT3. )ode )anual
)ode
%udder Angular
Belocity
0ommandinearity
)a4imum rudder angular velocity is 1=(Ps
M5"
0ommand
"tick
)eaning
)ulti attitude
controlJ "tick center
position for
(U attitude, its
endpoint is 2=U.
-
8/17/2019 Drone 9 April 2015(1)
36/122
)a46angular velocity is 1=(Ps. 8o
attitude angle limitation and vertical
velocity locking.
Altitudeock
)aintain the altitude best above 1 meter from 8
ground.
"tick
%eleased
!" ost
ock position if
!"
signal is ade#uate
;hen !" signal
has been lost for
2s, system enters
ATT3. )ode
automatically.
nly attitude
stabili+ing.
nly performing
attitude stabili+ing
without position
lock.
8T %ecommend
666
"afety
Attitude - speed mi4ture control
ensures stability
9epends on
e4perience.
5nhanced &ail6
"afe$!osition
9epends on
e4perience. lock
when hovering'
Auto evel &ail6"afe
$Attitude stabili+ing'
;ith !"P0ompass module and the failsafe re#uirements are
satisfied, in each 0ontrol )ode $including !" )ode, ATT3.
)ode, )anual )ode and
-
8/17/2019 Drone 9 April 2015(1)
37/122
Applications
30 )ode', the aircraft will enter the failsafe )ode. A! work
"ports flying. 666
-
8/17/2019 Drone 9 April 2015(1)
38/122
start - "top )otor Hnowledge
$1' Ioth 3mmediately )ode and 3ntelligent )ode are available in the Assistant
"oftware: Advanced6V)otor6V"top Type.
$' "top )otor method is defaulted to 3mmediately )ode. !lease get to know well
about this section before flying.
1. Start !otor: !ushing throttle stick before takeoff will not start the motors. Mou
have to e4ecute any one of following four 0ombination "tick 0ommands $0"0' to
start the motors.
. Stop !otor: ;e provide two options to stop motors in the assistant software:
3mmediately and 3ntelligent.
$1' mmeiately !oe: 3f you select this mode, in any control mode, once motorsstart and throttle stick is over 1(W, motors will not stop immediately only when
throttle stick is back under 1(W the motors will stop. 3n this case, if you push the
throttle stick over 1(W within =seconds after motors stop, motors will re6start, 0"0
is not needed. 3f you don’t push throttle stick after motors start in three seconds,
motors will stop automatically.
$' ntelligent !oe: Iy using this mode, different control mode has different wayof stopping motors. 3n )anual )ode, only e4ecuting 0"0 can stop motors. 3n ATT3.
)ode or !" ATT3. )ode, any one of following four cases will stop motors:
a' Mou don’t push throttle stick after motors start within three secondsJ
b' 54ecuting 0"0J
c' Throttle stick under 1(W, and after landing for more than 2 seconds.
-
8/17/2019 Drone 9 April 2015(1)
39/122
d' 3f the angle of multi6rotor is over >(, and throttle stick under 1(W.
#otes of ntelligent !oe:
$1' 3n ATT3. P !" ATT3. )ode, it has landing judgment, which will stop motors.
$' "tart motors in ATT3. P !" ATT3. )ode, you have to e4ecute 0"0 and then push
throttle stick over 1(W in 2 seconds, otherwise motors will stop after 2 seconds.
$2' 9uring normal flight, only pull throttle stick under 1(W will not stop motors in
any control mode.
$E' &or safety reason, when the slope angle of multi6rotor is over >( during the flight
in ATT3. P !" ATT3. )ode $may be caused by collision, motor and 5"0 error or
propeller broken down', and throttle stick is under 1(W, motors will stop
automatically.
#otes of ntelligent !oe 7 mmeiately !oe:
$1' 3f you choose the 3mmediately )ode, you should not pull throttle stick under 1(W
during flight, because it will stop motors. 3f you do it accidentally, you should push
the throttle stick over 1(W in =s to re6start motors.
$' 9 8T e4ecute the 0"0 during normal flight without any reason, or it will stop
motors at once.
-
8/17/2019 Drone 9 April 2015(1)
40/122
$1' 3f you choose the 3ntelligent mode, and the throttle stick is under 1(W, this will
trigger the landing !rocedure, in any control mode. 3n this judgment, pitch, roll and
yaw controls are denied e4cept the throttle, but multi6rotor will still auto level.
$' 3n any control mode, 9 8T pull throttle stick under 1(W during normal flight
without any reason.
$1' Any of these two cut off types will only work properly if TO calibration is correct
done. $' 3n failed6safe, 0"0 is denied by the main controller, motors will hold their
state.
Step1 *ompass *ali6ration:
;ithout !" module, please skip this step. 3f you use with !" module, follow
step6by6step for calibration.
$1' 9 8T calibrate your compass where there is magnetic interference, such as
magnetite, car park, and steel reinforcement under the ground.
$' 9 8T carry ferromagnetic materials with you during calibration, such as keys
or cell phones.
$2' 0ompass module 0A88T work in the polar circle.
$E' 0ompass 0alibration is very important, otherwise the system will work abnormal.
*ali6ration $roce(res:
1. "witch on the transmitter, and then power on autopilot systemS
-
8/17/2019 Drone 9 April 2015(1)
41/122
. Kuickly switch the control mode switch from !" )ode to )anual )ode and
back to !" )ode $or from !" )ode to ATT3. )ode and back to !" )ode' for
more than = times, The 59 indicator will turn on constantly yellow so that the
aircraft is ready for the calibration.
2. $&ig.1' *old your )ulti6rotor hori+ontal and rotate it around the gravitational
force line $about 2C(o ' until the 59 changes to constant green, and then go to the
ne4t step.
E. $&ig.'*old your )ulti6rotor vertically and rotate it $its nose is downward'
around the gravitational force line $about 2C(o ' until the 59 turns off, meaning
the calibration is finished.
=. 3f the calibration was successful, calibration mode will e4it automatically. 3f the
59 keeps flashing #uickly %ed, the calibration has failed. "witch the control
mode switch one time to cancel the calibration, and then re6start from step
1. ;hen the !" is abnormal, the )ain controller will tell you by the 59
blinking %ed and Mellow alternately $ ', disable the !" )odule, and automatically
enter the aircraft into the ATT3. )ode.
. Mou don’t need to rotate your multi6rotor on a precise hori+ontal or vertical
surface, but keep at least E= difference between hori+ontal and vertical calibration.
2. 3f you keep having calibration failure, it might suggest that there is very strong
magnetic interference around the !" P0ompass module, please avoid flying in this
area.
E. ;hen to do re6calibration
-
8/17/2019 Drone 9 April 2015(1)
42/122
$1' The flight field is changed.
$' ;hen the multi6rotor mechanical setup has changed:
a' 3f the !"P0ompass module is re6positioned.
b' 3f electronic devices are addedPremovedP re6positioned $)ain 0ontroller, servos,
batteries, etc.'.
c' ;hen the mechanical structure of the multi6rotor is changed.
$2' 3f the flight direction appears to be shifting $meaning the multi6rotor doesn’t
Ffly straightG'. $E' The 59 indicator often indicates abnormality blinking when
the multi6rotor spins. $3t is normal for this to happen only occasionally'
Step/ Assem6ly *hec
-
8/17/2019 Drone 9 April 2015(1)
43/122
)ake sure the following items are correct.
$1' )ake sure you have assembled your multi6rotor correctly.
$' )ake sure you have done the configuration procedure correctly. $2' )ake sure
all connections are in good condition.
$E' )ake sure batteries are fully charged for your transmitter, autopilot system and
all devices.
Step; 'efore Flight
0arry out the following procedures $is based on 3ntelligent )ode of )otor "top' to
make sure all configurations are correct. %efer to the Appendi46V59 9escription
for more 59 details.
1. Always switch on the transmitter first, then power on multi6rotorS
. Heep the aircraft stationary until the system start and self6check has finished $ '.After that, the 59 may blink Mellow E times #uickly $ '. "tart motor is disable
during 59 blinking Mellow E times #uickly $ ', as the system is warming up.
2. After the E times Mellow 59 disappears, toggle the control mode switch on
your transmitter to make sure it is working properly. &or e4ample, 59 blinks $ ',
which means the system is in ATT3. )ode and the !" signal is worst 0heck it
with 59 indicator to specify the current working mode for )0. "ee followingtable for details about 59 indicatorJ
$1' There are )anual )ode and ATT3. )ode without a !"P0ompass module, no
!" signal status 59 indicator.
-
8/17/2019 Drone 9 April 2015(1)
44/122
-
8/17/2019 Drone 9 April 2015(1)
45/122
1. 0hoose an open space without obstruction, tall buildings and crowds as flying
filed. !lace the aircraft 2 meters away from you and others, to avoid accidental
injury.
. 3f in !" ATT3. )ode, place the aircraft in an open space without buildings or
trees. Take off the aircraft after C or more !" satellites are found $%ed 59 blinks
once or no blinking'. 3f in )anual )ode or ATT3. )ode, you can skip this step.
2. "tart6up
$1' "witch on the transmitter first, then power on multi6rotorS Heep the aircraft
stationary until the system start and self6check has finished.
$' !lease wait for the system to warm up gradually with the 59 blinks Mellow E
times #uickly
$ '. Mou should not start the motors until the blinking disappears.
$2' Heep the aircraft stationary, and e4ecute the 0"0 to start the motors.
$E' %elease the yaw, roll and pitch sticks and keep them at the midpoint, at the same
time raise the throttle stick from the bottom. The motors will stop if you do not
push the throttle stick from the bottom within 2 sec and you will need to re6start the
motors.
$=' Heep raising the throttle stick until all the rotors are working, push the throttle
stick to the midpoint and then take6off your multi6rotor gently, pay attention not to
push the stick e4cessively.
$C' !ay attention to the aircraft movement at any time when flying, and use the
sticks to adjust the aircraft’s position. Heep the yaw, roll, pitch and throttle sticks at
the midpoint to hover the aircraft at the desired height.
-
8/17/2019 Drone 9 April 2015(1)
46/122
E. ower the aircraft slowly. !ull the throttle stick to the bottom and then e4ecute
the 0"0 to stop the motors after landing.
=. !lease always power off the )ulti6rotor first, and then switch off the transmitter
after landing. &M38 8T5" $B5%M 3)!%TA8T' !!!
$1' 3f the warm up waiting is longer than minutes $the E times Mellow blink
continues', please power off for 1( minutes, cold start, and then connect the
assistant software, enter the ?Tools? 6 V 3)D calibration, carry out the Advanced
calibration.
$' 3f you enable the 3mmediately )ode of )otor "topJ you should not pull throttle
stick under 1(W during flight, because it will stop motors. 3f you do it accidentally,
you should push the throttle stick over 1(W in =s to re6start motors.
$2' 9 8T e4ecute the 0"0 during normal flight without any reason, or it will
stop motors at once.
$E' !ay attention to the !" satellite status 59 indicator. Iad !" signal may
lead the aircraft to drift when hovering.
$=' 9 8T fly near to ferromagnetic substances, to avoid strong magnetic
interference with the !".
$C' !lease avoid using !" ATT3. )ode in the areas, where !" signal is most
likely bad.
$>' 3f the 59 flashes #uickly %ed then this indicates battery voltage is low, land
A"A!.
-
8/17/2019 Drone 9 April 2015(1)
47/122
$' 3f the transmitter indicates low6battery alarm, please land A"A!. 3n this
condition the transmitter may cause the aircraft to go out of control or even crash.
$
-
8/17/2019 Drone 9 April 2015(1)
48/122
The Arduino Dno is a microcontroller board based on the ATmega2. 3t has 1Edigital inputPoutput pins $of which C can be used as !;) outputs', C analog inputs,
a 1C )*+ ceramic resonator, a D"I connection, a power jack, an 30"! header, and
a reset button. 3t contains everything needed to support the microcontrollerJ simply
connect it to a computer with a D"I cable or power it with an A06to690 adapter or
battery to get started.
The Dno differs from all preceding boards in that it does not use the &T93 D"I6to6serial driver chip. 3nstead, it features the Atmega1CD $AtmegaD up to ersio%'.
-
8/17/2019 Drone 9 April 2015(1)
49/122
$o2er:
The Arduino Dno can be powered via the D"I connection or with an e4ternal
power supply. The power source is selected automatically.
54ternal $non6D"I' power can come either from an A06to690 adapter $wall6wart'
or battery. The adapter can be connected by plugging a .1mm center6positive plug
into the board7s power jack. eads from a battery can be inserted in the nd and
Bin pin headers of the !;5% connector.
The board can operate on an e4ternal supply of C to ( volts. 3f supplied with less
than >B, however, the =B pin may supply less than five volts and the board may be
unstable. 3f using more than 1B, the voltage regulator may overheat and damage
the board. The recommended range is > to 1 volts.
The po2er pins are as follo2s:
B38. The input voltage to the Arduino board when it7s using an e4ternal power
source $as opposed to = volts from the D"I connection or other regulated power
source'.
Mou can supply voltage through this pin, or, if supplying voltage via the power jack,
access it through this pin.
=B. this pin outputs a regulated =B from the regulator on the board. The board can
be supplied with power either from the 90 power jack $> 6 1B', the D"I
connector $=B', or the B38 pin of the board $>61B'. "upplying voltage via the =B
or 2.2B pins bypasses the regulator, and can damage your board. ;e don7t advise it.
-
8/17/2019 Drone 9 April 2015(1)
50/122
2B2. A 2.2 volt supply generated by the on6board regulator. )a4imum current draw
is =( mA.
89. round pins.
3%5&. This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the 3%5& pin
voltage and select the appropriate power source or enable voltage translators on the
outputs for working with the =B or 2.2B.
np(t an O(tp(t:
5ach of the 1E digital pins on the Dno can be used as an input or output, using pin
)ode$', digital ;rite$', and digital %ead$' functions. They operate at = volts. 5ach
pin can provide or receive a ma4imum of E( mA and has an internal pull6up resistor
$disconnected by default' of (6=( k hms. 3n addition, some pins have speciali+ed
functions:
• "erial: ( $%O' and 1 $TO'. Dsed to receive $%O' and transmit $TO' TT serial
data. These pins are connected to the corresponding pins of
the ATmegaD D"I6to6TT "erial chip.
• 54ternal 3nterrupts: and 2. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value.
• !;): 2, =, C,
-
8/17/2019 Drone 9 April 2015(1)
51/122
• 59: 12. There is a built6in 59 connected to digital pin 12. ;hen the pin is
*3* value, the 59 is on, when the pin is ;, it7s off.
The Dno has C analog inputs, labeled A( through A=, each of which provide 1( bits
of resolution $i.e. 1(E different values'. Iy default they measure from ground to =
volts, though is it possible to change the upper end of their range using the A%5& pin
and the analog %eference $' function. Additionally, some pins have speciali+ed
functionality:
T;3: AE or "9A pin and A= or "0 pin. "upport T;3 communication using
the ;ire library.
There are a co(ple of other pins on the 6oar:
A%5&. %eference voltage for the analog inputs. Dsed with analog %eference $'.
%eset. Iring this line ; to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
"ee also the mapping between Arduino pins and ATmega2 ports. The mapping for
the Atmega, 1C, and 2 is identical.
*omm(nication:
The Arduino Dno has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega2 provides DA%T TT
$=B' serial communication, which is available on digital pins ( $%O' and 1 $TO'.
An ATmega1CD on the board channels this serial communication over D"I and
appears as a virtual com port to software on the computer. The 71CD firmware uses
the standard D"I 0) drivers, and no e4ternal driver is needed. *owever, on
;indows, an .inf file is re#uir ed. The Ar duino software includes a serial monitor
http://arduino.cc/en/Reference/PinModehttp://arduino.cc/en/Reference/DigitalWritehttp://arduino.cc/en/Reference/DigitalReadhttp://arduino.cc/en/Reference/AnalogWritehttp://arduino.cc/en/Reference/AnalogWritehttp://arduino.cc/en/Reference/SPIhttp://arduino.cc/en/Reference/SPIhttp://arduino.cc/en/Reference/PinModehttp://arduino.cc/en/Reference/PinModehttp://arduino.cc/en/Reference/DigitalWritehttp://arduino.cc/en/Reference/DigitalReadhttp://arduino.cc/en/Reference/AnalogWritehttp://arduino.cc/en/Reference/AnalogWritehttp://arduino.cc/en/Reference/SPI
-
8/17/2019 Drone 9 April 2015(1)
52/122
which allows simple te4tual data to be sent to and from the Arduino board. The %O
and TO 59s on the board will flash when data is being transmitted via the D"I6
to6serial chip and D"I connection to the computer $but not for serial
communication on pins ( and 1'.
A "oftware "erial library allows for serial communication on any of the Dno7s
digital pins.
The ATmega2 also supports 30 $T;3' and "!3 communication. The Arduino
software includes a ;ire library to simplify use of the 30 bus.
$rogramming:
The Arduino Dno can be programmed with the Arduino software $download'. "elect
?Arduino Dno from the Tools V Ioard menu $according to the microcontroller on
your board'. &or details, see the reference and tutorials.
The ATmega2 on the Arduino Dno comes preburned with a boot loader that
allows you to upload new code to it without the use of an e4ternal hardware
programmer. 3t communicates using the original "TH=(( protocol.
Mou can also bypass the boot loader and program the microcontroller through the
30"! $3n60ircuit "erial !rogramming' header using Arduino 3"! or similar.
The ATmega1CD $or D in the rev1 and rev boards' firmware source code is
available. The ATmega1CDPD is loaded with a 9&D boot loader, which can be
activated by:
• n %ev1 boards: connecting the solder jumper on the back of the board $near
the map of 3taly' and then resetting the D.
http://arduino.cc/en/Reference/AnalogReferencehttp://arduino.cc/en/Reference/Wirehttp://arduino.cc/en/Reference/AnalogReferencehttp://arduino.cc/en/Reference/Wirehttp://arduino.cc/en/Reference/AnalogReferencehttp://arduino.cc/en/Hacking/PinMapping168http://arduino.cc/en/Guide/Windows#toc4http://arduino.cc/en/Guide/Windows#toc4
-
8/17/2019 Drone 9 April 2015(1)
53/122
-
8/17/2019 Drone 9 April 2015(1)
54/122
The Dno contains a trace that can be cut to disable the auto6reset. The pads on either
side of the trace can be soldered together to re6enable it. 3t7s labeled ?%5"5T658?.
Mou may also be able to disable the auto6reset by connecting a 11( ohm resistor
from =B to the reset line.
9S' O.er c(rrent $rotection:
The Arduino Dno has a resettable polyfuse that protects your computer7s D"I ports
from shorts and overcurrent. Although most computers provide their own internal
protection, the fuse provides an e4tra layer of protection. 3f more than =(( mA is
applied to the D"I port, the fuse will automatically break the connection until the
short or overload is removed.
$hysical *haracteristics:
The ma4imum length and width of the Dno !0I are .> and .1 inches respectively,
with the D"I connector and power jack e4tending beyond the former dimension.
&our screw holes allow the board to be attached to a surface or case. 8ote that the
distance between digital pins > and is 1C( mil $(.1C?', not an even multiple of the
1(( mil spacing of the other pins.
S(mmary:
)icrocontroller ATmega2
perating Boltage =B
3nputBoltage$recommended'
>61B
3nput Boltage $limits' C6(B
9igital 3P !ins 1E $of which C provide !;) output'Analog 3nput !ins C
90 0urrent per 3P !in E( mA
90 0urrent for 2.2B !in =( mA
&lash )emory2 HI $ATmega2' of which (.= HI used by
boot loader
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886http://dfu-programmer.sourceforge.net/http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886http://dfu-programmer.sourceforge.net/
-
8/17/2019 Drone 9 April 2015(1)
55/122
"%A) HI $ATmega2'
55!%) 1 HI $ATmega2'0lock "peed 1C )*+
ength C.C mm;idth =2.E mm
;eight = g
Datasheet:
Special !icrocontroller Feat(res:
6!ower6on %eset and !rogrammable Irown6out 9etection.
3nternal 0alibrated scillator 54ternal and 3nternal 3nterrupt "ources.
"i4 "leep )odes: 3dle, A90 8oise %eduction, !ower6save, !ower6down,
"tandby, and 54tended "tandby.
&O an $ac
-
8/17/2019 Drone 9 April 2015(1)
56/122
-
8/17/2019 Drone 9 April 2015(1)
57/122
-
8/17/2019 Drone 9 April 2015(1)
58/122
-
8/17/2019 Drone 9 April 2015(1)
59/122
Different types of Ar(ino 9no:
1) Ar(ino mini:
The Arduino )ini is a small microcontroller board originally based on
the ATmega1C, but now supplied with the 2. intended for use on breadboards
and when space is at a premium. 3t has 1E digital inputPoutput pins $of which C can
-
8/17/2019 Drone 9 April 2015(1)
60/122
be used as !;) outputs', analog inputs, and a 1C )*+ crystal oscillator. 3t can
be programmed with the D"I "erial adapter or other D"I or %"2 to TT serial
adapter.
S(mmary:
)icrocontroller ATmega2
perating Boltage =B3nput Boltage >6< B
9igital 3P !ins 1E $of which C provide !;) output'
Analog 3nput !ins $of which E are broken out onto pins'
90 0urrent per 3P !in E( mA&lash )emory 2 HI $of which HI used by boot loader'
"%A) HI55!%) 1 HI
0lock "peed 1C )*+ength 2( mm
;idth 1 mm
/)Ar(ino #ano:
-
8/17/2019 Drone 9 April 2015(1)
61/122
The Arduino 8ano is a small, complete, and breadboard6friendly board based on
the ATmega2 $Arduino 8ano 2.4' orATmega1C $Arduino 8ano .4'. 3t has
more or less the same functionality of the Arduino 9uemilanove, but in a different
package. 3t lacks only a 90 power jack, and works with a )ini6I D"I cable
instead of a standard one. The 8ano was designed and is being produced by
ravitech.
Specifications:
)icrocontroller Atmel ATmega1C or ATmega2
perating Boltage
$logic level' = B
3nput Boltage
$recommended'>61 B
3nput Boltage $limits' C6( B9igital 3P !ins 1E $of which C provide !;) output'
Analog 3nput !ins
90 0urrent per 3P!in
E( mA
&lash )emory1C HI $ATmega1C' or 2 HI $ATmega2' of which
HI used by boot loader "%A) 1 HI $ATmega1C' or HI $ATmega2'
55!%) =1 bytes $ATmega1C' or 1 HI $ATmega2'0lock "peed 1C )*+
9imensions (.>2? 4 1.>(?
ength E= mm;idth 1 mm
;eight = g
http://arduino.cc/en/Main/USBSerialhttp://arduino.cc/en/Main/USBSerial
-
8/17/2019 Drone 9 April 2015(1)
62/122
;) Ar(ino Lilly pa:
The ily !ad Arduino "imple is a microcontroller board designed for wearables
and e6te4tiles. 3t can be sewn to fabric and similarly mounted power supplies,
sensors and actuators with conductive thread. Dnlike the ily !ad Arduino )ain
Ioard, the ily !ad "imple has only < pins for inputPoutput. Additionally, it has a
/"T connector and a built in charging circuit for ithium !olymer batteries. The
board is based on the ATmega2.
S(mmary:
)icrocontroller ATmega2
perating Boltage .>6=.= B
3nput Boltage .>6=.= B
9igital 3P !ins < $of which = provide !;) output'Analog 3nput !ins E90 0urrent per 3P !in E( mA
&lash )emory 2 HI $of which HI used by boot loader'
"%A) HI55!%) 1 HI
0lock "peed )*+
-
8/17/2019 Drone 9 April 2015(1)
63/122
@) Ar(ino mega /B?:
The Arduino )ega =C( is a microcontroller board based on the ATmega=C(. 3t
has =E digital inputPoutput pins $of which 1= can be used as !;) outputs', 1C
analog inputs, E DA%Ts $hardware serial ports', a 1C )*+ crystal oscillator, a D"I
connection, a power jack, an 30"! header, and a reset button. 3t contains everything
needed to support the microcontrollerJ simply connect it to a computer with a D"I
http://arduino.cc/en/Main/ArduinoBoardLilyPadhttp://arduino.cc/en/Main/ArduinoBoardLilyPad
-
8/17/2019 Drone 9 April 2015(1)
64/122
cable or power it with a A06to690 adapter or battery to get started. The )ega is
compatible with most shields designed for the Arduino 9uemilanove or 9iecimila.
The )ega =C( is an update to the Arduino )ega, which it replaces.
S(mmary:
)icrocontroller
ATmega=C(
perating Boltage =B
3nput Boltage $recommended' >61B
3nput Boltage $limits' C6(B
9igital 3P !ins =E $of which 1= provide !;) output'
Analog 3nput !ins 1C
90 0urrent per 3P !in E( mA
90 0urrent for 2.2B !in =( mA
&lash )emory =C HI of which HI used by boot loader
"%A) HI
55!%) E HI
0lock "peed 1C )*+
) Ar(ino mega AD=:
-
8/17/2019 Drone 9 April 2015(1)
65/122
The Arduino )5A A9H is a microcontroller board based on
the ATmega=C( $datasheet'. 3t has a D"I host interface to connect with Android
based phones, based on the )AO2E1e 30. 3t has =E digital inputPoutput pins $of
which 1= can be used as !;) outputs', 1C analog inputs, E DA%Ts $hardware
serial ports', a 1C )*+ crystal oscillator, a D"I connection, a power jack, an 30"!
header, and a reset button.
The )5A A9H is based on the )ega =C(.
"imilar to the )ega =C( and Dno, it features an ATmegaD programmed as a
D"I6to6serial converter.
http://arduino.cc/en/Main/ArduinoBoardMega
-
8/17/2019 Drone 9 April 2015(1)
66/122
S(mmary:
)icrocontroller ATmega=C(perating Boltage =B
3nput Boltage $recommended' >61B3nput Boltage $limits' C6(B9igital 3P !ins =E $of which 1= provide !;) output'
Analog 3nput !ins 1C
90 0urrent per 3P !in E( mA90 0urrent for 2.2B !in =( mA
&lash )emory =C HI of which HI used by boot loader
"%A) HI55!%) E HI
0lock "peed 1C )*+D"I *ost 0hip )AO2E15
$in Descriptions for AT mega ;/C:
Bcc
9igital supply voltage
89
round.
!ort I $!I>:('
!ort I is an 6bit bi6directional 3P port with internal pull6up resistors $selected for
each bit'. The !ort I output buffers have symmetrical drive characteristics with
both high sink and source capa bility. As in puts, !ort I pins that are e4ternally
pulled low will source current if the pull6up resistors are activated. The !ort I pins
are tristated when a reset condition becomes active, even if the clock is not running.
http://arduino.cc/en/Main/ArduinoBoardMega2560http://www.atmel.com/dyn/resources/prod_documents/doc2549.PDFhttp://arduino.cc/en/Main/ArduinoBoardMega2560
-
8/17/2019 Drone 9 April 2015(1)
67/122
9epending on the clock selection fuse settings, !IC can be used as input to the
inverting scillator amplifier and input to the internal clock operating circuit.
9epending on the clock selection fuse settings, !I> can be used as output from the
inverting scillator amplifier. 3f the 3nternal 0alibrated %0 scillator is used as
chip clock source, !I>...C is used as T"0...1 input for the Asynchronous
TimerP0ounter if the A" bit in A""% is set.
$ort * $*:?):
!ort 0 is a >6bit bi6directional 3P port with internal pull6up resistors $selected for
each bit'. The !0=...( output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, !ort 0 pins that are e4ternally
pulled low will source current if the pull6up resistors are activated. The !ort 0 pins
are tristated when a reset condition becomes active, even if the clock is not running.
$*B&R"S"T:
3f the %"T93"I &use is programmed, !0C is used as an 3P pin. 8ote that the
electrical characteristics of !0C differ from those of the other pins of !ort 0. 3f the
%"T93"I &use is un programmed, !0C is used as a %eset input. A low level on
this pin for longer than the minimum pulse length will generate a %eset, even if the
clock is not running.
$ort D $DE:?):
!ort 9 is an 6bit bi6directional 3P port with internal pull6up resistors $selected for
each bit'. The !ort 9 output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, !ort 9 pins that are e4ternally
-
8/17/2019 Drone 9 April 2015(1)
68/122
pulled low will source current if the pull6up resistors are activated. The !ort 9 pins
are tristated when a reset condition becomes active, even if the clock is not running.
AV**:
AB00 is the supply voltage pin for the AP9 0onverter, !02:(, and A90>:C. 3t
should be e4ternally connected to B00, even if the A90 is not used. 3f the A90 is
used, it should be connected to B00 through a low6pass filter. 8ote that !0C...E
use digital supply voltage, B00.
AR"F
A%5& is the analog reference pin for the AP9 0onverter.
AD*E:B
3n the TK&! and K&8P)& package, A90>:C serve as analog inputs to the AP9
converter. These pins are powered from the analog supply and serve as 1(6bit A90
channels.
The alternate pin config(ration is as follo2s:
$ORT ':
\ A381P0IP!038T2 N !ort 9, Iit >
A381, Analog 0omparator 8egative 3nput. 0onfigure the port pin as input with the
internal pull6up switched off to avoid the digital port function from interfering with
the function of the Analog 0omparator. !038T2: !in 0hange 3nterrupt source 2.
The !9> pin can serve as an e4ternal interrupt source.
-
8/17/2019 Drone 9 April 2015(1)
69/122
\ A38(P0(AP!038T N !ort 9, Iit C
A38(, Analog 0omparator !ositive 3nput. 0onfigure the port pin as input with the
internal pull6up switched off to avoid the digital port function from interfering with
the function of the Analog 0omparator. 0(A, utput 0ompare )atch output: The
!9C pin can serve as an e4ternal output for the TimerP0ounter( 0ompare )atch A.
The !9C pin has to be configured as an output $999C set $one'' to serve this
function. The 0(A pin is also the output pin for the !;) mode timer function.
!038T: !in 0hange 3nterrupt source . The !9C pin can serve as an e4ternal
interrupt source.
T1P0(IP!038T1 N !ort 9, Iit =
T1, TimerP0ounter1 counter source.
0(I, utput 0ompare )atch output: The !9= pin can serve as an e4ternal output
for the TimerP0ounter( 0ompare )atch I. The !9= pin has to be configured as an
output $999= set $one'' to serve this function. The 0(I pin is also the output pin
for the !;) mode timer function.
$*#T/1: !in 0hange 3nterrupt source 1. The !9= pin can serve as an e4ternal
interrupt source.
\ O0HPT(P!038T( N !ort 9, Iit E
O0H, D"A%T e4ternal clock.
-
8/17/2019 Drone 9 April 2015(1)
70/122
T(, TimerP0ounter( counter source. !038T(: !in 0hange 3nterrupt source (.
The !9E pin can serve as an e4ternal interrupt source.
\ 38T1P0IP!038T1< N !ort 9, Iit 2
#T1 "3ternal nterr(pt so(rce 1: The !92 pin can serve as an e4ternal
interrupt source.
0I, utput 0ompare )atch output: The !92 pin can serve as an e4ternal output
for the TimerP0ounter( 0ompare )atch I. The !92 pin has to be configured as an
output $9992 set $one'' to serve this function. The 0I pin is also the output pin
for the !;) mode timer function.
$*#T1%: !in 0hange 3nterrupt source 1 N !ort 9, Iit 1
TO9, Transmit 9ata $9ata output pin for the D"A%T'. ;hen the D"A%TTransmitter is enabled, this pin is configured as an output regardless of the value of
9991.
!038T1>: !in 0hange 3nterrupt source 1>. The !91 pin can serve as an e4ternal
interrupt source.
-
8/17/2019 Drone 9 April 2015(1)
71/122
\ %O9P!038T1C N !ort 9, Iit (
%O9, %eceive 9ata $9ata input pin for the D"A%T'. ;hen the D"A%T %eceiver is
enabled this pin is configured as an input regardless of the value of 999(.
;hen the D"A%T forces this pin to be an input, the pull6up can still be controlled
by the !%T9( bit.
!038T1C: !in 0hange 3nterrupt source 1C. The !9( pin can serve as an e4ternal
interrupt source.
$ORT *:
\ %5"5TP!038T1E N !ort 0, Iit C
R"S"T Reset pin: ;hen the %"T93"I &use is programmed, this pin functions
as a normal 3P pin, and the part will have to rely on !ower6on %eset and Irown6
out %eset as its reset sources.
;hen the %"T93"I &use is un programmed, the reset circuitry is connected to
the pin, and the pin cannot be used as an 3P pin. 3f !0C is used as a reset pin,
990C, !%T0C and !380C will all read (.
$*#T1@: !in 0hange 3nterrupt source 1E. The !0C pin can serve as an e4ternal
interrupt source.
\ S*L&AD*&$*#T1; G $ort * 'it S*L /-2ire Serial nterface *loc
-
8/17/2019 Drone 9 April 2015(1)
72/122
limitation. !0= can also be used as A90 input 0hannel =. 8ote that A90 input
channel = uses digital power.
$*#T1;: !in 0hange 3nterrupt source 12. The !0= pin can serve as an e4ternal
interrupt source.
SDA&AD*@&$*#T1/ G $ort * 'it @ SDA /-2ire Serial nterface Data:
;hen the T;58 bit in T;0% is set $one' to enable the 6wire "erial 3nterface, pin
!0E is disconnected from the port and becomes the "erial 9ata 3P pin for the 6
wire "erial 3nterface. 3n this mode, there is a spike filter on the pin to suppress
spikes shorter than =( ns on the input signal, and the pin is driven by an open drain
driver with slew6rate limitation. !0E can also be used as A90 input 0hannel E.
8ote that A90 input channel E uses digital power.
$*#T1/: !in 0hange 3nterrupt source 1. The !0E pin can serve as an e4ternal
interrupt source.
\ A902P!038T11 N !ort 0, Iit 2 !02 can also be used as A90 input 0hannel 2.
8ote that A90 input channel 2 uses analog power.
$*#T11: !in 0hange 3nterrupt source 11. The !02 pin can serve as an e4ternal
interrupt source.
\ A90P!038T1( N !ort 0, Iit !0 can also be used as A90 input 0hannel .
8ote that A90 input channel uses analog power. !038T1(: !in 0hange 3nterrupt
source 1(. The !0 pin can serve as an e4ternal interrupt source.
\ A901P!038T< N !ort 0, Iit 1 !01 can also be used as A90 input 0hannel 1.
8ote that A90 input channel 1 uses analog power. !038T
-
8/17/2019 Drone 9 April 2015(1)
73/122
\ A90(P!038T N !ort 0, Iit ( !0( can also be used as A90 input 0hannel (.
8ote that A90 input channel ( uses analog power. !038T: !in 0hange 3nterrupt
source . The !0( pin can serve as an e4ternal interrupt source
$ORT D:
\ A381P0IP!038T2 N !ort 9, Iit > A381, Analog 0omparator 8egative 3nput.
0onfigure the port pin as input with the internal pull6up switched off to avoid the
digital port function from interfering with the function of the Analog 0omparator.
$*#T/;: !in 0hange 3nterrupt source 2. The !9> pin can serve as an e4ternal
interrupt source.
\ A38(P0(AP!038T N !ort 9, Iit C A38(, Analog 0omparator !ositive 3nput.
0onfigure the port pin as input with the internal pull6up switched off to avoid the
digital port function from interfering with the function of the Analog 0omparator.
0(A, utput 0ompare )atch output:
The !9C pin can serve as an e4ternal output for the TimerP0ounter( 0ompare
)atch A. The !9C pin has to be configured as an output $999C set $one'' to serve
this function. The 0(A pin is also the output pin for the !;) mode timer
function.
$*#T//: !in 0hange 3nterrupt source . The !9C pin can serve as an e4ternal
interrupt source.
\ T1P0(IP!038T1 N !ort 9, Iit = T1, TimerP0ounter1 counter source. 0(I,
utput 0ompare )atch output: The !9= pin can serve as an e4ternal output for the
TimerP0ounter( 0ompare )atch I.
The !9= pin has to be configured as an output $999= set $one'' to serve this
function. The 0(I pin is also the output pin for the !;) mode timer function.
-
8/17/2019 Drone 9 April 2015(1)
74/122
!038T1: !in 0hange 3nterrupt source 1. The !9= pin can serve as an e4ternal
interrupt source.
\ O0HPT(P!038T( N !ort 9, Iit E O0H, D"A%T e4ternal clock. T(,
TimerP0ounter( counter source.
!038T(: !in 0hange 3nterrupt source (. The !9E pin can serve as an e4ternal
interrupt source.
\ 38T1P0IP!038T1< N !ort 9, Iit 2 38T1, 54ternal 3nterrupt source 1: The
!92 pin can serve as an e4ternal interrupt source. 0I, utput 0ompare )atch
output:
The !92 pin can serve as an e4ternal output for the TimerP0ounter( 0ompare
)atch I. The !92 pin has to be configured as an output $9992 set $one'' to serve
this function. The 0I pin is also the output pin for the !;) mode timer
function.
$*#T1%: !in 0hange 3nterrupt source 1 N !ort 9, Iit 1 TO9, Transmit 9ata $9ata output pin for the
D"A%T'. ;hen the D"A%T Transmitter is enabled, this pin is configured as an
output regardless of the value of 9991.
$*#T1E: !in 0hange 3nterrupt source 1>. The !91 pin can serve as an e4ternal
interrupt source.
-
8/17/2019 Drone 9 April 2015(1)
75/122
-
8/17/2019 Drone 9 April 2015(1)
76/122
or hardware reset. 3n !ower6save mode, the asynchronous timer continues to run,
allowing the user to maintain a timer base while the rest of the device is sleeping.
The A90 8oise %eduction mode stops the 0!D and all 3P modules e4cept
asynchronous timer and A90, to minimi+e switching noise during A90
conversions. 3n "tandby mode, the crystalPresonator scillator is running while the
rest of the device is sleeping. This allows very fast start6up combined with low
power consumption. Atmel offers the KTouch library for embedding capacitive
touch buttons, sliders and wheels functionality into AB% microcontrollers.
The patented charge6transfer signal ac#uisition offers robust sensing and includes
fully debounced reporting of touch keys and includes Adjacent Hey "uppression
$AH"' technology for unambiguous detection of key events. The easy6to6use
KTouch "uite tool chain allows you to e4plore, develop and debug your own touch
applications. The device is manufactured using Atmel’s high density non6volatile
memory technology. The n6chip 3"! &lash allows the program memory to be
reprogrammed 3n6"ystem through an "!3 serial interface, by a conventional non6
volatile memory programmer, or by an n6chip Ioot program running on the AB%
core. The Ioot program can use any interface to download the application program
in the Application &lash memory. "oftware in the Ioot &lash section will continue
to run while the Application &lash section is updated, providing true %ead ;hile6
;rite operation.
Iy combining an 6bit %3"0 0!D with 3n6"ystem "elf6!rogrammable &lash on a
monolithic chip, the Atmel ATmegaEAP!APAP!AP1CAP!AP2P! is a powerful
microcontroller that provides a highly fle4ible and cost effective solution to many
embedded control applications.
-
8/17/2019 Drone 9 April 2015(1)
77/122
The ATmegaEAP!APAP!AP1CAP!AP2P! AB% is supported with a full suite of
program and system development tools including: 0 0ompilers, )acro Assembles,
and !rogram 9ebuggerP"imulators.
*omparison 6et2een $rocessors:
The ATmegaEAP!APAP!AP1CAP!AP2P! differ only in memory si+es, boot
loader support, and interrupt vector si+es.
9evice &lash 55!%) %A) memory si+es ATmegaEA 6EHIytes =CIytes
=1Iytes
ATmegaE!A6 EHIytes =CIytes =1Iytes
ATmegaA HIytes =1Iytes 1HIytes
ATmega!A HIytes =1Iytes 1HIytes
ATmega1CA 1CHIytes =1Iytes 1Hbytes
ATmega1C!A 1CHIytes =1Iytes 1Hbytes
ATmega2 2HIytes 1HIytes Hbytes
ATmega2! 2HIytes 1HIytes HIytes
ATmegaEAP!APAP!AP1CAP!AP2P! support a real %ead6;hile6;rite "elf6
!rogramming mechanism. There is a separate Ioot oader "ection, and the "!)
instruction can only e4ecute from there. 3n AT mega EAPE!A there is no %ead6
;hile6;rite support and no separate Ioot oader "ection. The "!) instruction can
e4ecute from the entire &lash.
-
8/17/2019 Drone 9 April 2015(1)
78/122
AVR *$9 *ore:
O.er.ie2:
The AB% core architecture in general. The main function of the 0!D core is to
ensure correct program e4ecution. The 0!D must therefore be able to access
memories, perform calculations, control peripherals, and handle interrupts.
3n order to ma4imi+e performance and parallelism, the AB% uses a *arvard
architecture N with separate memories and buses for program and data. 3nstructions
in the program memory are e4ecuted with a single level pipelining. ;hile one
instruction is being e4ecuted, the ne4t instruction is pre6fetched from the program
memory.
This concept enables instructions to be e4ecuted in every clock cycle. The program
memory is 3n6"ystem %eprogrammable &lash memory.
The fast6access %egister &ile contains 2 4 6bit general purpose working registers
with a single clock cycle access time. This allows single6cycle Arithmetic ogic
Dnit $AD' operation. 3n a typical AD operation, two operands are output from
the %egister &ile, the operation is e4ecuted, and the result is stored back in the
%egister &ile N in one clock cycle. "i4 of the 2 registers can be used as three 1C6bit
indirect address register pointers for 9ata "pace addressing N enabling efficient
address calculations.
ne of the address pointers can also be used as an address pointer for look up
tables in &lash program memory. These added function registers are the 1C6bit O6,
M6, and @ register, described later in this section. The AD supports arithmetic and
logic operations between registers or between a constant and a register. "ingle
register operations can also be e4ecuted in the AD. After an arithmetic operation,
the "tatus %egister is updated to reflect information about the result of the
-
8/17/2019 Drone 9 April 2015(1)
79/122
operation. !rogram flow is provided by conditional and unconditional jump and
call instructions, able to directly address the whole address space. )ost AB%
instructions have a single 1C6bit word format. 5very program memory address
contains a 1C6 or 26bit instruction. !rogram &lash memory space is divided in two
sections, the Ioot !rogram section and the Application !rogram section. Ioth
sections have dedicated ock bits for write and readPwrite protection. The "!)
instruction that writes into the Application &lash memory section must reside in the
Ioot !rogram section. 9uring interrupts and subroutine calls, the return address
!rogram 0ounter $!0' is stored on the "tack. The "tack is effectively allocated in
the general data "%A), and conse#uently the "tack si+e is only limited by the total
"%A) si+e and the usage of the "%A). All user programs must initiali+e the "! in
the %eset routine $before subroutines or interrupts are e4ecuted'. The "tack !ointer
$"!' is readPwrite accessible in the 3P space. The data "%A) can easily be
accessed through the five different addressing modes supported in the AB%
architecture. The memory spaces in the AB% architecture are all linear and regular
memory maps. A fle4ible interrupt module has its control registers in the 3P space
with an additional lobal 3nterrupt 5nable bit in the "tatus %egister. All interrupts
have a separate 3nterrupt Bector in the 3nterrupt Bector table. The interrupts have
priority in accordance with their 3nterrupt Bector position. The lower the 3nterrupt
Bector address, the higher the priority. The 3P memory space contains CE
addresses for 0!D peripheral functions as 0ontrol %egisters, "!3, and other 3P
functions.
AL9 G Arithmetic Logic 9nit:
The high6performance AB% AD operates in direct connection with all the 2
general purpose working registers. ;ithin a single clock cycle, arithmetic
operations between general purpose registers or between a register and an
-
8/17/2019 Drone 9 April 2015(1)
80/122
immediate are e4ecuted. The AD operations are divided into three main categories
N arithmetic, logical, and bit6functions. "ome implementations of the architecture
also provide a powerful multiplier supporting both signedPunsigned multiplication
and fractional format. "ee the F3nstruction "etG section for a detailed description.
Stat(s Register:
The "tatus %egister contains information about the result of the most recently
e4ecuted arithmetic instruction. This information can be used for altering program
flow in order to perform conditional operations. 8ote that the "tatus %egister is
updated after all AD operations, as specified in the 3nstruction "et %eference.
This will in many cases remove the need for using the dedicated compare
instructions, resulting in faster and more compact code. The "tatus %egister is not
automatically stored when entering an interrupt routine and restored when returning
from an interrupt. This must be handled by software.
SR"5
N AB% "tatus %egister
The AB% "tatus %egister N "%5 N is defined as:
\ 'it E G : lobal 3nterrupt 5nable the lobal 3nterrupt 5nable bit must be set for
the interrupts to be enabled. The individual interrupt enable control is then
performed in separate control registers. 3f the lobal 3nterrupt 5nable %egister is
cleared, none of the interrupts are enabled independent of the individual interrupt
enable settings. The 36bit is cleared by hardware after an interrupt has occurred, and
is set by the %5T3 instruction to enable subse#uent interrupts. The 36bit can also be
set and cleared by the application with the "53 and 03 instructions, as described in
the instruction set reference.
-
8/17/2019 Drone 9 April 2015(1)
81/122
'it B G T: Iit 0opy "torage the Iit 0opy instructions I9 $Iit oad' and I"T
$Iit "tore' use the T6bit as source or destination for the operated bit. A bit from a
register in the %egister &ile can be copied into T by the I"T instruction, and a bit in
T can be copied into a bit in a register in the %egister &ile by the I9 instruction.
'it G H: *alf 0arry &lag the *alf 0arry &lag * indicates a *alf 0arry in some
arithmetic operations. *alf 0arry is useful in I09 arithmetic. "ee the F3nstruction
"et 9escriptionG for detailed information.
'it @ G S: "ign Iit, " X 8 ⊕ B The "6bit is always an e4clusive or between the
8egative &lag 8 and the Two’s 0omplement verflow &lag B. "ee the F3nstruction
"et 9escriptionG for detailed information.
'it ; G V: Two’s 0omplement verflow &lag the Two’s 0omplement verflow
&lag B supports two’s complement arithmetic. "ee the F3nstruction "et
9escriptionG for detailed information.
'it / G #: 8egative &lag the 8egative &lag 8 indicates a negative result in an
arithmetic or logic operation. "ee the F3nstruction "et 9escriptionG for detailedinformation.
'it 1 G ,: @ero &lag the @ero &lag @ indicates a +ero result in an arithmetic or
logic operation. "ee the F3nstruction "et 9escriptionG for detailed information.
'it ? G *: 0arry &lag the 0arry &lag 0 indicates a carry in an arithmetic or logic
operation.
5eneral $(rpose Register File:
-
8/17/2019 Drone 9 April 2015(1)
82/122
The %egister &ile is optimi+ed for the AB% 5nhanced %3"0 instruction set. 3n order
to achieve the re#uired performance and fle4ibility, the following inputPoutput
schemes are supported by the %egister &ile:
ne 6bit output operand and one 6bit result input.
Two 6bit output operands and one 6bit result input.
Two 6bit output operands and one 1C6bit result input.
ne 1C6bit output operand and one 1C6bit result input.
AVR !emories:
O.er.ie2:
This section describes the different memories in the
ATmegaEAP!APAP!AP1CAP!AP2P!. The AB% architecture has two main
memory spaces, the 9ata )emory and the !rogram )emory space. 3n addition, the
ATmegaEAP!APAP!AP1CAP!AP2P! features an 55!%) )emory for data
storage. All three memory spaces are linear and regular.
3n6"ystem %eprogrammable &lash !rogram )emory .
The ATmegaEAP!APAP!AP1CAP!AP2P! contains EPP1CP2Hbytes n6chip
3n6"ystem %eprogrammable &lash memory for program storage. "ince all AB%
instructions are 1C or 2 bits wide, the &lash is organi+ed as PEPP1CH 4 1C. &or
software security, the &lash !rogram memory space is divided into two sections,
Ioot oader "ection and Application !rogram "ection in ATmega!A and
ATmega1C!A.
SRA! Data !emory:
-
8/17/2019 Drone 9 April 2015(1)
83/122
The ATmegaEAP!APAP!AP1CAP!AP2P! is a comple4 microcontroller with
more peripheral units than can be supported within the CE locations reserved in the
pcode for the 38 and DT instructions. &or the 54tended 3P space from (4C( 6
(4&& in "%A), only the "TP"T"P"T9 and 9P9"P99 instructions can be used.
The lower >CP1(P1(P2(2 data memory locations address both the %egister
&ile, the 3P memory, 54tended 3P memory, and the internal data "%A). The first
2 locations address the %egister &ile, the ne4t CE location the standard 3P
memory, then 1C( locations of 54tended 3P memory, and the ne4t
=1P1(EP1(EP(E locations address the internal data "%A).
The five different addressing modes for the data memory cover: 9irect, 3ndirect
with 9isplacement, 3ndirect, 3ndirect with !re6decrement, and 3ndirect with !ost6
increment. 3n the %egister &ile, registers %C to %21 feature the indirect addressing
pointer registers.
The direct addressing reaches the entire data space. The 3ndirect with 9isplacement
mode reaches C2 address locations from the base address given by the M6 or @
register. ;hen using register indirect addressing modes with automatic pre6
decrement and post6increment, the address registers O, M, and @ are decremented or
incremented.
The 2 general purpose working registers, CE 3P %egisters, 1C( 54tended 3P
%egisters, and the =1P1(EP1(EP(E bytes of internal data "%A) in the
ATmegaEAP!APAP!AP1CAP!AP2P! are all accessible through all these
addressing modes.
""$RO! Data !emory:
-
8/17/2019 Drone 9 April 2015(1)
84/122
The ATmegaEAP!APAP!AP1CAP!AP2P! contains =CP=1P=1P1Hbytes of
data 55!%) memory. 3t is organi+ed as a separate data space, in which single
bytes can be read and written. The 55!%) has an endurance of at least 1((,(((
writePerase cycles. The access between the 55!%) and the 0!D is described in
the following, specifying the 55!%) Address %egisters, the 55!%) 9ata
%egister, and the 55!%) 0ontrol %egister.
""$RO! Rea&Write Access
The 55!%) Access %egisters are accessible in the 3P space
A self6timing function, however, lets the user software detect when the ne4t byte
can be written. 3f the user code contains instructions that write the 55!%), some
precautions must be taken. 3n heavily filtered power supplies, B00 is likely to rise
or fall slowly on power upPdown. This causes the device for some period of time to
run at a voltage lower than specified as minimum for the clock fre#uency used.
;hen the 55!%) is read, the 0!D is halted for four clock cycles before the ne4t
instruction is e4ecuted. ;hen the 55!%) is written, the 0!D is halted for two
clock cycles before the ne4t instruction is e4ecuted.
$re.enting ""$RO! *orr(ption:
9uring periods of low B00, the 55!%) data can be corrupted because the
supply voltage is too low for the 0!D and the 55!%) to operate properly. These
issues are the same as for board level systems using 55!%), and the same
design solutions should be applied. An 55!%) data corruption can be caused by
two situations when the voltage is too low. &irst, a regular write se#uence to the
55!%) re#uires a minimum voltage to operate correctly. "econdly, the 0!D
itself can e4ecute instructions incorrectly, if the supply voltage is too low.
-
8/17/2019 Drone 9 April 2015(1)
85/122
55!%) data corruption can easily be avoided by following this design
recommendation: Heep the AB% %5"5T active $low' during periods of insufficient
power supply voltage. This can be done by enabling the internal Irown6out
9etector $I9'. 3f the detection level of the internal I9 does not match the
needed detection level, an e4ternal low B00 reset !rotection circuit can be used.
3f a reset occurs while a write operation is in progress, the write operation will be
completed provided that the power supply voltage is sufficient.
&O !emory:
All ATmegaEAP!APAP!AP1CAP!AP2P! 3Ps and peripherals are placed in the
3P space. All 3P locations may be accessed by the 9P9"P99 and
"TP"T"P"T9 instructions, transferring data between the 2 general purpose
working registers and the 3P space.
3P %egisters within the address range (4(( 6 (41& are directly bit accessible using
the "I3 and 0I3 instructions. 3n these registers, the value of single bits can be
checked by using the "I3" and "I30 instructions. %efer to the instruction set
section for more details. ;hen using the 3P specific commands 38 and DT, the
3P addresses (4(( 6 (42& must be used.
;hen addressing 3P %egisters as data space using 9 and "T instructions, (4(
must be added to these addresses. The ATmegaEAP!APAP!AP1CAP!AP2P! is
a comple4 microcontroller with more peripheral units than can be supported within
the CE location reserved in pcode for the 38 and DT instructions. &or the
54tended 3P space from (4C( 6 (4&& in "%A), only the "TP"T"P"T9 and
9P9"P99 instructions can be used.
&or compatibility with future devices, reserved bits should be written to +ero if
accessed. %eserved 3P memory addresses should never be written. "ome of the
-
8/17/2019 Drone 9 April 2015(1)
86/122
"tatus &lags are cleared by writing a logical one to them. 8ote that, unlike most
other AB%s, the 0I3 and "I3 instructions will only operate on the specified bit, and
can therefore be used on registers containing such "tatus &lags.
5eneral $(rpose &O Registers:
The ATmegaEAP!APAP!AP1CAP!AP2P! contains three eneral !urpose 3P
%egisters. These registers can be used for storing any information, and they are
particularly useful for storing global variables and "tatus &lags. eneral !urpose
3P %egisters within the address range (4(( 6 (41& are directly bit6accessible using
the "I3, 0I3, "I3", and "I30 instructions.
This !rogram is written in Arduino to calculate Temperature, *umidity and ight
values.
*oe:
]include Yi#uid0rystal.hV PPheader file to display 09 values
]include Y;string.hV PPused to create an empty string value
]include Ystring.hV
const int 38!DT1 X1(J PPused in Arduino for recording the input
const int 38!DT X11J
const int groundpin1 X 1J PPinitiating the values of ground pin and power pin
const int powerpin X 1
-
8/17/2019 Drone 9 April 2015(1)
87/122
const int groundpin X 11J
const int powerpin2X 1(J
i#uid0rystal lcd$,
-
8/17/2019 Drone 9 April 2015(1)
88/122
lcd.begin$1C, 'J
pin)ode$groundpin, DT!DT'J PPdefining the output for ground pin
pin)ode$powerpin, DT!DT'J PPdefining the output for power pin
pin)ode$groundpin1, DT!DT'J
pin)ode$powerpin, DT!DT'J
pin)ode$groundpin, DT!DT'J
pin)ode$powerpin2, DT!DT'J
pin)ode$38!DT1, DT!DT'J PPdefining the output values for the input1
pin)ode$38!DT, DT!DT'J PPdefining the output values for the input
digital;rite$groundpin, ;'J PPspecifies the output for powerpin and ground pin
digital;rite$powerpin, *3*'J PPpowerpin is always high
digital;rite$groundpin, ;'J PPgroundpin is always low
digital;rite$powerpin2, *3*'J
digital;rite$groundpin1, ;'J
digital;rite$powerpin, *3*'J
lcd.clear$'J PPrefreshes the 09
lcd.set0ursor$(,('J PPsets the cursor to (
lcd.print$?58B3%8)58T )83T%38?'J PPprints 58B3%8)58T
)83T%38
-
8/17/2019 Drone 9 April 2015(1)
89/122
lcd.set0ursor$(,1'J PPsets the cursor to the ne4t line
lcd.print$? "M"T5) ?'J PPprints "M"T5) in the ne4t line
delay$((('J PPdelays ms
`
void loop$'
_
int valJ
int value X analog%ead$in!in'J PPreads the analog values
lcd.set0ursor$(, 1'J
float millivolts X $value P 1(E.(' =(((J PPconverting raw values of humidty to
millivolts
float celsius X millivolts P1(J PPcalculating temperature
tXcelsiusJ PPtemperature is calculated in 0elsius
valb X analog%ead$put!in'J PP humidity calculation
prehum X $valbP='J
humconst X $(.1CP(.((C'J
humi X prehum 6 humconstJ
pretruehum X 1.(=EC6pretruehumconstJ
truehum X humiPpretruehum J PPfinal humidity value
-
8/17/2019 Drone 9 April 2015(1)
90/122
delay$1((('J PPdelays 1ms
lcd.clear$'J PPrefreshes the lcd
lcd.set0ursor$(,('J
lcd.print$?Temperature is?'J PPprints Temperature is
lcd.set0ursor$(,1'J
lcd.print$celsius'J PPprints temperature value in 0elsius
delay$((('J PPdelays ms
lcd.clear$'J PPclears the lcd
lcd.print $?*umidity: ?'J PPprints *umidity:
lcd.print $humi'J
delay$((('J PPdelays ms
lcd.clear$'J PPclears the 09
lcd.print $?3*T:?'J PPprints 3*T:
ldr^value X analog%ead$ldr'J PPreads the 9% values
lcd.print $ldr^value'J
ldr^valueXldr^valueP1(J PPcalculating the light values
delay$((('J PPdelays ms
"erial.println$?weather monitoring usg @igIee?'J PPprints weather monitoring using
@igIee
-
8/17/2019 Drone 9 April 2015(1)
91/122
"erial.print$?T5)!:?'J PPprints T5)!:
"erial.println$celsius'J PPcalculating Temperature
delay$1(('J PPdelays 1s
"erial.print$?*D)393TM:?'J PPprints *D)393TM:
delay$1(('J PPprints 1s
"erial.print$?3*T:?'J PPprints 3*T:
"erial.println$ldr^value'J PPprints the 9% values to serial monitor
delay$(('J PPdelays s
`
Description:
3n this project we are using 2 sensors,
1. Temperature "ensor
. 9% sensor
2. *umidity "ensor
&irst, we are converting Analog readings to digital readings, to monitor the values
in !0. These values will be read through A(6AE. Transmitter TO and %eceiver %O
are used to transmit and receive the data. The converted data is sent through@igIee through air as a medium. @igIee has only pins, transmitter and receiver.
The second @igIee which is in the receiver part is connected to the !0.
-
8/17/2019 Drone 9 April 2015(1)
92/122
;e have three standard library files in the program. li#uid crystal, a header file
which includes crystal display for controlling 09 values. 09 has parallel
interface. 3n order to communicate with 09, we use this header file.
w.string is used to display combination values. Bariable names can be added and
can be displayed it together.
0onstant integer, we are e#uating some values, these pins are used in Arduino for
recording input. These values are stored in Arduino digital pins. ;e drive 09
through these values.
There are E output pins, which are encoded and converted into one single value and
sends it to transmitter.
The loop is used to repeat the code for every sec. Analog read is used to assign
values to the analog input. ;e are converting pins to Arduino in analog form.
Temperature sensor is an analog value is feed to Arduino. &loat has raw values
initially, by using some calculation we are converting it into digital values to be
displayed on 09. Temperature is converted into 0elsius.
3n a delay of 1sec, temperature, humidity and light values will be used. Balues from
sensors are stored in temperature, humidity and light and it will be displayed in
09.
The code is then dumped into the micro controller to read the environment sensor
values displayed on 09.
Iincl(eJliK(i crystal+h
i#uid0rystal 6 ?*ello ;orldS?
The i#uid0rystal library allows you to control 09 displays that are compatible
with the *itachi *9EE>( driver. There are many of them out there, and you can
-
8/17/2019 Drone 9 April 2015(1)
93/122
usually tell them by the 1C6pin interface.
This e4ample sketch prints ?*ello ;orldS? to the 09 and shows the time in
seconds since the Arduino was reset
The 09s have a parallel interface, meaning that the microcontroller has to
manipulate several interface pins at once to control the display. The interface
consists of the following pins:
A register select $%"' pin that controls where in the 097s memory you7re writing
data to. Mou can select either the data register, which holds what goes on the screen,
or an instruction register, which is where the 097s controller looks for instructions
on what to do ne4t.
A %eadP;rite $%P;' pin that selects reading mode or writing mode.
An 5nable pin that enables writing to the registers.
data pins $9( 69>'. The states of these pins $high or low' are the bits that you7re
writing to a register when you write, or the values you7re reading when you read.
There7s also a display contrast pin $Bo', power supply pins $Q=B and nd' and
59 Iacklight $IkltQ and IHlt6' pins that you can use to power the 09, control
the display contrast, and turn on and off the 59 backlight, respectively.
The process of controlling the display involves putting the data that form the image
of what you want to display into the data registers, then putting instructions in the
instruction register. The i#uid0rystal ibrary simplifies this for you so you don7t
need to know the low6level instructions.
The *itachi6compatible 09s can be controlled in two modes: E6bit or 6bit. The
E6bit mode re#uires seven 3P pins from the Arduino, while the 6bit mode re#uires
11 pins. &or displaying te4t on the screen, you can do most everything in E6bit
-
8/17/2019 Drone 9 April 2015(1)
94/122
-
8/17/2019 Drone 9 April 2015(1)
95/122
-
8/17/2019 Drone 9 April 2015(1)
96/122
Fast *onnection:
i#uid0rystal&ast can use the %P; pin for faster access. 5ither way can update the
display faster than a human eye can detect, but if your project needs to do other
work, less time updating the display may be worth using a seventh pin.
arge E4E( 0onnection
i#uid0rystal&ast can also access large E4E( displays, which have two enable pins.
9isplay using slow C signal connection
'asic 9sage
i#uid0rystal lcd$%", 5nable, 9E, 9=, 9C, 9>'
0reate the i#uid0rystal object and specify the C pins where the 09 is connected.
Mou can connect more than one display $each to its own pins' and create a separate
i#uid0rystal objects for each.
lcd.begin$width, height'J
3nitiali+e the display and set the si+e.
lcd.print$anything'J
!rint a number or te4t. This works the same as "erial.print$', but prints to the 09.
lcd.set0ursor$4, y'J
)ove the cursor to