Botroniks Arduino ready-made hex code - SMS1090: SMS - Status reading of 4 switches and control up to 4 outputs - FreeHex!

BotronikS - Final code for all types of Arduino and PC users: -- HOME -- CONTACT


- SIM800L V2.0 5V: 1-2-3-4
- RelayModule 4way: 1-2-3-4
- PowerSupply 5.0V/2A: 1-2-3-4
misc: Wires: (link) 1--2--3 -- Resistors: (link) 1--2--3
connections (click to enlarge)
- Need additional accessories:

SMS1090: SMS - Status reading of 4 switches and control up to 4 outputs - FreeHex!
The offered code enables: Status reading of 4 switches (open/close) and control up to 4 outputs.
Required accessories: see above
For Arduino boards: NANO or UNO or MEGA
Arduino pins are used: see connections
uc ATmega328p (NANO, UNO, ...): see connections
uc AtMega2560 (MEGA,.............): see connections
Electrical and practical notes:
Uses 5V/2A power supply - current is very important! Set the power supply to exactly 5,0v (5,2V or more is not good for long time working)
Connect the power supply directly to the 5V and GND arduino pins - do not use the DC plug or USB power supply!
SIM800L power supply be taken directly from the power source - not from the arduino board!
Do not use standard Dupont Jumper Wires to connect the SIM800 (5V and GND) to the power supply (best soldered directly).
In case of insufficient power current or poor contact, the SIM800 is reset when trying to log in to the mobile network.
On outputs can connect some other type of 5V Loads up to 20 mA (for each output) like SSR's: Link1--Link2
For long distance of S0-S3 connection cable use shielded cable. Shield must be connected to GND.
More notes:
Before using the SIM card, activate it on a standard mobile phone and receive at least one SMS message.
The PIN and PUK code on the SIM card must be disabled!
After connecting to the power supply, the device is ready for operation after 1 minute
The flashing LED on the SIM800 pcb flashes more slowly when the device is connected to the mobile operator's network
Return SMS messages can be expected in a few minutes. Do not send more messages before answer.
When using it for the first time (after updating the code), be sure to do a default reset first (see below)
Be sure to upload the code to the Arduino outside of the project connections! (or it not necessary to do in the case when the noted power supply of the project is switched on)
See SMS commands description below
Some project notes:
Temperatures in SMS are in round Celsius degrees!
If the DS18B20 sensor is not connected, the temperature in the SMS is zero!
Download the FreeHEX code below, unpack and upload to the proper Arduino board (Use a free net tool for example XLoader)
1. uc ATmega328-16MHz-5V (NANO,UNO...): SMS1090-M328
2. uc AtMega2560 (Mega(ATMEGA2560).....): SMS1090-M2560
Some restrictions for this code version:
Does not store the last state of the output in case of power failure.
Deletes all messages that have arrived before when connect to power supply (does not execute them)!
Always Returns SMS to the sender.
ArduinoIDE source code is available!

User guide manual:
Description of SMS commands (send SMS and wait for answer):
? or S - Status request. Returns SMS to the sender abouth status
A - Activates (ON) Out1
a- Dectivates (OFF) Out2
B/b C/c D/d - for Out2/Out3/Out4
ALL=1 - Activates (ON) ALL Outputs
ALL=0 - Deactivates (OFF) ALL Outputs
Additional data in received SMS:
A0/A1/A2/A3=OPEN/CLOSE depends of status S0-S3 switches