Maker.io main logo

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

2026-04-09 | By Ron Cutts

License: GNU Lesser General Public License Bluetooth / BLE Microcontrollers Wifi Arduino ESP32

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.

Learn more about Visuino: What is Visuino

What You Will Need

  1. I am using in this tutorial a 5V light bulb module, but you can use anything, such as an LED module, a relay, etc

  2. SIM900 GSM Shield

  3. Arduino UNO

  4. SIM card (You should disable the PIN request on the SIM card before using it with the GSM shield)

  5. Jumper wires

  6. 5V power supply with enough amps for the shield

  7. Visuino program: Download Visuino

What You Will Need

What You Will Need photo 2

What You Will Need photo 3

What You Will Need photo 4

What You Will Need photo 5

What You Will Need photo 6

The Circuit

  1. Connect the SIM900 GSM Shield to the Arduino

  1. Connect the LED module pin [VCC] to Arduino (shield) pin [5V]

  2. Connect the LED module pin [GND] to Arduino (shield) pin [GND]

  3. Connect the LED module pin [IN] to Arduino (shield) Digital pin [2]

  1. Connect with the Jumpers on the shield pins D8(RX) & D7(TX) as you see it in the picture

  2. Make sure that the antenna is connected to the shield

  3. Connect the 5V Power Supply to the shield, and set the switch on the shield to the External Power (See the picture)

  4. Once the Power is connected, hold the Power button for 2 seconds

  5. Once the connection with the Network is established, the LED will blink every 3 seconds

The Circuit

The Circuit photo 2

The Circuit photo 3

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 in Picture 2

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type photo 2

In Visuino, Add Components

  1. Add "Software Serial Port" component

  2. Add 2X "Compare Text Value" component

  3. Add 3X "Digital Multi Source" component

  4. Add "Char To Text" component

  5. Add "Start" component

  6. Add "Text Value" component

  7. Add "Toggle(T) Flip-Flop" component

In Visuino Add Components

In Visuino Add Components photo 2

In Visuino Add Components photo 3

In Visuino Add Components photo 4

In Visuino Add Components photo 5

In Visuino Add Components photo 6

In Visuino Add Components photo 7

In Visuino Set Components

  1. Double-click on the "TextValue1" and in the Elements window

  2. Drag "Set Value" to the left side and in the properties window set "Value" to AT+CMGD=1,4

  3. Drag another "Set Value" to the left side and in the properties window set "Value" to AT+CNMI=1,2,0,0,0

  4. Close the Elements window

  5. Select "CompareValue1" and in the properties window set "Value" to Light ON and "Ignore Case" to True

  6. Select "CompareValue2" and in the properties window set "Value" to Light OFF and "Ignore Case" to True

In Visuino Set Components

In Visuino Set Components photo 2

In Visuino Set Components photo 3

In Visuino Connect Components

  1. Connect "Start1" pin [Out] to "MultiSource1" pin [In]

  2. Connect "SoftwareSerial1" pin [RX] to Arduino Digital pin [7]

  3. Connect "SoftwareSerial1" pin [TX] to Arduino Digital pin [8]

  4. Connect "SoftwareSerial1" pin [Out] to "CharToText1" pin [In]

  5. Connect "CharToText1" pin [Out] to "CompareValue1" pin [In]

  6. Connect "CharToText1" pin [Out] to "CompareValue2" pin [In]

  7. Connect "CompareValue1" pin [Out] to "MultiSource2" pin [In]

  8. Connect "CompareValue2" pin [Out] to "MultiSource3" pin [In]

  9. Connect "MultiSource2" pin [0] to "TFlipFlop1" pin [set]

  10. Connect "MultiSource2" pin [1] to "TextValue1" > "Set Value1": pin [In]

  11. Connect "MultiSource3" pin [0] to "TFlipFlop1" pin [Reset]

  12. Connect "MultiSource3" pin [1] to "TextValue1" > "Set Value1": pin [In]

  13. Connect "MultiSource1" pin [0] to "TextValue1" > "Set Value1": pin [In]

  14. Connect "MultiSource1" pin [1] to "TextValue1" > "Set Value2": pin [In]

  15. Connect "TextValue1" pin [Out] to "SoftwareSerial1" pin [In]

  16. 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]

In Visuino Connect Components

In Visuino Connect Components photo 2

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.

Generate, Compile, and Upload the Arduino Code

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 the 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

Downloads

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.