Control Light ON/OFF Via SMS With SIM900 Module - Visuino Project

In this tutorial, you will learn how to control a light by sending SMS commands using the SIM900 GSM Module and Visuino.

Watch the video!

Special thanks to Finn André Hotvedt for assisting with testing and verifying the correct commands for the SIM900 module.

If you need help with Visuino projects or building a custom prototype using Arduino or other boards, Finn André Hotvedt is a great resource. You can contact him here.

STEP 1
What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

Iam using in this tutorial a 5V light bulb module, but you can use anything such as LED module, Relay,etcSIM900 GSM ShieldArduino UNOSim card (You should disable the pin request on the sim card before using it with the GSM shield)Jumper wires5V power supply with enough amps for the shieldVisuino program: Download Visuino


 

STEP 2
The Circuit

Connect the SIM900 GSM Shield to the Arduino

 

Connect LED module pin [VCC] to Arduino (shield) pin [5V]Connect LED module pin [GND] Arduino (shield) pin [GND]Connect LED module pin [IN] to Arduino (shield) Digital pin [2]

 

Connect with the Jumpers on the shield pins D8(RX) & D7(TX) like you see it on the pictureMake sure that the antenna is connected to the shieldConnect the 5V Power Supply to the shield, and set the switch on the shield to the External Power (See the picture)Once the Power is connected hold the Power button for 2sOnce the connection with the Network is established the LED will blink every 3s

STEP 3
Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

STEP 4
In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

Add "Software Serial Port" componentAdd 2X "Compare Text Value" componentAdd 3X "Digital Multi Source" componentAdd "Char To Text" componentAdd "Start" componentAdd "Text Value" componentAdd "Toggle(T) Flip-Flop" component

STEP 5
In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

Double click on the "TextValue1" and in the Elements windowDrag "Set Value" to the left side and in the properties window set "Value" to AT+CMGD=1,4Drag another "Set Value" to the left side and in the properties window set "Value" to AT+CNMI=1,2,0,0,0Close the Elements windowSelect "CompareValue1" and in the properties window set "Value" to Light ON and "Ignore Case" to TrueSelect "CompareValue2" and in the properties window set "Value" to Light OFF and "Ignore Case" to True


 

STEP 6
In Visuino Connect Components

Connect "Start1" pin [Out] to "MultiSource1" pin [In]Connect "SoftwareSerial1" pin [RX] to Arduino Digital pin [7]Connect "SoftwareSerial1" pin [TX] to Arduino Digital pin [8]Connect "SoftwareSerial1" pin [Out] to "CharToText1" pin [In]Connect "CharToText1" pin [Out] to "CompareValue1" pin [In]Connect "CharToText1" pin [Out] to "CompareValue2" pin [In]Connect "CompareValue1" pin [Out] to "MultiSource2" pin [In]Connect "CompareValue2" pin [Out] to "MultiSource3" pin [In]Connect "MultiSource2" pin [0] to "TFlipFlop1" pin [set]Connect "MultiSource2" pin [1] to "TextValue1" > "Set Value1": pin [In]Connect "MultiSource3" pin [0] to "TFlipFlop1" pin [Reset]Connect "MultiSource3" pin [1] to "TextValue1" > "Set Value1": pin [In]Connect "MultiSource1" pin [0] to "TextValue1" > "Set Value1": pin [In]Connect "MultiSource1" pin [1] to "TextValue1" > "Set Value2": pin [In]Connect "TextValue1" pin [Out] to "SoftwareSerial1" pin [In]Connect "TFlipFlop1" pin [out] to Arduino digital pin [2]

 

Optional if you want to monitor response from the GSM shield: Connect "SoftwareSerial1" pin [Out] to Arduino Serial pin [In]

STEP 7
Generate, Compile, and Upload the Arduino Code

Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

STEP 8
Play

When you power the Shield wait a bit for the connection with the network to be established, once the connection is established the LED on the shield will blink every 3s.

Now you can send SMS from the phone using text "Light ON" or "Light OFF" and the LED should turn On or Off.

Congratulations! You have completed your GSM project with Visuino. Also attached is the Visuino project, that I created for this Tutorial. You can download and open it in Visuino: https://www.visuino.eu

icon SIM900-GSM-SMS-Light.zip 1KB Download(0)
License
All Rights
Reserved
licensBg
0