Make your own cheap DIY GSM GPS bike car tracker / GPS car locator for 20 USD ! – based on SIM808

Hi guys it’s Adam ! Welcome back ! Some of you asked me to build a real GPS locator for the quadcopters for example… so to do that you need another chip (ATMEGA328P – arduino uno, because ATTINY is too small), you need another board (BK-808) – so I have purchased some board with the chip SIM808 which actually cost something like ten dollars and that’s the cheapest I could find.. I must admit that this one is the cheapest
– it is from AND-GLOBAL and the name is BK-808 version 2 (BK-SIM808) or something like this you can you can search for it on Aliexpress, this one also differs a
bit (from other more expensive SIM808 based) because it doesn’t have a RI / RING signal here so basically you cannot use interrupts here to wake up the Atmega MCU that will be controlling this board, it also it requires to have external antennas – like you see here – the GSM
antenna , the BT Bluetooth ( I’m not using this one ), the GPS antenna also
is needed and the other thing is that this board is not exactly well designed…
so to make it work… I needed to solder another capacitor
here – it’s here connected in parallel to the existing electrolytic capacitor…
otherwise if you try to run it it will simply not register to the GSM network
because it will be constantly restarting itself… (and GREEN LED will be blinking fast) so keep that in mind that we
need this really need this capacitor if you intend to use this this particular
board, maybe other (SIM808 boards) are better constructed but this one – yeah… this is sh*** and we will see if it’s working in a minute. It has an ordinary pin connector –
we’ll be using these to attach to the “mainboard” I would say so I have a second board here and when I detach the board you will see the Arduino Uno chip – Atmega328-PU with some diodes and capacitors simply speaking they are used only to provide 3.3V voltage to this chip because this one will be using TTL levels with the
3.3V logic so even though this board is actually powered from the 5V
up to 10 volts – there’s a power regulator here – this is a
LM 1804 which actually drops the voltage to the 4 volts so that’s the
voltage… the same voltage as SIM800L is using – basically you need to adopt
your design to work with 3.3 volt logic so if you done it then
you are ready to go and you can connect this one. OK – as you can see I have a
main board with ATMEGA and I have a small board with the SIM808 – this one is having yeah… what about this chip
so this chip is slightly better than the previous one the SIM800L because
this one is not only having a 2G network (GSM) connectivity but it also has a Bluetooth,
it also has a GPS inside and it also has a GNSS (combination of all type of GPSes) which is the new standard
satellite system – even positioning satellite system in Europe (is supported) so it is something new and I was quite I would say glad that I bought something that could be used in
the future not only GPS but GNSS so what other you need.. You have to buy two antennas – I have the cheapest I could find… this is something like less than two
dollars so this is a GPS passive antenna so you need that if you want to catch
the satellite signal so without that the functionality would be limited
only to the GSM network (like for SIM800L). For GSM network I also have some kind of antenna- this one cost something like half USD I believe it is a
1.5 inch long and both antennas are using something called IPEX
connector or you may also find the name U.FL so you need to search for these antennas… I’m not aware about using active GPS antenna but I found on the
internet that some guys are using active antennas but they need to adapt some
board, so they need to add some powering and resistor to this socket to make it work so I only tried with the passive (GPS antenna). .. Now let’s turn it on to you see if there’s any difference according to the SIM800L
I will attach my board here.. Also I have a USB USB power bank
– I’ll be using this to power the device OK you can see there are two
two LED indicators, first one (RED) is simply the power on indicator and at the
beginning I suggest you to get rid of this LED because it is actually
consuming some significant power so if you intend to use it in a sleep mode for sure you will need to get this one out and the second LED (GREEN) is
actually the same indicator as in SIM800L – it simply tells you if the
device registered in 2G network or if it’s using GPRS or if it’s unable to register and some basic informations. Like I mentioned before you really need this capacitor here because otherwise the the
GREEN LED would be constantly blinking fast meaning that there’s no possibility to
register to the 2G network and basically it will be due fact that the board SIM808 is constantly restarting itself in a loop so you really need to
put this one here. I don’t know about the other boards probably they are better designed but this was the cheapest one… yeah keep that in mind – so this is only 10 USD here okay guys so maybe I should go outside to show you how these GPS really works yes so we gonna meet in a second okay guys I’m
already outside, I’m on my balcony and we’ll be trying to catch the GPS signal
with the SIM808 board connected to ATMEGA328P so I’m using here the PuTTY to show you what are the commands that are sent to SIM808. At the beginning we
will try to see what the MCU is sending and after that we’ll try the opposite
way I mean what SIM808 is responding to the MCU… OK as you can
see I’m also using this FTDI-232 board as serial converter – USB to serial – just to have a serial port because I don’t have one (in my laptop) so I need to use converter and the board. I already put that (prototype) into some kind of case for the future use.
OK maybe I shall put the device in the place that it could see the
satellites give me one second okay… I think it is
already in a good position so I’ll turn this on. OK so the the MCU
will try to contact the SIM808 board after 10 seconds. It’s ATE0 –
to disable the ECHO, then it fixes the serial port speed to 9600, after that it simply turns on the radio – you see CFUN=1 no we’ll see if it is going to register to
the 2G network in the moment OK now it checks the PINCODE (if used shal be 1111) and then there’s a something like another 30 seconds up to one minute to give it time to
register to the to the 2G network so we need to wait a bit so be patient please… meantime you can see the device so it’s
right here so now we are waiting OK so seems that it’s already
registered because the program is going further, then it disables GPS
power and the GNSS chip power (to reduce power usage) and via the command AT+CLCK=1 it
goes to the sleep mode.. to go into the sleep mode this one needs ready to have a DTR line level HIGH, because otherwise it it won’t be able to go into sleep mode (as SIM808 hardware design guide says). OK now it’s in a sleep mode so I’m gonna try to call it… It works simply the same way as the previous GPS . It waits until you call it via mobile… I will now try to call it OK let’s call it …now we’re calling it. It goes out of
the sleep mode (AT+CSCLK=0).. it disconnects the call (ATH) and then it tries to provision some GPRS (APN) data for the further use in case we don’t find the satellite… If we don’t find the
satellite it simply will poll the data from the 2G cell and send it back
over text message. Right now it restarts the GPS , it enables power of the GPS so it is what you see here… it enables a GPS and makes a cold start (CGPSRST=0)… now it queries the status of the GPS every 15 seconds. It will do these 40 times..
so 40 times checking of the GPS status (it is changeable in the code – now it is 20 times) to be sure that we sacrifice
appropriate amount of time to find the sattelites OK now we need to
wait a bit so we see if it’s going to fix on the satellites The question : why we are calling this device, why it is not done automatically ??? so we need to somehow to tell the the chip what is the MSISDN number that it should send back the text message… You can
hard code the data within it – like your private number MSISDN but it’s better to have it quite universal like waiting for SMS for the text message or waiting for
a call – to make it know what is is the phone number that you’re
using. OK.. we are waiting so it was querrying already 4 times and one minute
has passed, now it’s second minute so I believe it’s gonna take up to 3 to 4
minutes to fix on satellite so we need to be patient… if it gets the fix then it we will send a GPSINF in message to get position – longitude and latitude and then it will try to send you back those
data over there over the text message… If it’s not possible, I mean if it’s
not possible to find a satellite it will use the ordinary method :Assisted GPS so it will query the Google by the cell ID to find the GPS location of the nearest
2G GSM tower (all done over GPRS) – so that’s the behavior OK we are waiting (already long time) so I hope it will find something because today is a bit cloudy and it is using a passive GPS antenna
that requires to have a better signal (actually there was a issue in the code because it was waiting for 6 satellites, but 4 are sufficient) that’s right it should find something in a minute… I
believe it’s constantly querrying the GPS about
the status if it has already found some satellite data or not so it takes some
time … hopefully find something here oh yeah the other thing I have to
mention… so in the code it waits for six satellites visible so
we need 6 satellites to get out of this checking GPS loop- otherwise it
will simply wait until there are 40 attempts (I have changed it later not to wait for 6 sattelites and to make only 20 attempts – 5 min for sattelites, now it catches the signal in 2 minutes..). You may code this differently so it’s up to you I was just hoping that 6 satellites would be sufficient to get a proper fix but from what I know 4 satellites enough to get the 3D sattelite fix. OK guys thanks that your patience so after something like 5-6 minutes it actually got the 3G fix on the GPS and it sends a longtitude and
latitude with the Google map link to my mobile. So after that was completed it
actually went back to the sleep mode okay so let me check
the message that I got okay so hold on please I need to enable GPRS or LTE rather okay so simply sends messages in such way so we can see how it is working and now I can see it’s showing me
some kind of location here… so I’m not quite sure about accuracy of this device (I have corrected the code later – it was about changing MINUTES to DEGREES FRACTIONS for Google and it has 1 meter accuracy now !!!) so maybe I’m having a bad GPS antenna, maybe it’s time to invest some more money in this… but in total well… this device this whole
project costs less than $20… OK – guys so thank you very much for watching please , please give! so then I’ll be having motivation to do
something more interesting and give me some comments what you would like to see, what would you like me to construct. So bye bye thank you very much, See ya !

Related Posts

Rhino Rack Road-Warrior Roof Bike Racks Review – 2016 Ford Escape –

TravelSmith RFID Wallet with AntiTheft PacSafe Features

How to keep your mobile safe with Sophos

Leave a Reply

Your email address will not be published. Required fields are marked *