In the previous article, we learned how to send a message to scroll on a notice board from a smartphone using the Bluetooth application, and how to display the date and time. However, Bluetooth is only adequate for short-distance communication of about 10 meters.
But what if it’s necessary to send notifications from a greater distance…of say, 100 or 500 meters, or even further? The answer is SMS.
SMS is a text messaging service. The user can simply type in the desired message in his or her phone (whether it’s a smartphone or not) and send it as an SMS text to the matrix-led scrolling notice board.
For our purposes, I’ve used a readymade Matrix LED scrolling message board that was built using six units of an 8×8 LED block. So, there are a total of 384 LEDs (6x8x8).
The board can receive messages as serial input from any digital device, such as a microcontroller or microprocessor. It accepts serial data in an 8-N-1 format with 9600 BPS. The circuit also uses an Arduino NANO board and GSM module SIM900, which can receive messages from a mobile phone and send it to the matrix LED board to scroll and display.
Here is the circuit diagram with its description and operation:
Circuit description
There are only three building blocks in this circuit:
1. The scrolling message matrix LED board
2. The Arduino NANO board
3. The SIM900 GSM module
Note:
- The scrolling message Matrix LED board requires three wires for interfacing the Vcc, GND, and the serial input. It requires 12V @ 1A supply for the Vcc, so an external 12V supply from the adapter is required. Additionally, its serial data input must be connected with the Arduino board’s digital pin D3.
- The GSM module SIM900 has a four-wire interface for the Vcc, GND, TX, and RX. As mentioned, the Vcc pin requires 12V from an external supply. The GND should be connected with the common ground. And the TX and RX pins connect with the Arduino board’s RX (D1) and TX (D0) pins, respectively.
- The Arduino board must also receive a 12V input from an adapter to its Vin pin.
Circuit operation
The circuit operation for this project is simple. When the 12V supply is connected with the circuit, it will begin operation.
The Arduino board receives a string (message) from the GSM module. Arduino will extract the time, date, and text message from this string, displaying them on as a scrolling message on the Matrix LED board. The message is displayed on the board with the time and date.
- Initially, the default message “EC Department, G P Jamnagar” is displayed and scrolled continuously on the board (though it’s easy to set any other preferred, default message).
- The Arduino board will wait for any new notifications.
- An active SIM card is installed in the GSM module. The SMS has to be sent to this SIM number. The SIM card inside the GSM module will receive the SMS.
- The user can then send an SMS message via a mobile phone
- Arduino reads the SMS from the SIM card using the AT commands. It reads the date and time of SMS received, as well as the text message.
- Arduino’s digital pin D3 works as the serial data TX pin sends the message serially to the Matrix LED board. The format to send the message to the Matrix LED board is:
- This means the text message that’s to be scrolled must start with ‘!’ and end with ‘\r’
- Arduino inserts the start and end characters into the message that’s received from the GSM module. Next, it sends it to the Matrix LED board.
- Once received, the Matrix LED board begins displaying and scrolling this message continuously until it receives any new messages.
- Every time a user wants to display a new message, he or she can send it as an SMS from a mobile phone and it will then be scrolled and displayed on the Matrix LED board.
Software program
#include <SoftwareSerial.h>
SoftwareSerial matrix_LED_serial(2,3);
SoftwareSerial GSM_serial(10,11);
char sms[300];
int i=0,j=0,c;
void setup()
{
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(2,OUTPUT);
digitalWrite(2,LOW);
matrix_LED_serial.begin(9600);
BT_serial.begin(9600);
GSM_serial.begin(9600);
matrix_LED_serial.print(“!EC Department, Govt. Poly. Jamnagar\r”);
matrix_LED_serial.print(249, HEX);
Serial.println(“SMS based scrolling message Notice board”);
GSM_serial.println(“AT+CMGF=1”);
delay(500);
GSM_serial.println(“AT+CNMI=2,2,0,0,0”);
delay(3000);
}
void loop()
{
while(GSM_serial.available())
{
sms[i] = GSM_serial.read();
i++;
}
if(sms[i-1]==’#’)
{
Serial.println(“New SMS Received”);
matrix_LED_serial.print(‘!’);
matrix_LED_serial.print(“New NOTICE:”);
matrix_LED_serial.print(“Date-“);
for(c=30;c<38;c++)
matrix_LED_serial.print(sms);
matrix_LED_serial.print(“, Time-“);
for(c=39;c<47;c++)
matrix_LED_serial.print(sms);
matrix_LED_serial.print(“, “);
for(c=53;c<i-1;c++)
{
matrix_LED_serial.print(sms);
Serial.print(sms);
}
matrix_LED_serial.print(“\r”);
i=0;
for(c=0;c<i;c++) sms=’ ‘; // clear previous SMS
}
Filed Under: Arduino, Microcontroller Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.