Beruflich Dokumente
Kultur Dokumente
ARDUINO
LATEST POSTS
DCSPONSORED
Charging (Pile) Station block diagram
Self-driving cars and connected vehicles, is sure to change the way we commute in the future.
Today companies like Tesla are encouraging its owners to lend out their cars as robot taxis
when not used, recently its CEO Elon Musk took it to twitter to state that there will be more
than 1 million robot taxis on road by 2020. This will not only impact general transportation but
also change the way how logistics operate today.
SPONSORED SEARCHES
pcb design
Circuit Diagram
This GSM car tracker system will use GPRS of SIM800 GSM module which will be connected
with a microcontroller like Arduino. Although both the GSM module and the Arduino boards are
available as separate packages I decided to make my own circuit combining both of them on a
single board to save cost and space. The board can be powered by a 12V adapter or from the
12V battery in the cars/trucks, the on board buck converter will step down the 12V to 4V for What is Capacitor Leakage Current and
How to Reduce It
GSM module and as 3.3V for the microcontroller to work. The complete circuit diagram is given
below.
Three-phase Brushless
Motor Controller ICs with
Sine Wave Drive
projects
viresh Replies: 0
sending message
viresh Replies: 0
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
UART Communication between GSM and
GPS
Ankur Replies: 3
User login
E-mail or username *
Password *
The 12V unregulated voltage is provided to pin 1 and the regulated voltage is obtained on pin ,2
which is then passed through an LC filter of value 100uH and 470uF respectively to filter
output switching noise. The output voltage can be set by using the resistors R30 and R29
forming the potential divider circuit and connected to feedback pin as shown above. The
formulae to calculate the output voltage for LM2596 is given below
In our case for the above diagram, R29 is R1 and R30 is R2. So I have selected a value of 1k for
R29 and 2.2k for R30 to get an output voltage of 4V. Note that the SIM800 module reacquires
voltage between 3.7V to 4.2V to operate normally.
Finally we have the TxD and RxD pins pulled out to a header pin, these two pins will be used to
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
communicate with a microcontroller like Arduino through the standard USART protocol at 9600
baud rate. The other connections shown in the circuit above is optional and does not hood any
significant importance for this project.
So as shown above I have used theAMS1117 3.3V regulator IC to regulate 3.3V form the input
12V and use it to power the Atmega328 IC. Although the SIM800 works on 3.3V logic level, it
can also communicate with Arduino Nano/Uno externally without the need of any logic level
converters. The circuit also pulls out some pins through headers to help us program the
Atmega328 IC using an external FTDI programmersimilar to what we do with Arduino Pro mini
in 3.3V mode.
acronis.com OPEN
You can also download the design files in GERBER format and fabricate it to get your boards.
The Gerber file link is given below
Now, that our Design is ready it is time to get them fabricated. To get the PCB done is quite
easy, simply follow the steps below
Step 1: Get into www.pcbgogo.com, sign up if this is your first time. Then, in the PCB
Prototype tab enter the dimensions of your PCB, the number of layers and the number of PCB
you require. Assuming the PCB is 80cm×80cm you can set the dimensions as shown below.
Step 3: The final step is to upload the Gerber file and proceed with the payment. To make sure
the process is smooth PCBGOGO verifies if your Gerber file is valid before proceeding with the
payment. This way you can sure that your PCB is fabrication friendly and will reach you as
committed.
I proceeded with soldering the other components and the board was ready in just 40 minutes
from the time of unpacking the box. Few pictures of the board after soldering are shown
below.
As you can see I have not used the microcontroller side of the board as it is still in testing
stage, so for this tutorial I will hook up the GSM module with an external Arduino nano through
the header pins. I will provide an update once the microcontrller part is also tested.
Gnd GND
The power key connected to pin D12 is used to enable/disabling the module after power up,
this helps in saving power when the module is not used. Pin D11 and D12 is connected to Tx
and Rx pins respectively, we will program the Arduino to used these pins as software serial to
communicate with the board. The set-up looks like this below once the connections are made.
Obtaining geo-coordinates locations (Latitude and Longitude) from SIM800 GSM module:
Obtaining GPS coordinate from GPS is easy compared to GSM. The following AT commands
will be used to obtain the location information in DD format from the SIM800 module
AT command Description
Note: Make sure the SIM supports 2G and GPRS plan before proceeding with the above steps.
The commands when executed directly over serial communication will respond like this shown
below
+CIPGSMLOC: 0,75.802460,26.848892,2019/04/23,08:32:35
Where 0 is the location Pin code (fails to fetch in India), 26.8488832 is Latitude and 75.802460
is longitude. So we have to crop these values out from this result and append it to a Google
Map link to point the place and address on a map. The link will be something like this
https://www.google.com/maps/place/26.8488892,75.802460
We will use our Arduino code to do this and send the link as an SMS to our phone when
requested. As always the complete program with a detailed video is given at the end of this
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
page, but I have explained the program into small snippets below to help you understand it.
The Arduino communicates with the SIM800 module though serial communication with AT
command. For every AT command we sent the module will reply character after character and
if the result is successful the message will end with OK. So, before we start with our program
we write a function called SIM800_send which will take in AT command as string and pass it to
the GSM module using SIM800. println command and then use the SIM800.read() function to
get the result back from the SIM800 module and return it. The function is shown below
Inside the setup function, we initialize the serial monitor and SIM800 communication and 9600
baud rate and also make the pin 12 (PWR_KY) low for 1 second to enable the GSM module.
Then we use the above created function to communicate with the GSM module. We first enable
echo by using “ATE1” and then start following the commands listed above to get co-ordinates
from GSM module. After each AT command we print the response on the serial monitor for
debugging purpose, the code for the same is given below
void setup() {
//PWRKY pin of GSM module has to be pulled low for 1sec to enable the mod
ule
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
pinMode(12,OUTPUT);
digitalWrite(12, LOW); //Pull-down
delay(1000);
digitalWrite(12, HIGH); //Release
Inside the loop function, we check if the Module is saying anything. If the module receives a
call it will print out “RING”. So, we make out program to check for RING buy combining all the
output char to string and compare it directly to “RING”. The code for the same is shown below.
If a RING is detected, it is time to fetch the location data, trim the data and converter it to a
google map link and nally send it as an SMS. But before that we need to hang up the
incoming call, to do this we use the command “ATH”. Then we disable echo using ATE0 and
use the “AT+CIPGSMLOC=1,1” command to get the location data from the internet.
Again, we use the same while loop technique to convert the output characters to string.This
time the string will have the response from the AT+CIPGSMLOC=1,1 command which will
contain the latitude and longitude information as we discussed already. We will use the
prepare_message() function to trim the value of latitude and longitude. As you can see in the
below sample message
+CIPGSMLOC: 0,75.802460,26.848892,2019/04/23,08:32:35
The value of longitude is followed by the first command and ends with second command.
Similarly the value of latitude starts with second command and ends with third comma. We
can make use of these characteristics to fetch the latitude and longitude values form the
program. Using the below code
Now that we have our latitude and longitude value we just have toattach it to our Link with a
comma in-between to form the Link. The code for the same is given below.
Serial.println(Latitude); Serial.println(Longitude);
Link = Link + Latitude + "," + Longitude; //Update the Link with latitu
de and Logitude values
Finally we can send the Link as SMS to a mobile number. Here I have hardcoded the mobile
number with the command AT+CMGS="907923XXXX", make sure you replace the command
with your phone number.
The complete working of the project can be found in the video linked below. Hope you liked the
project and enjoyed building it. If you have any questions leave them in the comment section
or use the forums for other technical discussions.
Code
/*Program to send Latitude and Logitute Information from SIM800 to Phone via SMS on call request
* Code by: B.Aswinth Raj
* For: www.circuitdigest.com
* Dated:23-04-2019
* Sample Output for AT+CIPGSMLOC=1,1 ==> +CIPGSMLOC:
0,75.802460,26.848892,2019/04/23,08:32:35 //where 26.8488832 is Lattitude and 75.802460 is
longitute
String Link = "The current Location is https://www.google.com/maps/place/"; //we will append the
void setup() {
//PWRKY pin of GSM module has to be pulled low for 1sec to enable the module
pinMode(12,OUTPUT);
delay(1000);
delay(1000);
delay(2000);
delay(1000);
void prepare_message()
{
Convertido de web en PDF a https://www.htmlapdf.com con el api html a pdf
//Sample Output for AT+CIPGSMLOC=1,1 ==> +CIPGSMLOC:
for(int i=first_comma+1; i<second_comma; i++) //Values form 1st comma to 2nd comma is
Longitude
Longitude = Longitude + responce.charAt(i);
for(int i=second_comma+1; i<third_comma; i++) //Values form 2nd comma to 3rd comma is Latitude
Latitude = Latitude + responce.charAt(i);
Serial.println(Latitude); Serial.println(Longitude);
Link = Link + Latitude + "," + Longitude; //Update the Link with latitude and Logitude values
Serial.println(Link);
}
void loop() {
if (incoming=="RING") //If an incoming call is detected the SIM800 module will say "RING" check for
{
Serial.println ("Sending sms"); delay(1000);
while (SIM800.available())
{
}
Serial.print("Result Obtained as:"); Serial.print(responce); Serial.println("*******");
prepare_message(); delay(1000); //use prepare_message funtion to prepare the link with the
delay(1000);
delay(1000);
}
Video
Email Address *
Name
Country
United States of America
Subscribe
COMMENTS
TI TRAINING VIDEOS
Solutions for Fast Charging Electric Vehicle Supply Equipment (EVSE) Design
CALCULATORS
This website uses cookies to improve user experience. By using the website you are giving your consent to
set ©cookies. For Digest.
more information, read our cookie policy and privacy policy. OK, I Understand
Copyright 2019 Circuit All rights reserved. Privacy Policy | Cookie Policy | Terms of Use | Contact Us | Advertise