The document discusses the history of baby incubators and neonatal intensive care units (NICUs), from the early developments in the late 19th century to the modern NICU. It covers pioneers like Budin, Tarnier, and Couney who helped develop incubator technology and special care methods. Major developments included realizing the importance of temperature regulation, oxygen, and infection control in the 1950s-1970s, as well as increasing family involvement in neonatal care starting in the 1970s.
2. [BabyIncubator]
[Abstract]
Abstract
The preterm infant care is one of the most important, delegate and sensitive area in
the Bio-medical field. Some newborns are at a higher risk of mortality and are
called high risk infants, because the gestational age or their birth weight put them
at a higher-than-average risk of disease and death. Since most infants hospitalized
in NICU are born preterm, the problems of high risk infants are mainly related to
prematurity. Thirty eight percent of mortalities in the first 5 years of age belong to
prenatal period and out of these, 28% is related to preterm birth. The results of
statistics in Iran showthat in 1980, 13% of newborn
The purposeofthis project is to design and implement control system to regulate
the atmosphere temperature, continuous heart rate & bodytemperature
measurements, with visual monitoring inside the incubator.
Microcontroller will be used for implementing the hardware. The controlsystem
is a combination of sensors and actuators that operates synchronously to provide
a stable thermal environment inside the incubator and measure the babyheart rate
and temperature continuously in parallel.
3. [BabyIncubator]
[Acknowledgment]
Acknowledgment
We are gratefulto all whom assisted us for their attention & support.
We would like to express our sincere thanks and appreciation to all of you and of
coursefor our distinguished facilitator Dr. Mona Mousa for the patience and
hard work in arriving the project to the consensus adoptionof the resolution.
Frankly we have to put on record our appreciation to every single delegate who
had been present and helping this consensus adoptionby effort & knowledge. We
consider this project as a result came out due to a lot of teamwork tasks among
previous months.
Eventually we have to acknowledge the fact here that it was a complex process
where we had to make difficult compromises but we believe that we all did it for
a good purpose. Indeed it was a great learning experience.
8. Chapter 01
[BabyIncubator]
8
1.1 INTRO DUCTI ON
Baby incubator is a piece of equipment common to pediatric hospitals,
birthing centers and neonatal intensive care units. While the unit may serve
several specific functions, it is generally used to provide a safe and stable
environment for newborn infants, often those who were born prematurely or
with an illness or disability that makes them especially vulnerable for the
first several months of life.
Perhaps the most obvious function of an infant incubator is to protect babies
during the earliest stage of life, when they're most vulnerable. As
fully enclosed and controllable environments, incubators can be used to
protect babies from a wide range of possible dangers, according to "The
Pearson General Studies Manual 2009" by Showick Thorpe and Edgar
Thorpe. Incubators are fully temperature controlled, shielding babies from
harmful cold, and they provide insulation from outside noise, making it
easier for them to get plenty of comfortable rest. Incubator environments
can be kept sterile, protecting infants from germs and minimizing the risk of
infection.
The enclosure also keeps out all airborne irritants like dust and other
allergens. The cradle of the incubator is a roomy and comfortable surface, so
it's possible to leave the infant in place while many examinations and even
simple medical procedures are administered. This protects infants from too
much handling, which can be a concern in the case of some premature births.
9. Chapter 01
[BabyIncubator]
9
One of the most important elements in a newborn's survival is the infants
temperature regulation. Mammals have the advantage of being homeotherms,
meaning that they are able to produce heat, allowing us to maintain a
constant body temperature. However, homeothermy may be overwhelmed in
extremes of cold or heat. The newborn baby has all the capabilities of a
mature homeotherm, but the range of environmental temperature over which
an infant can operate successfully is severely restricted.
The baby has several disadvantages in terms of thermal regulation. the baby
has a relatively large surface area, poorthermal insulation, and a small
amount of mass to act as a heat sink. The newborn has little ability to
conserve heat by changing posture and no ability to adjust their own clothing
in a responseto thermal stress.
The incubator also has a port holes. Parents are encouraged to touch, stroke
and feel their baby through them. The babywill recognize the voice of the
parents, in particular the mother, and for that reasonparents are encouraged
to sing or talk to the babyas well.
Babies who are very small are nursed in incubators rather than cots, to keep them
warm. You can still have a lot of contact with your baby. Some incubators have
open tops, but if your baby's incubator doesn'tyou can put your hands through the
holes in the side of the incubator to stroke and touch your baby.
When your baby is stable, the nurses will be able to help you take your baby out of
the incubator and show you how to have skin-to-skin contact. You should carefully
wash and thoroughly dry your hands before touching your baby. You can talk to
your baby as well – this can help both of you.
10. Chapter 01
[BabyIncubator]
10
1.2 Temperature Regulation In Newborns
One of the most important elements in a newborn's survival is the
infant's temperature regulation. Mother has the advantage of being
homeotherms, meaning that they are able to produce heat, allowing us to
maintain a constant body temperature. However, homeothermy may be
overwhelmed in extremes of cold or heat.
The newborn baby has all the capabilities of a mature homeotherm, but the
range of environmental temperature over which an infant can operate
successfully is severely restricted.
The infant has several disadvantages in terms of thermal regulation. An
infant has a relatively large surface area, poor thermal insulation, and a small
amount of mass to act as a heat sink. The newborn has little ability to
conserve heat by changing posture and no ability to adjust their own clothing
in a response to thermal stress. Responses may also be hindered by illness or
adverse conditions such as hypoxia (below normal levels of oxygen).
Heat exchange between the environment and the infant is like any physical
object and its environment. Heat is exchanged by conduction, convection,
evaporation, and radiation.
11. Chapter 01
[BabyIncubator]
11
I. HEAT EXCHANGE BY CONDUCTION is relatively small. Conduction
depends on the thermal conductivity of a substance in contact with the
body. Since babies are usually laid on a mattress, which has a
relatively low thermal conductivity, the heat loss from the baby to the
mattress is relatively small.
II. HEAT LOSS FR OM THE I NFANT BY CO NV E CTION is dependent
upon air speed and air temperature.
III. EVAPORATIVELOSS depends upon air speed and the absolute
humidity of the air.
If a baby is clothed or nursed in a regular warm air incubator of
moderate humidity, evaporative heat loss is only a small fraction of
the total heat lost by the infant.
However, if an immature baby with thin skin is nursed under a radiant
overhead heater in a normal nursery environment, evaporation is a
major factor for heat loss.
IV. RADIANT HEAT LOSS is slightly more complex than the rest. It is
dependent on the surface area and geometry, the surface temperature of
the body, as well as the temperature of the receiving surface area.
12. Chapter 01
[BabyIncubator]
12
The infant's body responds differently to hot and cold temperatures. In the
case of hotter environmental temperatures, the infant's body produces sweat
through the sweat glands. The basal metabolic rate increases, causing the body
temperature to rise. The risks of hyperthermia are great and should be attended
to immediately. Serious overheating can cause heatstroke or death, and lesser
degrees of stress can cause cerebral damage due to hypernatremic dehydration.
There have been significant advances in thermoregulation since the 1960s.
These advances have reduced mortality in small babies by 25%. Although this
is a great accomplishment, research continues so that the mortality in small
babies is reduced even more.
13. Chapter 01
[BabyIncubator]
13
1.3 ProjectGoals
Basically, our incubator is an acrylic box with a front door that allows
clinical staff to put the neonate inside and a series of portholes that allow
clinical staff to care for the baby with a heater to warms the temperature inside
the incubator. In addition of system blower fan to circulate the air inside. The
systemcontrolled it automatically via sensors and microcontroller chips placed
insidethe incubator. With Visual Monitoring Camera inside the box.
For instance, the incubator might be started in the heating mode to warm up till
reached to a certain point, then switched off the heater automatically, in case
the temperature raised over 98.6° F (37.0° C), the fan will be switched on to
drag in the room temperature air inside the incubator till it hits the needed
degree.
14. Chapter 01
[BabyIncubator]
14
In addition, Heart-Rate & Body Temperature Measurements device nearby to in
order to monitoring hemodynamic status. In neonatal intensive care, Measurement
of heart rate &temperature is parts of every clinical examination. However, it is
influenced bysome exogenous and endogenous factors, such as medication, pain,
and stress.Similarly, an increased heart rate is a normal physiological response
to fever.Heart rate is known to increase by 10 beats per minute (bpm) per
degreecentigrade increase in bodytemperature in children.
Also the maintenance of a constant body temperature is important to all
humans but even more so for newborn babies (neonates), especially those born
pre-term. Because accurate measurement of body temperature is an important
component of thermoregulation management in the neonate.
16. Chapter 02
16
History
It is hard to believe that only a century ago, most sickly and premature infants
were sent home from the hospital without any special interventions; many of these
children did not survive past their first birthday. The first neonatal intensive care
units did not even appear in American hospitals until 1922; however, special care
methods for infants began to be developed in the late nineteenth century.
2.1 The Pre-NICU Era (up to the 1950's)
Pierre-Constant Budin, a French obstetrician, was a pioneer in the care
of at risk babies and devoted his career to reducing infant mortality. He
encouraged educating new mothers about proper nutrition and hygiene
for their babies, and knowing the risks contaminated cow’s milk could
pose to newborns, urged the use of breast milk instead of cow’s milk,
and believed that sterilized cow’s milk should be used if breast milk
was insufficient.
He also brought gavage- the process offeeding through a tube that went directly to
the stomach- into the spotlight, helping premature infants who were unable to feed
normally receive the nutrition they needed. Budin started his career as an assistant
to Etienne Stephane Tarnier, another French obstetrician
instrumental in the development for neonatal care. Infants that are born too
early are often incapable of producing their own heat, and incubators help keep
these babies warm and allow them to use their energy
to grow and gain weight. Tarnier recognized this, and developed a crude
isolate- a wooden box with a glass lid and a hot water bottle inside- to put
premature infants inside of.
Tarnier’s work contributed to a 28% decrease in infant mortality over three
years at the French maternity hospital he worked in. Tarnier’s technology was
picked up by a student of Budin’s, Martin Couney, who used considerably less
conventional methods to help popularize special care for premature infants
outside of France.
[BabyIncubator]
17. Chapter 02
[BabyIncubator]
17
At the turn of the century, many hospitals in both America and Europe did not allow
technology such as incubators to be used within their walls. Couney, however,
recognized the potential of incubators for helping premature babies.
Dr. Couney offered this type of treatment for premature infants free of charge; it was
paid for through admissions. Dr. Couney displayed the babies in a sideshow at Coney
Island starting in 1903, and charged onlookers twenty-five cents apiece to come in
and view the babies and the technology keeping them alive. Similar sideshows were
set up in Europe as parts of fairs and expositions, including the 1933 New York
World’s Fair and the 1939 Chicago World’s Fair.
Although the practice of displaying premature infants for money is certainly morally
questionable, it helped pave the way for modern neonatal intensive care. Dr. Couney
died in 1950, shortly after American hospitals began to use incubators to care for
premature babies.
18. Chapter 02
[BabyIncubator]
18
2.2 Formation of the Modern NICU (1950s-1970s)
Doctors and scientists began writing on the care of premature and sickly
newborns as early as the seventeenth century; however, it was not until
300 years later that these babies began to receive special care in
hospitals. Until the mid-twentieth century, most of these children were
sent home without medical intervention; occasionally, they would have a
nurse come home with them. It was not until after World War II that
hospitals began to create Special Care Baby Units, the precursors to
modern NICUs.
The creation of special care units for infants was sparked by the realization
that heat, humidity and a steady supply of oxygen could increase the
survival rates of sickly babies, meaning that hospitals could intervene to
help babies live as opposedto just sending them home. Hospitals were
initially reluctant to adoptincubators because of their cost, the fact that they
limited access to the infants, and the lack of evidence of their
effectiveness.
Dr. Couney’s exhibitions brought awareness to the effectiveness of the
incubator, which encouraged hospitals to adoptthe technology. This was
further encouraged by the invention of the Hess Incubator by Dr. Julian
Hess at the Reese Hospital in Chicago; in addition to providing heat and
humidity for babies, the Hess Incubator delivered oxygen to the infants.
The following decade, incubators with clear plastic walls were introduced,
allowing doctors and nurses to easily see and access the babies.
At this time, doctors were beginning to fully realize the danger that
infection posed to newborns, especially premature babies. However, the
way infection spread was severely misunderstood; it was thought that the
biggest risk to a baby was another baby in the nursery. No one thought that
a baby could get sick from a healthy adult. Dr. Louis Gluck was
instrumental in proving this line of thought wrong.
19. Chapter 02
[BabyIncubator]
19
Along with Sumner Yaffe, Norman Kretchmer and Harold Simon, Gluck
performed a series of experiments that involved two sets of babies; one washed
daily, the other ones not. They would take cultures from both sets and compare
them, and it became evident very quickly that the washed babies had fewer
pathogens.
To show that the children had a low risk of catching diseases from
each other, Gluck began keeping the washed and unwashed children in
the same nursery- at the time, keeping more than one premature infant
in one room was considered a risky idea. This study included about
25,000 babies, and was never completed- the difference in the health
between the two groups became so apparent that nurses began washing
all of the babies regularly.
It was shown that regardless of nursery mates, a baby who was
washed regularly was much less likely to become ill than one who
wasn’t; according to Gluck, there was “an 8 to 1 difference in
acquisition of staph anyplace”. Gluck observed that the biggest issues
was getting visitors and staff to wash their hands; to this day, this
remains one of the biggest threats in the NICU.
2.3TheContemporary NICUandFamily Involvement
Up until the 1970s, there was a very heavy emphasis on using machines to
help at-risk neonates and very little on the involvement of the family.
However, this began to change in the 70s. The Newborn Individualized
Developmental Care and Assessment Program was developed by Heidelise
Also, which encouraged family involvement and individualized plans for
each baby. The program reduced the number of ventilator days required for
children and improved the outcomes of graduates.
20. Chapter 02
[BabyIncubator]
20
NICU, allowing them to stay with their children outside of normal visiting
hours and increasing a father’s role in caring for his baby. The importance of
the bond between mothers and babies was understood and maternal-infant
bonding was also encouraged at this point.
This became even more heavily emphasized in the next decade with the
advent of kangaroo care- skin to skin contactbetween mother and child to
promote bonding, stabilize the baby’s breathing, heart rate and body
temperature, and help the baby gain weight and grow. Kangaroo care is now
encouraged for all parents, regardless of sex.
Parental rooming-in- allowing parents to spend the night in the same room as
their child- also was established in the 1980s, and older siblings became
more involved in the care of babies; at this point, many hospitals established
visiting policies for siblings.
22. Chapter 03
[BabyIncubator]
22
3.1 Standards Requirements &Dimensions
3.1.1. DesignFeatures
Before beginning the design process, we researched existing technologies
in the field of premature infant care. One of the most pertinent examples of
prior art found was the Van Hemel Incubator, a non-electric incubator built for
use in developing countries.
Created in 1968 in Zambia, this invention used paraffin lamps, located in a
compartment below the baby, to heat the air in the incubator. This heat source
created a thermally driven flow of air through the system. In addition, the hot
air was passed over a water- saturated cloth, feeding off of a neighboring bowl
of water, Design features address the intended uses of the device to meet the
need of the user and the patient, while the performance features ensure that the
devices are safe and effective when use in accordance with the directions.
The design and performance features of the neonatal incubator and transport
incubators provide the basis for understanding the intended uses and capabilities
of the device.
The primary design constraints for the incubator were to provide the infant with
the bare necessities:
- An ambient temperature of 37 degree Celsius
- Heartbeat rate continuous measurements.
- Body temperature continuous measurements.
- Visual monitoring inside the incubator.
24. Chapter 03
[BabyIncubator]
24
3.2 Incubator Operation&Control
Operations is the designation as an inclusive term for all the electrical
decisions designed into incubator system to control the sequence of
incubator control signal will make in response to changing in infant
temperature.
Control systems apply artificial means to change the behavior of a system.
The type of control problem often determines the type of control system
that can be used. Each controller will be designed to meet a specific
objective. The major types of control are shown in Figure.
Many control technologies are available for control. Early control
systems relied upon mechanisms and electronics to build controlled.
Majority of modern controllers use a computer to achieve control. The
most flexible of these is Microcontroller based baby incubator.
This system monitor vital parameterssuch as IncubatorTemperature,Infant
Body Temperature& heartbeats using PIC Microcontroller.Theelectronic
partis separated from the Baby’scompartmentbaby can be assuredsafe
25. Chapter 03
[BabyIncubator]
25
1. Incubator temperature control
2. Baby temperature
3. Heart beat Rate measurements
4. Visual Monitoring camera
So, for completelycontrolon incubatorsystem we need to apply some
controlelements, which categorizedinto three groups:
26. Chapter 03
[BabyIncubator]
26
3.2.1. Incubator Temperature Control
Control engineering has evolved over time. In the past humans was
the main method for controlling a system. More recently electricity has
been used forcontrolandearly electrical controlwas based onrelays. These
relays allow power to be switched on and off without a mechanical
switch. It is common to use relays to make simple control decisions.
The development of low cost computer has brought the mostrecent
revolution, ProgrammableInterfaceControllers. The advent of the
Microcontrollers began in the 1970s, and has become the most common
choice for manufacturingcontrols.
A Microcontrollerbased systemmakesdecisions
based on its programmedcodeand controls outputs
to automate a process or machine. Itact as a
microcomputerwithout any digital parts. also it
reducescost and size of the system.with simple
usage,easy for troubleshootand system
maintaining, easily interface additional RAM,
ROM,I/Oports.And Low time required for
performingoperations.
28. Chapter 03
[BabyIncubator]
28
3.2.2 Body Temperature
Temperature measurement is very important parameters of the human
system. body temperature in stable physical condition should be around
98.6 degrees Fahrenheit (37°C degrees Celsius).
There are many different methods and devices that may be used to
measure the temperature of the baby's body within an electronic device.
In this project . Arduino is well-suited for measuring temperature &. And
this takes place due to its ultra-low-power nature.
30. Chapter 03
[BabyIncubator]
30
3.2.3 Heartbeats-Rate Measurement
When the heartbeats rate quickens, it is a clear indicator that the heart is
working overtime.it reflects the heart's pumping speed as each beat pushes
blood through the body of the baby, and it can be measured through pulse
sensor.
It's important to measure heartbeats rate continuously to monitorthe heart in
case it's having trouble in pumping. It could mean that the baby is having a
heart attack. which needs to call for medical help
32. Chapter 03
[BabyIncubator]
32
3.2.4 BabyVisual Wireless Monitoring
It is not necessaryanymore to use high costsurveillance cameras. Here we
have a betteroption, using Alfred - Home Security Surveillance IP Camera
which easily can turn smart-phones to surveillance cameras. As smart-phone is
more versatile and powerful than IP cameras in the market.
Install Alfred the mobile app on smart-phone. Camera willbe located inside
infantincubator at designated location to take a wide clear angle for the baby,
and on the other side we can log on computer or mobile to start monitoring the
baby with live streaming video surveillance.
33. Chapter 03
[BabyIncubator]
33
With this application, parents of the baby will be connected easilyto their child
inside the incubator, with many features as follows:
• It supports multiple Viewers and multiple Cameras.
• It is always ready as it minimizes the launch time. After login on the selected
camera, you can see the secured location within 1-3 seconds even if the mobile
connectionis used.
• It uses P2P technologies which make the respondoccur in less than a second.
it connects to the camera with the shortest latency and the highest interactivity.
• It is helpfulas we can remotely turn on and off LED, and take snapshots.
34. Chapter 03
[BabyIncubator]
35
3.3 Incubator Description
The baby incubator assemblyhavingan acrylic boxwith removabledoor,
so that it can be opened for cleaning and maintenance. The heater hanged
in the incubatorwall so that it's isolated by an isolation sheet. with
mounted fan to maintain the inside incubatortemperaturein case it rises
above37 degree Celsius.Nearby a separated devicewhich aims to
measure body temperatureand heartbeats ratecontinuously.In addition
of wall-hangedcamera for visualmonitoring
Many control technologies are available for control. Early control
systems relied upon mechanisms and electronics to build controlled.
Majority of modern controllers use a computer to achieve control. The
most flexible of these is Microcontroller based baby incubator.
This system monitor vital parameterssuch as IncubatorTemperature,Infant
Body Temperature& heartbeats using PIC Microcontroller.Theelectronic
partis separated fromthe Baby’scompartmentbaby can be assuredsafe
36. Chapter 05
[BabyIncubator]
38
5.1 Conclusion
The objective of this project is to design and develop microcontroller and
closed loop control system based temperature, heartbeat rate, body
temperature and visual monitoring for baby incubator. To achieve this
hardware is designed so that the above mentioned parameters can be
monitored for the normal growth of the baby.
This system can provide optimum automatic control of temperature for
the baby using closed loop controlsystem. Moreover it controls the heater
and the fan according to temperature in the incubator chamber. Also
measuring heartbeats rate and bodytemperature to provide proper growth to
the baby in the incubator. with visual monitoring inside the box.
A connectively-heated incubator has benefits and limitations when
used to nurse preterm infants. The over all model presented in this work can
be used for improving the performance of infant warming devices using
Microcontroller chips & sensors.
The purpose of this study was to design an baby incubator for
improved usability. This study helped to arrive to the requirements
needed to help babies among their growth path.
37. Chapter 05
[BabyIncubator]
39
5.2 Recommendations
Any work, whatsoever precise it may be, has always some scope of
improvement. On the same lines the author envisages that there is
lot of scope of improvementin the present work. Some of the future
aspects of the work in terms of its improvements are the
parameters such as alarm for the measurements of the temperature
and heartbeats rates by using the differenttuning techniques used for
PID controllers. Also GSM technique can also be used to reduce
the noise created by the alarms in the close monitoring.
Currently, the incubator is a functional prototype, but still can add
features to be capable of heating a simulation infant, retaining heat
without power, and using alarms to alert the user to power failure or
hyperthermia. Though the device works well, there are still several
features that must be optimized before it is ready for use with patients,
including improving insulation and ventilation capabilities, integrating
temperature probes with infant body temperature band, and adding a
weaning setting for infants.
39. [References]
[BabyIncubator]
41
A. REFERE NCE S
[1] N.S. Joshi ,R.K. Kamet , P.K. Gaikwad, “Development of Wireless Monitoring System for Neonatal Intensive Care
Unit”, International Journal of Advanced ComputerResearch, Vol.3, No.3, September, 2013.
[2] Mahmoud Salim, “Design and Implementation of a Digital Control Unit for a Oxygenaire Servo Baby Incubator”,
Journal of Power Electronics, Vol. 8, No. 2, April, 2008.
[3] Ghada M.Amer, Kasid Aubidy, “Novel Technique to Control the Premature Infant Incubator System Using
ANN”, 3rd International Conference on Systems, Signals &Devices, Vol.I, March,2005.
[4] Sibrecht Bouwstra, Wei Chen, Loe Feijs, “Smart Jacket Design for Neonatal Monitoring with Wearable Sensors”
Proceedings of the Sixth IEEE International Workshop on Wearable and Implantable Body Sensor Networks,
Washington, pp.162-167, June, 2009.
[5] Sreenath Sudhindra Kumar, Lohit H.S, “Design of an Infant Incubator for Cost Reduction and Improved Usability for
Indian Health Care”, SASTECH Journal, Vol.11, No 2, September, 2012.
[6] Stephani D.P, “Neonatal Phototherapy Today’s Lights, Lamps and Devices”, Infant Journal, Vol.1, No 1, pp.14-19,
January, 2005.
[7] Abdel Rahman Shabaan, Shereen M. Metwally, MoustafaM.A. Farghaly, Amr A. Sharawi, “PID and Fuzzy Logic
Optimized Control for Temperature in Infant Incubators”, Proceedings of International Conference on Modelling,
Identification & Control (ICMIC) Cairo, Egypt, pp.53-59,September, 2013.
[8] Vidya Dhatrak, Revati Gholap ,Supriya Patil, Nagama Bhaldar, Prof. ManishaMhetre,
[9] “Intelligent Baby Incubator Using LabVIEW”, 2nd International Conference on Emerging Trends in Engineering &
Techno-Sciences (ETETS), Vol.3, No.3,pp.50-54, April, 2014.
[10] International Journal of Advanced Research in Electrical,
Electronics and Instrumentation Engineering (An ISO 3297: 2007 Certified Organization)
Vol. 4, Issue 2, February 2015
Copyright to IJAREEIE 10.15662/ijareeie.2015.0402060 832
PIC Microcontrollerbased Efficient Baby incubator
59. 56
PIC16F87XA
28/40/44-Pin Enhanced Flash Microcontrollers
DevicesIncludedin this Data Sheet: Analog Features:
• PIC16F873A
• PIC16F874A
• PIC16F876A
• PIC16F877A
• 10-bit, up to 8-channel Analog-to-Digital
Converter (A/D)
• Brown-outReset(BOR)
High-Performance RISC CPU:
• Only 35 single-word instructions to learn
• All single-cycle instructions exceptfor program
branches,which are two-cycle
• Operating speed: DC – 20 MHz clock input
DC – 200 ns instruction cycle
• Up to 8K x 14 words of Flash Program Memory,
Up to 368 x 8 bytes of Data Memory (RAM),
Up to 256 x 8 bytes of EEPROM Data Memory
• Pinoutcompatible to other 28-pin or 40/44-pin
PIC16CXXX and PIC16FXXX microcontrollers
PeripheralFeatures:
• Timer0:8-bittimer/counter with 8-bit prescaler
• Timer1:16-bittimer/counter with prescaler,
can be incremented during Sleep via external
crystal/clock
• Timer2:8-bittimer/counter with 8-bit period
register,prescaler and postscaler
• Two Capture, Compare,PWM modules
- Capture is 16-bit, max. resolution is 12.5 ns
- Compare is 16-bit,max. resolution is 200 ns
- PWM max. resolution is 10-bit
• Synchronous Serial Port(SSP) with SPI™
(Master mode) and I2
C™ (Master/Slave)
• Universal Synchronous Asynchronous Receiver
Transmitter (USART/SCI) with 9-bitaddress
detection
• Parallel Slave Port (PSP) – 8 bits wide with
external RD, WR and CS controls (40/44-pin only)
• Brown-outdetection circuitry for
Brown-outReset(BOR)
• Analog Comparator module with:
- Two analog comparators
- Programmable on-chip voltage reference
(VREF) module
- Programmable inputmultiplexing from device
inputs and internal voltage reference
- Comparator outputs are externallyaccessible
Special MicrocontrollerFeatures:
• 100,000 erase/write cycle Enhanced Flash
program memorytypical
• 1,000,000 erase/write cycle Data EEPROM
memorytypical
• Data EEPROM Retention > 40 years
• Self-reprogrammable under software control
• In-CircuitSerial Programming™ (ICSP™)
via two pins
• Single-supply5V In-CircuitSerial Programming
• Watchdog Timer (WDT) with its own on-chip RC
oscillator for reliable operation
• Programmable code protection
• Power saving Sleep mode
• Selectable oscillator options
• In-CircuitDebug (ICD) via two pins
CMOS Technology:
• Low-power,high-speed Flash/EEPROM
technology
• Fully static design
• Wide operating voltage range (2.0V to 5.5V)
• Commercialand Industrial temperature ranges
• Low-power consumption
Device
Program Memory Data
SRAM
(Bytes)
EEPROM
(Bytes)
I/O
10-bit
A/D (ch)
CCP
(PWM)
MSSP
USART
Timers
8/16-bit
Comparators
Bytes # Single Word
Instructions
SPI Master
I2
C
PIC16F873A 7.2K 4096 192 128 22 5 2 Yes Yes Yes 2/1 2
PIC16F874A 7.2K 4096 192 128 33 8 2 Yes Yes Yes 2/1 2
PIC16F876A 14.3K 8192 368 256 22 5 2 Yes Yes Yes 2/1 2
PIC16F877A 14.3K 8192 368 256 33 8 2 Yes Yes Yes 2/1 2
2003 Microchip Technology Inc. DS39582B-page 1
63. 65
APDS-9002
Miniature Surface-Mount Ambient Light
Photo Sensor
Data Sheet
Description
The APDS-9002 is a low-cost analog-output ambient light
photo sensor in lowest cost miniature chipLED lead-free
surface mount package. It consists of a spectrally suited
phototransistor, which peaks in human luminosity curve.
Hence, it provides an excellent responsivity that is close
to the response of human eyes, as shown in Figure 2. It
provides a design-alternative to the HSDL-9000 digital-
output ambient light photo sensor is suitable forportable
Features
Excellent responsivity which peaks in the human
luminosity curve
– Close responsivity to the human eye
Miniature chipLED lead-free surface-mount package
– Height – 0.80 mm
– Width – 2.00 mm
– Depth – 1.25 mm
applications with its ultra small package design.
The APDS-9002 is ideal for applications in which the
measurement of ambient light is used to control display
backlighting. Mobile appliances such as the mobile
Good output linearity across wide illumination range
Low sensitivity variation across various light sources
Guaranteed temperature performance: -40° C to 85° C
phones and PDAs that draw heavy current from display VCC supply 2.4 to 5.5 V
backlighting will benefit from incorporating these photo Lead-free package
sensor products in their designs by reducing power con-
sumption significantly. Applications
Detection of ambient light to control display back-
lighting
– Mobile devices – mobile phones, PDAs
– Computing devices – notebooks, webpads
– Consumer devices – TVs, video cameras, digital still
cameras
Automatic residential and commercial lighting
management
Electronic signs and signals
Daylight and artificial light exposed devices
67. 62
APDS-9002
Miniature Surface-Mount Ambient Light
Photo Sensor
Data Sheet
Description
The APDS-9002 is a low-cost analog-output ambient light
photo sensor in lowest cost miniature chipLED lead-free
surface mount package. It consists of a spectrally suited
phototransistor, which peaks in human luminosity curve.
Hence, it provides an excellent responsivity that is close
to the response of human eyes, as shown in Figure 2. It
provides a design-alternative to the HSDL-9000 digital-
output ambient light photo sensor is suitable forportable
Features
Excellent responsivity which peaks in the human
luminosity curve
– Close responsivity to the human eye
Miniature chipLED lead-free surface-mount package
– Height – 0.80 mm
– Width – 2.00 mm
– Depth – 1.25 mm
applications with its ultra small package design.
The APDS-9002 is ideal for applications in which the
measurement of ambient light is used to control display
backlighting. Mobile appliances such as the mobile
Good output linearity across wide illumination range
Low sensitivity variation across various light sources
Guaranteed temperature performance: -40° C to 85° C
phones and PDAs that draw heavy current from display VCC supply 2.4 to 5.5 V
backlighting will benefit from incorporating these photo Lead-free package
sensor products in their designs by reducing power con-
sumption significantly. Applications
Detection of ambient light to control display back-
lighting
– Mobile devices – mobile phones, PDAs
– Computing devices – notebooks, webpads
– Consumer devices – TVs, video cameras, digital still
cameras
Automatic residential and commercial lighting
management
Electronic signs and signals
Daylight and artificial light exposed devices
68. 63
APDS-9002
PIN 1: IOUT
Application Support Information
The Application Engineering Group is available to assist you with the application design associated with APDS-9002
ambient light photo sensor module. You can contact them through yourlocal sales representatives foradditional details.
Ordering Information
Part Number Packaging Type Package Quantity
APDS-9002-021 Tape and Reel 4-pins Chipled package 2500
Typical Application Circuit
PIN 2: VCC PIN 3: VCC
PIN 4: NC
RLOAD Figure 1Table
Component Recommended Application
Circuit Components
RLOAD 1 k
Figure 1. Typical application circuit for APDS-9002.
I/O Pins Configuration Table
Pin Symbol Description
1 IOUT IOUT
2 VCC VCC
3 VCC VCC
4 NC No Connect
2
69. 64
APDS-9002
SILICON
EYE RESPONSE
NORMALIZEDRESPONSIVITY 1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
350 450 550 650 750 850 950 1050 1150 1250
WAVELENGTH (nm)
Figure 2. Relativespectral response vs.wavelength.
CAUTION: It is advised that normal static precautions be taken in handling and assembly
of this component to prevent damage and/or degradation which may be induced by ESD.
Absolute Maximum Ratings
For implementations where case to ambient thermal resistance is ≤ 50°C/W
Parameter Symbol Min. Max. Units
Storage Temperature TS -40 85 °C
Operating Temperature TA -40 85 °C
Supply Voltage VCC 2.4 5.5 V
Recommended Operating Conditions
Parameter Symbol Min. Max. Units Conditions
Operating Temperature TA -40 85 °C
Supply Voltage VCC 2.4 5.5 V
3
70. 65
Pulse Sensor Getting Started Guide
Introduction:
Pulse Sensor is a well-designed plug-and-play heart-rate sensor for Arduino. It can be used by
students, artists, athletes, makers, and game & mobile developers who want to easily incorporate live heart-
rate data into their projects. The sensor clips onto a fingertip or earlobe and plugs right into Arduino with some
jumper cables. It also includes an open-source monitoring app that graphs your pulse in real time.
The Pulse Sensor Kit includes:
71. 66
1) A 24-inch Color-Coded Cable, with (male) header connectors. You'll find this makes it easy to embed the
sensor into your project, and connect to an Arduino. No soldering is required.
2) An Ear Clip, perfectly sized to the sensor. We searched many places to find just the right clip. It can be hot-
glued to the back of the sensor and easily worn on the earlobe.
3) 2 Velcro Dots. These are 'hook' side and are also perfectly sized to the sensor. You'll find these velcro dots
very useful if you want to make a velcro (or fabric) strap to wrap around a finger tip.
4) Velcro strap to wrap the Pulse Sensor around your finger.
4) 3 Transparent Stickers. These are used on the front of the Pulse Sensor to protect it from oily fingers and
sweaty earlobes.
5) The Pulse Sensor has 3 holes around the outside edge which make it easy to sew it into almost anything.
Let’s get started with Pulse Sensor Anatomy
The front of the sensor is the pretty side with the Heart logo. This is the side that makes contact with
the skin. On the front you see a small round hole, which is where the LED shines through from the back, and
there is also a little square just under the LED. The square is an ambient light sensor, exactly like the one used
in cellphones, tablets, and laptops, to adjust the screen brightness in different light conditions. The LED shines
light into the fingertip or earlobe, or other capillary tissue, and sensor reads the light that bounces back. The
back of the sensor is where the rest of the parts are mounted. We put them there so they would not get in the
way of the of the sensor on the front. Even the LED we are using is a reverse mount LED. For more about the
circuit functionality, check out the Hardware page.[needs link]
The cable is a 24” flat color coded ribbon cable with 3 male header connectors.
72. 67
RED wire = +3V to +5V
BLACK wire = GND
PURPLE wire = Signal
The Pulse Sensor can be connected to arduino, or plugged into a breadboard. Before we get it up and
running, we need to protect the exposed circuitry so you can get a reliable heart beat signal.
Preparing the Pulse Sensor
Before you really start using the sensor you want to insulate the board from your (naturally) sweaty/oily
fingers. The Pulse Sensor is an exposed circuit board, and if you touch the solder points, you could short the
board, or introduce unwanted signal noise. We will use a thin film of vinyl to seal the sensor side. Find the
small page of four clear round stickers in your kit, and peel one off. Then center it on the Pulse Sensor. It
should fit perfectly.
When you are happy with the way it’s lined up, squeeze it onto the face all at once! The sticker (made
of vinyl) will kind of stretch over the sensor and give it a nice close fit. If you get a wrinkle, don’t worry, just
press it down really hard and it should stick. We gave you 4, so you can replace it if necessary.
That takes care of the front side. The vinyl sticker offers very good protection for the underlying circuit,
and we rate it ‘water resistant’. meaning: it can stand to get splashed on, but don’t throw it in the pool!
If this is your first time working with Pulse Sensor, you’re probably eager to get started, and not sure if
you want to use the ear-clip or finger-strap (or other thing). The back of the Pulse Sensor has even more
exposed contacts than the front, so you need to make sure that you don’t let it touch anything conductive or
wet.
73. 68
The easiest and quickest way to protect the back side from undesireable shorts or noise is to simply
stick a velcro dot there for now. The dot will keep your parts away from the Pulse Sensor parts enough for you
to get a good feel for the sensor and decide how you want to mount it. You’ll find that the velcro dot comes off
easily, and stores back on the little strip of plastic next to the other one.
Notice that the electrical connections
are still exposed! We only recommend
this as a temporary setup so you can
get started. We show you how to better
seal the Pulse Sensor later in this
document.
Running The Pulse Sensor Code
Get the latest Arduino and Processing Pulse Sensor software here http://pulsesensor.com/downloads/
Arduino code is called “PulseSensorAmped_Arduino-xx”
The Processing code is called “PulseSensorAmped_Processing-xx”
We strongly advise that you DO NOT connect the Pulse Sensor to your body while your computer or arduino is
being powered from the mains AC line. That goes for charging laptops and DC power supplies. Please be safe
and isolate yourself from from the power grid, or work under battery power.
Connect the Pulse Sensor to: +V (red), Ground (black), and Analog Pin 0 (purple) on your favorite Arduino, or
Arduino compatible device, and upload the ‘PulseSensoAmped_Arduino-xx’ sketch.
note: If you want to power Pulse Sensor Amped
with low voltage (3.3V for example), make sure
you have this line of code in the setup()
analogReference(EXTERNAL);
Also, make sure that you apply the lower voltage
to the Arduino Aref pin (next to pin 13).
After it’s done uploading, you should see Arduino pin 13 blink in time with your heartbeat when you hold the
sensor on your fingertip. If you grip the sensor too hard, you will squeeze all the blood out of your fingertip and
there will be no signal! If you hold it too lightly, you will invite noise from movement and ambient light. Sweet
74. 69
Spot pressure on the Pulse Sensor will give a nice clean signal. You may need to play around and try different
parts of your body and pressures. If you see an intermittent blink, or no blink, you might be a zombie or a robot.
To view the heartbeat waveform and check your heart rate, you can use the Processing sketch that we
made. Start up Processing on your computer and run the ‘PulseSensorAmped_Processing-xx’ sketch. This is
our data visualization software, and it looks like this.
note: If you get an error when starting this code, you may need to make sure you are selecting the right
serial port. Check the Troubleshooting section below..
The large main window shows a graph of raw sensor data over time. The Pulse Sensor Data Window can be
scaled using the scrollbar at the bottom if you have a very large or very small signal. At the right of the screen,
a smaller data window graphs heart rate over time. This graph advances every pulse, and the Beats Per
Minute is updated every pulse as a running average of the last ten pulses. The big red heart in the upper right
also pulses to the time of your heartbeat. When you hold the Pulse Sensor to your fingertip or earlobe or (fill in
body part here) you should see a nice heartbeat waveform like the one above. If you don’t, and you’re sure
you’re not a zombie, try the sensor on different parts of your body that have capillary tissue. We’ve had good
results on the side of the nose, middle of the forehead, palm, and lower lip. We’re all different, original
organisms. Play around and find the best spot on you and your friends. As you are testing and getting used to
the sensor. You may find that some fingers or parts of fingers are better than others. For example, I find that
when I position the sensor so that the edge of the PCB is at the bottom edge of my earlobe I get an awesome
signal. Also, people with cold hands or poor circulation may have a harder time reading the pulse. Run your
hands under warm water, or do some jumping-jacks!
Arduino and Processing programming environments available for download here:
www.arduino.cc www.processing.org
75. 70
Sealing the Back Side of Pulse Sensor
Basic protection for the back of the Pulse Sensor
and prep for attaching Velcro Dot.
It’s really important to protect the exposed Pulse Sensor circuitry so the sweat of your fingertips or earlobe (or
wherever) doesn’t cause signal noise or a short circuit. This How-To uses hot glue, which can be removed
easily or re-worked if you want to change where you’ve stuck your Pulse Sensor. We love hot glue!
The other things you’ll need are:
Hot Glue Gun
Blue Tape (any tape should do ok)
Nail Trimmers (or your favorite trimming device. Flush-cut wire snips work well too)
Read these instructions all the way through before you start!
First, attach the clear vinyl sticker to the front of your Pulse Sensor, as shown above. Then put a blob of
hot glue on the back, right over the circuit. Size can be difficult to judge sometimes. What I meant was put a
hot glue blob about the size of a kidney bean on the back side of the Pulse Sensor.
Then, while the glue is still very hot, press the Pulse Sensor glue-side-down onto the sticky side of a piece of
blue tape (I believe that blue tape has magical properties, but if you don’t have blue tape other kinds of tape
will work just as well).
note: The tallest thing on the back of the Pulse Sensor is
the green LED housing right in the middle. Use it to make
the hot-glue seal thin and strong. When you press evenly
until the back of the LED touches, all the conductive parts
will be covered with hot glue. If the glue doesn’t ooze out
all around, let it cool down, then peel if from the Pulse
Sensor and try again. Once the glue has cooled down and
has some body, you can peel it off easily. Here’s some
pics of hot glue ‘impressions’ that I took during the making
of this guide.
76. 71
Next put a small dab of hot glue on the front of
the cables, where they attach to the Pulse
Sensor circuit board. This will bond to the other
glue that’s there and act as a strain-relief for the
cable connection. This is important because the
cable connection can wear out over time.
Once the hot glue has cooled (wait for it!)
the blue tape will peel off very easily. Check
your work to make sure that there are not
exposed electrical connections!
Next is trimming. I find the easiest way is to
use nail clippers. Flush cutting wire snips work
too. Take care not to clip the wires!!!
And leave enough around the cable to act
as a good strain-relief
77. 72
This is the basic Pulse Sensor Hot Glue Seal, It’s also got the clear vinyl sticker on the front face. We’re calling
this ‘Water Resistant’, ready to be handled and passed around from fingers to earlobes or whatever. It is not
advised to submerge or soak the Pulse Sensor with this basic seal.
Now you can stick on the velcro dot (included) and make a finger strap with the velcro tape (included)!
78. 73
Attaching the Ear Clip
We looked all over, and were lucky enough to find an ear clip that fits the Pulse Sensor perfectly. The
earlobe is a great place to attach Pulse Sensor. Here’s some instruction on how to do it.
It is important to apply some strain relief to the cable connection where it meets the Pulse Sensor PCB.
The little wire connections can wear out and break (or short on something) over time. We can do this with hot
glue, like we did in the previous example.
First, attach a clear vinyl sticker to the front of the Pulse Sensor if you have not already. Then, put a
small dab of hot glue on the front of the cables right where they meet the PCB. Get some on the edge of the
PCB too, that will help. Remember, if you don’t like the blob you’ve made for any reason, it’s easy to remove
once it cools down.
Next place the Pulse Sensor face down, and put a dab of glue about the size of a kidney bean on the
back as illustrated above. Center the round part of the ear clip on the sensor and press it into the hot glue. The
tallest component on the back is the plastic body of the reverse mount LED, and if you press it evenly it will
help keep the metal of the ear clip from contacting any of the component connections.
Allow the hot glue to ooze out around the ear clip. That will ensure good coverage. Take care not to let
the hot glue cover around the ear clip hinge, as that could get in the way of it working. Trimming is easy with
nail clippers (as above) or your trimming tool of choice. Don’t trim the wires by mistake!!!
Take a good look at your work with a magnifying glass to be sure that you haven't made contact with any of
the solder joints, then plug it in and test it. Hot glue is also great because it is easy to remove or re-work if you
need to.
Troubleshooting:
79. 74
Processing Sketch gives me a COM port error at startup.
Make sure you are plugged into an Arduino board, that it is working correctly, and running our firmware.
Check to see if you have the right serial port. The code underlined in red should match the correct port
number in the terminal window at the bottom of Processing IDE.
Processing gives an RXTX mismatch warning, then nothing happens
The RXTX mismatch problem can be resolved by making sure you are running the latest version of
Processing and Arduino.
If you’re still having trouble, go to http://processing.org/reference/libraries/serial/index.html for more info.
83. 88
EN - For pricing and availability in your local country please visit one of the below links:
DE - Informationen zu Preisen und Verfügbarkeit in Ihrem Land erhalten Sie über die unten aufgeführten Links:
FR - Pour connaître les tarifs et la disponibilité dans votre pays, cliquez sur l'un des liens suivants:
A000066 A000066
EN
This Datasheet is presented by
the manufacturer
DE
Dieses Datenblatt wird vom
Hersteller bereitgestellt
FR
Cette fiche technique est
présentée par le fabricant
84. 75
Arduino Uno
Arduino Uno R3 Front Arduino Uno R3 Back
Arduino Uno R2 Front Arduino Uno SMD Arduino Uno Front Arduino Uno Back
Overview
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial
converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put
into DFU mode.
Revision 3 of the board has the following new features:
1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins
placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided
from the board. In future, shields will be compatible both with the board that use the AVR,
which operate with 5V and with the Arduino Due that operate with 3.3V. The second one is a
not connected pin, that is reserved for future purposes.
Stronger RESET circuit.
Atmega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and
version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series
of USB Arduino boards, and the reference model for the Arduino platform; for a comparison with
previous versions, see the index of Arduino boards.
Summary
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
85. 76
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Schematic & Reference Design
EAGLE files: arduino-uno-Rev3-reference-design.zip (NOTE: works with Eagle 6.0 and newer)
Schematic: arduino-uno-Rev3-schematic.pdf
Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use an
ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration is identical
on all three processors.
Power
The Arduino Uno can be powered via the USB connection or with an external power supply. The power
source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The
adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads
from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however,
the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the
voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
The power pins are as follows:
VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied
with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of
the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can
damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
GND. Ground pins.
Memory
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM and 1 KB
of EEPROM (which can be read and written with the EEPROM library).
Input and Output
Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a
maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In
addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins
are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt() function for
details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
86. 77
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPI library.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e.
1024 different values). By default they measure from ground to 5 volts, though is it possible to change
the upper end of their range using the AREF pin and the analogReference() function. Additionally, some
pins have specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to
shields which block the one on the board.
See also the mapping between Arduino pins and ATmega328 ports. The mapping for the Atmega8,
168, and 328 is identical.
Communication
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or
other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is
available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial
communication over USB and appears as a virtual com port to software on the computer. The '16U2
firmware uses the standard USB COM drivers, and no external driver is needed. However, on Windows,
a .inf file is required. The Arduino software includes a serial monitor which allows simple textual data to
be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being
transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial
communication on pins 0 and 1).
A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a
Wire library to simplify use of the I2C bus; see the documentation for details. For SPI communication,
use the SPI library.
Programming
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino Uno from
the Tools > Board menu (according to the microcontroller on your board). For details, see the
reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to upload new
code to it without the use of an external hardware programmer. It communicates using the original
STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit
Serial Programming) header; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available . The
ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy)
and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground,
making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and Linux) to
load a new firmware. Or you can use the ISP header with an external programmer (overwriting the
DFU bootloader). See this user-contributed tutorial for more information.
Automatic (Software) Reset
87. 78
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is
designed in a way that allows it to be reset by software running on a connected computer. One of the
hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the
ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops
long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by
simply pressing the upload button in the Arduino environment. This means that the bootloader can
have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running Mac OS X
or Linux, it resets each time a connection is made to it from software (via USB). For the following half-
second or so, the bootloader is running on the Uno. While it is programmed to ignore malformed data
(i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the
board after a connection is opened. If a sketch running on the board receives one-time configuration or
other data when it first starts, make sure that the software with which it communicates waits a second
after opening the connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace
can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the
auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum thread for
details.
USB Overcurrent Protection
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and
overcurrent. Although most computers provide their own internal protection, the fuse provides an extra
layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break
the connection until the short or overload is removed.
Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB
connector and power jack extending beyond the former dimension. Four screw holes allow the board to
be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil
(0.16"), not an even multiple of the 100 mil spacing of the other pins.
88. 93
EN - For pricing and availability in your local country please visit one of the below links:
DE - Informationen zu Preisen und Verfügbarkeit in Ihrem Land erhalten Sie über die unten aufgeführten Links:
FR - Pour connaître les tarifs et la disponibilité dans votre pays, cliquez sur l'un des liens suivants:
A000066 A000066
EN
This Datasheet is presented by
the manufacturer
DE
Dieses Datenblatt wird vom
Hersteller bereitgestellt
FR
Cette fiche technique est
présentée par le fabricant
89. 79
Body temperature sensor
Reading the temperature with an Arduino is an extremely useful
function. It's the sort of function that is essential in many projects
ranging from building your own home thermostat to creating a
weather station. In addition it's simple enough to be implemented in a
few minutes with any Arduino and just two simple components.
In this tutorial, I will show you how to use an Arduino to read
temperature from a thermistor and print it on the serial port. A
thermistor is a simple electronic component that changes resistance
based on the temperature. This tutorial focuses on the simplest and
least expensive means for reading temperature. Along the way you
will learn a simple, core building block of electronics that enables you
to explore a whole world of sensors with your Arduino.
How Arduino Reads Temperature
There are several ways to read temperature with an Arduino. A few
of these include:
I2C or Serial Sensors – There are advanced sensor modules
that often can measure barometric pressure, temperature,
humidity, and other conditions all in one package. However
these modules are typically much more expensive and require
the use of the I2C or serial protocol to read. These might be
great for a more advanced weather sensor project.
Thermal analog sensor – A three pin component that takes
power, ground, and outputs a variable voltage based on the
temperature by implementing a band gap core inside a single
component. This class of component is useful and I'll examine
this in a future tutorial.
90. 80
Thermistor – A resistor that changes resistance based on the
ambient temperature.
This tutorial focuses on using the thermistor method for several
reasons. First, it responds quickly to temperature changes, second,
it's cheap and finally, it's easy to use.
There are also two very important concepts to be learned from this
tutorial:
1. Reading a value from an Arduino analog pin.
2. Using a voltage divider circuit to read variable resistor sensors.
Variable resistor sensors are manufactured to measure all sorts of
things, in the physical world, and the ability to read these sensors
with your Arduino will be an excellent basic skill to master. Rotation,
pressure, strain, flex, light, and heat are all examples of things you
can measure using an analog pin and a voltage divider circuit.
How It Works
Arduino analog pins read a voltage that is expected to range from 0V
to 5V. A standard way to turn a resistance change in a thermistor
into a voltage change that the Arduino analog pin can read is to
create a voltage divider circuit. The circuit uses two resistor in a
circuit of a known voltage to create a mathematically predictable
voltage value: Vout.
It's a very simple circuit as shown below. As the R1 (resistor 1) value
changes, Vout changes. In our tutorial R1 will be the thermistor and
its value will change relative to the temperature. Vout is connected to
our analog port on the Arduino so we can monitor it.
91. 81
circuit schematic
Voltage divider
Enough theory, let's move on to building up the breadboard and
Arduino.
Setting Up
Set up your breadboard and Arduino board like this diagram
below. The diagram was made with Fritzing a great tool for wiring up
projects logically before grabbing wires and components. The top,
grey component is the thermistor, or R1, in the diagram above. This
is one of many ways to wire up the circuit, I chose it because it
complies with some good, basic breadboarding practices.
layout with thermistor and voltage divider circuit
Breadboard
Programming The Arduino
92. 82
Reading the analog pin on an Arduino is quite simple. The pins
labeled A0 - A5 on the Arduino are special pins that when read with
the analogRead() function will return the value from 0 to 1023 where
the input voltage is from 0V to 5V. As the value of R1, the thermistor,
changes based on the temperature, the voltage into the A0 pin will
change predictably between 0V and 5V.
Let's write up some code and push it over to the Arduino.
1. Plug the Ardunio into your computer with the USB cable
2. Open the Arduino IDE
3. Copy and paste the code below
4. Press the Upload button to load the code into your Arduino
5. Open up the Serial Monitor of the Arduino IDE by
pressing CTRL SHIFT Mor Selecting the menu Tools > Serial
Monitor.
01
02 void setup() { //This function gets called when the Arduino starts
Serial.begin(115200); //This code sets up the Serial port at 115200 baud rat
03 }
04
05 void loop() { //This function loops while the arduino is powered
06 int val; //Create an integer variable
07 val=analogRead(0); //Read the analog port 0 and store the value in val
08
Serial.println(val); //Print the value to the serial port
delay(1000); //Wait one second before we do it again
09 }
10
Tip: Make sure the baud rate of the Serial Monitor matches what we set in
the setup() function. In this example: 115200.
The output should look something like this:
463
463
463
463
93. 83
463
463
Unless your breadboard is in a very hot oven, these values don't
make sense. That's because these are simply voltage samples
translated into a scale from 0 to 1023. Next, we need to turn these
into a usable temperature value.
Converting Analog Values to
Temperature
Above I mentioned that using the thermistor would be simple, and
that's because we can stand on the shoulders of giants. There is an
equation to do the translation from sampled value to temperature
called the Steinhart–Hart equation.
(http://en.wikipedia.org/wiki/Thermistor) The Steinhart-Hart equation
has already been translated for the Arduino. One examples of this
can be found at playground.arduino.cc in an article by Milan
Malesevic and Zoran Stupic. I've illustrated their
function Thermistor() below and added comments on how to use it.
1. Copy and paste the code below into the Arduino IDE replacing
the original example
2. Click on the Upload button to push this code up to your
Arduino.
3. Open up the Arduino Serial Monitor window once again as it
has vanished when you uploaded the code.
94. 84
#include <math.h> //loads the more advanced math functions
void setup() { //This function gets called when the
Arduino starts
Serial.begin(115200); //This code sets up the Serial port at
115200 baud rate
}
double Thermister(int RawADC) { //Function to perform the fancy math
of the Steinhart-Hart equation
double Temp;
Temp = log(((10240000/RawADC) - 10000));
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp *
Temp ))* Temp );
Temp = Temp - 273.15; // Convert Kelvin to Celsius
Temp = (Temp * 9.0)/ 5.0 + 32.0; // Celsius to Fahrenheit - comment
out this line if you need Celsius
return Temp;
}
void loop() { //This function loops while the arduino is
powered
int val; //Create an integer variable
double temp; //Variable to hold a temperature value
val=analogRead(0); //Read the analog port 0 and store the
value in val
temp=Thermister(val); //Runs the fancy math on the raw analog
value
Serial.println(temp); //Print the value to the serial port
delay(1000); //Wait one second before we do it again
}
Now the output should look much more like this:
69.22
69.07
69.22
69.22
70.33
72.07
72.86
73.34
74.13
Now this makes sense. My workshop is indeed 69 degrees
Fahrenheit. During this example, I touched the top of the thermistor
95. 85
with my finger and it sensed the temperature increase as you can
see.
Try experimenting with your setup to get more comfortable with these
new skills. Here are some suggestions.
Reduce the delay value in the loop to see how fast the
thermistor can react to temperature changes. (I don't suggest
changing this below 50 or you might overflow your serial
buffer.)
Try altering the program to get Celsius values (hint: read the
comments in the code)
Modify the breadboard and code to use pin A1 instead of A0
Extra Credit: Reconfigure the circuit to use a 10K Ohm mini
photo resistor and document analogRead() values based on
lighting changes (hint: use the first code segment)
Summary
That's all there is to it. Now you can go and create any manner of
invention using a very inexpensive thermistor.
You have employed the skills of building a breadboard circuit
Compiling and uploading a sketch to your arduino
Additionally from this tutorial you have learnt how to:
read analog values from the Arduino using analogRead()
understand and manipulate the value returned from
the analogRead() function
use a a voltage divider circuit to read changes to a resistor
based sensor such as the thermistor
96. 86
convert analog thermistor values into temperature values
While at first programming your Arduino to read and understand the
world around it may sound complicated, in reality, there is a whole
array of simple and inexpensive sensors available that will allow you
to interface with the real world quickly and easily. The voltage divider
circuit and some simple code can give your next creation new and
powerful senses.