Doggy Pal Collar - UCF EECS - University of Central Florida

Doggy Pal Collar - UCF EECS - University of Central Florida
Doggy Pal Collar
May 2, 2016
Group #33
Term: Spring 2016
Members:
Bryon Walsh - Electrical Engineering
Dustin DeCarlo - Electrical Engineering
Steven Heagney - Electrical Engineering
Stephanie Heagney - Electrical Engineering
Table of Contents
1.0 Executive Summary .................................................................................................................. 1
2.0 Project Description ................................................................................................................... 2
2.1 Project Motivation and Goals ............................................................................................... 2
2.2 Objectives ............................................................................................................................ 3
2.3 Requirement Specifications ................................................................................................. 4
2.3.1 Size ................................................................................................................................ 4
2.3.2 Weight ........................................................................................................................... 4
3.0 Research related to Project Definition ..................................................................................... 6
3.1 Related Projects ................................................................................................................... 6
3.1.1 PetPace ......................................................................................................................... 6
3.1.2 Voyce Health Monitor ................................................................................................... 7
3.1.3 Whistle .......................................................................................................................... 8
3.2 Relevant Technologies ....................................................................................................... 10
3.2.1 GPS sensor................................................................................................................... 10
3.2.2 Heart Rate Monitor Sensor ......................................................................................... 13
3.2.3 Temperature Sensor.................................................................................................... 16
3.2.4 Accelerometer Sensor ................................................................................................. 19
3.2.5 Wi-Fi/Bluetooth Transmitter ....................................................................................... 25
3.2.6 Power Supply .............................................................................................................. 33
3.2.7 Microcontroller: .......................................................................................................... 39
3.3 Microcontroller Programming ............................................................................................ 51
3.3.1 Code Composer Studio ................................................................................................ 51
3.3.2 LM Flash Programmer ................................................................................................. 53
3.3.3 Tivaware ...................................................................................................................... 53
3.3.4 Energia ........................................................................................................................ 54
4.0 Related Standards .................................................................................................................. 56
5.0 Realistic Design Constraints ................................................................................................... 58
5.1 Economic and Time Constraints ......................................................................................... 58
5.2 Environmental, Social, and Political Constraints ................................................................ 60
5.3 Ethical, Health, and Safety Constraints .............................................................................. 60
5.3.1 Animal Testing ............................................................................................................. 61
5.4 Manufacturability and Sustainability Constraints .............................................................. 64
i
6.0 Project Hardware and Software Design Details ..................................................................... 67
6.1 Initial Design Architectures and Related Diagrams ............................................................ 67
6.2 Temperature Subsystem .................................................................................................... 74
6.3 Heart Rate Monitor Subsystem .......................................................................................... 75
6.4 Accelerometer Subsystem.................................................................................................. 81
6.5 GPS Subsystem ................................................................................................................... 87
6.6 Microcontroller Programming Plan .................................................................................... 91
6.6.1 Internet of Things Subsystem ...................................................................................... 94
7.0 Project Prototype Construction and Coding ........................................................................... 98
7.1 PCB Acquisition and BOM .................................................................................................. 98
7.2 PCB Design ......................................................................................................................... 98
7.3 Final Programming Code Plan .......................................................................................... 100
8.0 Project Prototype Testing .................................................................................................... 103
8.1 Temperature Sensor Testing ............................................................................................ 103
8.2 Accelerometer Testing ..................................................................................................... 104
8.3 GPS Testing ...................................................................................................................... 104
8.4 Battery Testing ................................................................................................................. 105
8.5 Heart Rate Monitor Testing.............................................................................................. 108
8.6 Wi-Fi Testing .................................................................................................................... 113
8.7 Collar Stress Test .............................................................................................................. 117
9.0 Project Plan .......................................................................................................................... 120
9.1 Division of Work Responsibility ........................................................................................ 120
9.2 Milestones........................................................................................................................ 121
9.3 Budget .............................................................................................................................. 123
9.4 Finances ........................................................................................................................... 125
10.0 Project Operation ............................................................................................................... 128
10.1 Troubleshooting the Doggy Pal Collar ............................................................................ 130
11.0 Administrative Content ...................................................................................................... 131
11.1 Works Cited .................................................................................................................... 131
11.2 Datasheets ..................................................................................................................... 134
11.3 Permission Letters: ......................................................................................................... 136
ii
1.0 Executive Summary
Doggy Pal Collar (DPC) is a device that can be attached to a dog that is
designed to monitor the heart rate, temperature, location, and position of any dog
by wireless communication. This smart collar will display all the information it
collects to an Internet of Things website created for the owner. The idea for this
project was inspired by one of the members of the group. His dog has a medical
condition that unfortunately makes his dog have erratic seizures. He explained
how this condition induced constant fear because he never knew when a seizure
could happen. A seizure could occur when he was away; preventing his dog from
getting the required attention until it was too late. The DPC was created in the
hopes that by monitoring and tracking the dog the information gained will be able
to show any patterns or important signs that a veterinarian can later view and use
to help treat the dog. The collar was also equipped with an alert system that can
notify the owner when the dog is suffering from a seizure in real time so that the
dog can get the immediate treatment he/she needs. This smart collar will detect,
track, and log the dog's heart rate continuously and graph for easy access. The
heart rate monitor will detect any abnormal heart rates which will alert the owner
something's wrong. The temperature sensor and accelerometer will display the
current temperature and position of the dog while the Internet of Things website
keeps a log of all the information. The GPS element was chosen so that the
owner could find the dog quickly when he/she is having a seizure or should the
dog get lost. Being as this device is for a dog some abnormal design constraints
need to be taken into consideration; a major one being animal testing. The
University of Central Florida does not allow animals, nor humans, to be tested on
so for this project some inventive substitutes using non-living objects will be
sufficient. Another important constraint is the material used in the encasement of
the device. It will have to be strong enough to endure some rough treatment, like
withstanding being rolled on and scratched at, but the material can't be too heavy
or the collar may not be able to support it. 3D printed material was chosen for its
durability and lightweight. The size design of the DPC will have to be slim so that
it does not disturb the dog and fits comfortably around the dog's neck, while also
providing ample space for all the equipment needed. It must also meet the
standards for outdoor electronic devices. The electronic components must be
sealed from dirt, dust, and water. Weather is another big restraint; high
temperatures, low temperatures, and humidity can become problems for both the
electronic components and the design material used for the encasement. Testing
will be key to ensure the DPC will operate properly under these constraints. The
Doggy Pal Collar can assist veterinarians with diagnosing patients accurately by
eliminating some of the guesswork that comes when treating patients that can't
communicate. The creation of this smart collar will hopefully help dog owners feel
more at ease knowing their best friend is not alone and that the owner can
access vital information about their dog at any time or anywhere with any device
that has internet access.
1
2.0 Project Description
The Doggy Pal Collar is a smart collar designed to monitor a dog that is wearing
the collar around the neck. The smart collar is user friendly and will allow the
user to monitor several important aspects about the dog at any given time. The
collar will be powered by lithium-ion polymer batteries. The Doggy Pal Collar will
monitor the heart rate of the dog, the temperature of the dog, the location of the
dog with GPS and the position of the dog with an accelerometer. All these
sensors will be on the collar around the neck in a 3D printed case that protects
the components from the elements. A microcontroller will be used to connect with
each sensor to process the data that is collected from each sensor. The Doggy
Pal Collar will have a Wi-Fi chip on the collar that will send the data from each of
these sensors to the cloud. The Internet of Things platform will be used to
process and display the data in real-time using specially designed websites.
These two websites are dweet.io and freeboard.io. The temperature and
accelerometer data will be displayed as numeric data. The GPS data will show
the location of the collar. The heart rate data will be displayed as a graph
showing the pulse of the heart. If the heart rate data is abnormal, dweet.io will
send a message to the user’s phone alerting the user of the strange data. By
having the Internet of Things platform work in unison with the hardware
components, the Doggy Pal Collar can be an efficient tool for both dog owners
and veterinarians to monitor and track data about a dog.
2.1 Project Motivation and Goals
The motivation for this project was to create a device that could monitor a sick
dog. One member of the group has a dog that suffers from seizures. However,
the seizures were random and the owner was always worried about leaving the
dog alone because of these random seizures. The idea was to create a collar
that can monitor the heart rate of the dog. If the dog has a seizure, the collar can
alert the owner about the seizure and the owner can be aware of what is
happening and go check on the status of the dog. The collar will send a message
to the phone of the owner telling the owner the heart rate of the dog is abnormal.
This way the owner can be away from the dog but the smart collar will always be
monitoring the heart rate of the dog for any signs of seizures. The owner would
also be able to track the heart rate data from the collar and be able to present
that data to a veterinarian to help the veterinarian understand what is happening
to the heart of the dog while a seizure is accruing. By adding in more sensors,
the idea is to expand the collar into a device that can monitor several different
data points about the dog. That way the owner or a veterinarian could get a lot of
data about the dog from the collar instead of just the heart rate. The goal for this
project became to create a collar that could monitor the heart rate, temperature,
position and location of the dog. Another goal was to allow the owner or
veterinarian to see the data from these sensors in real time on a device that was
connected to the internet. The final goal was to have the collar send a message
2
to the phone of the owner if the heart rate of the dog became abnormal. By
achieving these three goals a smart collar could be created that would be able to
monitor the health of the dog in real-time and alert the owner in real-time if any
abnormal data was collected.
2.2 Objectives
The overall objective of this project is to create an easy to use smart dog collar
that will allow a user to monitor the status of a dog from anywhere an internet
connection is available. To meet this overall objective, smaller objectives were
created that would add up to the overall objective. The objectives listed below
were determined by the project team to be important to the overall success of the
Doggy Pal Collar. While some of those objectives are more important than
others, each objective listed will help make the Doggy Pal Collar a success smart
collar for animal lovers. To achieve this, the Doggy Pal Collar must meet the
following objectives to be successful according to the team:
1. Lightweight:
a. The Doggy Pal Collar must be light enough for a dog to wear
around the neck without causing the dog to be uncomfortable or
causing physical problems.
2. Small:
a. Each component must be small to fit on the Doggy Pal Collar.
b. The dog collar must also be small so it does not get in the way of
the dog’s natural habits.
3. Tough:
a. The collar needs to be sturdy and handle the natural habits of the
dog.
b. The collar needs to be able to handle different temperatures and
weather conditions.
c. The components need to handle the natural habits of the dog.
d. The components need to handle different temperature and weather
conditions.
4. Safe:
a. Each component must meet all safety and health requirement to be
worn by a living creature.
b. The collar must meet safety and health requirements to be worn.
The collar cannot be too tight or too loose.
5. Long Lasting:
a. The battery should last long and not need to be replaced frequently
b. The components should be long lasting and run constantly without
failure.
c. The material used to make the collar should be long lasting without
breaking.
d. The 3D printing material used to make the component cases should
be long lasting without falling apart.
3
6. Accessible Data:
a. The owner/veterinarian should be able to access the data from the
collar over the internet easily.
b. The data should be available at all times over the internet.
c. The data should be easy to read and displayed properly for each
component.
d. The data should be updated in real-time, providing the most
accurate information.
7. Smart Data:
a. If any data that is collected is abnormal for the dog a text message
should be sent to the owner’s phone alerting the owner
immediately.
2.3 Requirement Specifications
The specifications will be based on the objectives outlined for this project.
Therefore, while there are many different ways to approach this project and many
different technologies to use, the objectives and specifications and overall scope
of the project will limit the parts and technologies that can be used. The
specifications will be obtained for each component of the Doggy Pal Collar.
These components include the GPS unit, accelerometer, heart rate monitor,
microcontroller, temperature sensor, Wi-Fi module and battery. Once these
specifications are determined, the specifications for the 3D printed case and
collar can be obtained. Table 2.3.1 below shows the detailed specifications for
the Doggy Pal Collar.
2.3.1 Size
The overall size of the Doggy Pal Collar will be small. All of the components that
will be used need to be able to fit around the neck of an average sized dog. Many
different parts were researched on their size. It was important to get components
as small as possible without sacrificing quality. The specifications in Table 2.3.1
for the size are the minimum requirements necessary for the project. The largest
component for the Doggy Pal Collar will be the battery. The next largest will be
the wireless communication module followed by the heart rate monitor.
Meanwhile, the accelerometer and temperature sensor are relatively small
compared to the larger components. It might be difficult to get a different battery
size, therefore the battery might dictate what the specific size of the other
components will be in the final design of the Doggy Pal Collar.
2.3.2 Weight
4
The overall weight of the Doggy Pal Collar must be as low as possible. The
reasons for this are similar to the reasons for the small size of the components.
Since the Doggy Pal Collar will be worn around the neck of a dog, the weight
must be comfortable for the dog to carry and not cause any pain in the neck of
the dog. Therefore, components were researched that would be both small in
size and low in weight. These specifications were important for the overall health
of the dog. Like the size specifications, Table 2.3.2-1 contains the weight
specifications for the Doggy Pal Collar. The battery component is the heaviest
component by far. The weight of the battery can be a more important factor than
the size of the battery and the weight could be a deciding factor for which battery
will be used in the final design. The 3D collar casing will also have a high weight.
A different 3D material might be considered, or even a different method to hold
the components if the weight of the 3D casing becomes a burden on the project.
Table 2.3.2-1 Doggy Pal Collar Component Specifications
Component Name
Size
(mm)
(L x W x H )
Weight
(grams)
GPS Module
35.306 x 30.48 x 6.35
8.754
Accelerometer Module
21.59 x 19.05 x 2.0
1.4
Temperature Module
21 x 21 x 2
2.93
Heart Rate Module
16 x 16 x 3.2
3
Bluetooth Module
20.4 x 41 x 4
4.4
Battery (mm3)
60 x 50 x 7.9
47
Microcontroller Module
4x4
1.4
Container
230 x 185 x 69
200
Collar
304.8 x 19.05
90.72
5
3.0 Research related to Project Definition
3.1 Related Projects
During the design ideas stage of this project the team researched different projects that
were related to the same goal. These are the selected few the team deemed
preeminent.
3.1.1 PetPace
The PetPace is a monitoring collar that is designed to help owners track the
health of their dogs and cats via an app. It runs $150 for the collar plus the
accompanying monitoring service which costs $15 each month. It is the first of its
kind because it works for any size dog or cat. It is also the only monitoring collar
that can collaborate with veterinarians so the animal can receive the best
possible care. It works by wirelessly tracking the animal's vitals and sending out
an alert, to both the pet owner and their veterinarian, when there seems to be a
problem. The alerts come by text messages, emails or push notifications. The
veterinarians are contacted by PetPace themselves to “provide education about
the system and set them up to receive its alerts”. Veterinarians receive part of the
revenue from the monitoring service, according to PetPace. It can also track a
range of physical and behavioral parameters, activity patterns, and pain. The
collar monitors the dog's or cat's body posture and follows trends in order to
identify pain or the recovery process from injuries. This collar also tracks how
many calories your pet has burned for weight loss information to help prevent
obesity. The earlier health issues like diseases are detected the easier it is to
prevent suffering and significantly reduce health-related medical bills. It is hard to
diagnose a pet because they are unable to communicate their health problems
and pains so they often remain hidden. PetPace was designed to alleviate that
as co-founder and chief executive of PetPace, Avi Menkes, says “This is the first
system that can actually let the pet talk to us”.
Collar Specifications:
● Single push-button interface
● LED indications
● IP-67 water & dust resistance
● Shockproof and ruggedized for outdoor use
● Dimensions: (electronics case) 1.57 x 1.27 x 0.59″ (40 x 35 x 15mm)
● Weight: 1.5oz(43gr)
● Battery: LiPo 250mAh, for over 6 weeks between recharges
● Adjustable strap, available in 3 sizes: S,M,L
● Fits pets over 8 lbs
● Rechargeable collar
Gateway Specifications:
6
●
●
●
●
●
●
LED indications
Standard micro-USB connector for power
Ethernet 10/100 BASE-T
Single
gateway can serve up to 30 collars
Dimensions: 3.07 x 2.11 x 2.00″ (78 x 60 x 51mm)
Weight: 2.18oz (62g)
3.1.2 Voyce Health Monitor
The Voyce Health Monitor is an award winning collar that was “developed in
collaboration with biomedical engineers, veterinary experts and Cornell
University College of Veterinary Medicine”. This collar uses non-invasive sensors
that can detect various health conditions, behavior issues, heart disease and
anxiety for preventative care at any age.
How Voyce is able to reveal so much is by monitoring key features which include:
● Resting Heart Rate
● Resting Respiratory Rate
● Activity & Intensity
● Quality of Rest
● Calories Burned
● Distance Traveled
Resting heart and respiratory rate gives crucial information that can lead to early
detection of health issues and lower medical costs. Both the resting heart rate
and respiratory rate are tracked by the Health Monitor while the dog is at
completely at rest by taking multiple reading of both the carotid pulse and muscle
movement in the neck. The reading are then averaged to minimize heart rate
variability and increase accuracy; then graphed over time so trends are easily
visible. This smart collar creates a vital sign baseline for owners and
veterinarians so that they can easily detect and address changes in health and
behavior. They Voyce Health Monitor costs $199 plus $9.50 a month to access
your dog's data, tailored articles and resources like advice from pet experts that
is tailored specifically to each individual dog. The owner can also; get a
customized dashboard with fast facts, and articles based their dog’s breed and
health profile; set goals to encourage more active, spur weight-loss, and spend
more quality time together; set reminders for vaccines, flea and tick shots, ear
cleaning or clipping toenails, upcoming appointments, etc.
Collar Specifications
● Ergonomic curved design
● Lightweight, less than 6 ounces including the band
● Multiple sizes accommodate 12-32 inch necks
● Easy to use multi-function button and LED
● Durable, dust proof, and waterproof up to 1 meter (Rated to IP67)
● Non-invasive, radio frequency based technology
7
●
●
●
●
●
●
Fully integrated triple axis accelerometer
Powerful onboard microcontroller
Proprietary, specialized algorithms analyze data
Rechargeable lithium-ion polymer battery
Portable charging station utilizing micro-USB
Estimated normal use of up to one week between charges
Connectivity Specifications:
● Optimized for all current major browsers on desktops, tablets, and
smartphones
● Requires Internet access and Wi-Fi connectivity for syncing (802.11 b/g/n
at 2.4 GHz)
● Supports up to 10 separate networks
3.1.3 Whistle
Whistle has two products, the first originally named Whistle GPS Pet Tracker is
solely a GPS tracker and the second named Whistle Activity Monitor that tracks a
pet's health. The GPS Pet Tracker is priced at $79.95 each plus a required
monthly fee that ranges from $6.95 - $9.95 in order to activate while the Activity
Monitor is priced at $99.95 with no monthly fee. The Whistle GPS Pet Tracker
will send the dog's information to the owner's smartphone via an app. It is first
device to combine an app system and location-tracking with smart activity
monitoring.
This smart collar features:
● Live GPS Tracking
● Location alerts
● Nationwide GPS Coverage
● Custom Whistle zones
● Monitor health trends
● Track progress
● Connected caretakers
Whistle zones are customized safe areas that the owner can choose and receive
alerts when their pet leaves that area. The owner can also track their dog’s longterm health trends and compare the information with the shape for the dog's age,
weight, and breed. Everyone who has a hand in caring for the dog can be added
to the owner's account; that way everyone's always informed.
Whistle GPS Pet Tracker Specifications
● Rechargeable battery - a full recharge only takes an hour.
● Durable - rated IP67
● Waterproof
Technical Specifications:
8
●
●
●
●
Dimensions: 1.5 x 4.2 x 0.8 inches
Weight: 1.3 ounces
Waterproof (IP67)
Collar Attachment (attaches to any collar and harness up to 1" wide)
Software Compatibility:
● Apple iOS 7.1 or greater
● Android 4.0.3 or greater
● Web app available for desktop and mobile browsers
The Whistle Activity Monitor will also send information to the owner's smartphone
via an app. This make it easy for the owner to create healthy habits and track
their dog's progress. The device attaches to the dog’s existing collar and starts
tracking the daily activity and long-term health trends.
This smart collar features:
● Activity tracking
● Set a custom goal
● Track progress
● Stay connected when away
● Compare to similar dogs
● Track medication
● Monitor health trends
● Log food intake
Whistle Activity Monitor also allows the owner to add others to their account so
everyone can communicate about medication, meals, and other details. Within
the Whistle app there is the Whistle Community, a communication hub for
owners to share photos, notes, and memories like themselves. Just like Twitter
and Facebook; owners are able to share their adventures, follow friends and
compare their dog's stats with similar dogs.
Whistle Activity Monitor Specifications:
● 3-axis accelerometer
● LED indicators
● Single push-button interface
● Waterproof (IPX-7)
● Shockproof and ruggedized
● Dimensions: 38 mm W × 10 mm H
● Weight: 16 g
● Adjustable strap, compatible with all collars
● Fits dogs over 10 pounds
● Built-in rechargeable lithium-ion polymer battery
● Up to a week between charges
● USB charging dock
Wireless Connectivity:
9
● Bluetooth 4.0 Dual Mode (Classic and Low Energy)
● Wi-Fi 802.11 b/g/n (2.4GHz supported)
Software Compatibility:
● Apple iOS 7.1 or greater
● Android 4.0.3 or greater
3.2 Relevant Technologies
3.2.1 GPS sensor
Ultimate GPS Module - MTK3339 chipset: The MTK3339 chipset is a highsensitivity receiver, high-quality, no-nonsense GPS module that can track up to
22 satellites on 66 channels. It has a built in antenna and has a high speed of 10
location updates per second. Plus, the power consumption is incredibly low at
only 20 mA during navigation. Its two best features are the external antenna
functionality and the built in data-logging ability. If a bigger antenna is needed it
can easily attach to the “ANT” pad and the module will automatically detect the
new antenna and switch over. In order for the built in data-logging to start a
microcontroller is needed to send a "Start Logging" command. Once the
command has been sent “the time, date, longitude, latitude, and height is logged
every 15 seconds and only when there is a fix”. The MTK3339 chipset can store
up to 16 hours of data and updates data automatically so there is no worry about
losing data if the power is lost. It costs $29.95 on the Adafruit website.
Other features include:
● -165 dBm sensitivity, 10 Hz updates, 66 channels
● MTK3339 Operating current: 25mA tracking, 20 mA current draw during
navigation
● 3.3V operation,
● RTC battery-compatible
● Built-in data-logging
● PPS output on fix
● Works up to ~32 Km altitude (the GPS theoretically does not have a limit
until 40Km)
● Internal patch antenna + connection for optional external active antenna
● Fix status output
● Ultra-small size: only 16mm x 16mm x 5mm and 4 grams
● Satellites: 22 tracking, 66 searching
● Update rate: 1 to 10 Hz
● Position Accuracy: < 3 meters (all GPS technology has about 3m
accuracy)
● Velocity Accuracy: 0.1 meters/s
● Warm/cold start: 34 seconds
● Acquisition sensitivity: -145 dBm
10
●
●
●
●
●
Maximum Velocity: 515m/s
Vin range: 3.0-4.3VDC
Output: NMEA 0183, 9600 baud default
DGPS/WAAS/EGNOS supported
FCC E911 compliance and AGPS support (Offline mode : EPO valid up to
14 days)
● Up to 210 PRN channels
● Jammer detection and reduction
● Multi-path detection and compensation
GPS Receiver - GP-2106 SiRF IV: The GP-2106 is another small quarter sized
GPS receiver with a built-in high sensitivity sensor, and smart antenna. This
module can detect satellites as low as -163dBm and is powered by the SiRF Star
IV GPS solution. It also come with the ability to go as low as 30uA while in
hibernate mode and still maintaining a hot start. This 48 channel GPS module
works best when it is embedded in portable devices like car tracking device,
locator application, and safety alarm devices to only name a few. The embedded
active Jammer remover will ensure fast and accurate navigation even if it's in
unfavorable signal/high noise environments. This GP-2106 GPS receiver can be
found on the Sparkfun website for $49.95.
Other features include:
● SiRF IV chipset (3db gain over SiRF III)
● 48 channel
● Cold start - 35 second
● Warm start - 35 second
● Hot start - 1 second
● 1Hz update rate
● 1.8VCC input
● 4800bps (default)
● Wire to board connector type
● Support MEMS Sensor to detection and wakeup the device for power
saving and longer battery life.
● Adaptive Micro-power controller- only 50 to 500uA to maintain hot start
capability.
● Embedded Instant Fix CGEE and Reverse CGEE (3 days) for faster warm
start.
● Embedded active Jammer remover to ensure fast and accurate navigation
in hostile signal environments – GSM, NB environments
Garmin GPS 15x™: This GPS is a functional, high-sensitivity sensor that is
designed for a variety of OEM applications like car navigation, wireless
communication, marine navigation and mapping. It is ideal for projects that have
a limited amount of space because its size is practically the size of a
commemorative stamp and its weight is 0.26 ounces. Also because of its small
size it can be remotely mounted in out-of-the-way locations. This GPS sensor
has a CMOS level, UART-compatible asynchronous serial port, a wide input
11
voltage range, can be updated with the latest firmware from the Garmin website,
and offers excellent EMI/RFI performance so the user doesn't have to worry
about interference while operating it near smart mobile devices and wireless
communications equipment. Using its proven technology that is found in other
Garmin GPS receivers, GPS 15x™ is designed with a spectrum of OEM (Original
Equipment Manufacturer) system applications that can track multiple satellites at
a time while providing fast time-to-first-fix, precise navigation updates, and low
power consumption. The GPS 15x™ also has the capability of Wide Area
Augmentation System (WAAS) differential GPS and can be supplied by an OEM
or system integrator with only a few additional components. It is available on the
Garmin website for $43.50.
Other features include:
● GPS receiver tracks and uses multiple satellites for fast, accurate
positioning and velocity estimates.
● Compact, rugged design ideal for applications with minimal space.
● May be remotely mounted in an out-of-the-way location.
● User initialization is not required. Once installed, this device automatically
produces navigation data.
● On-board backup battery to maintain the non-volatile SRAM and real-time
clock for up to 21 days.
● Provision for external power to maintain the charge on the backup battery.
● Configurable parameters include expected position, current time and date,
and preferred position fix type (2D, 3D, or automatic)
● Size - 0.940 × 1.690 × 0.309 in. (23.88 × 42.93 × 7.84 mm
● Weight - 0.26oz. (7.37g)
For the Doggy Pal Collar the GPS needs to meet specific requirements. As this
device is going to be warn around a dog’s neck it needs to be small and light
weight which includes the GPS chip. It also need to have high-sensitivity
because the dog may travel in places where signal interference could be a factor.
It also needs to be cheap due to budget restraints. The Adafruit MTK3339 chip
meets all the requirements and more. Its low power consumption mean less
battery power is needed with leads to a smaller battery; inadvertently lowering
the overall weight of the device. It uses UART interface and Adafruit tested this
GPS chip themselves and found the time-to-first-fix to be 45 seconds in
Downtown Manhattan, New York. This chip was capable of tracking them as they
traveled through New York’s underground caverns, which is impressive. Even
though the MTK3339 is small and therefore has a small flash there is an option to
program the chip to only log information when moving which saves flash space.
For these reasons the Adafruit's MTK3339 GPS chip, shown in Figure 3.2.1-1,
was chosen to be implemented into the smart collar.
12
Figure 3.2.1-1: MTK3339 GPS Chip (Courtesy of Adafruit)
3.2.2 Heart Rate Monitor Sensor
The MAX30100 is a pulse oximeter and heart-rate monitor integrated chip sensor
created by Maxim Integrated. The MAX30100 comes with two light emitting
diodes, a photodetector sensor, enhanced optics and low frequency noise analog
signal processing that can be used to find pulse oximetry and heart-rate signals.
The sensor can run on a power supply of 1.8V or a power supply of 3.3V. The
sensor can run at a temperature of -40°C to +85°C. Using software, the sensor
can be powered down with little standby current which allows the power supply to
remain attached. This type of sensor can be used for medical devices, wearable
clothing and fitness devices. According to the MAX30100 datasheet, the sensor
has the following features and benefits:
1. Complete Pulse Oximeter and Heart-Rate Sensor Solution Simplifies
Design
a. Integrated LEDs, Photo Sensor, and High-Performance Analog
Front -End
b. Tiny 5.6mm x 2.8mm x 1.2mm 14-Pin Optically Enhanced Systemin-Package
2. Ultra-Low-Power Operation Increases Battery Life for Wearable Devices
a. Programmable Sample Rate and LED Current for Power Savings
b. Ultra-Low Shutdown Current (0.7μA, typ)
3. Advanced Functionality Improves Measurement Performance
a. High SNR Provides Robust Motion Artifact Resilience
b. Integrated Ambient Light Cancellation
13
c. High Sample Rate Capability
d. Fast Data Output Capability
The AFE4400 is an analog front-end integrated chip sensor used for pulse
oximeter devices. The sensor has a low frequency noise receiver channel with an
analog-to-digital converter that is integrated into the chip, a light emitting diode
transmit section and diagnostics for sensor fault detection and light emitting
diode fault detection.
The AFE4400 sensor also acts as a flexible timing controller. This ability allows
the user to have total control of the AFE4400 timing characteristics. The device
also has an integrated oscillator that runs from an external crystal. This oscillator
eases clocking requirements and provides a low-jitter clock to the device. The
AFE4400 talks to external devices, such as a microcontroller, using an SPI™
interface. Applications for the AFE4400 include medical devices and optical
devices. According to the AFE4400 datasheet, the sensor has the following key
features:
1. Fully-Integrated Analog Front-End for Pulse Oximeter Applications:
a. Flexible Pulse Sequencing and Timing Control
2. Transmit:
a. Integrated LED Driver (H-Bridge, Push, or Pull)
b. Dynamic Range: 95 dB
c. LED Current:
i.
Programmable to 50 mA with 8-Bit Current Resolution
d. Low Power:
i.
100 µA + Average LED Current
e. Programmable LED On-Time
f. Independent LED2 and LED1 Current Reference
3. Receive Channel with High Dynamic Range:
a. 13 Noise-Free Bits
b. Low Power: < 670 µA at 3.3-V Supply
c. Integrated Digital Ambient Estimation and Subtraction
d. Flexible Receive Sample Time
e. Flexible Trans impedance Amplifier with Programmable LED
Settings
4. Integrated Fault Diagnostics:
a. Photodiode and LED Open and Short Detection
b. Cable On and Off Detection
5. Supplies:
a. Rx = 2.0 V to 3.6 V
b. Tx = 3.0 V to 5.25 V
6. Package: Compact VQFN-40 (6 mm × 6 mm)
7. Specified Temperature Range: 0°C to 70°C
The AD8232 is a signal conditioning integrated chip used for ECG measurement
applications. The chip is created to receive, amplify and filter bio potential signals
that are within noisy conditions. This type of design allows for other devices such
14
as a microcontroller or an ultralow power analog-to-digital converter to receive
output signals easily. The chip can implement a two-pole high-pass filter that in
combination with instrumentation architecture of the amplifier can allow both
large gain filtering and high-pass filtering in a single stage. This ability saves both
space and cost. The AD8232 also has a fast restore ability that reduces the
length of settling tails from the high-pass filter. Using an uncommitted operational
amplifier, the chip can create a three-pole low-pass filter to eliminate more noise.
Depending on the application type, the user can choose the frequency cutoff of
all filters. The AD8232 has an amplifier for driven lead applications to help
improve common-mode rejection of interferences. One example would be right
leg drive (RLD). The chip performance temperature is from 0°C to 70°C and its
operational temperature is from −40°C to +85°C. Applications for the AD8232
integrated chip include medical devices, fitness devices and gaming devices
According to the AD8232 datasheet, the chip has the following features:
1. Fully integrated single-lead ECG front end
2. Common-mode rejection ratio: 80 dB (dc to 60Hz)
3. Low supply current: 170 µA (typical)
4. Two or three electrode configurations
5. High signal gain (G = 100) with dc blocking capabilities
6. 2-pole adjustable high-pass filter
7. Accepts up to ±300 mV of half-cell potential
8. Uncommitted op amp
9. Fast restore feature improves filter settling
10. 3-pole adjustable low-pass filter with adjustable gain
11. Leads off detection: ac or dc options
12. Single-supply operation: 2.0 V to 3.5 V
13. Integrated right leg drive (RLD) amplifier
14. Integrated reference buffer generates virtual ground
15. Rail-to-rail output
16. Internal RFI filter
17. Shutdown pin
18. 8 kV HBM ESD rating
19. 20-lead 4 mm × 4 mm LFCSP package
The MAX30100, AFE4400 and AD8232 each have their advantages and
disadvantages. Some features of each chip will not be necessary for the Doggy
Pal Collar, but each chip would bring something different to the Doggy Pal Collar
and each chip is a good choice for a heart rate monitor which is a key part of the
project. However, because of the constraints and specifications needed for the
Doggy Pal Collar, each integrated chip will have to be weighed against those
requirements and the integrated chip that best meets those requirements for the
project will be chosen. The decision was made to use the AD8232 integrated
chip for the heart rate monitor sensor for the Doggy Pal Collar. This chip was
chosen because the features of the AD8232 match well with the requirements for
the Doggy Pal Collar. The AD8232 integrated chip needs a low supply current at
typically 170 µA and is small in size at 4 mm x 4 mm. This will be helpful because
15
the components of the Doggy Pal Collar need to run at low power and be small in
size to fit on the collar. It also has a single-lead front end and flexible analog filter
features that will help filter out noise and take good measurements of the heartrate. The AD8232 can also be paired with a microcontroller to make viewing
output data easy and will work alongside an electrode cable. The AD8232 comes
with a shutdown pin that can put the chip into a low power shutdown mode. In
this mode the chip draws less than 200 nA of current. It also has a leads off
comparator output which has both DC and AC detection modes. If an electrode is
removed from the body it will cause the leads off pin to display a flat line. This
helps with easy trouble shooting and can warn the user that the heart rate
monitor is not functioning properly. While the MAX30100 and the AFE4400 are
good integrated chips, the features of the AD8232 show that the chip was built
for small, portable medical devices and this will be useful for the Doggy Pal
Collar. Figure 3.2.2-1 shows the pin configuration of the AD8232 chip from
Analog Devices.
While the AD8232 is a good chip, for the final design the Pulse Sensor Amped
was chosen. The Pulse Sensor Amped is a plug and play heart rate sensor
device that is easy to use for prototyping and testing. The Pulse Sensor Amped
at its heart is an optical heart rate sensor and uses pulse oximetry to find the
heart rate. It also comes with built in amplification and noise cancellation circuit
technology to help get an accurate reading. Another bonus is the sensor only
uses 4mA current draw and 5v making it a great sensor for a mobile and low
powered device like the Doggy Pal Collar. The size of the sensor is another great
feature because its small size saves a lot of space for bigger components of the
Doggy Pal Collar. Overall, from the beginning of the project to the end, the Pulse
Sensor Amped had multiple advantages over the competition for this project.
3.2.3 Temperature Sensor
The TMP007 is an infrared temperature sensor integrated chip made by Texas
Instruments. The features listed on its datasheet are:
● Integrated MEMS Thermopile for Noncontact Temperature Sensing
● 14-bit Local Temperature Sensor for Cold Junction References
o +/- 1 ˚ C (max) from 0 ˚ to +60 ˚ C
o +/- 1.5 ˚ C (max) from -40 ˚ to + 125 ˚ C
● Integrated Math Engine
o Directly Read Object Temperature
o Programmable Alerts
o Nonvolatile Memory for Storing Calibration Coefficients
o Transient Correction
● Two-Wire Serial Interface Options
o I2C and SMBus Compatible
16
o Eight Programmable Addresses
● Low Power
o Supply: 2.5 V to 5.5 V
o Active Current: 270 μA (typ)
o 2-μA shutdown (max)
● Compact Package
o 1.9-mm x 1.9-mm x 0.625-mm DSBGA
(Texas Instruments, TMP007 Infrared Thermopile Sensor with Integrated Math
Engine)
The TMP007 measures temperature without contact by absorbing passive
infrared energy from its target object. The math engine uses the voltage change
across the thermopile along with its reference to obtain the target object’s
temperature. The TMP007 can operate at temperatures from -40 ˚ to +125 ˚ C,
and can measure beyond that range as long as the sensor itself stays within the
operating temperature range. A functional block diagram of the TMP007 can be
seen in figure TMP1. The TMP007 is an 8-pin integrated circuit; its pin
configuration can be seen in figure TMP2. The pin designations can be found in
table TMP1.
Two of the typical characteristics of the TMP007 that are important for this project
are the response of the chip to particular wavelengths, and the response of the
chip based on the viewing angle it has on its target. A plot of the response ratio
of the chip versus the wavelength in μm is shown in figure TMP3. A plot of the
Responsivity of the TMP007 versus the viewing angle to the target is shown in
figure TMP4. For this project, the TMP007 will need to be pointed directly
towards the target to achieve the optimum response. The TMP007 will be
positioned on the printed circuit board closest to the inside of the collar, with a
small viewing port which will let it have a direct 0˚ viewing angle to the
temperature measurement target. The wavelengths shown in figure TMP3 are
the wavelengths of maximum sensitivity for the TMP007. The chip is engineered
to sense infrared radiation emitted from objects in the range of -23 ˚ C to 127 ˚ C.
Even if most of the infrared emission from the body heat of the target is outside
of the wavelengths of maximum sensitivity for the TMP007, the chip will still get a
reading. The chip features internal calibration coefficients to compensate for
environmental factors and sensor characteristics. According to the datasheet, the
device should be recalibrated if the board layout is changed, object distance or
angle is changed, the supply voltage is changed, or the environment changes
significantly. The sensor can be calibrated once in the prototype stage in order to
factor out the heat from surrounding components or ambient heat of the
environment. The object distance will remain constant once the sensor is
mounted on the printed circuit board and installed into the prototype housing
(Texas Instruments, TMP007 Infrared Thermopile Sensor with Integrated Math
Engine).
The TMP007 appears to be a very good choice for the temperature sensor in this
project. The no-contact temperature reading ability of the device negates
17
concerns about fur or hair obstructing readings. Concerns about maintaining
constant physical contact with the measurement target are also avoided. The
extremely small size of the device is very well suited to the wearable nature of
this project. The TMP007 is available for $4.75 directly from the Texas
Instruments website, store.ti.com.
Figure 3.2.3-1: TMP007 Pin Configuration (Courtesy of Texas Instruments)
Pin Name
Table 3.2.3-1: Pins of the TMP007:
Pin Number
Function
ADR0
C1
Input Address 0 Select
ADR1
B1
Input Address 1 Select
AGND
A2
Analog Ground
ALERT
C2
Alert Output, Active Low
DGND
A1
Digital Ground
SCL
B3
Input Clock Pin
SDA
C3
Data I/O
V+
A3
Supply Voltage (2.5 V to 5.5 V)
18
Figure 3.2.3-2: Response vs Wavelength (Courtesy of Texas Instruments)
Figure 3.2.3-3: Response vs Angle (Courtesy of Texas Instruments)
3.2.4 Accelerometer Sensor
The accelerometer on this device is possibly the most important component for
this product. When the team sat down and discussed this module it was decided
to choose the best design on the market. It was decided overall that the group
could sacrifice some specification on other modules to amplify the usefulness of
the overall design.
19
The accelerometer on the Doggy Pal Collar is the overall input of information of
the design. When reviewing all the items it was found that 90% of the inputs will
come from the accelerometer, and the more information the team have the more
the microcontroller was able to conclude from what is given.
The amount of power consumed by this component is extremely important.
Unlike other components like the Wi-Fi that runs only when in use the
accelerometer is constantly running and gathering information, so it is imperative
that the power consumption for this module is a minimum to increase the
longevity of the device.
When reviewing these devices the team found they were extremely cheap
compared to the other components within the system. Due to its importance the
group found the cost to be unimportant compared to the amount of information
and accuracy that the team can obtain therefore the team was searching
primarily for the best device on the market.
Accelerometer Sensor #1: The Kionix 2 / 3 Axis Accelerometer was the first
device analyzed as seen in Figure 3.2.4-1. This accelerometer is cheap, has a
good operation temperature range up to 85 degrees Celsius and has a low
operation range. It was decided not to use this device because it only produces
3 axis of information. The team would have to attach at least 1 more to get role
information and other Axis of pull.
Figure 3.2.4-1: Kionix Accelerometer (Courtesy of Kionix)
● Sensing Axis:
X, Y, Z
● Acceleration:
2 g, 4 g, 6 g, 8 g
● Sensitivity:
256 count/g, 341 count/g, 512
count/g, 1024 count/g
● Output Type:
Digital
20
● Interface Type:
I2C
● Resolution:
12 bit
● Supply Voltage - Max:
3.6 V
● Supply Voltage - Min:
1.7 V
● Package / Case:
LGA-16
● Maximum
Temperature:
Operating + 85 C
● Minimum
Temperature:
Operating - 40 C
● Axes
3
Accelerometer Sensor #2: The second accelerometer that was tested is the GY52 3 Axis + Gyroscope for Arduino as seen in Figure 3.2.4-2. The main problem
with this module is that it is for Arduino. Arduino type microcontrollers are bulky
and run at high power outputs which are non-ideal for our design. This type of
device was great for us because of the amount of information that the team could
gather, but unfortunately this type of microcontroller is unwanted in our design.
Figure 3.2.4-2 – GY-52 Accelerometer (Courtesy of Dealextreme)
● Sensing Axis:
X, Y, Z, Gyroscope 9 axis total
● Acceleration:
2 g, 4 g, 6 g, 8 g, 16g
21
● Gyroscope Range:
250, 500, 1000, 2000 Degrees
● Sensitivity:
256 count/g, 341 count/g, 512 count/g,
1024 count/g
● Output Type:
Digital
● Interface Type:
I2C
● Resolution:
12 bit
● Supply Voltage - Max:
5V
● Supply Voltage - Min:
3V
● Maximum
Temperature:
Operating + 85 C
● Minimum
Temperature:
Operating - 40 C
Accelerometer Sensor #3: The third accelerometer looked at is the Freescale
FXLS8471Q 3 Axis accelerometer as seen in Figure 3.2.4-3. The team was
interested in this device because of its low voltage requirement. When the
design was overlooked the team found that this accelerometer is large and bulky
for what the group needed. The size of the device is an overall reason to
conclude that this device is unwanted.
Figure 3.2.4-3 Freescale Accelerometer (Courtesy of NXP)
22
● Sensing Axis:
X, Y, Z
● Acceleration:
2 g, 4 g, 6 g, 8 g
● Output Rates:
1.56 to 800 Hz
● Output Type:
Digital
● Interface Type:
I2C
● Resolution:
12 bit
● Supply Voltage - Max:
3.6 V
● Supply Voltage - Min:
1.95 V
● Package / Case:
LGA-16
● Maximum
Temperature:
Operating + 85 C
● Minimum
Temperature:
Operating - 40 C
Accelerometer Sensor #4: It was recommended by our professor to use the
Invensense accelerometer due to its specifications. This accelerometer is the
most advanced the team had looked at. It has a low running voltage and it was
found to give us the most information out of any device. In addition it comes with
a built in thermometer in which the team can use as a reference temperature for
our animal temperature sensor.
● Sensing Axis:
X, Y, Z, Compass, rotational
● Acceleration:
2 g, 4 g, 6 g, 8 g, 16g
● Sensitivity:
256 count/g, 341 count/g, 512 count/g,
1024 count/g
● Output Type:
Digital
● Interface Type:
I2C
● Resolution:
12 bit
● Supply Voltage - Max:
3.6 V
● Supply Voltage - Min:
1.7 V
● Package / Case:
LGA-16
● Maximum Operating
+ 85 C
23
Temperature:
● Minimum Operating
Temperature:
- 40 C
Invensense Accelerometer Figure 3.2.4-4 (Courtesy of Invensense)
It was decided to go with the Invensense 9250. As a group it was chosen to use
this device because it exhibited the best qualities overall. The Invensense had 6
axis of sensitivity and 3 separate compass for the x y z plane. The Kionix
accelerometer was cheap and small, but its temperature operation range was
unacceptable, being that it could only operate up to temperatures of 80 Celsius
as under a collar for extended periods of time it is possible to reach these
temperatures.
The second accelerometer tested was the GY.
This
accelerometer was cheap and within the performance standards of our design,
but unfortunately it was designed for an Arduino microcontroller. It was decided
to find an accelerometer with these type of specifications but one that could
operate with our microcontroller. The third accelerometer that was tested is the
Freescale. It was decided to analyze this device because of its low voltage
requirement. This device only had 3 axis of sensitivity but it was considered to
run two of these devices simultaneously because of the low cost and operational
voltage needed. The Invensense accelerometer not only had 6 axis of total
sensitivity, it also has a built in thermometer which can be used as a secondary
reference thermometer. After testing and assembling the device it ran beyond
expectations. The Invensense accelerometer was clearly the better quality
component to use based on both the price of the unit and the many features the
unit comes with.
For the final project it was decided to use the Adafruit MMA8451 Accelerometer.
This device uses the Freescale Xtrinsic MMA8451Q accelerometer chip at its
heart. The chip is low-powered, has three-axis and 14 bits of resolution. It uses
24
1.95V to 3.6V of power which is helpful to keep the Doggy Pal Collar battery
lasting longer. It has I2C digital output interface and two programmable interrupt
pins for an inertial wakeup mode. Overall, it was a great sensor for the project.
3.2.5 Wi-Fi/Bluetooth Transmitter
Wi-Fi Adapter #1: The first device that was looked at was the Tiny UART
Embedded Module Wi-Fi system. As you can see from the figure below (Figure
3.2.5-1) this device is extremely large. The team’s goal was to try to keep the
dog collar as small as possible so the team determined this to be problematic for
the design. Had this device been smaller it would have been more ideal to use.
The next problem that was found with the device was the amount of power that it
consumed. This module required 3.3v for usage.
Figure 3.2.5-1 Tiny UART (Courtesy of gridconnect)
Below are a list of specifications for the Tiny UART Embedded Module:
●
●
●
●
●
Cost: $12.98
Frequency Band: 2.4 GHz
Protocols: TCP/IP/UDP/FTP/HTTP
Dimensions: 22 x 13.5 x 6 mm (10x1 2mm DIP)
Power Consumption: Continuous TX: ~200mA, Normal (Ave): ~12mA ;
Peak 200mA, Standby: <200uA
● Voltage Requirement: 3.3V
● Temperature operation range: Operation: -40ºC to 85ºC (-40ºF to 185ºF)
Wi-Fi Adapter #2: The second device that was looked at was the Wi-Fi shield
wishield v2.0 for the Arduino as seen in Figure 3.2.5-2. The first problem with
this device was that it runs with an Arduino, but it was decided to analyze this
product to make sure it is something to use or not use. After looking it over it
was decided that this device was massive and not realistically usable. The next
problem that was found with this device was that the power consumption is high.
This device runs at 5 volts which is 2 volts higher than the first device making this
25
no longer an option. Obviously one advantage of this Arduino system is its
compatibility and ease of use. Unfortunately I believe it would create a massive
device with high power consumption over time. This system is good for the new
electronics user but not for our design.
Figure 3.2.5-2 wishield v2.0 (Permission Pending from LinkSprite)
Below are some specifications for the
●
●
●
●
●
●
●
●
●
●
●
●
●
●
Cost: $12.98
Frequency Band: 2.4 GHz
Protocols: TCP/IP/UDP/FTP/HTTP
Dimensions: 22 x 13.5 x 6 mm (10x1 2mm DIP)
Power Consumption: Continuous TX: ~200mA, Normal (Ave): ~12mA ;
Peak 200mA, Standby: <200uA
Voltage Requirement: 5V
Temperature operation range: Operation: -40ºC to 85ºC (-40ºF to 185ºF)
802.11b Wi-Fi certified
1Mbps and 2Mbps throughput speeds
Ability to create secured and unsecured networks
WEP (64-bit and 128-bit)
Sleep mode: 250μA
Transmit: 230mA
Receive: 85mA
Wi-Fi Adapter #3: The third device that was looked at was the Olimex Wi-Fi
Adapter as seen in Figure 3.2.5-3. The device looked good at first glance. This
device was cheap, less than 10 dollars making it quite ideal for mass production.
The temperature range was identified as being inadequate. The maximum range
for the temperature is 70 degrees Celsius making it less likely to survive
extended use in Florida. The Wi-Fi adapter would be under the plastic/rubber
26
material of the collar but the collar itself will be black. Since black rubber/plastic
really heats up fast we found this Wi-Fi adapter unusable.
Figure 3.2.5-3 Olimex Wi-Fi Adapter (Permission Pending from Olimex)
Some specifications of the Olimex Wi-Fi Adapter are as follows:
●
●
●
●
●
●
●
●
Cost: $9.99
Frequency Band: 2.4 GHz
Protocols: TCP/IP/UDP/FTP/HTTP
Voltage Requirement: 3.3V
Temperature operation range: Operation: -40ºC to 70ºC
802.11b Wi-Fi certified
Transmit: 215mA
Receive: 62mA
It was decided to look at the CC3100 as our Wi-Fi Adapter because of its
versatility, size, weight, and specifications. Figure 3.2.5-4 is a picture of the
CC3100. Although these are general reasons, this device goes far beyond the
needed requirements. This device can connect to just about any microcontroller
that is 8, 16 or 32 bit. Below are some of the standard specifications for this.
This is a Wi-Fi Certified chip. The internal Clock runs at 32.768 KHz with a
startup time of 250ms.
●
●
●
●
●
Internal clock is 32.768 KHz
Initialization Time is 250 ms
Wi-Fi certified chip
802.11 b/g/n Radio, Baseband, and Medium Access Control (MAC)
Interfaces with 8, 16 and 32 bit MCU’s
27
●
●
●
●
●
●
Integrated DC/DC supply voltage
Operates from 2.1V to 3.6V
Pre Regulated 1.85V
Low voltage deep sleep mode runs at 115 Microamps.
Clock source is a 40 MHz crystal with an internal oscillator
Ambient temperature range of -40 to 85 Celsius
Figure 3.2.5-4: CC3100 Unit (Courtesy of Texas Instruments)
In conclusion the team decided to use the Texas Instruments CC3100 as our
final Wi-Fi adapter. Although unmentioned the team likes Texas Instruments for
their product reliability and customer service but aside from all that the
specification for the device were much better than all the other Wi-Fi adapters
and it was cheaper. It was decided by the team that the Tiny UART was too
large for our design. The amount of dedicated space this one component would
need was too big, and it was decided to find a new solution on the market for our
design. The next device tested was the Wi-Fi Shield Wishield v2. This
component was not what the team wanted. The Wi-Fi Shield ran off Arduino and
had a high voltage requirement of 5 volts. The next component tested was the
Olimex Wi-Fi Adapter. This component has an extremely low temperature range
of 70 degrees Celsius. The team felt that even with it under the collar, in the hot
sun of Florida it could easily exceed this maximum requirements. Overall the
team concluded that the project would use the TI CC3100 because of its low
voltage, high performance and low price. After testing that using the component
there are no regrets by the team for selecting this device.
28
Bluefruit EZ-Link (Courtesy of Adafruit)
For the final project we chose to use the Bluetooth EZ-Link because of its
availability and ease of use. It was found to be easy to code and it interacted
with our microcontroller very reliably. It came with its own built in antenna with is
considered uncommon. This device allowed us to easily upload our code. In
addition because this product is used to monitor an animal which its owners are
not home it worked perfectly because of the range.
3.2.5.1 Internet of Things
ThingSpeak.com is a website built around the Internet of Things.
ThingSpeak.com uses channels to send and store this data. Once a ThingSpeak
channel is created, data can be sent to the channel, ThingSpeak.com can
manipulate the data, and ThingSpeak.com can send the data. The website works
with mobile applications and web applications as well as Twitter, Arduino and
Raspberry PI among others. Its features include:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Real-time data collection and storage
MATLAB analytics and visualizations
Alerts
Scheduling
Device communication
Open API
Geolocation data
Available on GitHub
ThingSpeak channel
a. Eight fields that can hold any type of data.
b. Three location fields.
29
c. One status field.
Freeboard.io is a cloud based website that can be used with the Internet of
Things platform that helps display data in real-time. The idea behind the website
is to create easy to use dashboards that can display device and sensor
information that has been uploaded to the cloud using Wi-Fi or other networking
technology. Freeboard.io features include:
1. Flexible Data Sources
a. Seamless integration with dweet.io, or access any web-based API.
2. Develop with Widgets
a. Select from a growing list of included widgets, or add your own.
3. Drag & Drop Simplicity
a. Design layouts that exactly meet your needs. Change them quickly
and easily as requirements change.
4. Public or Private access
a. Keep your Freeboards public and pay $0. Select one of our low
cost plans to make them private.
5. Clone it
a. Duplicate any Freeboard and use it as a starting point for a new
one (permission required).
6. Share Instantly
a. Every Freeboard has a unique URL that you can share via email,
SMS, and social networks.
Dweet.io is a cloud-based website that can be used with the Internet of Things
platform that is similar to twitter. This website does not need to be setup, data
only needs to be sent to dweet.io to be published automatically in the cloud.
Dweet.io is a web API and can easily be implemented into microcontroller code
with just a couple lines of code. Dweet.io features:
1. Dweeting
a. Send data from your thing to the cloud by "dweeting" it.
2. Real-time Streams
a. Create real-time subscriptions to dweets.
3. Alerts
a. Notify you when something in the data you dweet falls outside set
of conditions.
4. Client Libraries
Wolfram Data Drop is a cloud based website that allows for the accumulation of
data from sensors, devices and programs. The website uses the Wolfram Data
Framework to make data semantic and make the data computable. Using the
Wolfram Language data can be manipulated in multiple ways including data
computation, data visualization, data analysis, and data querying among others.
Wolfram Data Drop features include:
30
1. Accumulate Data from Anywhere
a. Web API
i.
Anything that can reach the web can send data.
b. Twitter
i.
Data can be sent to @WolframDataDrop to add short pieces
of data.
c. Email
i.
Data can be sent to datadrop@wolframcloud.com.
d. Web Form
i.
Enter data in any format in an embeddable smart web form.
e. Wolfram Language
i.
Add any type of data with a single built-in function.
f. Custom API
i.
Use Wolfram Cloud Instant API to create custom API for
data.
g. Custom Form or APP
i.
Use Wolfram Universal Deployment System to create instant
forms or apps for adding data.
h. Connected Devices and FrameWorks
i.
Use connectors from Wolfram Connected Devices Project
Partners.
2. Instant Access to Powerful Analysis
a. Native Time Series Support
i.
Analyze, visualize, manipulate, forecast, etc. time series
using built-In capabilities of the Wolfram Language.
b. Built-In Geographic Capability
i.
Immediately connect your data with maps and deep
geographic data from the Wolfram Knowledgebase.
c. Built-In Figure Processing
i.
Use figure processing capabilities of the Wolfram Language.
d. Instant Machine Learning
i.
Use automated machine learning system in the Wolfram
Language to analyze data.
e. Make Dynamic Reports Automatically
i.
Create interactive documents based on data.
3. Typical Uses
a. Setup Web Dashboards
i.
Do analyses and create visualizations continuously from
Data Drop data.
b. Generate Alerts
i.
Define any criterion to generate email or other alerts from
Data Drop data.
c. Create A Web Query API
i.
Make it easy to query data from Data Drop from any web
system.
d. Generate Automated Reports
31
i.
Periodically create reports from Data Drop data.
e. Aggregate Data From Multiple Sources
i.
Use Wolfram Data Framework and Wolfram Cloud to
combine different data from Data Drop.
f. Access Data From Any Language
i.
Automatically generate code to access Data Drop data from
any common computer language.
g. Instant Data Publishing
i.
Make data quickly available through Data Drop.
h. Natural Language Data Queries
i.
Setup a system to answer natural language queries using
data from Data Drop.
4. Integrated Into All Wolfram Platforms
a. Wolfram Alpha
i.
Get an instant report on data from Data Drop.
b. Wolfram Development Platform
i.
Include data from Data Drop in programs and applications.
c. Wolfram Data Science Platform
i.
Automatically create reports from data from Data Drop.
d. Wolfram Programming Lab
i.
Learn to program with real-time data from Data Drop.
e. Wolfram Device Analytics Platform
i.
Fast path to dashboards and back-end analytics for
connected products.
f. Wolfram Discovery Platform
i.
Real-time data from Data Drop for R&D processes.
g. Wolfram Mathematica
i.
Real-world data from Data Drop for technical computing.
The Internet of Things platform is an important part of the Doggy Pal Collar
project. Data collected from the sensors on the collar will be sent to the cloud
where that data will be manipulated and displayed. This data must be accessible
and also a message must be sent to the smartphone of the owner of the collar if
any data collected is abnormal for the heart rate monitor. Each Internet of Things
website offers advantages and disadvantages, however the requirements and
specifications for the Doggy Pal Collar will help determine which website is best
used for the project. Based off this criteria, the dweet.io and freeboard.io
websites were chosen. While Wolfram Data Drop offers an extensive list of
features and programming power, many of those features will not be necessary
for the Doggy Pal Collar. In contrast, ThingSpeak.com does not offer enough
features to work well with the Doggy Pal Collar. While Wolfram Data Drop is too
big and extensive for this project, dweet.io and freeboard.io will do exactly what
is necessary for the smart collar. Each website offers features that will help make
the Doggy Pal Collar a success.
For the final project, ThingSpeak was chosen for the Internet of Things data
display. The code to implement ThingSpeak into the project was easier to work
32
with and did not take up much space on the microcontroller. ThingSpeak was
also able to do what both dweet.io and freeboard.io could do but in one website
instead of two. One downside was ThingSpeak has a 15 second update delay,
but for the purposes of displaying the data collected from the collar this 15
second delay was not a problem.
3.2.6 Power Supply
When researching battery power supply for this smart collar, 4 important
constraints needed to be taken into consideration.
1.
Safety
2.
Size/weight
3.
Rechargeable/non-rechargeable
4.
Time duration between recharging and cycle life
The reality is dogs are not conscientious creatures and therefore this battery will
have to endure some rough housing. The Doggy Pal Collar is designed to keep
dogs safe and help safeguard their health. For these reasons batteries that had
harmful chemicals or gave off toxic fumes were disregarded.
Size and weight will be a major issue when it comes to power. This device will be
around a dog’s neck and worn for 24 hours a day for multiply days. In order to
keep the dog from trying to take it off in distress or discomfort the size and,
consequently, the weight needs to be small and light. The collar will not be more
than a few inches tall with an even smaller depth. This means battery packs, if
used, need to be kept to two or three to keep the size down. If the batteries were
larger than 3 inches tall when vertical (standing up) and/or horizontal (on their
side) they were disregarded. Also if the batteries weighed more than half a
pound, whether by themselves or in a pack, then they too were disregarded.
As non-rechargeable batteries are the most common and therefore the most
available to the owner, they were taken into consideration and compared to the
rechargeable batteries. Non-rechargeable batteries perfect for devices where
charging is impractical or impossible. Though there is the possibility that the dog
may become lost this smart collar will enable the owner to quickly locate the dog
so this smart collar should never be inaccessible to the owner. Also, in order to
track and monitor the dog the Doggy Pal Collar needs to be running for long
hours; for at least a full 24 hours preferably. Non-rechargeable batteries cannot
reach this level of power that would be needed.
For this project, price is a major constraint. In order to keep well within budget
every element is compared and weighted to see the long-term cost benefits. So
the question is which battery cell type offers more savings. Things that need to
be taken into consideration was the cost per life cycle, the cost of a charger, and
cost of running that charger. Pete, from www.frequencycast.co.uk, has done a
33
rough calculation of rechargeable batteries versus non-rechargeable batteries to
see which one was a better investment. He points out how rechargeable
batteries have a lower mAh than non-rechargeable batteries so to compare them
he found “out how many charging cycles will be needed to get the same
consumption” as a non-rechargeable battery. His calculations resulted in
rechargeable batteries winning over the non-rechargeable. It was later pointed
out that after two years rechargeable batteries will suffer from a greater internal
discharge that increases with time. When this happens the charge won’t last as
long for rechargeable. Also, taking the charger itself into consideration,
consumers commonly leave rechargeable equipment plugged into their charges
long after full charge has been reached. Unless the consumer has the up-to-date
chargers with built in timers they could be wasting money and damaging their
rechargeable batteries anyway. Looking at all the advantages and disadvantages
of both battery cell types revealed the best battery choice for this project;
rechargeable batteries. The reasons why are:
● Environmental impact – With the ability to be used over and over multiple
times before they need replacing there is a minuscule amount going to
landfills. They are also energy efficient because they use less energy
recharging than the energy needed to make new batteries.
● Size – They are available in the same sizes and voltages as disposable
types, and can be used interchangeably with them.
● Convenience – They, in some cases, can last up to 5x longer, on each
charge, than disposable batteries when used in high drain devices.
● Charge Evolving – With battery chargers becoming more convenient,
reliable, easy to use and durable recharging batteries has become easy
and convenient. Some battery chargers can charge many different types
of batteries interchangeably. They charge in a number of different ways as
well from USB ports to car-ports.
● Performance: Rechargeable batteries will use a 1.2 V of energy the
duration of their use. This means peak performance is constant even at
low battery. Some batteries provide a refresh mode to drain the batteries
before fully charging them again to get optimal performance and long life.
● Time Saving - Having rechargeable batteries means there’s never a time
where the consumer will run out of batteries. Some battery charges can
even recharge the battery in under an hour.
● Cost Efficiency - Even though the initial cost of rechargeable batteries
and a battery charger is extremely costly, it is inexpensive to charge them
and they are capable of being used for over more than 500 times.
As mentioned before, the desire duration of time between recharging would last a
few days. This means that the battery’s amp hour needs to exceed the max
current draw needed to run the smart collar enough to last at least a day. Even
though the smart collar may not reach or stay at the maximum current it is best
have a power overhead so as not to tax the battery and for safety reasons. It is
also best to test the current draw on a bench top power supply but for now and
34
educational guess will do. The current draw for each component is shown in
Table 3.2.6-1:
Table 3.2.6-1 Total Current and Voltage
Component
Max Current Draw
Max Voltage
Microcontroller
25 mA
4V
Heart-rate monitor
.17 mA
3.6 V
Temperature sensor
.27 mA
5.5 V
Wi-Fi
53 mA
3.6 V
GPS
25 mA
4.3 V
Conclusion
Total current draw is Cannot exceed
103.44 mA
Voltage of 5.5 V
a
Knowing this information is crucial to choosing the right battery. Since the battery
needs to exceed the max current draw in order to safely power the system. For
the Doggy Pal Collar to have a battery supply for a full day the battery will need
to be a 5.5V or lower with a current power of 25000 mA/h or added in parallel.
Once the decision for rechargeable batteries and the current and voltage needed
was found the process of choosing which battery chemistry to use began. The
batteries were looked at for their durability, voltage and current power, overall
size, and cost efficiency. Knowing that the size may vary depending on how
many are needed in a pack was taken into consideration but the signal ones that
were far too large were immediately disregarded. Important information from the
research of all the different battery chemistry types is shown in Table 3.2.6-2 and
Table 3.2.6 - 3 for easy comparing and contrasting:
35
Table 3.2.6-2 Compare/Contrast
36
Table 3.2.6 - 3 Compare/Contrast Continued:
After much time and research the Lithium-Ion Polymer batteries were chosen for
this project. Lithium Ion Polymer (Li-Poly) batteries can come in an array of sizes
and voltages. Manufacturers can design any size battery, within reason, and
have them produced economically; some batteries even resemble the size of a
credit card. The gelled electrolytes enable manufacturers to simplify the
packaging, in some cases eliminating the metal shell which makes this perfect for
small projects. The chosen battery is Adafruit’s Li-Poly 3.7V 2500mA battery with
comes with a pre-attached 2-pin JST-PH connector that is advertised to “click in
and out smoothly to its connecting JST jack” to prevent snagging or getting stuck.
One major drawback for these types of batteries is they’re not durable and
require extra care during use and charging. This battery also comes with a
protection circuitry which keeps the battery's voltage from becoming too high (this
can over-charge the battery) or becoming too low (this will over-use the battery).
The battery will cut-out when completely dead at 3.0V. This protection will also
prevent output shorts. With all the improved safety these batteries are more
37
resistant to overcharge which means there’s a lesser chance for electrolyte
leakage.
As stated above, these batteries are not safe and a worrisome feature of
Adafruit's Li-Poly batteries is, like most, they do not have a thermistor built in
because they are not always next to the battery. It's originally intended to be
used at low charge rates and in cool indoor temperatures which makes it
extremely important to use a Li-Poly constant-voltage/constant-current charger
when recharging; Adafruit suggests charging at 1/2C or even less. When
charging these batteries it's important to make sure that the charger voltage is
less than or equal to the battery voltage. For the best battery performance/life the
battery voltage and charger voltage should match. If these batteries are overcharged they, at the very least, will become permanently damage or, at worst,
will cause an explosion and/or fire.
Combining these batteries in series or parallel is also extremely dangerous to
DIY. One battery may discharge into another causing damage or a fire. These
batteries also come with a long list of what not to do which includes, but not
limited to, transporting or storing the battery near metal; strike, crush, or puncture
the batteries; leave the batteries in a high temperature environment; use the
batteries in a location where there is high static-electricity or magnetic fields, etc.
That all being said, this Lithium-Ion Polymer battery will be encased in a 3D
printed collar that is known for its durability and will add some much need
protection for the battery.
Due to some of the components changing in the Doggy Pal Collar and the desire
to provide a long battery life the final battery that was chosen is Adafruit’s 3.7V,
4400mAh Lithium-Ion battery. This battery has many of the same features as
Adafruit’s 3.7V, 2500mAh Lithium-Ion Polymer battery. The Lithium-Ion battery
has a slightly larger in size and weight compared to the Lithium-Ion Polymer, but
it will allow the Doggy Pal Collar to last for about 3 days. Table 3.2.6-4 shows
what the new maximum current draw and maximum voltage of the Doggy Pal
Collar will be.
Table 3.2.6-4: Final Maximum Power:
Components
Max Current Draw
Max Voltage
Microcontroller
25mA
4V
Pulse Sensor
.17mA
3.6V
Temperature Sensor
.27mA
5.5V
Bluetooth
40mA
16V
38
GPS
Accelerometer
Total:
25mA
4.3V
11.83mA
3.6V
Total maximum current Cannot
exceed
draw is 102.27 mA
voltage of 3.6 V
a
3.2.7 Microcontroller:
The design concept of this project includes four sensors which must gather data
from their target object and have it transmitted through local wireless internet to a
web server. A wireless communication module will be necessary in order to
transmit the data gathered by the sensors wirelessly to the web. The collection of
sensors and the wireless communication module must be controlled by some
component in order to communicate in an orderly manner and have their data all
processed properly. Some of the possible controllers that were considered for the
project were a computer, a microcontroller, and a Field Programmable Gate
Array (FPGA).
Although the sensors gather data in real-time, a real-time response by the
controller is not necessary. There are no buttons or switches in the design to
necessitate reacting to end-user input. An operating system was decided to be
unnecessary as well. The controller simply needs to collect the data from the
sensors and pass it off to the wireless communication module. No complex
computations or complex digital signal processing will be needed, either. For
these reasons, a microcontroller was chosen as the control unit for this project.
TM4C123x: This line of microcontrollers is made by Texas Instruments. It is
targeted to strike a balance between floating point performance and high power
efficiency. It features the ARM Cortex-M4 CPU with floating point and CPU
speeds up to 80 MHz. They have up to 256 KB Flash, 32 KB SRAM, and 2 KB
EEPROM. They have two available high speed Analog-to-Digital converters
which operate at up to 1 million samples per second with no loss to accuracy.
Also available are two CAN 2.0 A/B controllers and USB 2.0 (Host/Device/OTG).
The MCU is capable of serial communication with 8 UARTs, 6 I2Cs, and 4
SPI/SSI. Power consumption can be brought as low as 1.6 micro Amps.
The Cortex CPU is stated to simplify digital signal processing and excel at mathheavy operations. The TM4C123x line is supported by TivaWare. Among its
listed applications the ones that could be useful for this project are connectivity,
sensor aggregation, and data acquisition.
39
TM4C123x microprocessors are available from $4.00 to $8.00 each from
Arrow.com, an Orlando based authorized Texas Instruments semiconductor
distributor (Texas Instruments, TM4C Microcontrollers, 2).
TM4C129x: The TM4C129x line of microcontrollers is made by Texas
Instruments and features integrated Ethernet MAC+PHY and communication
peripherals. The MCU has an ARM Cortex-M4 CPU with floating point and is
capable of clock speeds up to 120 MHz. It has 1 MB Flash, 256 KB SRAM, and 6
KB EEPROM. The integrated Ethernet is 10/100, which means it transmits at 10
and 100 Mbps. There are four tamper inputs and hardware acceleration for AES,
DES, and other encryption methods. This MCU line has two 12-bit Analog-toDigital converters (ADC) capable of sampling at 2 MSPS. There are two CAN 2.0
A/B controllers, a full speed USB 2.0, and a high speed USB ULPI interface. The
serial communication features include eight UARTs, ten I2Cs, four QSPI/SSI, and
a 1-wire master interface.
The suggested applications in the Texas Instruments documentation include
industrial sensors, security access systems, communications adapters, industrial
HMI control panels, and networked residential systems. This microcontroller line
seems to be at security and industrial uses and might not be ideal for the smart
collar.
TM4C129x microcontrollers are available on arrow.com for approximately $11.00
to $20.00 each depending on the model.
Various development kits and booster packs are available from Texas
Instruments for the TM4C12xx line. Features of these kits include OLED and
LCD displays, microSD card slots, direct contact and Infrared temperature
sensors, multiple axis motion tracking sensors, pressure sensors, and ambient
light sensors(Texas Instruments, TM4C Microcontrollers, 3-4).
MSP430F5529: The MSP430F5529 is a 16-bit MCU with a RISC CPU and clock
speeds up to 25 MHz. It has 128 KB flash and 8 KB RAM. It features integrated
PHY and USB 2.0 and four 16-bit timers which each have from three to seven
capture/compare registers. The MCU has three-channel direct memory access,
63 input/output pins, a hardware multiplier which supports 32-bit operations, and
a real-time clock. There is a single 12-bit ADC which has internal reference,
autoscan, and sample-and-hold capabilities.
The MSP430F5529 also has two USCIs (universal serial communication
interface). USCI_A0 and USCI_A1 support automatic Baud-rate detection via
UART and synchronous SPI as well as an IrDA encoder and decoder. USCI_B0
and USCI_B1 support synchronous SPI and I2C. The supply voltage can go from
3.6 V to as low as 1.8 V via USB. There is also an integrated USB-PLL and the
USB has eight input and eight output endpoints (Texas Instruments,
MSP430F5529).
40
The MSP430F5529 is available on arrow.com for around $5.00 to $7.00.
MSP430G2553: The MSP430G2553 microcontroller from Texas Instruments
features a 16-bit RISC CPU with 16-bit registers. This MCU boasts ultra-low
power consumption with fiver power saving modes and a supply voltage as low
as 1.8 V. It features two 6-bit timers with three capture/compare registers each.
There are up to 24 input/output pins which are capacitive-touch enabled. This
microcontroller features on-chip emulation with a spy-bi-wire interface.
The USCI features an enhanced UART with automatic Baud-rate detection, an
IrDA encoder/decoder, I2C, and synchronous SPI. There is an onboard
comparator for analog signal comparison or analog-to-digital conversion. There is
also a 10-bit ADC with internal reference, sample-and-hold capability, and
autoscan. The ADC is operated at 200 kSPS (Texas Instruments,
MSP430G2553).
The MSP430G2553 is available in a 20 pin, 28 pin, or 32 pin package. The MCU
is available on arrow.com for approximately $1.50 to $4.00 each.
BeagleBone Black Development Board: The BeagleBone Black is an opensource platform and features a Sitara ARM Cortex-A8 processor running at 1
GHz. This microcontroller supports multiple distributions of Linux and Android.
The BeagleBone has 512 MB DDR memory and 4 GB eMMC memory. It has
10/100 Ethernet, 5V power via USB, and optional JTAG.
The development environment for the BeagleBone is a terminal interface in the
browser. It can run Python, Ruby, INO Sketches, and JavaScript (Texas
Instruments, Beaglebone Black Development Board). The BeagleBone Black is
available for $55.00 on adafruit.com.
TM4C123GH6PM: The TM4C123GH6PM is a Texas Instruments TIVA series
microcontroller. It features an ARM Cortex-M4F processor that operates at
speeds up to 80 MHz using a Thumb-2 mixed 16/32 bit instruction set. It has 256
KB of Flash memory and 32 KB of SRAM. The microcontroller has eight UARTs
and four I2C modules.
The UARTs on the TM4C123GH6PM feature a programmable baud-rate
generator and separate transmit and receive FIFOS with programmable length,
bits for start, stop, and parity. The serial interface characteristics are fully
programmable for 5 to 8 data bits with fully selectable parity bit generation and
detection and a 1 or 2 bit stop bit.
The IrDA serial-IR encoder/decoder on the UARTs has a serial infrared
input/output in addition to the UART input/output. The serial infrared
encoder/decoder functions are supported up to a data rate of 115.2 Kbps halfduplex. There is also a programmable internal clock generator which allows the
41
reference clock to be divided by anywhere from 1 to 256 (Texas Instruments,
Tiva TM4C123GH6PM Microcontroller Datasheet).
The TM4C123GH6PM is available on arrow.com for approximately $7.00.
C2000 Piccolo: The C2000 Piccolo is a microcontroller made by Texas
Instruments. The Piccolo features a 32-bit C28x DSP core and a CLA
coprocessor which together can handle 240 million instructions per second. The
Piccolo also features a Trigonometric math accelerator and can execute common
trigonometry math functions in 1-2 cycles.
Tasks can be offloaded to the CLA coprocessor to free up bandwidth in the C28x
core. The CLA has access to control and analog peripherals. It can run motors,
perform power factor correction, power line communication, LED lighting, and
more.
The Piccolo has pulse width modulation shadowing and supports many switching
topologies. There are three 12-bit ADCs. There is available motor control
software on the chip. The Piccolo also features a FAST software sensor which
can replace mechanical sensors. There is an instaSPIN position and speed
control suite for motor control.
In the connectivity department, the Piccolo MCU has four UARTs, two I2Cs, three
SPIs, two CAN 2.0Bs, and USB 2.0 MAC & PHY (Texas Instruments, C2000
Real-Time Microcontrollers, 4).
The C2000 Piccolo has many features for motors and motor control which are
not necessary for the smart collar. The Piccolo was unavailable on arrow.com,
adafruit.com, and mouser.com at the time of writing.
C2000 Delfino: The C2000 Delfino is a microcontroller made by Texas
Instruments that is targeted at heavy signal processing uses. Like the C2000
Piccolo, it features a 32-bit C28x DSP core with a CLA coprocessor. It has up to
1 MB flash and up to 204 KB SRAM. The Flash-based Delfino features either a
dual or single 32-bit floating point C28x core running at 200 MHz. The RAMbased Delfino C28x core can reach clock speeds of 300 MHz.
The Delfino microcontroller features an IQMath virtual floating-point engine to
simplify the porting of code between floating-point and fixed-point devices. This
microcontroller also features the Trigonometric Math Unit that is found in the
C2000 Piccolo. It also features a Viterbi Complex Unit accelerator which is used
for vibrational analysis of motors and provides processor acceleration for
narrowband PLC standards.
There are four 16-bit ADCs which run at 1 MSPS. The Delfino also has a 12-bit,
12.5 MSPS ADC. It features two I2Cs, three SPIs, four UARTs, USB 2.0 MAC
42
and PHY, and two CAN 2.0s. It also has two 10 MHz oscillators and a
temperature sensor (Texas Instruments, C2000 Microcontrollers, 6).
The C2000 Delfino is available on arrow.com for $24.36.
C2000 F28M3x: The C2000 F28M3x microcontroller have both an ARM CortexM3 core and the C28x core from the other C2000 MCUs. The F28M3x is divided
into a Control subsystem and a Host subsystem.
The Control subsystem uses the C28x 32-bit CPU operating at speeds up to 150
MHz. It has from 256 to 512 KB Flash memory, 20 KB ECC RAM, 16 KB parity
RAM, and 64 KB ROM. It has six channel direct memory access, one UART and
a McBSP/SPI/I2S.
The Host subsystem is powered by the ARM Cortex-M3, a 32-bit CPU operating
at speeds up to 100 MHz. It has from 256 to 512 KB flash memory, 16 KB ECC
RAM, 16 KB parity RAM, 64 KB ROM, and an external memory interface. It
features 32 channel direct memory access, four timers, and two watchdogs. It
has 10/100 Ethernet, USB, four SSIs, 5 UARTs, two I2Cs, and two CANs.
The two subsystems share an analog temperature sensor, two analog
comparators, and a 10 MHz / 30 kHz internal oscillator (Texas Instruments,
C2000 Real-Time Microcontrollers, 8).
The C2000 F28M3x has a listed starting price of $9.40 according to its brochure.
MSP430FG4618: The MSP430FG4618 has a 16-bit RISC architecture and
boasts ultra-low power consumption, consuming 400 microAmps at a speed of 1
MHz in active mode, and 1.3 microAmps in standby mode. It can take a supply
voltage as low as 1.8 V and it has five power saving modes. It has 116 KB of
flash and 8 KB of RAM.
The MSP430FG4618 also features a 12-bit ADC with internal reference and
sample-and-hold as well as autoscan. In addition to the ADC, it has two 12-bit
Digital-to-Analog converters (DACs). It has three Op-Amps, a comparator onchip, and two timers, both 16-bit. Timer_A has three capture/compare registers.
Timer_B has seven capture/compare registers. The MCU also has three channel
direct memory access.
The MSP430FG4618 features a USCI which has an enhanced UART, IrDA
encoder/decoder, synchronous SPI, and I2C. There is also an integrated LCD
driver and a real time clock, and the MCU has 80 input/output pins (Texas
Instruments, MSP430FG4618).
The MSP430FG4618 is available on arrow.com for $12.40.
43
MSP430F2013: The MSP430F2013 is a low-power MCU with a 16-bit RISC
architecture which can take a supply voltage as low as 1.8 V. It consumes 220
micro Amps in active mode and 0.5 microAmps in standby and has five power
saving modes. It has 2 KB flash memory and 128 B RAM. It has ten input/output
pins and is available in a 14-pin or 16-pin package. It can achieve internal clock
frequencies up to 16 MHz and also features a 32 kHz crystal oscillator for
precision, as well as a low-power oscillator and can take an external digital clock
source.
The MSP430F2013 has a 16-bit Timer_A which has two capture/compare
registers. It has an on-chip comparator and a 10-bit ADC with internal reference,
sample-and-hold, and autoscan. The 10-bit ADC operates at 200 kSPS. There is
also a 16-bit Sigma-Delta ADC with differential inputs.
The MSP430F2013 has a Universal Serial Interface (USI) which supports SPI
and I2C communication. It has serial onboard programming and on-chip
emulation with a Spy-Bi-Wire interface (Texas Instruments, MSP430F2013).
The MSP430F2013 is available on arrow.com for $1.73.
MSP430C092: The MSP430C092 is an ultra-low power microcontroller which
can take a supply voltage of 0.9 V operating at 1 MHz or 1.5 V operating at
4MHz. It has a 16-bit RISC architecture with extended instructions, 2 KB ROM,
128 Bytes of RAM, and 96 Bytes of lockable CRAM. It has a 1 MHz internal highfrequency clock and a 20 kHz internal low-frequency clock as well as external
clock input and a 32-bit watchdog timer.
The MSP430C092 features two 16-bit timers with three capture/compare
registers each. It has an ultra-low voltage analog pool with modes for 8-bit ADC,
8-bit DAC, programmable comparator, supply voltage monitor, temperature
sensor, and internal reference voltage source. In addition, it has a bootstrap
loader and a four-wire JTAG debug interface (Texas Instruments, MSP430C092).
This microcontroller appears to be unavailable from Texas Instruments at the
time of writing.
MSP430F5131: The MSP430F5131 microcontroller has a 16-bit RISC
architecture with extended memory and a 40 nanosecond instruction cycle. It is
capable of taking a supply voltage from 3.6 V to 1.8 V. It features a frequencylocked-loop (FLL) for stability, a VLO, a 25 MHz high-frequency crystal oscillator,
and a 32 kHz low-frequency crystal oscillator. It features three channel direct
memory access.
This MCU has a hardware multiplier supporting up to 32-bit operations. It also
contains up to twelve input/outputs which can tolerate up to 5 V. It has two 16-bit
timers which have three capture/compare registers and support high-resolution. It
also has a third 16-bit timer with three capture/compare registers which does not.
44
The MSP430F5131 has two USCIs. USCI_A0 supports UART with automatic
Baud-rate detection, IrDA encoding/decoding, and synchronous SPI. USCI_B0
supports I2C and synchronous SPI. This MCU also has a 10-bit ADC with
internal reference, sample-and-hold capability, and autoscan, which can operate
at 200 kSPS and includes a temperature sensor. In addition, there is a 16channel comparator with an ultra-low-power mode (Texas Instruments,
MSP430F5131).
The MSP430F5131 features serial onboard programming and is available in a
38-pin or 40-pin package. It can be found on arrow.com for $1.88.
TMS470MF03107: The TMS470MF03107 microcontroller has a 32-bit ARM
Cortex-M3 RISC CPU operating at up to 80 MHz with a Thumb2 instruction set. It
comes with up to 448 kB program flash and an additional 64 kB flash for program
space or EEPROM emulation, as well as up to 24 kB SRAM. It has a built-in
debug mode, a memory protection unit, and open architecture.
The key peripherals listed on the Texas Instruments site for this MCU are a highend timer, 16-channel 10-bit multi-buffered ADC (MibADC), two CANs, and two
multi-buffered SPIs (MibSPI). In addition, this MCU has two UARTs with local
interconnect network interfaces (LIN). It has a digital watchdog timer, and a realtime interrupt timer with vectored interrupts. It has four dedicated I/O pins and 45
peripheral I/Os (Texas Instruments, TMS470MF03107).
The TMS470MF03107 is available from mouser.com for $11.42.
CC1110-CC1111: The CC110-CC111 is a microcontroller that is designed for
wireless applications. It features an 8051 microcontroller core with 8/16/32 kB
programmable flash and 1, 2, 4 kB RAM. It has a 128-bit AES security
coprocessor for data encryption.
The MCU features seven 12-bit ADCs with up to eight inputs each. It has an I2S
interface and two USARTs. The MCU features a 16-bit timer with DSM mode and
three additional 8-bit timers, as well as direct memory access and hardware
debug support. It can use a supply voltage from 2.0 V to 3.6 V.
The radio is an RF transceiver based on the CC1101. It has a high sensitivity and
a programmable data rate reaching up to 500 kBaud. The output power is also
programmable up to 10 dBm for all frequencies that it supports. The frequency
ranges are 300 to 348 MHz, 391-464 MHz, and 782-928 MHz. It also has digital
RSSI / LQI support (Texas Instruments, CC1110-CC1111).
Wireless development kits and software libraries as well as RF calculation tools
are available on the CC1110-CC111 section of the Texas Instruments website.
The chip and evaluation board are available for $114 on arrow.com.
45
CC430F5125: The CC430F5125 is a microcontroller from Texas Instruments
featuring an integrated RF transceiver. It has the same 16-bit RISC processor
that is found in the MSP430, with extended memory and a system clock up to 20
MHz. It is capable of taking a supply voltage from 3.6 V to 1.8 V. This MCU has
three channel direct memory access.
It features two 16-bit timers, one with five capture/compare registers, and one
with three. It also features a real-time clock, an integrated LCD driver, and a 128bit AES encryption coprocessor. This microcontroller has two USCIs. USCI_A0
supports UART, IrDA, and SPI, while USCI_B0 supports I2C and SPI. There is a
10-bit ADC which has internal reference, sample-and-hold, and autoscan. There
is also a comparator, a 32-bit hardware multiplier, and an embedded emulation
module. The CC430F5125 features serial onboard programming.
The RF Transceiver core can take a supply voltage from 2.0 V to 3.6 V. It
operates on frequency bands 300 MHz to 348 MHz, 389 MHz to 464 MHz, and
779 MHz to 928 MHz. The data rate is programmable and can go from 0.6 kBaud
to 500 kBaud. The transceiver output power is programmable and can reach up
to +12 dBm for all its available frequencies. There’s also support for backwards
compatibility with an asynchronous serial receive/transmit mode (Texas
Instruments, CC430F515).
The CC430F515 microcontroller was unavailable for purchase in small batches
at the time of writing. Large batches were unavailable for immediate purchase
and had a twelve to eighteen week factory lead time on multiple sites including
mouser.com and avnet.com.
RF430FRL154H: The RF430FRL154H is made by Texas Instruments. It is a
sensor transponder with a 16-bit MSP430 microcontroller. The MSP430 features
2 KB of FRAM, 4 KB of SRAM, and 8 KB of ROM. It can take a supply voltage
from 1.45 V to 1.65 V. It is based on a 16-bit RISC architecture and the CPU can
operate up to 2 MHz.
The microcontroller features a 4 MHz high-frequency clock, a 256 kHz lowfrequency clock, and an external clock input. There is one 16-bit timer with three
capture/compare registers and a 32-bit watchdog timer. The MCU has an
eUSCI_B module which supports three-wire and four-wire SPI and I2C. It also
features a four wire JTAG debug interface.
The transponder chip allows parameter setting, configuration, and
communication through its RFID, SPI, or I2C. There is an internal temperature
sensor and a 14-bit sigma-delta ADC. More digital sensors may be connected
through its SPI or I2C communication modules (Texas Instruments,
RF430FRL154H).
The RF430FRL154H is available for $5.49 on mouser.com.
46
3.2.7.1 CAN 2.0
CAN (Controller Area Network) is a serial communication protocol which is a
method of standardization of assigning identifiers to communication functions.
There are two message formats; standard and extended. The standard format is
11 identifier bits and is the original address format. The extended format is
introduced by CAN 2.0 and uses 29 identifier bits. A 1 bit identifier is used to
distinguish between standard and extended formats. The standard format is
backwards compatible with implementations that came out before CAN 2.0.
According to the CAN 2.0 specification, CAN has:
●
●
●
●
●
●
●
●
Prioritization of messages
Guarantee of latency times
Configuration flexibility
Multicast reception with time synchronization
System wide data consistency
Multimaster
Error detection and signaling
Automatic retransmission of corrupted messages as soon as the bus is
idle again
● Distinction between temporary errors and permanent failures of nodes and
autonomous switching off of defect nodes
(Bosch, CAN Specification Version 2.0, 5)
The bitrate is fixed among a system. The bus is a single channel, and when the
bus is not in use any connected peripheral may transmit a message. If multiple
units attempt to access the bus, the unit with highest priority gets access. The
number of units that may be connected does not have a hard limit, but will be
limited by electrical loads and delay times. CAN 2.0 A uses the older CAN
specification 1.2, while CAN 2.0 B uses the standard and extended formats. Any
module that is consistent with CAN specification 2.0 is compatible with A and B
(Bosch, CAN Specification Version 2.0).
3.2.7.2 I2C
I2C (Inter-Integrated Circuit) is a communications protocol for an embedded
system in which one or more slave devices connect to one or more master
devices (usually the microcontroller) in series using only two wires; Serial Clock
(SCL) and Serial Data (SDA). The protocol is capable of supporting multiple
master units, but for this project the microcontroller will be the only master. In the
I2C protocol each slave has its own distinct address, and the protocol is
theoretically capable of supporting an unlimited number of connected devices.
I2C is a simple communication method that is usable even with slow
microcontrollers and only requires two I/O pins. There are various modes of clock
47
frequency used for the I2C communication line; 100 kHz, a 500 kHz Fast mode, a
High Speed mode which can reach up to 3.4 MHz, and an ultra-fast mode which
can reach 5 MHz. The clock is generated by the master unit and one bit of data
can be transferred with each clock pulse. When the data line is not in use, it is
pulled to ‘high’ by pull up resistors. To use the line, a module pulls it low to create
a zero, and releases it to create a one. When the master begins a command it
transmits a START bit pattern and finishes with a STOP pattern. Data is
transmitted on the I2C in bytes. After each byte there must be an acknowledge
bit. The acknowledge (ACK) bit comes from a slave, and allows it to
communicate that it is ready to accept more data. If the slave unit needs the
master to resend or it needs more time, it can send a not-acknowledge (NACK)
instead (I2C Info, I2C Info – I2C Bus, Interface and Protocol). A representation of
data transfer via I2C can be seen in figure I2C1.
For this project to use the I2C communication method, the microcontroller would
be the master unit, while the heartbeat monitor, temperature sensor,
accelerometer / GPS, and wireless communication module would each be
slaves. There would need to be pull up resistors on both the SCL and SDA lines
between each one or two modules. Assuming the accelerometer / GPS to be on
the same integrated chip, and each other slave module to be on its own
integrated chip, there would be four slave modules connected to the
microcontroller. Thus approximately four pull up resistors would be needed on
the two wires. Since it is not crucial to have an extremely fast sampling rate from
the sensors that will be connected in this design, the relatively slow nature of
serial communication (in comparison to parallel) is of little concern. The
addresses of slave modules can either be fully or partially pre-set by the
manufacturer. Those which are only partially pre-set have adjustable addresses
to avoid conflicts, since all slaves on the I2C must have different addresses.
When the other modules are chosen for this project, attention will have to be paid
to ensure the avoidance of such address conflicts, if the I2C communication
method is used. Most microcontrollers have I2C modules and I2C would be a
good choice for the communication method between the modules for this project.
Figure 3.2.7.2-1: Data transfer on I2C (Courtesy of Texas Instruments)
3.2.7.3 UART
The UART (Universal Asynchronous Receiver/Transmitter) converts serial data
received from a peripheral device to parallel for the CPU, and converts parallel
data in the form of bytes from the CPU to serial data in the form of bits for
peripheral devices. A functional block diagram of a UART can be seen in figure
48
U1 below. UART modules take an input clock with a programmed frequency and
divides it to produce a baud clock. The baud clock is either sixteen- or thirteentimes the baud rate of the UART, meaning each bit that is transmitted or received
lasts for thirteen or sixteen cycles of the baud clock. The divisor for the baud
clock can be configured manually by writing to a register. UARTs have adjustable
data width, and all transmissions have one start bit, 5-to-8 data bits, optional
parity bit, and then a stop bit (Texas Instruments, Keystone Architecture
Universal Asynchronous Receiver/Transmitter (UART) User Guide).
An excellent summary of the functions of the UART according to Ken Conway
and Michael DeHaan of TechTarget.com is:
“(The UART)
● Converts the bytes it receives from the computer along parallel circuits
into a single serial bit stream for outbound transmission
● On inbound transmission, converts the serial bit stream into the bytes that
the computer handles
● Adds a parity bit (if it’s been selected) on outbound transmissions and
checks the parity of incoming bytes (if selected) and discards the parity bit
● Adds start and stop delineators on outbound and strips them from inbound
transmissions
● Handles interrupts from the keyboard and mouse (which are serial devices
with special ports)
● May handle other kinds of interrupt and device management that require
coordinating the computer’s speed of operation with device speeds”
(TechTarget, UART (Universal Asynchronous Receiver/Transmitter))
The microcontroller for this project has multiple UART modules and is capable of
interfacing with multiple sensors simultaneously using them, thus making UART
seem like a good candidate for the communication protocol in the smart collar’s
system. However, the TMP007 temperature sensor that will be used can only
interface using the I2C protocol. For this reason, and for the sake of simplicity, the
entire design will use the I2C communication protocol wherever possible. Figure
3.2.7.3 - 1 shows the block diagram of the UART.
49
Figure 3.2.7.3-1: Block Diagram of the UART (Courtesy of Texas
Instruments)
For the final project, the Atmega328p chip was chosen. The Arduino Uno was the
microcontroller used for the testing and prototyping of the Doggy Pal Collar,
therefore it was natural to stay with the Atmega328p for the final design. This
chip was low-powered and easy program. It also had more than enough pins for
the project and was able to handle the different components of the Doggy Pal
Collar without running into any delays or errors.
50
3.3 Microcontroller Programming
3.3.1 Code Composer Studio
Code composer studio is an integrated development environment (IDE) for Texas
Instruments embedded development. In addition to the IDE itself, Code
Composer Studio has an App Center which can provide additional useful
development software for a large variety of design tasks. There are packages
available for the assorted product lines of different Texas Instruments
microcontrollers, such as the C2000 control SUITE, MSP430Ware, and
Tivaware. Tivaware is the package focused on the Cortex ARM microcontrollers,
and will undoubtedly prove useful in the embedded software development
necessary for this project. There are also tools available for Linux and a GUI
Composer. This project will be coded on a machine running the Windows
operating system, however the GUI Composer may be of interest in later stages,
when presenting the information gathered from the sensor suite on the collar is to
be aggregated and presented to the end-user for viewing. As an additional useful
feature, if a particular embedded device platform is selected during the
installation of Code Composer Studio, the App Center will filter out software
packages that are not relevant to the selected device platform. Once a software
package is chosen and installed, the user can use the Resource Explorer feature
to explore sample code and documentation to find and begin immediately using
the desired relevant material.
The Code Composer Studio IDE has a C compiler which has been specifically
optimized by Texas Instruments for each embedded device platform. The IDE
has the ability to provide advice to the user on the code being compiled in order
to optimize for device performance, application code size and memory efficiency,
and power efficiency. For this project, the size of the code will most likely be
small enough that optimization in that regard will not be necessary. The
performance of the embedded processor will be of some importance due to
having multiple sensors sampling simultaneously and all of their data being
processed by the microcontroller and then being communicated wirelessly.
Power efficiency is of some concern due to the fact that this device will be
portable, and the ability to go for long periods of time without recharging will be
beneficial and highly desirable. According to the documentation, devices which
have an ARM Cortex-M core for the most part feature an Instrumentation Trace
Module (ITM). The ITM module, according to the documentation provided by
Texas Instruments, “provides a high-level software view of what is happening on
the device. ITM enables features such as: Statistical profiling, variable tracing
and interrupt profiling” (Texas instruments, Code Composer Studio v6).
TI-RTOS (Texas Instruments Real Time Operating System) is a scalable
operating system available in CCS which provides device drivers, system
software, and pre-integrated software components. TI-RTOS can be installed
51
through the CCS App Center. There are different versions of TI-RTOS available
for the different lines of embedded devices, and there is one specifically for the
TivaC line called TI-RTOS for TivaC. TI-RTOS can also be used outside of Code
Composer Studio. TI-RTOS has source files, pre-compiled library, and example
code. From the TI-RTOS User’s Guide:
“(TI-RTOS Network Services)
● TI-RTOS Kernel – SYS/BIOS. SYS/BIOS is a scalable real-time kernel. It
is designed to be used by applications that require real-time scheduling
and synchronization or real-time instrumentation. It provides pre-emptive
multi-threading, hardware abstraction, real-time analysis, and
configuration tools. SYS/BIOS is designed to minimize memory and CPU
requirements on the target.
● TI-RTOS Instrumentation – UIA. The Unified Instrumentation
Architecture (UIA) provides target content that aids in the creation and
gathering of instrumentation data (for example, Log data).
● TI-RTOS Networking – NDK. The Network Developer’s Kit (NDK) is a
platform for development and demonstration of network enabled
applications on TI embedded processors.
● TI-RTOS Interprocessor Communication – IPC. IPC contains packages
that are designed to allow communication between processors in a multiprocessor environment and communication to peripherals. This
communication includes message passing, streams, and linked lists.
These work transparently in both uni-processor and multi-processor
configurations.
● MSPWare, MWare, TivaWare, CC25xxWare, and the CC3200 SDK’s
driverlib. These provide software designed to simplify and speed
development of applications on the corresponding device family. These
components are rebuilt to include only the portions required by TI-RTOS.
● XDCtools. This core component provides the underlying tooling for
configuring and building TI-RTOS and its components. XDCtools is
installed as part of CCS v6.x. If you install TI-RTOS outside CCS, a
compatible version of XDCtools is installed automatically. “
(Texas Instruments, TI-RTOS 2.14 User’s Guide)
The TI-RTOS Kernel SYS/BIOS real-time kernel might prove to be very useful
when developing this project. The sensor suite for the smart collar contains
several instruments which will be operating continuously. The UIA is intended to
simplify gathering instrument data, which is another feature that could make
implementation of the embedded code for the smart collar sensor suite much
more convenient. The TivaWare driver library for the TI-RTOS would be useful
for the TivaC embedded processor that will be used in this project. Once the
device has reached the breadboard prototype stage, testing will be conducted
with the TI-RTOS to attempt to determine its level of usefulness in facilitating
communication between the embedded processor and all of its connected sensor
modules.
52
3.3.2 LM Flash Programmer
LM Flash Programmer is a piece of software available for download from Texas
Instruments. It is a flash programming utility that can be used with Tiva C series
microcontrollers. The program has a simple user interface with a dropdown list to
choose the microcontroller product line that will be programmed. The interface
can be chosen from another dropdown, as well as the port, speed, and clock
source. To program the board, a binary file is selected, and a few options can be
chosen. These options include erasing the entire flash, erasing only the
necessary pages, resetting the microcontroller after programming is complete,
and choosing a program address offset. A hardware reset can also be
performed. Also available in the Flash Programmer are some basic flash utilities
such as the ability to erase a certain address range, upload the entire flash
contents or a certain address range to a binary file, and verifying the contents of
the flash.
The LM Flash Programmer is a basic flash utility used to program the flash
memory of the microcontroller with code that is already written and compiled. The
Flash Programmer could be useful for testing software on the microcontroller if
multiple versions are written. The Flash Programmer would provide a simple and
quick way to jump between different instances of a program, and allow the
design to be tested rapidly running different pieces of code.
3.3.3 Tivaware
Tivaware by Texas Instruments is a peripheral driver library used to access the
peripherals on the Tiva family of Texas Instruments microcontrollers that are
based on the ARM Cortex-M. According to the Tivaware Peripheral Driver Library
User’s Guide, the design goals of the Tivaware drivers are:
● “They are written entirely in C except where absolutely not possible.
● They demonstrate how to use the peripheral in its common mode of
operation.
● They are easy to understand.
● They are reasonably efficient in terms of memory and processor usage.
● They are as self-contained as possible.
● Where possible, computations that can be performed at compile time are
done there instead of at run time.
● They can be built with more than one tool chain.”
The User’s Guide states that many of the drivers can be used without
modification for many applications, however in some cases the drivers might
need to be altered or added to in order to meet certain needs. For example,
some peripherals with very complex abilities cannot be used with the drivers in
the Tivaware library, but the existing Tivaware drivers can be modified to work
53
with such peripherals as an alternative to creating one’s own drivers. The drivers
can also be used as a reference to a programmer wishing to code for the
peripheral. The Tivaware library contains drivers for all Tiva microcontrollers.
Tool chains that are supported are:
·
·
·
·
·
“Keil RealView Microcontroller Development Kit
Mentor Graphics Sourcery CodeBench for ARM EABI
IAR Embedded Workbench
Texas Instruments Code Composer Studio
GNU Compiler Collection (GCC)”
The Tivaware peripheral driver library will definitely prove to be useful when
integrating all the peripherals involved in the smart collar project. The
microcontroller is a Tiva ARM Cortex-M based MCU, and at least two of the
peripherals- the TMP007 Infrared Temperature sensor and the CC3100 Wireless
Network Processor- are manufactured by Texas Instruments. The Tivaware
peripheral library also supports Code Composer Studio, which is the primary
code development environment that will be used for this project. Integrating the
Texas Instruments peripherals involved in this design will doubtlessly be greatly
simplified by utilizing the Tivaware Peripheral Driver Library, and it will clearly be
a very wise choice to include it in the project.
3.3.4 Energia
Energia is an open source C Language IDE platform which was created in order
to bring the Wiring and Arduino framework to the Texas Instruments MSP430.
Energia is supported on Mac, Windows, and Linux. It uses the mspgcc compiler
and it has plug-ins and integrations available for Code Composer Studio. The
development environment contains a code editor, message are for code
feedback, console for displaying text output, toolbar, and menus. Software
written using the IDE are called sketches, with a .ino file extension, and are
written in the text editor. The Edit menu features a “Copy for Forum” option which
copies the code from the text editor in a format that is suitable for posting to
online help forums, and includes syntax and coloring. This feature would prove
very useful if difficulties arise during the software programming phase of the
design. Energia features an Auto Format tool which automatically indents code,
lines up braces, etc. to improve readability. There is also a Serial Port menu
which displays all of the serial devices currently connected and refreshes
whenever the menu is opened. Since all the modules of the smart collar will be
connected serially this menu is an attractive feature. Energia features libraries
which can be used in sketches via the Import Library menu. Using this menu
inserts #include statements into the sketch and compiles the library with the
sketch. Some libraries are included with the Energia installation, and others are
available for download. Energia also includes a Serial Monitor which displays
serial data being sent from the microcontroller, negating the need for a third-party
terminal program in testing (Energia, Energia Development Environment).
54
Energia appears to be a promising development environment for the embedded
software portion of this project. The ability to display serial data without a third
party terminal program would simplify development somewhat. Due to the open
source nature of the IDE there is a large amount of community support which is a
resource that could be tapped if problems occur during software development for
the collar. One possible use of Energia in this project would be as a secondary
development environment to Code Composer Studio. Using the Texas
Instruments libraries and chip-family specific App Center packages from Code
Composer Studio in conjunction with the community support and open nature of
Energia it might be possible to get the best of both worlds in terms of embedded
development.
For the final project, the Arduino IDE was used for programming the
microcontroller and different components of the Doggy Pal Collar. It was chosen
because of how easy it was to setup and use and the open source libraries,
examples and community that came with the IDE helped make programming
each component simple.
55
4.0 Related Standards
Dirt/Sand/Dust: For electronic devices dirt and dust can have anything from little
to catastrophic effects on the project. Overheating is always an important issue
when dealing with electronics and a built-up of dust acts like an insulated blanket
that prevents proper convection cooling. Dust that gets into or blocks the
insulating system can cause integrated circuits (ICs) to overheat and become
permanently damaged. ICs are also vulnerable across their contacts. Any dust in
there can cause electrical shorts which can also be permanently damaging to
ICs. In today's market ICs can have hundreds of exposed electrical contacts per
inch. Dust can contain conductive material like water, oils, and metallic elements
which can then cause signal errors and abrupt part failure.
High/Low Temperatures: Cold - Under very cold conditions electronic device can
suffer shut-downs, malfunctions and even permanent component damage can
occur. In some cases components may even crack rendering them useless.
Batteries are also affected and can have their life-span shorten, reduce their
effectiveness and damage their internal elements when exposed to freezing
temperatures. Cold weather slows down electric currents in batteries, which
accelerates the release of their charge. Cold weather is also dangerous when
devices are exposed to extreme temperature changes. For, example, this may
occur when a device is brought inside from the cold weather to the warm house
causing condensation, which could lead to permanent damage for electronic
components.
Heat - Electronic devices will generate heat simply by operating. They need to be
designed with this in mind by adding fans or other cooling systems in order to
keep the heat levels down. This means when devices are exposed to outside
heat sources the temperature can reach and easily surpass the device's limits,
leading to shut-downs, malfunctions and/or component damage. Batteries are
particularly sensitive to high temperatures. Heat, like cold, can shorten the
battery's life-span or in extreme cases melt and warp plastic enclosures and
cases. The same stands for electronic components, it has been proven by data
that for semiconductor and electronic components the failure rate is hugely do to
heat and life shortens.
Weather: Humidity - Any way an electrical device comes in contact with water,
like rain storms, humidity, pools, etc., can be devastating. Low humidity can
cause damaging static charges, while high humidity can lead to condensation
which can then lead to corrosion.
Water: All types of water, regardless of its form, can cause corrosion if not
properly dried. Distilled water, or pure water, is water that has all impurities
removed and therefore does not conduct electricity, which will not inflict damage
should it come into contact with an electronic device. Water that can conduct
electricity is pure water that has dissolved ionic compounds within. This type of
56
water is the most common and can cause permanent damage to electronic
devices.
WIFI: IEEE 802.11 – This IEEE standard has had many subsequent
amendments since its 1997 release date. These amendments and standard
together are the “basis for wireless network products using the Wi-Fi brand”.
They are the “set of media access control (MAC) and physical layer (PHY)
specifications for implementing wireless local area network (WLAN) computer
communication in the 2.4, 3.6, 5, and 60 GHz frequency bands”.
GPS: The U.S Department of Defense (DoD) regulations “prohibit standard
consumer GPS receivers from functioning above 60,000 feet and 999 mph
(simultaneously). Though for this project neither of these restrictions will be a
problem.
57
5.0 Realistic Design Constraints
When designing the collar several design constraints were taken into
consideration.
These constraints include economic, environmental,
sustainability, manufacturability, ethical, health and safety. When analyzing the
design, all parameters are taken into consideration individually.
The realistic constraints were somewhat complicated. The most obvious one
was creating a device that is lightweight and easily wearable for the animal.
When it was reviewed this is the first parameter of the design that was looked
over. it was quickly realized other devices on the market such as “Fitbark” were
large and bulky. It was decided to focus on this as our first task. The size of the
collar is limited to the internal components that the team put in it.
The second design question that was asked had to ask ourselves is, should the
team make a collar or a collar attachment. Some of the devices on the market
such as “Fitbark” attach to a collar whereas others such as “Dogtelligent” are
stand-alone collars.
When analyzing this constraint, the group had to ask
ourselves, what is lost by using a stand-alone over an attachment. The group
determined that an attachment collar while yes, would be versatile and able to
attach to almost any dog collar, would create a lack of structural integrity for the
dog. Although a stand-alone collar would be more expensive for the user, it
would offer the dog more comfort overall. The group concluded that an
attachment collar would create a sag in the dog's neck and would be painful. In
the end it was decided to go with a collar that was stand-alone due to it being
more structurally intact, in addition the team can control the constraints of the
design.
Next the team had to worry about the material construction of the outside of the
collar. The collar itself must be waterproof. The material choices the group had
were plastic, rubber, metals, and some composite mixtures of materials. As a
team it was decided to craft the device out of a mixture of plastic and rubber, the
rubber to hide the exposed input ports. The plastic material would most likely be
crafted using a 3D Printer.
5.1 Economic and Time Constraints
The current cost of materials for our current design are as follows:
●
●
●
●
●
●
●
Temperature Sensor - $6.40
MCU - $11.42
Wi-Fi Communication - $14.07
Accelerometer -$7.22
GPS - $29.95
Heart Rate Monitor - $3.53
Power System - $14.95
58
● Total Cost: $87.54
The primary overall goal was to make the device cheaper than other similar
devices on the market. Generally the attachment style collars are cheaper and
since were going for a stand-alone collar an overall goal would be to make the
collar cheaper than the other attachment style collars. Here is a list of collars
similar to the collar we created along with their price.
● Dogtelligent - $120 – Dogtellegent.com
● WUF - $129 – www.getwuf.com
● Petpace – $149.95 – petpace.com
As you can see from the above prices, all of these collars are above 120 dollars.
As a group it was decided that it is possible to construct one for under 75 Dollars.
Economically it was decided to use the parts that fit our projects overall design
and while being the cheapest possible. In addition, the smaller we make the
design, the cheaper it becomes. It was decided overall to print our entire project
on one board. For mass production this would be the most economic and ideal
method. By printing the board as a whole the entire project will be subject to less
malfunctions. By reducing the electrical production of the project were able to
reduce the amount of possible errors in the system.
For mass production the parts such as the accelerometer, Wi-Fi, microcontroller
can be ordered in mass supply and can be considerably cheaper. In the long run
they would be printed all together. The assembly for the project would be very
easy, the most time consuming part of production would be using a 3d printer to
print out each device. 3rd party outer casing production is something we will
discuss for long term. A more advanced mold for the outer casing for mass
production will be something that will be done.
The potential impact on the economy will be minimal overall. It may force the
other competitors of our collar to lower cost, slightly driving prices down. Since
the price margin is large as a group it was decided the amount of profit acquired
can be large. As a group it was our goal to keep the cost of production under 50
Dollars. Most collars cost around $120-$150. The range for profit is large. As a
company
Economically the design will be further expanded in productions for large scale
use. For example places that have many dogs, it's possible to produce a simpler
design where some of the functions are less required and the collar can be used
as a GPS locator. The collar could also be prototyped to be used in large scale
environments for tracking animals such as elephants in Africa.
There would be little to no maintenance for this device other than cleaning it and
changing the battery. The device would be expected to run for at least 5 years.
Within the user manual they will be able to learn how to open the device and
59
change the battery. Overall this device will have minimal maintenance while
maintaining a high profit margin.
The amount of time to produce a device is determined by the amount of time it
takes for the manufacturer of the board to produce and send the device. The
amount of time to develop and test the device is yet to be determined but is
expected to take beyond a month for the team of 5. The expectation to time ratio
is expected to be high, as in we expect good results over a short period of time.
The device should have very few bugs / issues due to the amount of
programming required for the project. The other subsystems of the project will
be very easy to troubleshoot / determine if they are working properly. The overall
time taker is the programming of the microcontroller of the device.
For the final project, the price went well above $100 dollars and several
components changed. However, The Doggy Pal Collar is still a competitive
device even around $180. This is because the device still offers several data
tracking methods compared to other similarly priced devices that only offer one
or two ways to track data. The Doggy Pal Collar also does not need a monthly
subscription.
5.2 Environmental, Social, and Political Constraints
The outside casing that we decided to use for the harness is environmentally
friendly as it was produced using a 3D printer. The material used is not harmful
to animals in any way. In addition if a dog were to lose the collar in the ocean
(which is highly unlikely) it will not prevent any harm to oceanic life. The device
itself will not cause any waste of any sort. The battery charging function is 100%
environmentally friendly. As a group we concluded this device/project to be 100%
environmentally friendly.
Social Constraints - As a team we concluded that it would be unlikely for any
organizations to have any problems with our devices. The exception to this
would be if our device is used as not intended such as someone using it for
tracking and harnessing an animal.
Political Constraints - All of the software within our project is programmed by us,
the devices we are using for the project are all sold with the knowledge that the
producers will use their hardware for resale in more complex devices. None of
the designs used are breaking patent law, as there are several similar devices on
the market. The Collar does not violate any US homeland security laws. The
collar will be black as it is not gender specific for the dog. I can't see this device
in any way useable in a harmful manner against the US or anyone specifically.
5.3 Ethical, Health, and Safety Constraints
60
Ethical Constraints - The research team concluded there to be no ethical
standards being broken as long as the collar itself is not used in a harmful way.
Or in other words the collar is being modified by the buyer and it is used to harm
the animal. Ethically the initial reason for our collar is to help diagnose any
problems the animal may have thought diagnostics using the accelerometer, or
monitoring the heart rate of the animal. The programming within the collar will be
able to detect certain conditions the animal is experiencing via testing of
conditional inputs. For example if the dog rolls the accelerometer will detect a
spin of the x axis, etc.
There is little worry of safety as the collar uses a low voltage configuration
ensuring the animal cannot be shocked in any way. The port to charge the collar
is not exposed to make sure that the dog cannot be shocked via charger port.
The collar itself is waterproof, exposure to rain will not shock the dog. The
mechanism of the collar is a standard strap collar and cannot harm an animal in
any way that a common collar could. There are no blinking lights on the collar
that could in some way blind the animal. The collar does not produce any noise
or vibration that can cause harm to the animal. If any lights are showing on the
collar they are to be directed towards the rear of the animal. The collar is
adjustable so that it is able to fit on most small to large size dogs. Improper
fitting of the collar would not be recommended.
Health Constraints - The collar is made of non-hazardous materials produced
from 3D printers. The plastic material used has been tested and confirmed to be
nonhazardous to dogs. The device has been confirmed to be waterproof and not
somehow leak and shock the dog.
5.3.1 Animal Testing
Due to laws and regulations during this project it was decided to instead test the
device on humans and create mechanical representations of dogs. To do this it
was decided to attach the collar using a cylinder. We could spin the cylinder to
simulate a roll the dog would do. By doing this several times we analyzed the
data and use it to predict within our future code with the dog is doing a roll.
Short Term Testing - Within our short term testing the device was simulated and
tested to predict rolls, breathing patterns, Heart rate, and other forms of dog
states.
For rolls it was predicted that the device would spin on 1 axis, see figure 5.3.1-1.
We needed to determine a function within our code to analyze this type of
behavior. We had to determine the minimum and maximum time, in addition to
the completeness of a turn. It was determined that approximately 270 Degrees
can count as a complete spin for a dog for it to count as a roll. To test this
function we hooked the device up to a drill and slowly let it spin to simulate the
dog slowly spinning.
61
Figure 5.3.1-1: Roll Test
For the device to recognize breathing patterns the accelerometer would
experience tight jerks up and down in the Y axis, see figure 5.3.1-2 for our
fabricated configuration. These tight jerks could also represent if the animal is
throwing up. Taking this information from the accelerometer we were able to
determine how hard the animal was breathing. Depending on the rate and
magnitude of the jerks the device will process the information and determine
which is happening. In addition we have a heart rate monitor built into the device.
With both the accelerometer and the heart rate monitor we found we were able to
get an accurate reading on the animal. To test this process we simulated the tight
jerks by hooking the device up to machines that produce tight vibrations like a
bandsaw or car engine. As a car engine runs it produces a similar effect of heart
rate or breathing.
To determine and test animal acceleration we simply used the information and
software built into the accelerometer. This is one function that most smart dog
collars do not have. We simply analyzed the data given off from the
accelerometer in the X axis of the device attached to our fabricated configuration
as seen in figure 5.3.1-3
Figure 5.3.1-2 Acceleration
To determine and test the temperature of the animal we are using an open
exposed temperature sensor built into the side of the doggy pal collar. By doing
this we were able to get a more accurate reading on the animal because the
exposed point of the sensor is in direct contact with the animal. There is also a
temperature sensor built into the accelerometer if we wanted to get a
temperature not exposed to the animal. To test this function we put the exposed
62
portion of our temperature sensor up to a heated surface and tested the
temperature.
To determine and test the distance traveled by the pet it is necessary to set up
the GPS monitor for the device. The device reads the amount of distance
traveled from the GPS monitor and outputs it for the user. To test this we simply
drove around in a car and checked to see if the range was accurate and in sync
with our automobile,
The next property to test was the velocity of the collar. It was decided that
precise velocity was required for the collar. The decided test to test velocity was
to put the collar inside an automobile and travel at a sustained speed for a long
period of time. The velocity was measured using the output values of the GPS
module. After we tested this we verified it was the same speed as the vehicle
traveling.
Figure 5.3.1-3 Velocity Test
63
Figure 5.3.1-4: Testing Plan
5.4 Manufacturability and Sustainability Constraints
Business Self Sustainability would be quite easy with this device. The amount of
money to construct a single collar still yields very high profitability even at the
maximum manufacturing cost. The cost of research and development would be
64
nonexistent unless the company/business decided to expand to newer devices or
different forms of technology.
The goal value that the team predicted it would cost for 1 device is less than fifty
dollars.
The current cost of materials for our current design are as follows:
●
●
●
●
●
●
●
●
Temperature Sensor - $6.40
MCU - $11.42
Wi-Fi Communication - $14.07
Accelerometer -$7.22
GPS - $29.95
Heart Rate Monitor - $3.53
Exterior/Casing - $50
Power System - $14.95
The market value of competitors collars is approximately 120-150, average about
130 Dollars. That yields an 80 profit range if we charged the same amount as
our competitors. With initial release of our device it has been decided to keep the
price slightly lower than our competitors as we do not want to drive the value of
the device down on the market.
The amount of effort to mass produce the device would be minimal. The device
board would have to be printed, then a human would have to manually install the
device into the collar and seal it for shipment. The amount of time needed to
order and print the device would take several weeks, and the time to construct a
final product would take a few minutes. Overall the amount of time to produce
this device is limited by the amount of time it takes the manufacturer to print the
board.
Future designs for this product would require a team of engineers to update and
improve the design. It would be recommended to keep engineering on staff to
troubleshoot potential problems or to update the software on the device.
The engineering team determined that the devices sustainability would be very
high. The device will need little to no updating or maintenance. The only real
maintenance needed would be changing the battery or charging the device.
The team went through each individual component such as the processor, Wi-Fi
adaptor, power system, and the microcontroller and found the product lifetime to
be about 1 year of continuous use. This device is designed to experience heavy
vibration and stress given the printed board specifications. The device itself
should have a very high reliability given we have printed it on a composite board.
Product lifetime is limited by the components within the device. This collar can
last approximately 10 years of standard use given the estimated lifespan of the
components.
65
It would be suggested that a 2 year warranty be given to the device for the
business to properly survive. Given that the device can last 10 years under
normal conditions, and 1 year under extreme conditions it would be ideal to have
this 2 year window for the user to enjoy the device. Within the device a lifetime
timer will be installed so if it is ever mailed back to the manufacturer they are able
to diagnose that it died to overuse. In any other situation the engineers
associated with the project agree that it is fair to replace the device if a
malfunction occurs.
For the final design, the price ended up going higher and some components
changed. However, the Doggy Pal Collar still achieved all its goals and the new
price still keeps the collar competitive with other similar devices. A better design
and testing plan could lower the price point more.
66
6.0 Project Hardware and Software Design Details
6.1 Initial Design Architectures and Related Diagrams
The TM4C123GH6PM microcontroller comes in a 64 pin package. The Pin
Diagram for the TM4C123GH6PM is shown in Figure 6.1-1. The signals for each
pin for the TM4C123GH6PM are found in a table starting on page 1369 in the
TM4C123GH6PM Datasheet. The table features every signal that can be found
on a pin on the microcontroller listed in alphabetical order for easy lookup, along
with the pin type and a brief description. The primary signals that will be of
concern for the smart collar will be communication signals such as I 2C serial data
and serial clock, and UART transmit and receive pins. According to table MCU2,
I2C0SCL is found on pin 47, I2C0SDA is found on pin 48, U1CTS and U1TX are
found on pin 15, and U1RTS and U1RX are found on pin 16. U2TX is on pin 10
and U2RX is on pin 53. The table in the datasheet proved exceptionally helpful
when creating the first draft schematic for the smart collar and will be heavily
relied upon throughout the entire duration of this project.
The initial design architecture of the smart collar system features two sensors
and a communication module connected to the microcontroller via I2C, one
sensor connected to the microcontroller via UART, and one sensor connected to
the microcontroller via a proprietary digital communication connection. The basic
communication layout of the smart collar system is shown in Figure 6.1-2.
Each sensor will collect data from the target object- the dog wearing the smart
collar. The data collected will include temperature, position, acceleration, and
heart rate. The data will be aggregated by the microcontroller and then sent to
the wireless communication module for wireless transmission through a local
wireless connection to the web. The end user will be able to view the data in an
easy-to-read format on a website. A signal flow block diagram for the smart collar
system is shown in Figure 6.1-3. The schematic for the connections in the smart
collar system is shown in Figure 6.1-4.
67
Figure 6.1-1: Pin Diagram of the TM4C123GH6PM (Courtesy of Texas
Instruments)
68
Figure 6.1-2: Communication Configuration of the System
69
Figure 6.1-3: Signal Flow Block Diagram:
70
Figure 6.1.-4a: Microcontroller Schematic (Figure Courtesy of Texas
Instruments)
Figure 6.1-4b: Temperature Sensor Schematic (Figure Courtesy of Texas
Instruments)
71
Figure 6.1-4c: Accelerometer Schematic (Permission Pending from
Invensense)
Figure 6.1-4d: Heart Rate Monitor Schematic (Figure Courtesy of Analog
Devices)
72
Figure 6.1-4e: GPS Schematic (Figure Courtesy of Adafruit)
73
Figure 6.1-4f: Wi-Fi Module Schematic (Figure Courtesy of Texas
Instruments)
6.2 Temperature Subsystem
The temperature subsystem will gather temperature data from the target object,
and can operate from -23 to 127 degrees Celsius. The temperature subsystem
will consist of the TMP007 Infrared Temperature sensor which will be connected
as a slave via I2C bus to the TM4C123GH6PM microcontroller. Pin A1 of the
TMP007 will be connected to digital ground. Pin A2 will be connected to analog
ground. Pin A3 will be connected to a 3.3 Volt supply source. Pin B3 will be
connected via the I2C serial clock line to pin 47 of the microcontroller. Pin C3 will
be connected via the I2C serial data line to pin 48 of the microcontroller.
74
The TMP007 will be positioned on the printed circuit board as shown in Figure
6.2-1 such that its sensor is facing upwards through a small viewing port on the
interior side of the smart collar directly at the target object. Using its internal
thermopile which can be seen in Figure 6.2-2, it will calculate the temperature of
the target object and communicate that data to the microcontroller via the I 2C
bus. The TMP007 will continuously gather temperature data and send it over the
I2C bus at a rate of 100 kHz whenever the microcontroller requests it. The
TMP007 is capable of sending alerts from pin C2 at certain temperatures,
however as of this writing, the alert feature will not be used in this project.
Figure 6.2-1: TMP007 Infrared Viewing Port
Figure 6.2-2: Functional Block Diagram of the TMP007 (Courtesy of Texas
Instruments)
6.3 Heart Rate Monitor Subsystem
The heart rate monitor circuit is based around the idea of electrocardiography.
This is the process of measuring the electrical activity in the heart by using
electrodes put on the body. The electrodes are used to detect the small electrical
changes on the body that are caused by the heart muscle depolarizing with each
heartbeat. The electrocardiography can be separated into three sections. The
first section is the PR section. This section is where the first wave is created by
75
the electrical impulse moving from the right atrium to the left atrium. The second
section is the QRS section. In this section the right ventricle and the left ventricle
start to pump. The final section is the ST section. This section is where the left
ventricle and the right ventricle wait to be re-polarized. Figure 6.3-1 below shows
an example of an EKG waveform from Wikipedia.
Figure 6.3-1: EKG Waveform (Courtesy of Wikipedia)
At the heart of the circuit is the AD8232 chip that can measure
electrocardiography. Figure 6.3-2 shows the block diagram of the AD8232 chip
from Analog Devices. This chip has many features that will be important for the
circuit. Table 6.3-1 shows the short pin function descriptions for the AD8232 chip
from Analog Devices. These features include a low supply current, a shutdown
pin and a single-lead ECG front end that is fully integrated. The Ad8232 has an
instrumentation amplifier that applies gain and filters out near dc signals at the
same time. This ability allows the AD8232 chip to amplify small ECG signals by a
factor of 100. The circuit will run at 3.3V and the shutdown pin will be used to
reduce the power usage and put the circuit into a low power shutdown mode
when not being used. While in shutdown mode the AD8232 chip takes less than
200 nA of current. This will be useful to save battery power on the Doggy Pal
Collar and help the other components on the collar last longer. The circuit will
also use an electrode cable with pads that attaches to the body in order to sense
the electrical activity that comes from the heart. When the electrode cable pads
are connected to the body the circuit will produce an electrocardiogram waveform
that is similar to the figure above using an operational amplifier output pin on the
circuit. The circuit can also detect when the electrode cable pads are not
connected to the body using the leads off comparator output pin. When the
electrode cable pads are not connected, the electrocardiogram waveform will
76
show a flat line in the waveform. This can help trouble shoot the heart rate
monitor and let users know that the heart rate monitor is not functioning properly.
Figure 6.3-2: AD8232 Functional Block Diagram (Courtesy of Analog
Devices)
77
Table 6.3-1: Pin Function Short Descriptions (Courtesy of Analog Devices)
Pin Number
Mnemonic
Description
1
HPDRIVE
High-Pass Driver Output.
2
+IN
Instrumentation Amplifier
Positive Input.
3
-IN
Instrumentation Amplifier
Negative Input.
4
RLDFB
Right
Leg
Feedback Input.
5
RLD
Right Leg Drive Output.
6
SW
Fast Restore
Terminal.
7
OPAMP+
Operational
Amplifier
Noninverting Input.
8
REFOUT
Reference Buffer Output.
9
OPAMP-
Operational
Amplifier
Inverting Input.
10
OUT
Operational
Output.
11
LOD-
Leads Off Comparator
Output.
12
LOD+
Leads Off Comparator
Output.
13
𝑆𝐷𝑁
Shutdown Control Input.
14
AC/𝐷𝐶
Leads Off Mode Control
Input.
15
FR
Fast Restore
Input.
16
GND
Power Supply Ground.
Drive
Switch
Amplifier
Control
78
17
+Vs
Power Supply Terminal.
18
REFIN
Reference Buffer Input.
19
IAOUT
Instrumentation Amplifier
Output Terminal.
20
HPSENSE
High-Pass Sense Input
for
Instrumentation
Amplifier.
A microcontroller will collect the data from the circuit and send that data to the
Internet of Things platform that is setup with the Doggy Pal Collar. The Internet of
Things platform will allow users to see the electrocardiogram waveform from the
circuit in real-time. One of the websites for the Internet of Things platform that is
being used alongside the Doggy Pal Collar is dweet.io. This website will monitor
the heart rate monitor data. If the data is outside certain boundaries, it will send a
message to the user telling them to go check on their dog because there could
be a problem. Figure 6.3-3 shows the flowchart of the heart rate monitor as a
component of the Doggy Pal Collar. A schematic for the configuration of the heart
rate monitor can be seen in Figure 6.3-4.
79
Figure 6.3-3: Heart Rate Monitor Component Flowchart
80
Figure 6.3-4: Schematic of Heart Rate Monitor Configuration:
For the final project, the Pulse Sensor Amped was used in place of the AD8232. The
subsystem for the Pulse Sensor Amped is similar to the AD8232. However, one major
difference is the Pulse Sensor is a plug and play device so it takes less setup and it uses
pulse oximetry to find the heart rate.
6.4 Accelerometer Subsystem
The accelerometer that was chosen is an Invensense Inc 9 Axis Accelerometer
labeled the MPU-9255. This device was suggested by our professor at UCF.
The team also looked at many other accelerometers but the team felt this one fit
our needs. The constraints involved in selection were weight, size, functionality,
and cost. The Invensense device performed well, weighed very little, and was
very small so overall its performance was a plus. On the other hand this device
cost a little bit more than the other devices available, but overall it was found that
the user would enjoy having a lighter device overall so it was decided to stick
with the Invensense accelerometer.
Within the device there are 3 sets of 3 axis control units containing 9 axis total.
The first die contains a 3 axis gyroscope and a 3 axis accelerometer, the other
die contains a 3 axis magnetometer. The diagram of Axis of Orientation can be
seen in Figure 6.4-1 and 6.4-2.
81
Figure 6.4-1 Axis Orientation of the Accelerometer and Gyroscope
Given Dimensions are 3x3x1mm
Figure 6.4-2, Axis Orientation
For digital to analog conversion this device contains nine 16 bit analog to digital
converters of digitizing the gyroscope outputs, accelerometer outputs, and for the
magnetometer outputs. A schematic for the device is shown in Figure 6.4-3.
82
Figure 6.4-3: Accelerometer configuration schematic
The temperature range for precision device outputs ranges from 40 Celsius to 85
Celsius. The operating voltage range (VDD) is from 2.4v to 3.6v . The MPU-9255
includes a support module for AAR, automatic activity recognition which includes
built in software that can detect when a user is walking, running, sleeping, etc.
Our group found that this kind of built in technology is perfect for the Doggy Pal
Collar. Although the integrated software was designed for humans walking and
running, it gave us an ideal starting point to change and integrate the software for
our needs.
Gyroscope Features:
● X, Y, and Z digital output sensors
● Programmable within X degrees per second function
● Programmable Low Pass Filter
● 3.2mA Operating Current
● Accelerometer Features
● Triple Axis Control
● Programmable within +/-(g) rates
● 450µA operating current
● Low power operation current mode
● Wake on motion for power saving applications
83
Magnetometer Features:
● 3 axis hall effect magnetic sensor
● 280µA operating current
● Measurement range ±4800µT
Feature Overview:
● 3.5mA Operating Current when running all 9 Axis Functions
● Additional bus for reading external sensors
● VDD voltage operation range of 2.4V-3.6V
● Dimensions of 3x3x1mm optimal for small devices
● 10000g Shock tolerance
● Exceptional long term life testing
Given the above specifications it was found that this device was suitable for the
design. Not only is the device able to meet the required specifications it is
designed and durable for this type of application. This device is low cost,
reliable, space efficient, and high quality. As you can see from Table 6.4-1 below,
the pin usage and diagram are given.
Table 6.4-1: Pins of the Accelerometer
Pin #
Pin Name
Pin Description
1
RESV
Reserved
7
AUX_CL
Master Serial Clock
8
VDDIO
Digital supply voltage
9
AD0/SDO
Slave Address
10
REGOUT
Regulator
connection
11
FSYNC
Frame sync digital input
12
INT
Interrupt digital output
13
VDD
Power supply Voltage
18
GND
Power supply Ground
19
RESV
Reserved
20
RESV
Reserved,
ground
21
AUX_DA
Maser serial data for
external
filter
connect
cap
to
84
22
nCS
Chip Select SPI mode
only
23
SCL/SCLK
Serial Clock
24
SDA/SDI
Serial data input, serial
data
2-6, 14-17
NC
Not internally connected
Figure 6.4-4, Pin Diagram of Invensense MPU-9255
85
Figure 6.4-5, Internal diagram of the MPU-9255
As you can see from Figure 6.4-4 there are 6 signal registers available for the 6
axis of control with an addition axis that operates the temperature sensor. I do
not believe the design will be using the temperature sensor that is included within
this device as the team needs a more accurate reading more directly off the
animal.
It was recommended by our professor to use the Invensense accelerometer due
to its specifications. This accelerometer is the most advanced the group had
looked at. It has a low running voltage and it was found to give us the most
information out of any device. In addition it comes with a built in thermometer in
which the design can use as a reference temperature for our animal temperature
sensor.
Sensing Axis:
X, Y, Z, Compass, rotational
Acceleration:
2 g, 4 g, 6 g, 8 g, 16g
Sensitivity:
256 count/g, 341 count/g, 512 count/g,
1024 count/g
86
Output Type:
Digital
Interface Type:
I2C
Resolution:
12 bit
Supply Voltage - Max:
3.6 V
Supply Voltage - Min:
1.7 V
Package / Case:
LGA-16
Maximum Operating Temperature:
+ 85 C
Minimum Operating Temperature:
- 40 C
For the final paper, the Freescale MMA8451Q chip was used instead of the Invensense
chp. The subsystem for both accelerometers would be similar, however the MMA8451Q
has less features compared to the Invensense. This won’t be a problem because both
sensors can find the X,Y, and Z position of the dog and that was the main feature for the
Doggy Pal Collar.
6.5 GPS Subsystem
Once the MTK3339 chipset has passed the testing phase it can be implemented
into the completed system and start tracking. This high-quality, quick-to-fix, -165
dBm sensitivity receiver will make tracking the dog's location simple and the
small size will make implementation effortless. The pin layout in Figure 6.5–1
shows in detail how the GPS chip works and, in Figure 6.5–2, what each pin is
assigned to do and how it will be used for this project. When the microcontroller
is wired to the RX and TX pins it can the command the GPS to start. This chips
works by using the built in antenna to send and receive signals.
87
Figure 6.5–1 Chip System Block Diagram (Courtesy of Adafruit)
Figure
6.5–2
Pin
Layout
for
MTK3339
(Courtesy
of
Adafruit)
88
When installed the MTK3339 chip should quickly find a fix and send out the echo
signal. This GPS chip will then decode the raw data that is received from the
located satellites and automatically log this data. Since the data does not log
unless there is a fix, this decreases the chance of confusing or inaccurate
information. This GPS also comes with software that can take this logged data
and create a google-map-like graph with the path that was taken highlighted for
easy viewing as shown in Figure 6.5–3:
Figure 6.5 – 3 GPS Path Tracking (Courtesy of Adafruit)
When implemented into the Doggy Pal Collar system the GPS is then able to
present all this information easily and quickly. How the GPS system will work with
the microcontroller is shown in the Figure 6.5 – 4. First a microcontroller will send
the GPS MTK3339 chip the codes to activate it. In this code the first part will be
very similar to the Adafruits “echo” code used for the testing stage. This code will
command the GPS to do what it was built to do; send a signal to locate, at least
four, satellites and receive the return signal for the located satellites. Once the
return signal is received the decoding of the raw data can begin to arrange the
information into longitude, latitude, height, date and time categories. Using the
software that comes with the MTK3339 chip, the data will create the google map
like graph of the path that was traveled. The second part of the code will send
this map and logged data to the Wi-Fi component which will send the data to the
89
Internet of Things. All this information will then be able to be viewed in live time to
help the owner keep track of where their furry friend is anywhere and anytime of
the day. Figure 6.5-5 shows a schematic of the GPS module for this project.
Figure 6.5-4: GPS System Flowchart
90
Figure 6.5-5: GPS Schematics
6.6 Microcontroller Programming Plan
The TM4C123GH6PM microcontroller will be connected via I 2C to the TMP007
temperature sensor and the accelerometer. The configuration of the I2C bus for
this connection is shown in Figures 6.6-1 and 6.6-2. The microcontroller will be
designated as one master, and the wireless communication module will be
designated as the second master. The temperature sensor and accelerometer
will be designated as slaves. The GPS module will be connected via UART1 to
the microcontroller, with a Baud rate of 9600, 1 stop bit, and no parity bit. The
wireless communication module will be connected to the microcontroller via
UART2 with the same settings as UART1. The heart rate monitor will be
connected via a digital communication interface through the GPIO pins which is
uses a proprietary protocol. The code to use this protocol is provided by the chip
manufacturer. The microcontroller will receive data from the temperature sensor,
heart rate monitor, accelerometer, and the GPS, and transmit data to the
wireless communication module for wireless transmission. The I2C bus on the
TM4C123GH6PM microcontroller is capable of running at speeds of 100 kbps,
400 kbps, 1 Mbps, or 3.33 Mbps. The speed chosen for the bus must match the
speed of all devices on the bus. The initial speed chosen will be 100 kbps to test
for compatibility or sampling rate issues. Speed will be increased if it is
necessary and feasible.
The parameters that control the I 2C clock rate are CLK_PRD (system clock
period), TIMER_PRD (programmed value in I2CMTPR register), SCL_LP (low
phase of serial clock), and SCL_HP (high phase of serial clock). The following
91
formula from the TM4C123GH6PM datasheet is used to calculate the I 2C clock
period:
SCL_PERIOD = 2 x (1 + TIMER_PRD) x (SCL_LP + SCL_HP) x CLK_PRD
Sample values for these parameters from the microcontroller datasheet are
shown in Table 6.6-2. The initial configuration will be a 4 MHz system clock and
timer period set to 0x01 in order to achieve the desired 100 kbps speed. As each
of the sensors on the I2C bus makes measurements and collects data to transmit,
they will set a bit to request an interrupt. The microcontroller will poll for these
interrupts and collect the data as it comes in. The microcontroller will then
communicate with the wireless communication module in order to have the data
transmitted at regular intervals.
Figure 6.6-1: TM4C123GH6PM I2C Block Diagram (Courtesy of Texas
Instruments)
92
Table 6.6-1: TM4C123GH6PM I2C Signals (Courtesy of Texas Instruments)
Figure 6.6-2: I2C Bus Configuration (Courtesy of Texas Instruments)
93
Table 6.6-2: I2C Timer Periods (Courtesy of Texas Instruments)
For the final paper, the Atmega328p chip was used for the Doggy Pal Collar. This chip
was very similar to the Texas Instruments chip with similar features and the subsystem
would be similar as well. One of the main reasons for the change was the use of the
Arduino Uno for testing and prototyping and setting up code to work with the
Atmega328p chip.
6.6.1 Internet of Things Subsystem
The Internet of Things (IoT) is a platform which allows information to be shared
and manipulated easily. This is accomplished by using wireless, embedded and
other networking technology that allows objects to collect data in their local area
of operation and send this data over a network. These objects can be anything
including humans, animals and inanimate objects. The “Things” can be any type
of device or sensor that collects data such as a temperature sensor or a heart
rate monitor. These Things can collect data and using networking technology
such as Wi-Fi, Bluetooth or Ethernet can send this data to other devices. This
data can also be sent to the cloud where the data can be manipulated even
further. This can be useful because data can be accessed and monitored in realtime over a network without having to retrieve a device first. In addition to
sending information, the Internet of Things platform allows for data to be received
by the local devices and sensors as well as allowing these “Things” to be
manipulated across networking technologies. The technique is the same, the
data or instructions are sent over a network using Wi-Fi, Bluetooth or other
networking technology to the embedded system that controls the devices or
sensors on the object. This can be useful because updates and new instructions
can be received by the devices changing how they operate in real-time without
having to retrieve the devices first.
94
The Doggy Pal Collar will use the Internet of Things platform to communicate
data to the owner of the collar. A Wi-Fi module on the collar will transfer data
from the temperature sensor, the accelerometer sensor, the heart rate monitor
and the GPS sensor to the cloud. Once this data is in the cloud it will be
manipulated and displayed with the help of two Internet of Things websites in the
cloud called freeboard.io and dweet.io. These two websites will help display the
information in an easy to ready manner on the internet where anyone can access
the data in real-time. The data can be displayed in many different forms and help
the owner and veterinarians track important data overtime and monitor the
behavior of the dog when the owner is away. By using the Internet of Things to
display this data, anyone with an internet access can easily see the information
the Doggy Pal Collar is sending to the cloud. This can be done without removing
the collar from the dog because as long as the dog is within range of a home
network the collar will continue to transfer data to the cloud. Another advantage
of using the Internet of Things platform is the dweet.io website will be able to
send alerts to the owner of the collar in case the heart rate monitor picks up
abnormal readings such as erratic heart rate. This information can be sent
straight to a smartphone and alert the owner in real-time. Erratic heart rates can
be very dangerous for the dog and dweet.io can monitor the incoming data by
setting certain boundaries for the data with programming code. If the heart rate
data stays within the boundaries, no alert message will be sent.
It would also be possible to use the Internet of Things platform to send data to
the Doggy Pal Collar to update firmware or change the type of data that is being
displayed without having to remove the Doggy Pal Collar and take it apart. A
veterinarian could also access the Doggy Pal Collar over the Internet of Things
and customize the collar to specific needs they are looking for right from a
computer in their office without even having to wait to see the dog in person. The
Internet of Things platform was chosen because of these advantages it presents
over other methods of collecting and displaying data such as a phone application
which could be hard to customize for the needs of the dog. This platform
provides all the services necessary to help make the Doggy Pal Collar a reliable
device that pet owners and veterinarians can count on to help monitor animals.
Freeboard.io is a cloud based website that can be used with the Internet of
Things platform that helps display data in real-time. The idea behind the website
is to create easy to use dashboards that can display device and sensor
information that has been uploaded to the cloud using Wi-Fi or other networking
technology. The website works with other API websites such as dweet.io and is
open source and each Freeboard that is created comes with a URL that can be
shared on social networks, email and SMS. It is also free to use and free to
access, with payment plans available depending on the needs of the users.
Freeboard.io is one of the websites that will be used together with the Doggy Pal
Collar. There are many sensors on the collar that include a temperature sensor,
heart rate monitor, accelerometer, and GPS sensor. Using a Wi-Fi module, the
data collected from these various sensors will be sent to the cloud-based website
dweet.io. A dashboard will be created using Freeboard.io that will collect the
95
sensor data from dweet.io and display them. This sensor data can be accessed
from the Freeboard.io URL that anyone will be able to use. Inside the dashboard,
the GPS data will be shown using a map to show the location of the collar. The
temperature data will be displayed as a number value in Fahrenheit degrees. The
heart rate data will be shown as a graph updating in real-time the heart rate of
the dog. The accelerometer data will show the position of the dog. All this
information will be on one dashboard on one page. This will make it very easy to
read and understand. This sensor information will also be updating in real-time
as long as the collar is within Wi-Fi range. The benefits of using the Internet of
Things platform with Freeboards.io help make the Doggy Pal Collar a versatile
device. The owner of the collar or a veterinarian can easily access the
Freeboard.io website to monitor this information without needing to be near the
Doggy Pal Collar. Furthermore, the Freeboard dashboard is very easy to
customize and can easily be changed to fit the needs of the owner or
veterinarian.
Dweet.io is a cloud-based website that can be used with the Internet of Things
platform that is similar to twitter. This website does not need to be setup, data
only needs to be sent to dweet.io to be published automatically in the cloud.
Dweet.io is a web API and can easily be implemented into micro controller code
with just a couple lines of code. It has many features such as real-time updates
and alerts that notify the owner when data that is dweeted is outside normal
parameters. Dweet.io is a free site and it’s free to publish and see information
that is published. Dweet.io is another website that will be used along with the
Doggy Pal Collar. The collar will be sending the sensor data it receives to the
Dweet.io website via Wi-Fi module. This dweet.io data will be collected by the
Freeboard.io website for further manipulation before it is displayed. The dweet.io
website will send out a text alert to the owner of the collar is any sensor data is
abnormal such as high temperature or erratic heart rate pulses. The features of
dweet.io make it a good companion website for the Internet of Things platform
and allow data from the collar to be viewed in real-time by the owner or a
veterinarian. Since dweet.io can be accessed from anywhere, it also makes it
easy to monitor the dog. Figure 6.6.1-1 shows the flowchart of the Internet of
Things subsystem for the Doggy Pal Collar.
For the final project, ThingSpeak was used for the Internet of Things platform. This
website was chosen because the code was easy to setup alongside the rest of the
Doggy Pal Collar components. The subsystem would be very similar however, instead of
using two websites, only one website would be necessary.
96
Figure 6.6.1-1: Internet of Things Subsystem Flowchart
97
7.0 Project Prototype Construction and Coding
7.1 PCB Acquisition and BOM
Our team found there were two primary vendors in the Orlando area with very
similar prices. The search online yielded these vendors but very little information
regarding pricing and products. Within the design we were asked to write our
design schematic in Eagle CAD. While researching other PCB vendors I found
some of them used other software for submission of design. Saturn PCB Design
uses their own PCB Design program called Saturn PCB Design Toolkit. With
further research the team found that the Saturn PCB Design toolkit output files in
Gerber format. I found that within Eagle CAD there is a function to convert your
schematic/pin diagram to GERBER format. The prices for these PCB vendors
were unavailable because each design exhibits its own unique cost due to the
components used. For us to find a specific price for our design we had to call
them up and present our PCB files with a list of the parts needed for the design.
After speaking with representatives from each vendor we found the cost to be
approximately 100 dollars to print our design.
Some of the standard information needed to submit a design is listed below:
● Manufacturers part numbers
● Data for all machine placed parts
● Files for PCB
7.2 PCB Design
The PCB design was created using Eagle CAD version 7.1.0 as seen in Figure
7.2-1.
Figure 7.2-1: PCB Design
98
The overall design was done in a linear fashion due to the product being a collar.
There were some problems integrating our devices into the design. We were
required to obtain library files to import our specific components into the
schematic. Initially we used components within the design that were similar to
what we needed until we could get our specific library files needed. Intense
research and information gathering was required to complete the schematic
portion of this device because of the complexity and flexibility of Eagle Cad It is
extremely important for the collar to have a symmetrical distribution of weight on
the animal so that the collar does not harm the dog or create neck issues for the
animal. Some of the components on the device look large on the schematic but
actually have a small weight overall so we had to take in consideration the size to
weight ratio for each component. The battery overall seemed to weigh the most
of every component. We wanted to keep the width of the collar at a standard
width approximately the same width of the largest component as we want to keep
the collar as small as possible. It is also an option for future designs to build the
device on 3 separate PCB’s so that it could curl easier as seen in Figure 7.2-2.
Figure 7.2-2: Three section collar design
Before we created the schematic design we assembled out pin diagram as seen
in Figure 7.2-3. The purpose of this diagram is to get an overall layout to see
what wires run to each component. By doing this it will make it easier when
doing the layered diagrams within the schematic portion of the design. Once it
was complete it was much easier to oversee the layout of the design. It was
much easier to know where each component needed to be connected and we
could build our electrical highways much easier down the board.
99
Figure 7.2-3: Pin Diagram
7.3 Final Programming Code Plan
Programming code will be written for each component of the Doggy Pal Collar.
Since each component of the Doggy Pal Collar is independent of each other, the
programming code will also be independent. This means that the components do
not need data from each other to operate. This code will be written by group
members for each component of the smart collar. The microcontrollers from
Texas Instruments are very user friendly and programs can be written by users of
all different types of programming backgrounds. The microcontroller needs to be
programmed to gather data from each component of the Doggy Pal Collar and
send that data via Wi-Fi to the Internet Of Things platform associated with the
Doggy Pal Collar. The first component to write programming code for is the Wi-Fi
module. The Wi-Fi module needs to be setup before the other components in
order to send data to the Internet Of Things platform. The programming code for
the Wi-Fi module needs to have certain data from the user. This data is the
100
password and service set identifier of the wireless network that the Doggy Pal
Collar will be connecting with. Dweet.io code will also be included. This code will
tell the Wi-Fi module to send data to the website dweet.io, which is a part of the
Internet of Things platform for the Doggy Pal Collar.
The programming code for the GPS module will have to find the location of the
dog even as the dog is moving. The programming code will be set up in a loop
that constantly looks for the location of the dog. In every loop of code the data
will be logged and used to map the location of the dog for easy tracking. The
programming code for the temperature sensor will work similar to the GPS
module. A loop will be setup to constantly check the temperature of the area the
dog is located in. The programming code for the accelerometer will be separated
into three pieces under one constant loop. The first part of the code will look at
the X-axis position of the dog. The second part of the code will look at the Y-axis
position of the dog. The third part of the code will look at the Z-axis position of the
dog. The loop in this code will continually look for the position of the dog using
the X-axis, Y-axis and Z-axis. The programming code for the heart rate monitor
will pick up the pulse of the dog. The programming code needs to continuously
loop around looking for the heart rate and picking up each major section of the
pulse. These major sections are the PR interval and the QT interval. The PR
interval is where the first wave is created by an electrical impulse. The QT
interval is where the ventricles begin to pump and leads into the ST interval
where things are electrically quiet. The code should allow the heart rate monitor
to detect the electrical activity in the heart. If the electrodes of the heart rate
monitor are disconnected, than the programming code should recognize this and
present data that represents a flat line. Once the code for each component is
completed, programming code will also be written for the Internet of Things
platform associated with the Doggy Pal Collar.
Programming code for the website dweet.io will be used to setup data
boundaries for the heart rate monitor. If the heart rate monitor picks up data that
is outside those boundaries that will represent erratic heart rate in the dog.
Dweet.io will send an alert to the owner’s smartphone telling the owner to go
check on their dog. To send this alert, dweet.io will need information from the
user to be placed in the programming code. This information is the phone
number of the user and the phone carrier email address of the user. Figure 7.3-1
shows a flowchart that represents the coding plan for the Doggy Pal Collar.
101
Figure 7.3-1: Final Programming Code Flowchart
For the final project, the programming code plan was mostly the same. Some
components changed types but the functions were the same and the overall goal to have
data from each component be displayed on an Internet of Things website was achieved.
102
8.0 Project Prototype Testing
8.1 Temperature Sensor Testing
Once the smart collar has reached the prototype stage testing can begin on the
TMP007 Infrared Temperature sensor. The primary characteristics of concern for
the temperature sensor are its accuracy, range, sampling rate, and consistency.
Each test will be repeated multiple times to ensure that the temperature sensor
functions according to its specifications and meets the needs of the smart collar
design.
In order to test the accuracy of the temperature sensor, another temperature
measurement device which is calibrated will be used. The TMP007 and the
control device will each be used to perform measurements repeatedly on a
variety of objects at different temperatures. These will include water ice, cold
liquid from a refrigerator, hot coffee, multiple solid objects at room temperature,
and the exterior of a vehicle that has been sitting in the sun. Each device will
perform each measurement three times. The temperature readings taken by the
TMP007 and the control device will be recorded and compared. The results will
be used to calibrate the TMP007 if necessary.
In order to test the range of the temperature sensor, objects with known
temperatures will be measured at different distances. For the smart collar design,
the distance will be small; less than two centimeters. To ensure the TMP007
functions properly, temperature readings will be taken on objects at zero, one,
two, three, seven, and ten centimeters from the device. Each temperature
measurement will be taken three times and recorded. The temperature readings
from the TMP007 will be compared to the known temperatures to ensure that it is
taking accurate readings at each range.
The goal of the sampling rate testing is to gauge how quickly the temperature
sensor adjusts its readings as its target object’s temperature changes. To
perform this testing, the sensor will be taking readings on a stationary object
which will be heated and cooled three times over a thirty minute interval. The
readings taken by the TMP007 will be analyzed to ensure that it adjusts its output
at a rate that satisfies the needs of the smart collar system.
The consistency of the temperature sensor will be tested by analyzing the results
of the accuracy, range, and sampling rate testing. The temperature readings from
the previous testing will be analyzed to ensure that the TMP007 is taking
consistent readings over all of the tested temperature ranges with respect to
time. Each measurement of an object at a known temperature should be the
same each time it is taken by the TMP007 in order to be satisfactory.
103
8.2 Accelerometer Testing
When first testing the accelerometer it was decided to verify its functionality with
another similar component. The overall characteristics to test within the
accelerometer are as follows:
●
●
●
●
●
●
Linearity
Hysteresis
Cross Axis Sensitivity
Temperature Sensitivity
Shock Response
Bias Stability
Scale Factor Test - The scale factor test is the ratio of the sensor electrical output
to mechanical input. This is done by setting a reference value to 1g so it can be
verified that the device is working properly. To do this we mount our
accelerometer to an automatic accelerometer calibrator. The accelerometer
would be wired to this device and to verify it is working correctly it should output
1g, our reference value.
The sensitivity of the accelerometer can be measured by hooking the device up
to an oscilloscope. The magnitude of the waveform can give us forward and
backwards sensitivity (+g/-g).
Hysteresis Test - The accelerometer should be able to determine the changes in
acceleration whether it be in the positive or negative direction. The purpose of
the Hysteresis test is to determine the presence of strain/deflection on the
accelerometers spring after the force has been applied then removed. When
performing a Hysteresis test it should produce a linear graph while comparing the
acceleration to output voltage. The more the accelerometer deviates from this
linear form the less accurate the accelerometer will perform.
Linearity Test - The transfer function of the accelerometer can determine how
linear the device is running. The device is mounted on a shaker and subjected to
a +1g to +20g stress test at a reference frequency of 100Hz.
For the final project, the accelerometer changed types, but the same method of
testing was used.
8.3 GPS Testing
The MTK3339 chip needs to work in multiple areas that the dog may go; in all the
different terrains, weather conditions, and locations. Testing will center on the
characteristics of this GPS that may create problems later on if they are not up to
standards like time to first fix, location accuracy, signal interference, and
consistency. More than one of these characteristics can be analyzed for during a
104
single test for some of these characteristics may emanate from the other. A
program was created to test the GPS chip that works like a sonar. It will send out
a signal to locate all the satellites in the area then receive and decode the
response signal from the located satellites. This code is from the Adafruit website
and is rightfully named “echo”.
To test the location accuracy of this GPS it would be best if the first test
conducted eliminated as many interruptions as possible. This way the GPS
should be able to easily obtain the decoded coordinates of the location without
error and prove that it does indeed work. The best place to do this is in an open
field with a cloudless sky so that there are no object in the way and the GPS has
a clear view of the sky. After it is established that the GPS works the next few
tests should be where a dog would presumably travel. This can mean inside a
house/building, backyards, parks, cars, pathways, etc. Different weather and
temperature conditions can interfere with the GPS signal as well. Therefore,
these test need to not only be for different locations but also for different weather
and temperature conditions like rain and snow. Some of these tests will be as
simple as taking the GPS outside to test in the rain while others will be harder to
achieve. Florida does not reach the temperatures need to test how the GPS will
operate in cold or snowy conditions, so the GPS will have to be placed in a
freezer to simulate the temperatures needed and then taken out to test how well
it operates. It would be best if the GPS chip could be tested in varying locations
and under varying conditions to see the limits of the GPS chip.
Single interfering is another major concern for GPS devices. Since GPS signals
are generally weak even the slightest change in position can mean a fix or not.
Because most of these concerns are dependent on the location of the GPS, the
testing for signal interference will be similar to or conducted during the testing for
location accuracy. For example, how dense can the trees in a park be before the
signal is blocked? This test will determine how strong the GPS signal is and the
accuracy. Locations are not the only problem with signal interference though.
Many things interfere a GPS signal from everyday appliances to the buildings
himself. Another example is that some window tinting for cars contains metallic
components that can block GPS signal reception. The MTK3339 chip will have to
be tested to determine how these common interferences will affect the
performance of the GPS.
It is important to test for consistency to find out if the device will properly work
over long periods of time. Each test will be repeated multiple times and under the
same circumstances to keep the testing results accurate and ensure the GPS is
functioning correctly. By doing this in different terrain, weather, and locations, it
can be determined if the dog will safely be able to be tracked wherever he/she
may go.
8.4 Battery Testing
105
Lithium-Ion Polymer batteries need special care and have to be charged under
specific conditions, which means certain charges are needed for these batteries
in order to charge safely. This sensitivity needs to be tested to find the limits that
a Lithium-ion Polymer can endure before it becomes unsafe.
The battery testing will include:
●
●
●
●
●
Overall battery life
Duration of charge time
Radiate temperature
Impact testing
Environmental temperature testing
Every battery will need to be replaced after a period of time and/or after and X
amount of discharge/recharge. Testing the life of the battery provides the time
duration that the battery can power the system before it needs to be replaced.
The goal is to have a smart collar that is convenient for the owner to use, which
means a healthy stretch of time between charges. To do this the Lithium-Ion
Polymer battery will be discharged at the same amount it would need to for all
the components in the Doggy Pal Collar to properly work; then recharged as
shown in Figure 8.4-1. Batteries are rarely discharged fully according to Battery
University. They state that “manufacturers often use the 80 percent depth-ofdischarge (DoD) formula to rate a battery.” The 80% DoD means that 80 % of the
battery's available energy is discharged with 20% still remaining in reserve.
Manufacturers believe that this test is a closer representation of how batteries
are commonly charged and discharged when in use by the customer. This way of
testing has other benefits as well because when a battery is cycled from charged
to discharged it increases the service life of the battery to not have it fully
discharged. This is then repeated an X amount of times until the battery can no
longer hold a charge. The results will show if the predicted time of life for the
battery is accurate and for how long the battery should, under the same
circumstances, last.
106
Figure 8.4-1: Battery Recharge Flowchart
To test the amount of time it takes to fully charge can be done during the battery
life test. Another requirement needed towards making the DPC convenient is a
short charge time. It would be counterproductive for the battery to last a day but
needs 8 hours to full charge. This test can be fulfilled during the battery life test.
Each time the battery needs to be recharged the amount of time need for it to
reach its full charge can be tracked and recorded. Averaging the times will result
in the overall time needed to fully charge this Li-Poly battery.
The Doggy Pal Collar is designed for easy charging by allowing the charger to
attach to the collar so the battery doesn’t have to be removed. However, LithiumIon Polymer batteries emanate heat while charging. This heat needs to be
measured to find the highest peak the battery can reach so the encasement can
be tested to handle this peak temperature. This test can also be executed during
the battery life test by measuring the temperature the battery emits and finding
the peak temperature for each recharge. The highest peak time will be used to
test the encasement to best test for overall safety.
Impact testing is an important factor needed for this project. An animal is an
unknown element. They cannot understand that the battery in their collar may
explode if it is punctured or damaged. Therefore this battery needs to be tested
107
to find the peak impact pressure it can endure before it becomes unstable. This
test will involve using a Clamp Meter to find the breaking point of the battery and
measuring the resulting pressure. Knowing this pressure point and the breaking
point from the encasement will ensure this battery is well guarded from being
punctured or damaged.
Again, due to the sensitivity of Lithium-Ion Polymer batteries they can explode if
exposed to or not charged under the correct temperatures. This smart collar will
be exposed to different weather patterns and temperatures so it needs to be
tested to find the highest and lowest temperatures it can endured before it
becomes unstable. According to currentresults.com the average temperature for
hottest places in America can reach to over 100 degrees Fahrenheit. They also
state that the average temperature in the winter is “just above freezing” at 33.2
degrees Fahrenheit. The Doggy Pal Collar needs to be tested for these
temperatures to find the limit it can withstand. To do this the battery may need to
be heated and cooled, to see if it can withstand these temperatures. Every
scenario that a dog may find itself in need to be taken under consideration when
testing this smart collar.
8.5 Heart Rate Monitor Testing
Testing the heart rate monitor system will be different compared to the testing of
other components for the Doggy Pal Collar. The testing of the heart rate monitor
cannot be done on humans or animals. This limits the different ways available to
test the heart rate monitor because the heart rate monitor needs a heartbeat to
read data from. The GPS module, accelerometer, Wi-Fi module and temperature
sensor do not require animals or humans to be tested on. In order to get around
these limitations, a heart rate will be simulated electronically in order to test the
heart rate monitor. The heart rate monitor will be tested by group members.
Specially trained individuals will not be required for testing the heart rate monitor.
The heart rate monitor works on the idea of electrocardiography. This is the
procedure of measuring the electrical activity in the heart using electrodes that
are attached to the body. An external component that is not part of the Doggy Pal
Collar will be necessary for testing the heart rate monitor. This component is a
phone application called Medsby ECG Simulator. This phone application
simulates a real-time analog electrocardiogram signal through the sound card in
the phone. Figure 8.5-1 shows a picture of the Medsby ECG Simulator
application running on a project member’s phone. An audio jack will be placed in
the headphone socket of the phone. A real-time electrocardiogram signal input
can be generated by connecting the ground pin of the audio jack and the speaker
output pin of the audio jack to any device you want to send the electrocardiogram
signal to, like an oscilloscope or heart rate monitor. Figure 8.5-2 shows an
example of the Medsby ECG Simulator connected to an oscilloscope. The
Medsby ECG Simulator also allows for different heart rate speeds to test different
amplitudes of the electrocardiogram signal.
108
Figure 8.5-1: Medsby ECG Simulator Application
Figure 8.5-2: Example of Medsby Simulator Connected To Oscilloscope
(Courtesy of Medsby)
109
The heart rate monitor will connect to the Medsby ECG Simulator by connecting
the electrodes of the heart rate monitor to the ground pin and speaker pin of the
audio jack that is connected to the phone with the Medsby ECG Simulator. Once
the connection is made the Medsby ECG Simulator will simulate an
electrocardiogram signal at 40 beats per minute for testing the heart rate monitor.
The heart rate monitor will be tested at different heart rate signals that simulate
different activities for a dog. The normal dog at rest has a heart rate of 60 to 160
beats per minute. The Medsby ECG Simulator can go as high as 180 beats per
minute and as low as 40 beats per minute. Starting at 40 beats per minute, the
Medsby ECG Simulator will be increased by 20 beats per minute for each test of
the heart rate monitor up to 180 beats per minute to make sure the heart rate
monitor can pick up a wide range of heart rate signals. The heart rate monitor will
also be tested for flatline readings. This will be done by disconnecting the
Medsby ECG Simulator from the heart rate monitor. When this is done the heart
rate monitor should flatline and show no activity on its graph. Figure 8.5-3 shows
a flowchart of the heart rate monitor testing procedure.
The component that needs to be tested first for the Doggy Pal Collar is the Wi-Fi
module. The Wi-Fi module will be sending the heart rate data to the Internet of
Things platform, therefore before the heart rate monitor can be tested the Wi-Fi
module will be setup first. Every other component of the Doggy Pal Collar is
independent enough that each component can be tested at any time in any
order. These components work on their own and do not communicate any data
between each other, they only send their data to the Wi-Fi module. The heart
rate monitor will be tested in various areas that a dog would normally go to in an
average house. These areas include the back yard, front yard, bathroom,
bedroom, under a bed, and on a table. No matter what location the heart rate
monitor is in, the data should be sent to the Wi-Fi module without any connection
errors. Any connection errors could cause the heart rate graph to be displayed
wrong and show inaccurate data. When the heart rate monitor picks up the
electrocardiogram signal it will be sent to the microcontroller. The programming
code inside the microcontroller will take the electrocardiogram signal and send
that data to the Internet of Things platform via the Wi-Fi module. The Internet of
Things platform used for the Doggy Pal Collar are two websites called dweet.io
and freeboard.io. These two websites will be storing and displaying the heart rate
monitor data in a graph form for the user to see.
First the electrocardiogram signal will be sent to dweet.io and stored on that
website. Freeboard.io will collect the electrocardiogram data from dweet.io and
display the data using a dashboard on the freeboard.io website. The dashboard
will be setup to display the electrocardiogram data in graphical form in real-time.
With this setup, when the heart rate monitor picks up rapidly changing heart rate
signals the data should change in real-time on the freeboard.io website. This will
be tested by rapidly changing the heart rate beats per minute on the Medsby
ECG Simulator. It will also be tested by sending a flatline signal from the heart
rate monitor to the Internet of Things platform. A user should be able to open a
computer, smartphone or tablet and be able to access the heart rate monitor data
110
from freeboard.io. Special boundaries will be setup using programming code for
the microcontroller and the dweet.io website. These boundaries will include
rapidly changing heart rate data, very low heart rate data and very high heart rate
data. If dweet.io picks up this type of data it will trigger an alert from the website.
This alert will be sent to the user’s smartphone. This alert will tell the user that
something could be wrong with the dog and that the user should go check on the
dog immediately. If the heart rate monitor data that is sent to dweet.io is within
acceptable boundaries, then no alert will be issued and instead the data will wait
to be collected by freeboard.io.
111
Figure 8.5-3: Heart rate monitor and Internet of Things flowchart
For the final project, the heart rate monitor changed to a different type, but the testing
was the same.
112
8.6 Wi-Fi Testing
When testing the Wi-Fi the design needed to set the specifications of the device
for our specific microcontroller and verify that everything is working properly. The
device the team choose to use is the TI CC3100 Simple Link Wi-Fi Adapter. The
flowchart for the internal components can be seen in Figure 8.6-1
Figure 8.6-1: Internal Flow Diagram of CC3100
It was decided analyze the CC3100 as our Wi-Fi Adapter because of its
versatility, size, weight, and specifications. Although these are general reasons,
this device goes far beyond the needed requirements. This device can connect to
just about any microcontroller that is 8, 16 or 32 bit. Below are some of the
standard specifications for this. This is a Wi-Fi Certified chip. The internal Clock
runs at 32.768 KHz with a startup time of 250ms.
●
●
●
●
●
Internal clock is 32.768 KHz
Initialization Time is 250 ms
Wi-Fi certified chip
802.11 b/g/n Radio, Baseband, and Medium Access Control (MAC)
Interfaces with 8, 16 and 32 bit MCU’s
113
●
●
●
●
●
●
Integrated DC/DC supply voltage
Operates from 2.1V to 3.6V
Pre Regulated 1.85V
Low voltage deep sleep mode runs at 115 Microamps.
Clock source is a 40 MHz crystal with an internal oscillator
Ambient temperature range of -40 to 85 Celsius
The pin diagram layout consists of 64 pins in which about 50 of them are used as
shown in Figure 8.6 -2 and Table 8.6 - 1.
Figure 8.6 -2: Wi-Fi Pin Diagram (Courtesy of Texas Instruments)
Table 8.6 - 1 Pin Diagram Layout:
1
unused
2
Hibernate Signal
3
Reserved
4
Forced AP Mode
5
Host interface for SPI Clock
6
Host interface for Data Input
7
Host interface for Data Output
8
Host interface for Chip Select
9
Digital Core power supply 1.2 V
114
10
I/O Supply
11
Serial Flash Interface for SPI Clock
12
Serial Flash Interface Data out
13
Serial Flash Interface Data In
14
Serial Flash Interface for SPI Chip Select
15
Interrupt Output for active high
16
Unused
17
Unused
18
Unused
19
Connect 100k pull down to ground
20
Enable Signal
21
Enable Signal for external TCXO
22
Connect to WLAN
23
Connect to WLAN
24
Internal PLL Power Supply 1.4V
25
Input to internal LDO
26
Unused
27
Unused
28
Unused
29
Reserved
30
Reserved
31
2.4GHz RF TX/RX
32
Reset for input device
33
Power supply for the RF Power Amplifier
34
100K Pulldown to ground
115
35
100K Pulldown to ground
36
Input to internal LDO
37
Power Supply for the DC-DC converter
38
Analog DC-DC Converter
39
PA DC-DC Converter input supply
40
PA DC-DC Converter switch output
41
PA DC-DC Converter switch output
42
PA DC-DC Converter output
43
PA DC-DC Converter switch output
44
Power supply input for the digital DC Converter
45
Analog2 DC-DC Converter
46
Analog2 DC-DC Converter switch output
47
Analog2 Power Supply Input
48
Analog1 Power Supply Input
49
Power Supply for the Internal Ram
50
UART Host Interface
51
32.768 kHZ XTAL_N/external CMOS Clock input
52
32.768 kHZ XTAL_N/100k external clock
53
Unused
54
I/O Power Supply
55
UART Host interface
56
Digital power supply (1.2V)
57
UART Host Interface
58
Test Signal
59
Test Signal
116
60
Test Signal
61
UART Host Interface
62
Test Signal
63
Leave Unconnected
64
Leave Unconnected
65
Ground
For the final project, a bluetooth device was used instead of wifi, however, the testing
was the same.
8.7 Collar Stress Test
When the testing first began we had to determine which materials we would use
for the collar. It was decided by the team to use ABS or Acrylonitrile butadiene
styrene for our design. This material closely resembles the consistency of Lego
blocks. The most notable properties of ABS is their resistance and toughness.
Structural modifications can be made to this material to increase its resistance to
strain and stress. ABS creates about 3 layers per 1 mm and can be purchased in
many different color options The minimum thickness for ABS is approximately
1mm. Aside from its physical properties this material has a high resistance to
temperature. It is capable of being tolerant to temperature from -20 to 80 Celsius.
The final step of the molding process involves molding the product at high heat.
There are many different ways of processing this material, our strategy is to use
a 3d printer and mold it ourselves. This also gives up the option of later
applications of creating different sizes for the animal. The ABS material is
nontoxic to animals making it safe. After the collar was molded we used a three
point stress test to analyze the strength of the material. The team found it met the
expectations of the design.
The University of Central Florida informed the group that due to a shortage of
plastic used for the 3D printer, neither of the Auto Cad designs could be printed.
Because of this the new plan was too hand make a collar for the Doggy Pal
Collar. For this DIY project an 11x14x.093 (LxWxH) inch, clear plastic sheet was
used to quickly make a box shape collar. Using UCF’s laser cutter to accurately
cut the six sides need for the box, they were then painted and glued together with
silicone and enforced with brackets. The brackets were used to secure each of
the four walls to the bottom plastic. A hinge was used to attach the top cover to
one of the walls as to open and close the box easily. Because this box was
handmade there was no section created for the collar to pass through as can be
117
seen in both figures above. Therefore the collar was screwed to the side of the
box with the temperature sensor and pulse sensor as they need to be placed on
the side closest to the dog as seen in Figures 8.7 – 3, 4 and 5 below.
Figure 8.7 – 3: Final Collar Design 1
Figure 8.7 – 4: Final Collar Design 2
118
Figure 8.7 – 5: Final Collar Design 3
119
9.0 Project Plan
9.1 Division of Work Responsibility
The work was divided 4 ways. Each member had responsibility of two separate
components of the design as seen in Figure 9.1-1. Stephanie was assigned to
the Power and GPS systems. Bryon was assigned to the Temperature System
and MCU. Dustin was assigned to the accelerometer and the Wireless
Communication, and Steven was assigned to the Heart Rate Monitor and Data
Analysis. As the team began working and assembling the different components
each member worked closely together. When testing specific components the
group found that no single person could work on one specific component as it
was required for at least 2 people to focus on each component. For example
Steven and Bryon had to constantly work together as Steven was assigned to
programming the system and Bryon was assigned to the MCU. Stephanie and
Dustin were both assigned to components of the design so they had to be
constantly in contact with Steven to properly program and configure their
particular components. Stephanie initially had to communicate with everyone on
the team until the group finalized our electrical schematic. The entire team had
to work together to get the best possible wiring diagram to ensure the most
efficient electrical model.
The project was constantly changing and evolving, some parts of the project that
seemed short turned out to be long, while some parts that seemed long turned
out to be short. During the weekly meetings, group members would update each
other on the progress of their parts of the project as well as discuss what needed
to be completed next. These meetings were also a good time to work out any
problems the group members might have run into while working. As each
member continued to go deeper into their work, good communication and good
project management were key for the continued success of the project.
120
Figure 9.1-1: Block Diagram
9.2 Milestones
The duration of Senior Design I is used for the developing and research stages of
the design process. The team also used this semester to acquire project parts to
test in the coming semester. In the start of Senior Design I the team’s first step
was to brainstorm ideas to develop for the Senior Design project. During a team
meeting the idea for the Doggy Pal Collar was decided, based on each member's
individual skills and passions, and the design process began. In Senior Design
Bootcamp it was explained how the human brain cannot envision a new design
idea once a suggestion has been placed. To overcome this presuppose problem
it was said that each member should come up with at least 30 different ideas
designs. The magic number 30 is when the minds stops reproducing the same
concepts and starts creating something new. In this design stage the team each
individual came up with 30 different designs for a heart monitoring dog collar.
Next the team researched the parts that would be needed to create the smart
collar and redesigning where necessary. This can be seen in the Timeline Graph
9.2 - 1 below:
121
Figure 9.2-1: Timeline Graph of Senior Design I
The duration for Senior Design II is used for the prototyping, testing, and final
development stages. The team plans to test all the components individually then
again when all the components are connected in one system. Testing the
prototype to make sure it functions correctly for a dog will be a challenge. With
animal and human testing disallowed the testing stage needed a brainstorming
stage of its own to develop unique ways to overcome this restriction. The collar
itself needs to be developed and tested to make sure it meets all its
requirements. This semester will also be used for any redesigning that may be
needed do to component and/or design failures. Final the completed project will
be presented and given to our team member for his dog to use. This can be seen
in the Timeline Graph 9.2 - 2 below:
122
Figure 9.2-2: Senior Design II
9.3 Budget
One goal for the Doggy Pal Collar was to keep the budget as low as possible.
The maximum spending amount goal for the Doggy Pal Collar was $100. When
doing research on similar products a common trend among them was the high
price point. Dog collars that only had one feature such as temperature sensing or
GPS tracking were expensive, while collars that had multiple features such as
heart rate monitoring and GPS tracking were very expensive. The conclusion
was quickly reached that these type of smart collars were being treated like
specialty collars for hardcore animal lovers. The idea seemed to be that the
people who were animal lovers would gladly pay a high price for a smart collar
because they loved their animals so much and would pay any price to keep their
animals safe. In turn, this high price point turned off the average animal owner
who did not have the amount of money necessary to invest in a smart collar. The
Doggy Pal Collar was envisioned as a smart collar that would be low cost and
have a good quality design. This collar would not be a cheap knock off with
123
questionable material. Instead, it would have multiple features that included GPS
tracking, heart rate monitoring, position tracking and temperature sensing with a
long lasting battery power and quality design and comfort. The components
would have to have a reasonable cost to keep within the budget of $100 while
also meeting the specifications set for the Doggy Pal Collar. This budget of $100
was selected because it represents a good cutoff point for the average animal
owner. With all the features that will be included in the Doggy Pal Collar, the
price point of $100 will be very cheap compared to what the Doggy Pal Collar
can do.
Therefore, it was important that the parts selected and the prototype built would
be able to meet the low cost goal but still maintain the high quality goal. Many
different parts were discussed and researched, but after refining the objectives
and goals of the Doggy Pal Collar, certain parts began to stand out. Table 9.3-1
shows the parts chosen for the prototype Doggy Pal Collar. These parts were
determined to be high in quality but still cheap enough to provide a low cost
alternative to the current market of smart dog collars. The total price of the Doggy
Pal prototype collar is within the team’s acceptable goal of only spending around
$100. Surprisingly, the most expensive component was the GPS unit. This is
most likely because the GPS unit comes with a lot of extra features. If the budget
begins to balloon out of control, a cheaper GPS unit might be selected that has
less features. The total cost of the prototype Doggy Pal Collar is reasonable.
However, it is possible that the final design might go over budget, especially
when the 3D casing for the components is taken into account. Because the goal
was to create a smart collar that would be cheaper than the competition,
reaching a cost of around $200 will defeat one of the objectives for this project.
The budget will be closely watched for the final design and more sacrifices for
cheaper components and cheaper design materials might have to be made to
stay within an acceptable budget.
124
Table 9.3-1: Prototype Parts List and Cost
Component
Prototype Items
Vendor
Cost
Heart rate monitor AD8232
Digi-Key
$3.53
Temperature
sensor
TMP007
Digi-Key
$6.40
Accelerometer
MPU-9255
InvenSense
$7.22
GPS
MTK3339
Adafruit
$29.95
Wi-Fi
CC3100
Digi-Key
$14.07
Battery
Lithium Ion Polymer Adafruit
Battery 3.7v
2500 mAh
$14.95
Microcontroller
TMP4C123GH6PM
$11.42
Total
Mouser
Electronics
$87.54
For the final project, the budget increased and some parts changed. This went
against the goal of having a low costing collar, however the Doggy Pal Collar was
still competitive even at the new price for the parts.
9.4 Finances
The finances for the Doggy Pal Collar will be split between the members of the
team. At a budget of $100, the Doggy Pal Collar is very cost efficient for both the
teammates and any animal lovers who need a reliable smart collar at a
reasonable price. A veterinarian one of the team members know could also help
finance the project with a $100 donation. The veterinarian was interested in the
Doggy Pal Collar and the possibilities the collar has. This $100 donation will help
greatly with any unexpected costs that occur during the development of the
Doggy Pal Collar. Many of the components that are being used in the prototype
stage of development are from Texas Instruments. This company allows for
some components to be sampled for free and delivered with free shipping. The
team is taking advantage of this opportunity and getting free samples of different
components to test and try. Texas Instruments also allows for multiple free
samples of the same component for certain products it sells. Therefore, many
125
backup pieces have been acquired free of charge. These backup pieces can be
used in the event that any main components break.
With of all these opportunities that the team is taking advantage of, the finances
for the Doggy Pal Collar so far have been very minimal. However, the team still
wants to keep the components cheap enough to meet the $100 budget. Table
9.4-1 shows every component that has been obtained during work on the Doggy
Pal Collar that will not be used in the project. These components are different
than the parts used in Table 9.3-1, from section 9.3 Budget, which will be used
for the prototype design and possibly used for the final design. The parts in Table
9.4-1 will not be used for anything and can be considered as wasted
components. These parts were acquired during the research phase of the project
when many different parts were being looked at. That has caused these parts to
no longer be useful for the Doggy Pal Collar and the money spent on them was
wasted. These parts would not be considered as unexpected costs because
these components were obtained with a purpose of being used, whereas an
unexpected cost would occur from something unexpected and unplanned
happening, like a component burning or breaking. The team simply chose parts
too soon before all the necessary research and specifications for the Doggy Pal
Collar was completed.
Table 9.4-1: Wasted Project Parts
Component Name
Vendor
Price
HUZZAH ESP8266
Breakout
Adafruit
$9.95
Triple-Axis
Accelerometer
Adafruit
$7.95
DHT11 Temperature and
Humidity Sensor
Adafruit
$5.00
Nokia 5110/3310 LCD
Screen
Adafruit
$10.00
Total:
$32.90
The final project has no sponsors and with a change in components used in the
smart collar, the final cost was split between the members as shown below.
126
Figure 9.4 – 1: Final Costs
127
10.0 Project Operation
First the user must download and install the Processing program from
processing.org. The program must be installed on a personal computer that has
Bluetooth connectivity and an internet connection. The program may be installed
to any directory, on any compatible operating system.
Next the Bluetooth connectivity must be enabled on the computer to which
Processing has been installed. Once the computer’s Bluetooth module is on, turn
on the Doggy Pal Collar by flipping the switch found on its side. Once the collar is
turned on, its Bluetooth module will power up and become available for pairing.
The collar’s Bluetooth module will identify itself as “Adafruit EZ-link.” Navigate to
the Bluetooth settings menu on the computer with Processing installed (host
computer), and pair with the collar. Pairing may take a minute or so.
Next, a terminal program will be needed in order to identify the correct COM port.
The Bluetooth module on the collar will open two COM ports for communication
with the host computer, and the user needs to determine which one is the proper
one for Processing to use. The recommended terminal program for this device is
the serial monitor in the Arduino IDE program. Arduino IDE is available for
download at Arduino.cc, in the downloads section. Arduino IDE may be installed
to any directory the user desires. Once Arduino IDE is installed, the user should
run the program. The user should go to the Tools dropdown menu in the toolbar
at the top of the IDE window. In the tools dropdown, the user will see the option
to select from available COM ports, labelled as “Port: .” If the host computer is
properly paired with the Doggy Pal Collar Bluetooth module, and the Doggy Pal
Collar is powered on, then the user will see at least two COM ports listed under
this menu. In order to determine whether a particular COM port is receiving data
from the collar’s Bluetooth module, the user must choose that COM port, and
then open the serial monitor within the Arduino IDE. The option to open the serial
monitor is located under the Tools dropdown menu. After opening the serial
monitor, the user should select baud rate of 115200. The baud rate selection
dropdown is located at the bottom right of the serial monitor window. Next the
user should wait 20 to 30 seconds for Bluetooth configuration. If the serial
128
monitor does not display any data after 30 seconds, the user should try another
COM port. Once the correct COM port is open in the serial monitor, the collar will
print data continuously after the configuration period. Once the user has verified
the correct COM port, the user should take note of its number, and close the
serial monitor and the Arduino IDE program.
Next, the user should use the Processing program to open the .pde file that is
supplied with the Doggy Pal Collar. The Processing window will now show the
.pde source code which is used to gather data from the collar and transmit it to
the IOT platform. The user must alter the “COM ##” portion of line 18 to match
the COM port number that was noted previously. If the change to the COM name
in the code is saved, this step only needs to be run for initial configuration.
Once the COM port name in the .pde file is changed to reflect the proper port, the
user should select Sketch from the Processing program toolbar, and then select
Run from the dropdown menu. The sketch will begin to run, and will continue to
gather data from the collar as long as the collar is on and within range, until the
Stop button is clicked, or the program is closed. The Thingspeak channel for the
user’s Doggy Pal Collar device will be continuously updated as long as the collar
is on and within range, and the Processing program is running the .pde file. The
user may check the collar data from any device that can access the Thingspeak
website, from any location. Data will be updated in 15 second intervals.
To turn off the Doggy Pal Collar, simply turn the switch to the off position and
either press the Stop button in the Processing program or exit the program. The
Doggy Pal Collar does not need to be reconfigured after powering down. When it
is powered back on, it will be ready to connect and resume broadcasting data.
The .pde file will need to be re-run in the Processing program each time the
collar is powered down, or the connection is lost.
To recharge the lithium ion battery, open the lid of the housing and plug into a
USB connection. Do not recharge the collar while it is being used.
129
10.1 Troubleshooting the Doggy Pal Collar
The collar won’t power on.
Try recharging the battery.
There is no data being transmitted.
Make sure that you have entered the correct COM port number in the Processing
.pde file. Make sure that your computer is paired with the collar’s Bluetooth
module. To check whether the problem is with Processing or the collar hardware,
connect with a terminal program such as Arduino IDE’s serial monitor and verify
whether data is being transmitted by the collar.
The collar doesn’t show up for Bluetooth pairing.
Verify that the host computer’s Bluetooth is enabled. Make sure that the collar is
as close as possible to the host computer while pairing.
When I run the .pde file in Processing, I get a connection error.
Verify that your host computer is paired with the collar. Exiting Processing,
stopping the sketch, or powering down the collar all cause a connection loss.
Make sure to wait at least 30 seconds after a connection loss before attempting
to connect again. Some operating systems “hold on” to the Bluetooth COM port
for too long and cause this error.
I am getting an error when I run the .pde file in Processing other than a
connection error.
It is possible some of the code was unintentionally altered when fixing the COM
port line. Delete the copy of the .pde file that you are running and replace it with a
copy of the original .pde file for the collar.
130
11.0 Administrative Content
11.1 Works Cited
(Cover Image):
Cliparts.co. “Dog Head Silhouette Clip Art Images & Pictures - Becuo.” Web. 9 December
2015
<http://cliparts.co/clipart/2436333>
(Accelerometer):
Freescale. “FXLS8471Q.” Web. 10 November 2015
<http://www.freescale.com/products/sensors/accelerometers/3-axis-accelerometers/2g4g-8g-low-g-14-bit-digital-accelerometer:FXLS8471Q>
GY. “GY-52 3 axis Accelerometer.” Web. 9 November 2015
<http://www.dx.com/p/gy-52-mpu-6050-3-axis-gyroscope-triaxial-accelerometer-6-axisstance-tilt-module-for-arduino-148654?tc=USD&gclid=Cj0KEQiAkIWzBRDK1ayoYjt38wBEiQAi7NnP-tcvAB9Ur9FWTvncbPGaNhfDIFO8TR9qP2qvokh6IaAtLz8P8HAQ#.VmHROnarTIU>.
Invensense. “Invensense MPU-9250” Web. 10 November 2015
<http://www.digikey.com/Suppliers/us/invensense.page?lang=en&WT.srch=1>
Kionix. “Kionix Accelerometers.” Web. 8 November 2015
<http://www.digikey.com/product-detail/en/KXCNL-1010-FR/1191-1035-1ND/3880959?WT.srch=1>
NXP.
“Breakout Board for FXLS8471Q NXP Accelerometer .” Web. 9 November 2015
<http://www.nxp.com/products/sensors/accelerometers/3-axis-accelerometers/breakoutboard-for-fxls8471q-freescale-accelerometer:BRKOUT-FXLS8471Q>
(Wi-Fi):
GridConnect. “Tiny UART Embedded WiFi Module - HF-LPT100.” Web. 9 November 2015
<http://gridconnect.com/tiny-wifi-module-802-11-b-g-n-industrial-gradetemperature.html#>
LinkSprite. “Cuhead WiFi Shield V2.0 for Arduino.” Web.
9 November 2015.
<http://store.linksprite.com/cuhead-wifi-shield-v2-0-for-arduino/>
Mouser. “Olimex Wi-Fi Adapter” Web. 25 November 2015
<http://www.mouser.com/ProductDetail/Olimex-Ltd/MOD-WIFIESP8266/?qs=QGk6feVlqMKKopUWzCH4tA%3D%3D&gclid=Cj0KEQiAkIWzBRDK1ayo
-Yjt38wBEiQAi7NnP6pACglG_JDltgdCS-yCRpXoY83PzaDp7AO7HWjbpLYaAj48P8HAQ>
Olimex. “MOD-WIFI-ESP8266” Web. 9 December 2015
<https://www.olimex.com/Products/IoT/MOD-WIFI-ESP8266/>
131
Texas Instruments. “CC3100.” Web. 25 November 2015
<http://www.ti.com/product/cc3100>
Tiny UART. “GC-HF-LPT100.” Web. 23 November 2015
<https://gridconnect.com/tiny-wifi-module-802-11-b-g-n-industrial-gradetemperature.html?gdftrk=gdfV25227_a_7c1592_a_7c6907_a_7c1133&utm_source=goog
le&utm_medium=CPC&utm_term=&utm_campaign=Shopping:%20%5bPLA%5d%20%2
0%20All%20Products%20General%20All&mm_campaign=477cea803cb14c83d8a99b6c7
d0cd349&keyword=&mkwid=sPwK9yrXV_dc%7Cpcrid%7C59302249153&gclid=Cj0KEQi
AkIWzBRDK1ayoYjt38wBEiQAi7NnP3GDGIJvDg7mXXHWg8HV6heX8s8reOF4bk4Zthrf5UwaApWc8P8H
AQ>
Wi-Fi Shield WISHIELD. “Wifi_shield_2_D4.” Web. 25 November 2015
<http://store.cutedigi.com/wifi-shield-wishield-v2-0-for-arduino/>
(Microcontroller):
n.p.. Arrow. Arrow Electronics, Inc.. n.d.. Web. 15 September 2015
<https://www.arrow.com/>
Texas Instruments. “Beaglebone Black Development Board.” Web. 8 November 2015
<http://www.ti.com/tool/beaglebk#buy>
---. “C2000 Real-Time Microcontrollers.” Web. 8 November 2015
<http://www.ti.com/lit/sg/sprb176z/sprb176z.pdf>
---. “CC1110-CC1111.” Web. 8 November 2015 <http://www.ti.com/product/cc1110-cc1111>
---. “CC430F5125.” Web. 8 November 2015 <http://www.ti.com/product/cc430f5125>
---. “MSP430C092.” Web. 8 November 2015 <http://www.ti.com/product/msp430c092>
---. “MSP430F2013.” Web. 8 November 2015
<http://www.ti.com/product/msp430f2013?keyMatch=MSP430F2013&tisearch=SearchEN-Everything>
---. “MSP430F5131.” Web. 8 November 2015 <http://www.ti.com/product/msp430f5131>
---. “MSP430F5529.” Web. 8 November 2015 <http://www.ti.com/product/MSP430F5529>.
---. “MSP430FG4618.” Web. 8 November 2015
<http://www.ti.com/product/msp430fg4618?keyMatch=MSP430FG4618&tisearch=Search
-EN-Everything>
---. “MSP430G2553.” Web. 8 November 2015
<http://www.ti.com/product/MSP430G2553/description>
---. “Tiva TM4C123GH6PM Microcontroller Datasheet.” Web. 8 November 2015
<http://www.ti.com/lit/ds/symlink/tm4c123gh6pm.pdf>
---. “TM4C Microcontrollers.” Web. 8 November 2015
< http://www.ti.com/lit/sg/spmt285d/spmt285d.pdf>
132
---. “TMS470MF03107.” Web. 8 November 2015
<http://www.ti.com/product/tms470mf03107>
---. “RF430FRL154H.“ Web. 8 November 2015 <http://www.ti.com/product/rf430frl154h>
(GPS):
Adafruit. “Ultimate GPS Module - 66 channel w/10 Hz updates - MTK3339 chipset.” Web. 7
September
2015 <https://www.adafruit.com/products/790>
Afrotechmods. “How to choose a battery: A battery chemistry tutorial.” Online video clip.
YouTube.
YouTube, 14 Dec. 2014. Web. 8 Dec. 2015.
Garmin. “GPS 15x™.” Web. 9 November 2015 <https://buy.garmin.com/enUS/US/prod51048.html>
SparkFun. “GPS Receiver - GP-2106 SiRF IV (48 Channel).” Web. 13 November 2015
<https://www.sparkfun.com/products/10890>
(Battery):
10TopTenReviews. “Battery Chargers and the Benefits of Rechargeable Batteries.” Web. 10
September
2015 <http://battery-charger-review.toptenreviews.com/battery-chargers-and-thebenefits-of-rechargeable-batteries.html>
Adafruit. “Lithium Ion Polymer Battery - 3.7v 2500mAh.” Web. 15 September 2015
<https://www.adafruit.com/products/328>
Electropaedia. “Primary (Non Rechargeable) Batteries.” Web. 10 September 2015
<http://www.mpoweruk.com/primary.htm>
eHow. “Advantages and Disadvantages of Rechargeable Batteries.” Web. 9 December 2015
<http://www.ehow.com/about_5397626_advantages-disadvantages-rechargeablebatteries.html>
Frequencycast. “Rechargeable Batteries vs Standard Batteries.” Web. 9 December 2015
<http://www.frequencycast.co.uk/rechargeablebatteries.html>
Interstate Batteries. “What are the Advantages to Using Rechargable Batteries?.“ Web. 11
September
2015 <http://www.batteries-faq.com/activekb/questions.php?questionid=43>
Isidor Buchmann. Battery University. Cadex Electronics Inc. 2003. Web. 15 September 2015
<http://batteryuniversity.com/>
Wikipedia. “Alkaline battery.” Web. 8 December 2015
<https://en.wikipedia.org/wiki/Alkaline_battery>
---. “Nickel–cadmium battery.” Web. 8 December 2015
<https://en.wikipedia.org/wiki/Nickel%E2%80%93cadmium_battery>
133
---. “Nickel–metal hydride battery.” Web. 8 December 2015
<https://en.wikipedia.org/wiki/Nickel%E2%80%93metal_hydride_battery>
---. “Lithium-ion battery.” Web. 8 December 2015 <https://en.wikipedia.org/wiki/Lithiumion_battery>
---. “Lithium polymer battery.” Web. 8 December 2015
<https://en.wikipedia.org/wiki/Lithium_polymer_battery>
(Heart-rate monitor):
Analog Devices. “AD8232.” Web. 3 November 2015
<http://www.analog.com/en/products/application-specific/medical/ecg/ad8232.html>
Maxim Integrated. “MAX30100.” Web. 5 September 2015
<https://www.maximintegrated.com/en/products/analog/sensors-and-sensorinterface/MAX30100.html>
SparkFun. “SparkFun Single Lead Heart Rate Monitor - AD8232.” Web. 5 September 2015
<https://www.sparkfun.com/products/12650>
Texas Instruments. “AFE4400.” Web. 5 September 2015
<http://www.ti.com/product/afe4400>
Wikipedia. “Electrocardiography.” Web. 5 September 2015
<https://en.wikipedia.org/wiki/Electrocardiography>
(Internet of Things):
Bug Labs Inc.. dweet.io. Arrow, Ford, Renesas, Verizon. n.d.. Web. 10 November 2015
<https://dweet.io/>
Bug Labs Inc. freeboard.io. Web. 10 November 2015 <https://freeboard.io/>
n.p.. Wolfram Data Drop. n.d.. Web. 10 November 2015 <https://datadrop.wolframcloud.com/>
n.p.. Thing Speak. The MathWorks Inc. n.d.. 10 November 2015 <https://thingspeak.com/>
Wikipedia. “Electrocardiography.” Web. 5 September 2015
<https://en.wikipedia.org/wiki/Electrocardiography>
Whatis. “Internet of Things (IoT).” Web. 5 September 2015
<http://whatis.techtarget.com/definition/Internet-of-Things>
11.2 Datasheets
Heart Rate Monitor:
http://www.analog.com/media/en/technical-documentation/datasheets/AD8232.pdf
Wi-Fi Module:
134
http://www.ti.com/lit/ds/symlink/cc3100.pdf
GPS Module:
https://www.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-DatasheetV0A.pdf
Accelerometer:
http://43zrtwysvxb2gf29r5o0athu.wpengine.netdna-cdn.com/wpcontent/uploads/2015/02/MPU-9250-Datasheet.pdf
Temperature Sensor:
http://www.ti.com/lit/ds/symlink/tmp007.pdf
Battery:
https://www.adafruit.com/datasheets/785060-2500mAh_specification_sheet.pdf
MCU:
http://www.ti.com/lit/ds/symlink/tm4c123gh6pm.pdf
135
11.3 Permission Letters:
Texas Instruments:
136
MEDSBY:
Kionix Engineering:
137
SparkFun:
138
Battery University:
139
Adafruit:
ANALOG DEVICES:
140
Gridconnect:
NXP:
Francisco:
Hello Steven.
steven:
Hello
Francisco:
Thank you for contacting NXP Semiconductors.
Francisco:
How are you?
steven:
I am good, I just have a quick question
steven:
I am a student at the University of central Florida, I am working on a project and I might be using
some devices from NXP
steven:
I would like to use some pictures of the parts from the NXP website but I need to get permission
first
steven:
Could you give permission? Or should I email somebody else?
141
Francisco:
It depends on the pictures, Steven.
Francisco:
Which type of images are you going to use?
steven:
The pictures from the parts on the NXP store
Francisco:
Do you have the link?
Francisco:
Of the pictures.
Francisco:
Just to confirm.
steven:
http://www.nxp.com/products/sensors/accelerometers/3-axis-accelerometers/breakout-board-forfxls8471q-freescale-accelerometer:BRKOUT-FXLS8471Q
Francisco:
Checking.
steven:
So I want to use a picture of that accelerometer
steven:
Of course I would give credit to NXP website saying that is where I got it from.
Francisco:
It shouldn't be a problem Steven.
Francisco:
That images are in public domain.
Francisco:
You don't need to write to anobody.
steven:
Ok great, I just wanted to make sure before I took any, thanks for the help
Francisco:
You're very welcome Steven.
Francisco:
Have a great day.
steven:
You too thanks.
Chat session ended. Goodbye.
142
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising