In this article we are going to explain how to control electrical devices through SMS using a GSM modem and AT89S52 microcontroller. We are using SIM300 gsm modem with TTL output. You can control 4 devices with this code in this article, which can be extended more with similar drivers. We can shown LEDs as the output devices. You can easily connect relays in the place of the LED using a relay driver IC ULN2003.
Circuit Diagram
The GSM modem is connected to the serial port of the 8051 microcontroller. The devices are connected to the Port P2.4 to P2.7. The lcd display shows the various status. The 8051project board is used in this article.
The following commands are used to control the devices.
load1 on => to switch ON the device 1
load1 off => to switch OFF the device 1
The commands are same for other devices such us load2 on, load2 off etc.
AT Command used to read the first or latest SMS
AT+CMGR=1
AT command used to delete all SMS
AT+CMGD=1,4
Video demo
Device control through SMS using SIM300 and AT89S52 1.0
Control your home appliances through SMS