Introduction: The Ultimate Child Tracker

Picture of The Ultimate Child Tracker

One of the worst nightmares for a parent is when your child is "missing". He / she may be just around the corner, but not know where they are can be a perfect recipe for a panic attack. Statistics show that during 2013, a daily average of 1,720 parents or primary care givers felt the disappearance was serious enough to warrant calling law enforcement (in the US). [Source: https://www.fbi.gov/about-us/cjis/ncic/ncic-missin... ] The worldwide figures would be even more alarming.

I was looking for a simple small device that could track my child (4-year old) whenever I wanted and looked around for some commercial products that were available. There are many products available, however most of them were very limited (required a home station within range) or had expensive monthly subscription fees.

Then it struck me, that mobiles these days are the perfect tracking devices, with easy tracking ability using just GPRS (and some with GPS as well). Android and Google / iPhone and iCloud provide the perfect combination to track the phone. The only problem with this idea is that the phone can be left behind / dropped / broken by the child and I needed something small enough to be pinned to the child's clothing (and difficult to break).

I came up with the following wishlist:

  1. Small and lightweight
  2. Battery life of at least 8 hours (standby)
  3. Rugged
  4. Should look good and appealing to a child
  5. Should provide me with the location when I ask via sms
  6. Should pick-up my call so that I can communicate with my child

The original plan was to use the RePhone, but my C skills are rusty and I'm more comfortable with the Arduino series of boards. Seeed Studio also makes another board for wearables that had what I needed. It's called the Xadow. It's an Arduino Leonardo compatible board with multiple modules that can be used to create a smart wearable easily.

Step 1: Theory Behind Trackers

The two most frequently used trackers are GPS based and GPRS based, both with their advantages and disadvantages; some combining both to get the best results.

GPS (Global Positioning System)

According to Wikipedia, the Global Positioning System (GPS) is a space-based navigation system that provides location and time information in all weather conditions, anywhere on or near the Earth where there is an unobstructed line of sight to four or more GPS satellites.The system provides critical capabilities to military, civil, and commercial users around the world. The United States government created the system, maintains it, and makes it freely accessible to anyone with a GPS receiver.

The GPS concept is based on time. The satellites carry very stable atomic clocks that are synchronized to each other and to ground clocks. Any drift from true time maintained on the ground is corrected daily. Likewise, the satellite locations are monitored precisely. GPS receivers have clocks as well—however, they are not synchronized with true time, and are less stable. GPS satellites continuously transmit their current time and position. A GPS receiver monitors multiple satellites and solves equations to determine the exact position of the receiver and its deviation from true time. At a minimum, four satellites must be in view of the receiver for it to compute four unknown quantities (three position coordinates and clock deviation from satellite time).

Source: https://en.wikipedia.org/wiki/Global_Positioning_S...

Disadvantages:

  1. Requires a clear view to the sky - and hence does not work in basements, within buildings
  2. Is more power-hungry than GSM tracking and hence requires a larger battery

GSM (Global System for Mobile Communications)

According to Wikipedia, GSM is a standard developed by the European Telecommunications Standards Institute(ETSI) to describe protocols for second-generation (2G) digital cellular networks used by mobile phones, first deployed in Finland in July 1991.[2] As of 2014 it has become the default global standard for mobile communications - with over 90% market share, operating in over 219 countries and territories.

Source: https://en.wikipedia.org/wiki/GSM

The cellular network is distributed over land areas called cells, each served by at least one fixed-location transceiver, known as a cell site or base station. In a cellular network, each cell uses a different set of frequencies from neighboring cells, to avoid interference and provide guaranteed bandwidth within each cell.
When joined together these cells provide radio coverage over a wide geographic area. This enables a large number of portable transceivers (e.g., mobile phones, pagers, etc.) to communicate with each other and with fixed transceivers and telephones anywhere in the network, via base stations, even if some of the transceivers are moving through more than one cell during transmission. Cellular networks offer a number of desirable features:

  1. More capacity than a single large transmitter, since the same frequency can be used for multiple links as long as they are in different cells
  2. Mobile devices use less power than with a single transmitter or satellite since the cell towers are closer
  3. Larger coverage area than a single terrestrial transmitter, since additional cell towers can be added indefinitely and are not limited by the horizon

Source: https://en.wikipedia.org/wiki/Cellular_network

As each tower in a cellular network provides a unique identity code, it is possible to triangulate using 3 or more towers to get your position. The more number of towers available, the more precise your location.

Cellphones receive signals from various cellphone towers and picks up the signals from the tower with maximum signal strength. Since, the distance & signal strength between different cellphone towers are known (usually around 5-10 km), the signal strength from various towers to the cellphone is used to calculate the distance between each tower & the cellphone & further triangulate the approximate position of the cellphone.

Source: http://www.quora.com/How-do-mobile-operators-track...

Disadvantages:

  1. Location is not extremely accurate, however in urban areas with a lot of cell towers, this should be acceptable
  2. You need a SIM card with a cellular service network of your choice

You can find more information on GSM tracking on the following pages:

http://www.neilson.co.za/mobile-network-geolocatio...

http://stackoverflow.com/questions/10329877/how-to...

My Choice

I decided to go with GSM based tracking as even with the GPS tracking, I would have needed a cell phone connection for my other features (calling, SMS, etc). GPS tracking is much more accurate, but needs a larger module and battery. (Maybe in the future)

Step 2: Hardware

I decided to use the following hardware for the tracker:

  1. Xadow Main Board: http://www.seeedstudio.com/depot/Xadow-Main-Board-...
  2. Xadow Breakout Board: http://www.seeedstudio.com/depot/Xadow-Breakout-p-...
  3. SIM800L GSM Module: http://www.aliexpress.com/item/Smallest-SIM800L-GP...
  4. Small speaker
  5. Small microphone (pulled from an old hands-free kit)
  6. 10k Resistor
  7. Some Wires

Please note, there are many other options available and I chose these mainly because i had them available (and in the case of the GSM module - it's cost)

Xadow Main Board

The Xadow Main Board is a microcontroller board based on the controller ATmega32U4 with 32k flash and is compatible with the Arduino Leonardo. The board can be powered either from the USB connection or a Lithium battery (included) and hence can be easily used as a wearable.

The Xadow Modules cascade with each other using FFC cables. Since the pins on the module are not broken out, we need to use a breakout module that breaks out the RX/TX pins and allows us to connect to the SIM800L Module.


Also, since the module is compatible with the Arduino Leonardo, it has two serial ports (One through USB and one on RX/TX pins) which makes it easier to debug the arduino sketches.

SIM800L GSM Module

The SIM800L is a quad-band GSM/GPRS Module, effectively making it usable across the world. It has the following features:

  1. Quad-Band GSM/GPRS
  2. Audio in and out
  3. Serial TTL compatible
  4. AT Command Set
  5. Operating Voltage: 3.4 to 4.4 Volts
  6. In-built function that provides GSM based location (latitude, longitude)

SimCom has provided a lot of documentation on the best ways to use these modules and Adafruit is kindly hosting all of them for us:

They have also created an easy to use library: https://github.com/adafruit/Adafruit_FONA_Library

Step 3: Circuit

Picture of Circuit

The circuit is very simple:

Xadow Connections:

  1. Connect the Xadow Breakout Module to the Xadow Board using the FFC Cable - ensure that the slots face the same direction
  2. Connect the Battery to the Xadow Board (JST Connector)

SIM800L Connections:

  1. VCC to the battery pad at the bottom of the Xadow Board (See image above)
  2. GND to ground
  3. Mic to MICP and MICN
  4. Speaker to SPKP and SPKN
  5. DTR to ground via a 10k Resistor
  6. TXD to RX on the Xadow Breakout
  7. RXD to TX on the Xadow Breakout
  8. RST to A5 on the Xadow Breakout

You can test the module using the FonaTest sketch in Adafruit's Fona Library. I tested the circuit using my Induino development board (see image above).

Step 4: Cellular Network

The SIM800L module requires a working SIM card (with data). In India, there are many affordable pre-paid plans by all the major carriers (Airtel, Vodaphone, etc) as low as INR 105 (~USD 2) for 300 MB per month. Unfortunately in US most of the carriers have "unlimited" plans ranging from $40-$80 per month. For this application, you would need at the max 10-20 MB per month.

The only service provider I found that was budget friendly was Ting (working on the T-Mobile network) which comes to ~USD 9 (plus taxes) per month for 1 device and upto 100 MB of data per month.

So, I went ahead and bought a Ting SIM card and installed it on the SIM800L module. Please note, the chamfered edge has to point towards the edge of the slot and not inside.

Step 5: Software

The Arduino Sketch is heavily modified from the examples in Adafruit Fona Library.

#include 
#include "Adafruit_FONA.h"

#define FONA_RST 4
#define AUTHORIZED "+1*****************" // INSERT YOUR PHONE NUMBER HERE

// this is a large buffer for replies
char replybuffer[255];

HardwareSerial *fonaSerial = &Serial1; // Use the Serial1 on the Xadow Board

Adafruit_FONA fona = Adafruit_FONA(FONA_RST);

uint8_t readline(char *buff, uint8_t maxbuff, uint16_t timeout = 0);

void setup() {
  while (!Serial);
  Serial.begin(115200);
  Serial.println(F("Initializing....(May take 3 seconds)"));

  fonaSerial->begin(115200);                                  // The SIM800L module auto detects the baud rate, but works really well with 115200
  if (! fona.begin(*fonaSerial)) {
    Serial.println(F("Couldn't find SIM800L"));
    while(1);
  }
  Serial.println(F("SIM800L is OK"));

  // Print SIM card IMEI number.
  char imei[15] = {0}; // MUST use a 16 character buffer for IMEI!
  uint8_t imeiLen = fona.getIMEI(imei);
  if (imeiLen > 0) {
    Serial.print("SIM card IMEI: "); Serial.println(imei);
  }

// Configure APN Settings for TING - please change for your network
  fona.setGPRSNetworkSettings(F("wholesale"));
}

char fonaInBuffer[64]; 

void loop() {
  Serial.print(F("FONA> "));
  while (! Serial.available() ) {
    if (fona.available()) {
        Serial.write(fona.read());
    }
  }
  char phone[32] = {0};
  if(fona.incomingCallNumber(phone)){
    Serial.println(F("RING!"));
    Serial.print(F("Phone Number: "));
    Serial.println(phone);
    if(phone == AUTHORIZED)
      fona.pickUp(); 
  }
  char* bufPtr = fonaInBuffer;    //handy buffer pointer
  
  if (fona.available())      //any data available from the SIM800L?
  {
    int slot = 0;            //this will be the slot number of the SMS
    int charCount = 0;
    //Read the notification into fonaInBuffer
    do  {
      *bufPtr = fona.read();
      Serial.write(*bufPtr);
      delay(1);
    } while ((*bufPtr++ != '\n') && (fona.available()) && (++charCount < (sizeof(fonaInBuffer)-1)));
    
    //Add a terminal NULL to the notification string
    *bufPtr = 0;
    
    //Scan the notification string for an SMS received notification.
    //  If it's an SMS message, we'll get the slot number in 'slot'
    if (1 == sscanf(fonaInBuffer, "+CMTI: \"SM\",%d", &slot)) {
      Serial.print("slot: "); Serial.println(slot);
      
      char callerIDbuffer[32];  //we'll store the SMS sender number in here
      
      // Retrieve SMS sender address/phone number.
      if (! fona.getSMSSender(slot, callerIDbuffer, 31)) {
        Serial.println("Didn't find SMS message in slot!");
      }
      Serial.print(F("FROM: ")); Serial.println(callerIDbuffer);
      if(callerIDbuffer == AUTHORIZED) {
        //Send back an automatic response
        Serial.println("Sending reponse...");
        if (!fona.enableGPRS(true))  
         Serial.println(F("Failed to turn on"));
        uint16_t returncode;
        if (!fona.getGSMLoc(&returncode, replybuffer, 250))
          Serial.println(F("Failed!"));
        if (returncode == 0) {
          Serial.println(replybuffer);
        } else {
          Serial.print(F("Fail code #")); Serial.println(returncode);
        }
        if (!fona.sendSMS(callerIDbuffer, replybuffer)) {
          Serial.println(F("Failed"));
        } else {
          Serial.println(F("Sent!"));
        }
        if (!fona.enableGPRS(true))  
          Serial.println(F("Failed to turn on")); 
      }
    }
  }
}
  

Step 6: Enclosure

Picture of Enclosure

I wanted to use the Xadow Metal Frame as the enclosure, unfortunately it has been discontinued by Seeed Studio.

So, for the time being I settled with a plastic enclosures that came with the Xadow Boards covered with a paper box. I went to TemplateMaker and created a template for the enclosure 4cm x 8.5cm x 1.5cm, printed it on card paper and put the entire circuit within it. The only problem with this approach is that the entire device needs to be opened up to charge, however, the intent is to have a 3D-printed enclosure that exposes the USB port for charging.

The entire device is tied to the arm using a velcro tape and can be hidden under the jacket / loose shirt.

Step 7: Final Result

The final product has the following features:

  1. Accepts calls from a defined number (defined in code)
  2. Responds to an SMS command from defined number with current latitude and longitude

To Do:

  1. Set up location tracking, so that the module automatically sends location to an MQTT server when either of the following conditions are met:
    • The child moves by 500m
    • every 30 minutes
  2. Implement a vibration sensor / sound sensor so that the module can dial out / send message to a specific set of people. e.g. if the child is crying or has fallen down.
  3. Still debating whether to implement GPS - the SIM808 module has in-built GPS, but is considerably more expensive. Alternatively, I have a GPS module that I can use, but that would increase the size of the device.

Suggestions welcome.

DISCLAIMER: I have tested this device, however do not provide ANY warranty whatsoever.

Comments

NikhilS127 (author)2017-09-12

Can I use arduino uno or leonardo for this instead of xadow

NikhilS127 (author)2017-09-12

what will be approx. budget for this project

JailerS (author)2016-07-04

pls i want to know how you going to pick the call to talk to the child if its a waerable?

pharouk90 (author)2016-06-20

I think I should stop building Wwebsite and Mobile Apps and came back to Electronics, it is quite interesting. Well done.

erth64net1 (author)2016-04-05

Considering that the Xadow boards have been discontinued. What would you recommend as a replacement. Perhaps the ADAFruit Feather 32u4 FONA board?

dushyantahuja (author)erth64net12016-04-06

You could try the FONA or even the Rephone from Seeed

http://www.seeedstudio.com/depot/RePhone-Kit-Create-p-2552.html

DorothyHastings (author)2016-02-20

What a nice tracker!

trohde1 (author)2016-01-24

Save yourself 8 bucks. These guys actually get the idea of the Internet of Things and their services a prices reflect that.
http://neo.aeris.com/

RomanŠ22 (author)2015-11-11

Hi, perfect thing ! please how do you connect the speaker and microfone? is it directly to SIM900 connected or do i need some other parts? which microfone and speaker do you use, which parameters? Thanks for sharing ! nice job!

nodcah (author)2015-09-13

This is really darn cool! I was thinking of doing something similar but shorter-ranged that I could put on my cat's collar. Thanks for sharing!

dushyantahuja (author)nodcah2015-09-14

For shorter range - it may make sense to make a bluetooth based tracker. Or a radio beacon kind of a tracker (with radio base stations). That would be fun to design and create actually.

Oh most definitely. That would be as simple as making a tiny radio transmitter that emits a beeping or continuous wave on/off radio transmission with a limited range, say, 2 kilometers.Pick a frequency that doesn't require a super long antenna. Turn squelch off on a frequency compatible portable radio receiver or walkie talkie and walk around until the signal gets stronger (louder, clearer). If it gets less clear and quieter, you must walk in a different direction, a lot like the game called Hotter or Colder. The circuit could be as minimal as a pulsing tone generator (hardware hack a blinking flashlight or party strobe light, anyone?), powering a full can crystal oscillator! Seriously though, I've seen devices that do exactly that but are very hard to find and very expensive, costing over $40 USD. So by all means, someone here on instructables please figure out how to make one! I keep trying to build one but I can't get mine to work over a long enough range!

Anyways, great instructable! Very practical and well-written!

This looks like what you want: http://hackaday.com/tag/location-tracking/

nodcah (author)dushyantahuja2015-09-16

Do you have any idea how location would be determined using this? I've tried using this and this using differing baud rates for a kind of crude distance detection, but I haven't gotten reliable results. Any ideas?

Thanks!
-Nodcah

Gadget93 (author)dushyantahuja2015-09-14

I guess the comment I made was for you. This is a really good instructable by the way.

Gadget93 (author)nodcah2015-09-14

I was thinking the same exact thing. My cat is my child so I'd want to find him wherever he is if he goes out. Perhaps something on a cat collar.
If you design something like that, I'd be very interested.

dmagryta124 (author)2015-09-18

Do all GPS modules require a SIM card? What about Ublox GPS modules?

No they don't - I needed the SIM card to enable the communication - sending a message, picking up the call, etc.

anilbot (author)2015-09-18

Excellent 'ible... I have had plans of building something similar, and it should greatly reduce the risk of losing our kids.. Especially in places like India where the authorities are sluggish to respond to distress calls. Just have a question. will the wireless radiation be big enough to affect the kid wearing it? felt concerned as she is wearing for hours together..

dushyantahuja (author)anilbot2015-09-19

The radiation won't be any more than a normal cell phone. Possibly less. However, I am not an authority on radiation safety. Please check with a doctor / specialist if you're worried.

Raphango (author)2015-09-14

Great!!! Congratulations!!

Does it work for my luggage too?

dushyantahuja (author)Raphango2015-09-14

Can - though you would need a good roaming plan if you're planning on travelling abroad. Would be nice to see that your luggage reached Egypt when it was actually supposed to reach London :-)

Raphango (author)dushyantahuja2015-09-15

LoL! Thank you!

lovethebackwoods (author)2015-09-14

Wow - fascinating! We have had at least three times with our kids who "missing" for short periods; with all three the concerns were such that we were at a countdown to calling the police. I felt the silliest when our youngest, then four, "hid" behind our bed pillows, then fell asleep! He was hearing-impaired and all of our yelling and calling him did not rouse him. We were making one last thorough trip through the house and yard when I felt prompted to move the pillows - there was my sleeping son! A Child Tracker such as this could save parents a lot of time and concern, but if there is the slightest possibility that a child could actually be missing, don't waste any time in notifying authorities - it could save a life! Thanks for this interesting Instructable!

Thanks a lot, agree with you that you should not waste any time notifying authorities. This can just help you keep track - but you do need to use your common sense.

cparshley (author)2015-09-14

I think this is a great idea, very useful for many parents. Definitely could provide much peace of mind. I would never be able to get my kids to wear it (getting them to wear clothes is a big win for me, lol), but most kids should get used to it.

One concern I have is the use of what appears to be a LiPoly battery. I would be afraid of it getting wet or damaged, and lighting on fire. I wonder if a less sensitive battery could be used while still keeping it small and lightweight.

dushyantahuja (author)cparshley2015-09-14

A good waterproof case should allay your concerns. Most cell-phones have LiPoly batteries and work fine.

CrankyCoderBlog (author)2015-09-13

Do you have the 3d printer design files? I like this project and have a printer so i would be willing to try out the design

I haven't created the design yet. Will post here once I have finalised.

ccollins24 (author)2015-09-13

iInstead of strapping it to the arm, how about making it so it fits a standard children's belt. You can just run the belt through some predefined loops on the device and then I attached the child's waist.

dushyantahuja (author)ccollins242015-09-13

Great idea, will keep it in mind when I design the final 3D-printed enclosure

Kathyday (author)2015-09-13

Could this be adapted for use with animals? Such as a dog or a cat or even a horse? The telephone would not enable you to TALK with your lost one, but the rest would seem workable.

This is a terrific idea!

dushyantahuja (author)Kathyday2015-09-13

Yes, it can be used with animals as well. Just create a strap suitable for the animal

robin snead (author)2015-09-13

This is a great device. In my area of the USA, we had an awful tragedy when an 8 year old autistic child wandered away from her home and drowned in a neighbors pool. The police were looking for her in the back of cars and in the woods for hours, nobody had any idea of where she could have gone.

RVMBCBA (author)2015-09-09

I cannot understand much of the electronics involved in this Instructable, but bravo to you for developing a cost-effective tracker for children. I am a Behavior Analyst who works with children with autism and many times, wandering off leads to disaster for children who cannot communicate even their names and phone numbers. I plan to pass this on as a link to those of my client families who both might need it and might understand how to construct this.

dushyantahuja (author)RVMBCBA2015-09-10

Thanks for the kind words. However, I would recommend that the parents look at commercial projects instead for autistic children (something like http://www.aliexpress.com/item/New1-Pcs-Mini-Global-Real-Time-GPS-Tracker-GSM-GPRS-GPS-Tracking-Tool-ForChildren-Pet-Car/32438229212.html?ws_ab_test=201407_1,201444_6,201409_1). This is a DIY solution, and DIY (in my experience) needs a lot of tinkering and should not be used for life-saving situations. This is great for casual monitoring, but that's all.

RVMBCBA (author)dushyantahuja2015-09-10

Thanks dushu - I had not seen these before at a price that normal families could afford - I have saved thre product page and will refer my client families to it.

Saiyam (author)2015-09-09

This is really an innovative idea!! Great job :)

tinaciousz (author)2015-09-08

Really cool project. This can save lives and save parents from getting gray hairs! :)

geekrex (author)2015-09-08

you got my vote bro
loved this project

sdidwania (author)2015-09-07

any pics of final product

dushyantahuja (author)2015-09-07

Have added this to the safety contest as well.

graydog111 (author)2015-09-07

I agree with zowzow, it's a great project. Wish I had the talent to build it. I'm sure you could sell them finished. Enter the safety contest & you got my vote.

zowzow (author)2015-09-07

This is a great project. You should enter this in the safety contest.

About This Instructable

46,337views

404favorites

License:

More by dushyantahuja:Programming the Electrodragon IoT RelayWifi CalendarThe Ultimate Child Tracker
Add instructable to: