Botroniks Arduino ready-made hex code - SMS1042A: SMS 2x Temperature Alarm (2x sensor DS18B20) and control of 4 outputs - TryHex!

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

Nano
Uno
Mega

- SIM800L V2.0 5V: 1-2-3-4
- DS18B20 temp. sensor: (link) 1--2--3
 
- 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
 
Arduinos
connections (click to enlarge)
- Need additional accessories:

SMS1042A: SMS 2x Temperature Alarm (2x sensor DS18B20) and control of 4 outputs - TryHex!
The offered code enables: 2x High and low alarm temperature limits are set via SMS. When the measuring temperature exceeds the set limits, an alarm SMS message
follows (or together with a call) to up to 3 stored phone numbers. SMS 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
Add resistors (R1-R2) of 4,7K if sensor does not have it. For long distance of sensor connection cable use shielded cable. Shield must be connected to GND.
 
Some 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:
Enter phone number in international format - If no phone number is stored - no alarm SMS!
The temperature must be outside the alarm limits for at least 3 minutes for a successful alarm! (then sends SMS on up to 3 memorize phone numbers)
If the DS18B20 sensor is not connected, the temperature in the SMS is zero!
If there is no stored phone number - no alarm SMS!
The alarm phone number is deleted if it is entered (*tx= (x=1,2 or 3)) example: *t3=
 
Download the TryHEX 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...): SMS1042Atry-M328 - Time limited (2h - then need restart) version for try!
2. uc AtMega2560 (Mega(ATMEGA2560).....): SMS1042Atry-M2560 - Time limited (2h - then need restart) version for try!
Fully functional HexCode but time limited! Test and use it free! If You are satisfied and want FinalHexCode (code version no limit) - do next:
FinalHexCode : Do some donation (HOME) and copy bottom line in Your Email to us (CONTACT). After successful donation You will receive ProjCode on your email soon as possible.
Need of project code: ProjCode-SMS1042A (FinalHexCode)
You can use and copy received FinalHexCode in Your projects without any restrictions!
 
Project code is not realized in the Arduino IDE. Source code not available!
 

User guide manual:
Description of SMS commands (send SMS and wait for answer):
*** - Return to Default Reset - does not send a return SMS message after this command ( *MO=1 *RM=1, all outputs=OFF) (do it first after uploading code)
? or S - Status request. Returns SMS to the sender abouth status of outputs.
?* or S* - Returns SMS with settings values
OUT1=1 or A - Activates (ON) Out1 (*RM=1 sends (*RM=0 or does not) a return sms report on the executed command)
OUT1=0 or a - Deactivates (OFF) Out1 (*RM=1 sends (*RM=0 or does not) a return sms report on the executed command)
OUT2=1 or B - Activates Out2 -=-
OUT2=0 or b - Deactivates Out2 -=-
OUT3=1 or C- Activates Out3 -=-
OUT3=0 or c- Deactivates Out3 -=-
OUT4=1 or D- Activates Out4 -=-
OUT4=0 or d- Deactivates Out4 -=-
ALL=1 - Activates (ON) ALL Outputs (*RM=1 sends (*RM=0 or does not) a return sms report on the executed command)
ALL=0 - Deactivates (OFF) ALL Outputs (*RM=1 sends (*RM=0 or does not) a return sms report on the executed command)
SMS commands of settings: (allways memorised and returns SMS)
*MO=1 - To Memorizes the last state of the output when power failure
*MO=0 - To Do not memorizes the last state of the output when power failure
*RM=1 - To Returns SMS message to the sender after executing the SMS command
*RM=0 - To Do not returns SMS message to the sender after executing the SMS command
*L1=x - set Low Temperature1 limit (in round degrees Celsius - x range:-50/+120) example: *L1=-6
*H1=x - set High Temperature1 limit (in round degrees Celsius - x range:-50/+120) example: *H1=56
*L2=x - set Low Temperature2 limit (in round degrees Celsius - x range:-50/+120) example: *L2=1
*H2=x - set High Temperature2 limit (in round degrees Celsius - x range:-50/+120) example: *H2=105
*t1=x - set 1. alarm phone number (example: *t1=+381641111111)
*t2=x - set 2. alarm phone number (example: *t2=+381642222222)
*t3=x - set 3. alarm phone number (example: *t3=+381643333333)
*CL=0 - If alarm status activated, send alarm SMS message only
*CL=1 - If alarm status activated, add a call (15sec.) with an alarm SMS message