Send data to a server using sim800l gprs module | sim800l arduino gprs

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so let's see the circuit diagram first so here we have our arduino nano and this is our sim card module please keep in mind that the sim card module requires a stable power and it is runs between normally 3.7 volt to 4.3 volt i am using a lipo battery i suggest using a lipo battery because i have tried many power sensors and this works the best and the simple volume draws maximum of 2 ampere current so in this case i'm using 200 damage battery and you can power the arduino uh using your pc or any five versions so the five volt uh so that three point seven volt goes to the bcc pin of the sim card module uh actually this is not same zero 800l module i am using a random sim card module from the foot chain but in case of sim 800l uh this will be the v6 pin so connect the 3.7 volt to the vcc bl and the ground pin of the battery to the ground pin of the simple module and you have to connect the ground up arduino and the ground of the battery or the sim card module now connect the tx pin of the sim card module to the d8 pin of the arduino nano and in case of the rx pin uh we know that arduino uh keeps voltage uh of 5 volt so the transfer we need to step down this voltage so i am using the voltage divider here i am using a 1k resistor and a quick resistor and the 5 volt signal from the arduino goes to the one resistor and the other terminal to the ground and we'll take the signal in between these two resistors uh if you have a basic understanding of how identified you work then you will understand and from here we are connecting it to the rx pin um i suggest using the voltage divider and uh stepping down the voltage uh sometimes the sim card module gets stuck or it becomes unresponsive because of the high voltage so now it will get a voltage in the range between 3.7 to 4.3 so the circuit diagram is very simple uh now we can go to our server part so now i have logged into my cpanel from here choose mysql database wizard [Music] and now we have to create a database let's name it sample and next step [Music] now you have to create a user for this database say let's say the user is also sample user and after that you have to set password for this user set set these passwords and then click create okay [Music] so we have created uh our sample users so you have to build it this would be a sample user but no problem we can use this name also and from here uh we'll give it all the privileges and make changes okay so our database is now created uh now it's time uh we create the php file so in the root directory of your website uh create a file name gatemethod.php and we'll go to the edit section we come here uh we can see first we have our server name then we have to enter our database name in this case updated his name is sample and the username is sample okay uh and you have to leave your password that you set earlier here and we'll use the gate method to get the data from the link uh please don't change these things below here uh keep this as it is you just have to change these values uh give your password here and then save it okay now we will go back to our cpanel and from here we'll choose phpmyadmin and here is the database that we created just now so we'll choose this database [Music] [Music] [Music] and here we have to create a table uh go to the sql section and paste this code it will create uh three variables first one is the id second one here we will store our data the val and it will uh record the reading time so now let's create go now we can see our table has been created uh there is no value here because uh we haven't done our arduino coding part yet but we said with our server part it's time to prepare the arduino board we're using the software serial library and uh inside the software serial we have to initialize the pin numbers we have connected the tx pin of the sim card module to pin it and um pin 7 is the rx pin and you have to define the apn name the same you are using it is dependent on your sim card please search for that on the internet by your sim uh what is the ap name uh in in my case it is internet and this is apn username and password uh if you have it put it in here in my case this is not necessary and this is the url link that uh from which uh the gprs module will send the data [Music] so this is the method we created on our root directory of the website getmethod.php and i'm initializing a counter i'll just send this counter value that will be implemented by one you can send any kind of data depending on what kind of variable you have created on the website on your database so we're using the serial.begin and the our software serial.begin both are that 9600 quadrat and we are giving a delay of 15 seconds to let the gprs module or our sim card module started and find the networks this function is responsible for sending data to the server and inside our loop void loop function uh we are just incrementing the counter and this is the data we will be sending we are converting the counter that integer variable into a string type and then we are passing it to our gsm http post the function will say that we send the data and here we can see uh we have taken a string variable and we have to add this parameter this is the name pal by which the the website will identify that where to put the data okay now go ahead and upload this code to arduino okay so now let's open the serial monitor [Music] [Music] okay it has set our apn and this is the ip purple scene okay the value one is sent set one okay now if we see uh at our database that the value of one has been sent uh by this uh method you can send any kind of data so this is the tutorial i hope you liked it thank you for watching
Info
Channel: Microcontrollers Explained
Views: 20,693
Rating: undefined out of 5
Keywords: sim800l arduino, sim800l arduino nano, sim800l gprs, sim800l internet connection, arduino gprs, arduino sim800l, gprs, gsm, send data to a server using sim800l arduino
Id: Gdt-pNPI1Zw
Channel Id: undefined
Length: 10min 37sec (637 seconds)
Published: Sun Oct 03 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.