Test & Measurement


Remote monitoring system sends e-mail via SMS - design

25 August 2004 Test & Measurement

This article shows a simple set-up that enables remote monitoring of temperature and an analog signal via e-mails. On meeting certain alarm conditions, the system can send SMS messages, which are then converted to e-mails and forwarded to the designated e-mail address.

This project demonstrates how to make a simple remote monitoring system that monitors temperature and analog voltages using a temperature sensor (the DS18S20 from Dallas Semiconductor) and an analog-to-digital converter ADC (the MAX127 from Maxim).

Figure 1 outlines the concept
Figure 1 outlines the concept

The components required: PIC micro-controller - PIC 16F877; 1 Wire temperature sensor - DS18S20; 8-channel 12-bit serial ADC - MAX127; GSM modem; SMS to e-mail conversion service provided by TynTec.

The user is able to program the alarm thresholds for temperature and the analog input. When any of the alarm conditions are met, the system then sends a standard SMS message using the GSM module. The SMS message must be sent to the designated mobile number provided by TynTec in order for it to be translated to an e-mail. The SMS message is then converted into an e-mail message and forwarded to the designated e-mail address by TynTec's 2-way SMS messaging service.

The main advantages of the project:

* An easy way to send e-mails that are automatically generated without human intervention.

* A very simple way of remotely monitoring temperature and voltages etc.

* It is capable of sending e-mails as well as SMS messages.

* It does not require any PC intervention to achieve the functions above.

* It avoids getting involved with complex TCP/IP connectivity issues - this can be particularly problematic in areas where GPRS coverage is not present.

Details

A BASIC compiler, the Proton+ for the PIC microcontrollers provided by Crownhill www.crownhill.co.uk) is used. The SMS to e-mail conversion facility is provided by TynTec ( www.tyntec.biz). The GSM module used is a Siemen's TC35; although others can be used. In this design a development board, the Proton Dev board from Crownhill with the PIC16F877 installed on it was used. Note that the standard 16 x 2 LCD module was replaced with a 20 x 4 LCD module. The Proton+ compiler supports the 20 x 4 LCD module via the 'PRINT' command.

Temperature sensor: The DS18S20 is used as a temperature sensor. It uses Dallas's 1-Wire protocol. The DS18S20 is connected to PortC pin 0 of the PIC. The DQ pin requires a 4,7 kΩ pull-up resistor connected to 5 V.

Analog to digital converter: The MAX127 is selected for this project. It is a 12-bit 8-channel serial interface device. It uses two I/O pins of the PIC (PortB pins 0 and 1). We only make use of the first channel of this device. The code can be adjusted easily to make use of the other channels if need be. Ensure that the SDL and SDA pins (pins 5 and 7 respectively) have 4,7 kΩ pull-up resistors connected to 5 V.

An LDR (light dependent resistor) is connected to 5 V and then to ground via a 1 kΩ resistor. The junction of the LDR and resistor is then connected to Channel 0 (pin 13) of the MAX127. The input range of the A/D is selected to be 0-5 V. The connection diagram is shown in Figure 2.

Figure 2
Figure 2

Overview of code operation

1) The PIC reads the analog input value. This function is achieved in the 'MAX127IN' subroutine. If the analog voltage is above the specified threshold, then the alarm flag 'ALARMFLAG' will be set. Setting the alarm flag to '1' indicates that an SMS needs to be sent.

2) Following that, the temperature will be read from the DS18S20. If the temperature is above the specified limit, then the alarm flag 'ALARMFLAG' will be set. Setting the alarm flag to '1' indicates that an SMS needs to be sent.

3) Then, the code will decide whether or not to send an SMS message. If the alarm flag 'ALARMFLAG' is set. The code will go to a subroutine called 'SMS' to send an SMS message to the designated mobile number.

Set-up procedure

Firstly, obtain an account for TynTec's '2 Way SMS Tool'. The destination e-mail address will have to be specified to them. TynTec ( www.tyntec.biz) will then provide a unique mobile number.

In the code the following points need modification:

* Line 87: If MAXREAD > 2047 THEN

This is where the analog input threshold level will be set. The MAX127 is a 12-bit A/D converter, so it has 4096 steps. It is configured to have an input voltage range of 0-5 V. At the moment, the code is set with a threshold of 2,5 V.

* Line 119: If temp > 58 THEN

At this point the temperature alarm threshold needs to be set. In the code provided, it is set at 29°C. 'temp' is a register holding the reading from the DS18S20. Dividing 'temp' by 2 gives the actual temperature in degrees C. Note that only this code only works with +ve temperatures.

* Line 268: HSEROUT ["AT+CMGS=+447---------"]

Here the destination mobile number is specified - the number provided by TynTec.

* Line 298: UNTIL SMSDELAY = 10.

The delay between an SMS message transmission and a repeat 'scan' of the temperature and analog input is adjustable. At present it is set for 10 minutes delay. This can be adjusted to suit different situations.

A sample e-mail sent from the unit is shown in Figure 3. After following the steps above, the system should be able to monitor the temperature and analog input. If/when the trip thresholds are exceeded, an SMS message will be sent out which will result in an e-mail being sent to the designated recipient. The code for this project can be downloaded from www.maxim-ic.com/Remote-Emailer.

Figure 3
Figure 3

For more information contact CST Electronics, 011 452 0706 or Electrocomp (Value Added Reseller), 011 458 9000.



Credit(s)



Share this article:
Share via emailShare via LinkedInPrint this page

Further reading:

Compact high precision magnetometer
Future Electronics Test & Measurement
Bosch Sensortec has introduced the BMM350, a compact 16-bit, 3-axis magnetometer engineered to deliver high accuracy, low noise, and exceptional energy efficiency in space constrained designs.

Read more...
Ultra compact NTC thermistors
RS South Africa Test & Measurement
Murata Manufacturing Co. has expanded its compact NCU03 series of NTC thermistors with two ultra-small 0603M devices tailored for consumer and automotive designs.

Read more...
5G mobile hotspot with integrated multimodal AI capabilities
CST Electronics Computer/Embedded Technology
MeiG Smart has launched its first 5G Mobile HotSpot solution, the SRT8710, a breakthrough in mobile connectivity that combines ultra-fast 5G communications with integrated multimodal artificial intelligence functions.

Read more...
Omniflex uses LoRaWAN to track water usage
Omniflex Remote Monitoring Specialists Test & Measurement
Omniflex has helped New South Wales Ports improve its ability to track water usage by installing remote monitoring to 38 water meters at its Port Kembla site, sending the data to the NSWPorts web portal.

Read more...
Surviving the extremes: Understanding shock and vibration in MEMS sensors
Altron Arrow Editor's Choice Test & Measurement
By considering factors such as mechanical headroom, damping, and system-level robustness, designers can ensure that the chosen sensor not only survives, but performs reliably over time.

Read more...
Advanced pressure monitoring sensor
EBV Electrolink Test & Measurement
The Infineon KP497 is an advanced, highly integrated digital pressure sensor designed for demanding automotive and industrial applications, with a particular focus on battery management systems.

Read more...
Slimline 150 W bench PSU
Vepac Electronics Test & Measurement
The PeakTech P 6222 is the company’s new, slim laboratory power supply that offers precisely adjustable output values of 30 V and 5 A with a continuous power output of 150W.

Read more...
Redefining edge intelligence in RF analysis
Vepac Electronics Test & Measurement
The HAROGIC PXR Series bridges the gap between benchtop-grade RF performance and high-performance edge computing.

Read more...
Otto Wireless appointed as sole agent for Dragino Technology
Otto Wireless Solutions Test & Measurement
Dragino is a globally recognised leader in LoRaWAN and Internet of Things products and solutions, and is known for delivering reliable, cost-effective hardware.

Read more...
AI-ready rugged spectrum analysis for the field
Vepac Electronics Test & Measurement
The HAROGIC PXR Series is a rugged, benchtop-grade spectrum analyser and an AI-ready open platform in a single portable instrument.

Read more...









While every effort has been made to ensure the accuracy of the information contained herein, the publisher and its agents cannot be held responsible for any errors contained, or any loss incurred as a result. Articles published do not necessarily reflect the views of the publishers. The editor reserves the right to alter or cut copy. Articles submitted are deemed to have been cleared for publication. Advertisements and company contact details are published as provided by the advertiser. Technews Publishing (Pty) Ltd cannot be held responsible for the accuracy or veracity of supplied material.




© Technews Publishing (Pty) Ltd | All Rights Reserved