Dear friends welcome to another video!
This is Nick from educ8s.tv and today we are
going connect our Arduino project to the Internet
using the GPRS service!
Our projects can now access the Internet even
from remote places where there is no Ethernet
or WiFi available!
Without any further delay let’s get started!
If you have watched my previous videos you
will know that I really like this GSM shield
and I like to build projects with it.
The only thing I hadn’t tested so far was
the Internet capability of it.
That’s what we are going to do today.
This project, connects to the Internet via
the GPRS service and visits my website in
order to download a small text which is then
displayed on a Nokia 5110 LCD display.
The text that it downloads is located at this
path educ8s.tv/test.txt and it is our familiar
text “It works fine!”.
As you can see, after a few seconds, the text
appears on the display!
Great, our project works fine!
We can now connect to the Internet even from
remote areas given that there is GSM coverage
at that area!
The connection speed is slow, at most time
less the 100Kbps but it is more than enough
for simple projects!
Let’s now see how to build this project!
The parts needed in order to build this project
are these:
• An Arduino Uno
• A TinySine GSM shield
• A Nokia 5110 LCD display
You can find links for all the parts in the
description of the video.
The connection is really easy.
After connecting the GSM shield to the Arduino
Uno board, all we have to do is to connect
the Nokia 5110 display.
Since some of the digital pins of the Arduino
are used by the GSM shield we have to connect
the Nokia LCD display to the remaining ones.
The TinySine shield is using pins D2,D3,D7,D8
and D9.
I am going to use pins D4, and D10 to D13
for the LCD display.
Check the connection diagram and also watch
the Nokia 5110 LCD display tutorial I have
prepared for more details.
That’s it.
If we now power up the project, it will connect
to the GSM network, next to the GPRS service,
and after about 2 minutes it will display
the text from the remote server.
The procedure is slow, we are going to miss
the speed the Wi-Fi.
Now let’s see the code of the project.
We are using two libraries today.
The TinySine GSM library and the Nokia 5110
Basic library.
You can find links for both libraries in a
link in the description of the video.
The code of the project is simple.
At first we connect to the GSM network.
Next we connect to the GPRS service.
In order to achieve that we have to enter
the APN settings for our cell phone provider.
For my provider which is COSMOTE the APN settings
are these.
Name, username and password.
Find the settings for your provider and enter
them in this line.
Next we send a GET request to the remote server.
We define the server, the path, the port,
a char array in order to save the result,
and finally how many bytes we want to get
from the server.
That’s it!
We got the text from the server and all we
have to do is to remove the HTTP headers and
print it on the display!
As always you can find the code of the project
in a link in the description of the video.
As you can see, connecting to the Internet
using the GSM shield is easy.
That opens up a whole new world of projects.
Our projects can now easily sense the environment
and log that data in an online database even
from remote areas!
I am already building a project like this,
so stay tuned.
I can see a couple of problems though.
The connection is slow, it can take up to
two minutes to connect the internet and that
requires a lot of power.
The second problem is that projects like this
require a lot of memory.
An Arduino Uno only has 2KBs of RAM memory
so in this example I was using 70% of the
RAM memory of the Arduino Uno!
Since this GSM shield does not work well with
an Arduino Mega or Due, we have to find another
shield if we want to build more complex projects
that require more sensors and functionality.
Do you know any GSM shields that can work
well on an Arduino Mega or Due and have a
good library support?
Also do you plan to use the GPRS capability
of this shield with your project?
Please post any comments or ideas in the comments
section below.
Before we go, I would like to show a small
footage from one of my favorite Greek cities
I visited lately.
Naufplio, is one of the most beautiful Greek
cities, if you ever visit Greece, don’t
miss it!
If this is your first time here, I would love
to have you subscribed.
In this channel I post videos about DIY projects
every Saturday.
I build projects with Arduino, Raspberry Pi,
I build robots and simple electronic circuits.
I love making things and helping people doing
the same.
I hope that you will join our community.
Until next Saturday, Watch, Learn, Build!
