Вы находитесь на странице: 1из 19

CHILD TRACKER

SMART WATCH
INTERSHIP REPORT: EMBEDDED FIRMWARE DEVELOPMENT

Personal tracker for kids below 14 years old. It has specifications like calling, geofencing, SOS
emergency button, display, battery management etc. This internship report primarily include
firmware development part which I did at Fracktal Works Pvt. Ltd.

Name: Mulay Ganesh Anil

Roll No: 1301EE19

Department: B.Tech
(Electrical Engineering)
1|Page
DECLARATION
I Mulay Ganesh Anil (1301EE19), Department of Electrical Engineering hereby declare that
this internship report is an original work and has not been copied from any outside source.
I attach my internship certificate and feedback form along with this report for evaluation.

Signature………………………………………………. Date: 29/August/2016

2|Page
TABLE OF CONTENTS
DECLARATION.................................................................................................................................... 2
TABLE OF CONTENTS ....................................................................................................................... 3
ABSTRACT ........................................................................................................................................... 4
SECTION ONE: ..................................................................................................................................... 5
1.0 ABOUT COMPANY .................................................................................................................. 5
1.1 MISSION..................................................................................................................................... 6
1.2 CLIENTS..................................................................................................................................... 6
SECTION TWO ..................................................................................................................................... 6
2.0 ABOUT PROJECT: CHILD TRACKER SMART WATCH ............................................. 6
2.1 FEATURES. .............................................................................................................................. 8
2.2 DEVICE SPECIFICATOINS ...................................................................................................... 8
2.3 PROCESS FLOW DIAGRAM.................................................................................................... 9
2.5 PROGRAM FLOW DESCRIPTION ................................................................................... 10
2.6 BRIEF TIMELINE AND APPROACH .................................................................................... 15
SECTION THREE ............................................................................................................................... 17
3.0 PROBLEMS FACED AND SOLUTIONS ......................................................................... 17
3.1 LESSONS LEARNED AND CHALLENGES. .................................................................. 18
3.2 CONCLUSION ......................................................................................................................... 19

3|Page
ABSTRACT

I carried out my internship at Fracktal Works Private Ltd, Bangalore. Fracktal Works is a
company born and incubated with the thought of enabling people to experience and empower
creation with 3D printing. They manufacture 3D printers, a pioneering device that can be used
by any industry for a varied number of purposes. It also works as an embedded solutions
provider and offer device programming, electronic design, firmware and software solutions to
other industrial clients. It offers internship opportunities to the students In need of education
about design, electronics, software, firmware and other related departments like accounting,
marketing and procurement.

Internship is an opportunity to relate what has been covered in class and what is applicable in
the field in an operational environment. The purpose of the internship is to fulfill the core
equipment for the award of a Bachelor Degree in Electrical Engineering to get a practical aspect
of the theoretical work studied at the university and to understand the operations in the
industrial sector and to enable students gain experience in different tasks.

During my internship period a number of approaches and exposure methods were used which
included: hands on, through reading relevant materials, and also questions and answer
approaches.

I was assigned to embedded systems departments which include the accounts circuit design,
layout design, firmware development, PCB design section and the UI/UX department and this
helped me interact with different people, clients and this helped me acquire information and
gain the benefits of client relations and product development. I wrote entire firmware for child
tracker device that included ATSAMDg20 MCU, origin GPS, Quectel M66 GPRS, Qtouch, Flash
Memory, SSD1306 OLED display, BQ25120 Battery management IC. In conclusion, this was an
opportunity to develop and enhance skills and competencies in my career field which I actually
achieved

4|Page
SECTION ONE:

1.0 ABOUT COMPANY

The Fracktal works was founded in 2013 by Vijay Raghav Varada and Rohit Asil, two techies
from Manipal University. It is a 3D printer manufacturing and product development firm that
develops affordable desktop FFF & SLA 3D printing systems for the Indian market as well as
provides product design and CAD services to maximize benefit of digital manufacturing
processes in the final design. They provide end to end: hardware, embedded firmware and
software prototyping to help our customers realize their ideas rapidly without boundaries, and
hence out tagline "Creation Unbound".

1. Logo
They understand the gap between conceptualization of a project or product, and the actual
realization of it. Whether we are an engineer, a fashion designer, architect or a humble home
maker, everyone has faced challenges while making or constructing anything from scratch. 3D
printers bring forward a completely new dimension to the scenario. All you have to do is sit in
front of your computer, design whatever you want, and have your object ready in no time!
Today the team has grown from 2 to 30 employees in the span of two years which includes
designers, mechanical engineers, electrical engineers, operations manager, human resource,
accounting and management.

5|Page
1.1 FRACTAL WORKS MISSION
“Our mission is to eliminate the time from concept to reality so our customers can feel no
boundaries to where their imagination can take them!”

1.2 CLIENTS

 IIT Bombay
 Manipal University
 L&T Technology services
 LOreal Paris
 Cisco
 CMR university
 Loctell
 Toshiba

SECTION TWO:
2.0 ABOUT PROJECT: CHILD TRACKER SMART WATCH

Statement: To design and develop a GPS/GSM based personal tracker smart watch for kids. It
must include features like calling, emergency alerts, dedicated website and application for
child tracking, geofencing and display.

Personal GPS Tracking is the ability for any authorized person to locate another person with the
use of GPS device that receives information from the GPS satellite network in space.

The personal GPS system allows the authorized person to track the location of the intended
person carrying the GPS tracking device.

Strapping a wearable with tracking support to your child’s wrist makes a lot of sense, especially
when it allows you to monitor their current location and habits in real-time.

In the past, it was perfectly acceptable to allow your children free roam of the neighborhood
without supervision. Parents would usually set a dinner curfew and children were expected to
return at the appropriate time.

6|Page
The world isn’t so forgiving anymore; at least it sure doesn’t seem to be. Every day we hear
stories about children being abducted, going missing or being involved in some kind of accident.
As a parent, you can never be too safe with your child.

It is of a small size, high accuracy remote location tracking device, is fully integrated GPS GPRS
Motion Sensor unit with in-built battery, GPS & GPRS antennas, SOS button and many features
that make it Compact and integrated GPS tracking unit. Want to know where your child is right
now? You can… it’s easy! You can watch the movement of your child anytime, anywhere, from
your Smartphone or from GPS integrated tracking portal. If your child needs help they are only
a button away. With the use of our tracking portal, you can set zones around your home,
school, or anywhere you like and receive alerts when they enter or exit a zone. You can also
check the history of the child to see where it’s been.

2. Child Tracker: “Lilo”

7|Page
2.1 FEATURES:
1. Small handy and colorful smartwatch for kids below 10-14 years
2. Low weight, Large battery life
3. OLED display with better resolution
4. Tamper proof model with silicon band
5. Parent can call on device and have a conversation with child
6. One-way text messaging between you and your child
7. Real time location alert depending on the time interval set by user
8. Dedicated Web portal and App to monitor child, change settings etc.
9. SOS button option in case child feels unsafe
10. The option to establish “safe zones” where your child can roam freely (geofencing)
11. 3G connectivity with an integrated SIM card with a proprietary service plan
12. Replaceable armbands that can grow with your child
13. Round robin calling in a pre-programmed list, and if the first number doesn’t answer it will
call the next until it goes through the entire list.
14. Contacts and its preference can be saved by sending an SMS or by uploading on website
portal

2.2 DEVICE SPECIFICATIONS:


1. ATSAMD20g18 : 32-bit ARM® Cortex®-M0+ processor, and ranging from 32- to 64-pins with
up to 256KB Flash and 32KB of SRAM.
2. Quectel M66: smallest Quad-band GSM/GPRS module using LCC castellation packaging
3. Origin Nano Hornet ORG1411: ultra-compact, ultra-low profile and ultra-low weight
multichannel GPS with SBAS, QZSS and other regional overlay systems receiver that
continuously tracks all satellites in view, providing real-time positioning data
4. SSD1306 OLED Display: SSD1306 is a single-chip CMOS OLED/PLED driver with controller for
organic / polymer light emitting diode dot-matrix graphic display system. It consists of 128
segments and 64commons
5. BQ25120 Battery Management IC: Linear charger, regulated output, load switch, manual
reset timer, and battery voltage monitor
6. W25X20CLZPIG: SPI Flash memory densities from 1M to 128M-bit, small erasable sectors
7. MMA8452Q: The MMA8452Q is a smart, low-power, three-axis, capacitive, micromachined
accelerometer with 12 bits of resolution.
8. TPA6205: The TPA6205A1 device is a 1.25-W mono fully differential amplifier designed to
drive a speaker with at least 8-Ω impedance
9. Miscellaneous: MIC, Vibrator Haptic, Microsim Slot

8|Page
10. Software: ATMEL Studio 7.0, TI battery tester, Eagle

BQ25120
Speaker
BMS
SSD1306
ORG1411
OLED
GPS
display

W25X20CLZP
I
MIC
SPI Flash
memory

ATSAMD20
Quectel G18 Accelerome
M66 GSM Processor ter
controller

3. PERIPHERAL COMPONENTS

2.3 PROCESS FLOW DIAGRAM

9|Page
2.4 PROGRAM FLOW DESCRIPTION:

I. BOOT up:
First boot up the device by long pressing SOS button.

II. APN Detection:


Tracker detects the APN details automatically depending on the sim used.
E.g.: aitelgprs.com

III. Device registration:


It then sends SMS to loctell server with an IMEI number to register device.
SMS content: IMEI:121212121221111,NETWORK:Airtel

IV. Download Device Settings:


Tracker downloads all the other settings from Loctell Server using a REST HTTP call,
Tracker already has Loctell Server IP, port and Setup Details REST path hardcoded.
REST call is given using following API:
www.lookwr.com/downloadSetup?deviceId=<IMEI>&checksum=AAAA
This rest call responds with:
<SUCCESS>,<ErrorCode>,<Command>,<Command>,......

*error codes and commands would be specified later.


This return data gives Contact numbers of six user defined contacts. Those are stored in
SPI Flash memory. It also replies back with the time interval with which tracking must be
done.

E.g.:
REST CALL:
http://www.lookwr.com/downloadSetup?deviceId=868325021056728&checksum=AAAA

RESPONSE:

SUCCESS,0,,7783805949,9663243701,,,,0,1,2,3,0,15,,+5:30,,9632390308,9999999999,0,11

V. Device ID:
Tracker uses IMEI number as device ID of the device.

VI. Log GPS Location:


Tracker fetches the Lat/Lng location and sends it to Loctell Server.
<BASE_URL>/Log?type=0&deviceId=<IMEI>&lat=1 2.3433&lng=77.3434…….

10 | P a g e
It also responses back with:
<SUCCESS>,<ErrorCode>,<Command>,<Command>,......

Eg:
GET Request:
http://www.lookwr.com/Log?type=0&deviceId=8631 5802353281 7&lat=1 2.7888&lng=7
7.89788&time=1 1 :1 2:44:25:1 1 :201 5&battery=80&charging=1 &inuse=0&speed=1
0&alt=111 &gprs=70&gps=87&hw=1 .1 &sw=2.2&checksum=AAAA

Response:
SUCCESS,0,,7783805949,9663243701,,,,0,1,2,3,0,15,,+5:30,,9632390308,9999999999,0,1.
1,

Parameter Name Description


type 0: for log
1: for Alert
deviceId IMEI number
lat Latitude fetched by GPS or GSM
lng Longitude fetched by GPS or GSM
time Time fetched by RTC running in device
battery Current battery percentage
charging 0: Not charging
1:Charging
inuse Whether put on hand or removed
speed Speed fetched from accelerometer
alt Altitude
gprs GPRS signal strength
hw Hardware version
sw Software version
checksum Checksum

VII. GSM location:


If GPS fails to give location, we should give GSM location.

11 | P a g e
4. INCOMING CALL ALERT

VIII. Alerts:
Different types of alerts are sent to the server which is described below.

A. Low Battery Alert: When the tracker battery is below 30% an alert has to be sent to
the server, This has to be done only once.
B. Device Manual Switch-Off Alert: If the user is switching off the device, then an alert
has to be sent to the server.
C. Incoming Call Alert: When device detects an incoming call, A notification has to be
sent to the server with phone number and call duration.
D. SOS Button Press Alert: When SOS button is pressed (long press), an alert has to be
sent to the server.
E. Battery: Full While charging, When the battery is full, An alert has to be sent to the
server.
F. Outgoing Call: When there is an outgoing call, this information has to be sent to the
server.
G. Device removed from Hand: When the device is removed from hand, An alert has to
be sent to the server.
H. SIM Card Removed/Inserted: When the user removes and inserts the SIM card, an
Alert has to be sent to the server.

12 | P a g e
Alerts will be sent to logtell server using the same API as used for logging, but type will be 1
e.g.:www.lookwr.com/Log?type=1&deviceId=8631 5802353281lat=1
2.3433&lng=77.3434&alert=1
Response: OK

Parameter Name Description


Type 0: for log
1: for Alert
deviceId IMEI number
Lat Latitude fetched by GPS or GSM
Lng Longitude fetched by GPS or GSM
Time Time fetched by RTC running in device
Alert Alert number given in below table
data1 when alert = 1 , 2, 3, 5
data1 value will be blank

when alert = 4,8


data1 value will be phone number
data2 when alert = 1 , 2, 3, 5
data2 value will be blank

when alert = 4,8


data2 value will be call duration in
seconds
Checksum Checksum

Alert Number Alert Name


1 Low Battery
2 Device Manual Switch off
3 Incoming call alert
4 SOS pressed
5 Battery full
6 Outgoing call
7 Device Removed from Hand
8 SIM card removed
9 Device worn on hand
10 Device switched on
11 SIM card inserted

13 | P a g e
IX. DISPLAY
Icon can be changed in the following cases
● Based on the message ID
● Low Battery
● Battery Full
● Missed call
● SOS - Outgoing call
● Incoming Call
● SIM Inserted
● SIM Removed
● Device Worn
● Device taken out of hand
● Contacts (Mom, Dad, Grand Dad, Grand Mom, Uncle, Aunt, Driver, Servant)

14 | P a g e
2.5 BRIEF TIMELINE AND APPROACH:
a. I was given fabricated device that needed some corrections in SIM Card connections,
MIC connections, PCB padding etc. I used gerber viewer to analyse and correct those
mistakes. Once I got fully functional device, I started designing firmware architecture
depending on product requirements.
b. I used quectel AT commands for GSM related functionalities. ATSAMD20f18 MCU and
Quectel M66 communicates serially with 19200 baudrate. Some of the AT commands
are given below:
AT+CSQ: Signal quality
ATA: Attain Call
AT+CLCC: Get incoming call details
ATH: Hang Call
AT+CMGR: Read SMS
AT+CGSN: Get IMEI number
AT+CBC : Get Battery quality
AT+QCELLLOC: Get GSM tower location and time
AT+QHTTPGET: GET HTTP request
AT+QHTTPREAD: read GET response
AT+CMGS: send SMS

c. I configured SPI communication between OLED display and MCU. I wrote driver file for
the LED display as it was not available anywhere. We used hex values of various images
to display on screen. Every time a series of hex value had to be sent in order to
distinguish between command and data.
d. Origin GPS and MCU were communicating with Serial TX/RX at 9600 baudrate. GPS
module uses very high power. Hence it needed to be put on sleep moderegularly.
e. One of the most significant feature of our device was qtouch. It is capacitive touch
button. ATMEL studio has given basic layout for qtouch firmware. We need to change
things according to our needs. This qtouch library uses RTC (real time clock) and timer
counter. It generates RTC interrupt with some microseconds duration. If PTC (peripheral
touch controller) senses capacitive voltage then PTC interrupt is given and specified
function is carried out.
f. Interfacing speaker, mic, microsim slot, vibrator and accelerometer was easy and
required understanding about circuit connections.

15 | P a g e
g. Another important feature was SPI Flash memory. If device power switches off, device
should not erase contacts, messages and other important data. In order to achieve this
we used Flash memory. This flash was communicating with MCU using SPI.
h. Battery management IC BQ25120 which is used in current generation mobile phones is
used in this device. This uses I2C communication mode with MCU. On sending command
and data one after the other with specified I2C address executes the command.

5. FRONT VIEW AND BACK VIEW

16 | P a g e
6. ASSEMBLED WATCH

SECTION THREE

3.0 PROBLEMS FACED AND SOLUTION

At first I interfaced every part of the device separately with the microcontroller. But I faced
number of problems while assembling everything together. Most of the problems were
related to communication and clock used between microcontroller and other peripheral ICs.
For speeding up the operation I used various data structures, interrupts, threading and
algorithms. I have mentioned all the problems below.

a. Sending device alerts was one of the most important features. Whenever user
gets/makes a call, presses SOS button an alert has to be sent. But calling has high
priority then Sending alerts. Also two processes cannot work together. Sending alerts
require activating GPRS connection, sending GET request and getting response. This
entire process is time consuming and device may stuck while executing all this. To solve
this problem, I used Queue of Alerts and Log requests. I’d put all the log location and
alerts in the queue and gave them least priority. Whenever device is free, Queue was
emptied with its corresponding time stamp.

17 | P a g e
b. Another important task is to display time. ATSAMD20g18 has one single RTC which was
being used by Qtouch. Hence I’d to write calendar library which kept on incrementing
timer counter whenever RTC gave interrupt for Qtouch. This timer counter was
alternatively used with some if-else conditioning to get Date, Month, Year, Minutes,
Hour, Second values.
c. The device had to use one single capacitive touch button for dialing and receiving calls,
SOS button press and device switch on/off. But the interrupt was same for all the
operations. I had to study user behavior to setup touch measurement time and
sensitivity for all the operations.
d. Battery consumption is the most important aspect of any device. I’d to design and write
my firmware architecture such that unnecessary peripherals are put on sleep mode.
e. Most of the GSM functions like Calls, SMS and Position tracking are real time. Eg; Call
might come even when device is already working on something else. But serving this
incoming call interrupt is of higher priority. Such priority management was done for all
the incoming inputs.
f. Child can press touch button many times, that smartwatch is some kind of playing toy
for him. But this childish behavior should not affect device functioning.
g. We were using geofencing algorithm such that whenever child goes outside desired
roaming range, device should trigger alert to his parents. Such safety measures were
taken care of.
h. GPRS or GPS has very bad issues with network and signal strength. I used good quality
antenna and positioned it such that maximum signal strength was achieved always.
i. ATSAMD20 has only 4 clock lines. These had to be used very carefully.
j.

3.1 LESSONS LEARNED AND CHALLENGES:

1. The training has helped me to impart the theoretical knowledge of embedded device
design to practical design.
2. I learned Embedded C with the help of ATMEL studio 7.0. It gave me an exposure to
firmware development.
3. I did hands on with freeRTOS for interfacing purpose.
4. It helped me understand practical problems faced with communication medium,
protocols, coding, soldering, PCB corrections, Micro circuit testing and analysis,
Architecture design.

18 | P a g e
5. Defining MACROS, Structures, Directives, Variables are very valuable in firmware
development. For the first time ever I wrote libraries for different functions.
6. The training has also helped me in making connections with various people who in the
future may give a helping hand in life.
7. The time for the internship was little yet I had a lot to cover. Most of the work was done
all alone and mentor helped me to solve problems I faced.
8. Clients were so reluctant to submit the device in time which made me experienced to
deal with high pressure from them and senior management. We had weekly deadline
for specific tasks which needed to be finished in time.

3.2 CONCLUSION

Internship was finished in time and I delivered 80% of the finished product in time. Clients
were happy when it was demonstrated with a watch on kid’s hand. We tested Incoming and
outgoing call, Log location requests, Alerts, Display, Battery management, SOS Button press
and Geofencing. The device worked flawlessly during demo. This internship exercise was
mainly to enable me acquire practical skills and link theory to practice in the real world so as
to meet the labour market needs. I have been able to acquire practical skills like embedded
design, embedded C, firmware development, PCB design etc.

19 | P a g e

Вам также может понравиться