SMS control 4 way remote control relays using ATtiny2313 microcontroller

Summary of SMS control 4 way remote control relays using ATtiny2313 microcontroller


This article describes a circuit that controls up to eight devices via SMS using an old Ericsson mobile phone and an AT90S2313 or ATtiny2313 microcontroller. It enables ON, OFF, or reset functions for appliances like servers, lights, and locks without a fixed telephone line. The system decodes 8-bit binary SMS messages to manage device states, requiring specific firmware configuration for the external crystal oscillator on ATtiny2313 models.

Parts used in the SMS Controlled Device Circuit:

  • Ericsson mobile phone
  • AT90S2313 microcontroller
  • ATtiny2313 microcontroller
  • Relay module (implied for device control)
  • External Crystal Oscillator (for ATtiny2313)

SMS remote control
Introduction

With this circuit we can control up to 8 devices (4 devices in our example project), by sending a specific SMS message with any mobile phone. It’s very useful in the case that, at the place we have the devices, we have not a wired (fixed) telephone line. If you have an old ericsson mobile phone and you are not using it, its the time to build some useful with that.  The controlling that we can do to the devices, it is ON , OFF or Reset.

Usage of this circuit

With this circuit you can switch-ON , OFF or  Restart some Linux servers, ADSL modems, Printers, Door with electric lock, Garage door, House lights, Water pumpselectric sunshadeBlock the engine of your car or your motorcycle, at the steal case  and much more. The purpose of this circuit is to make the human life better and easier.

The circuit

The hardware of the circuit is very simple, because the communication port of ericsson mobile works at the 5 volts with AT commands ( like the modem commands, but for mobile phones).
The firmware of the AT90S2313 (or ATtiny2313) is very complicated because, we have to convert the ‘septets’ of the phone into ‘octets’ because the AVR needs bytes with 8 bits length ( The ‘septet’ is 1 byte with 7 bits length and  ‘octet’ is 1 byte with 8 bits length). All this process is necessary for decoding the text message from the SMS.

This circuit is working on both AT90S2313 and ATtiny2313 microcontrollers. In case of ATtiny2313 you have to select “External Crystal Oscillator” instead of default “internal RC oscillator” from the “Fuses” tab of your programmer’s software. You have to uncheck the “Divide clock by 8 internally“.

When you finish the circuit connect it to the mobile phone, turn on the phone and then power on the circuit, not before . The AVR will try to read the message from the 1st memory location of the phone, for that  I suggest you to delete all SMS messages from the phone before you connect it to the circuit. If there is no message to the 1st memory location, the AVR is trying again until you sent any.

The format of the message must be only ‘1’ or ‘0’. ‘1’ to enable, or ‘0’ to disable the device. The message must have only 8 numbers, ‘1’ or ‘0’ , alone or mixed .

Example: if you send the message 11000100 then you enable, starting from the right, the devices 3,7,8 (‘1’) and disabling the devices 1,2,4,5,6 (‘0’) .

If you want to send a new message and you don’t want to change some device, must send the same number as the old message.

Example: If you want to enable only the 5th device, you must send a new message like 11010100 to keep the other devices as there are (we send the same message as the old ( 11000100 ) and we change only the 5th bit from ‘0’ to ‘1’ to enable the device ).

For more detail: SMS control 4 way remote control relays using ATtiny2313 microcontroller

Quick Solutions to Questions related to SMS Controlled Device Circuit:

  • How many devices can this circuit control?
    The circuit can control up to 8 devices.
  • Can I use this circuit if I do not have a wired telephone line?
    Yes, it is useful when there is no wired fixed telephone line at the location.
  • What commands are used to send messages to control the devices?
    The message format must be only 8 numbers consisting of '1' to enable or '0' to disable.
  • Does the ATtiny2313 require a different oscillator setting than the AT90S2313?
    Yes, you must select External Crystal Oscillator instead of internal RC oscillator for the ATtiny2313.
  • What happens if there is no message in the first memory location of the phone?
    The AVR will try again until any message is sent.
  • How do I change only one device state without affecting others?
    You must send the same number as the old message but change only the specific bit from '0' to '1' or vice versa.
  • When should you power on the circuit relative to the mobile phone?
    You should turn on the phone first, then connect the circuit and power it on.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top