6.3: Application scenario : MQTT based temperature alarm system
Created by ppatierno on 11/19/2013 3:09:07 PM

Application scenario : MQTT based temperature alarm system

The simple scenario of our example is the following : we want to develop a simple temperature alarm system with a device that monitors the temperature inside a room of a building and a remote device that acquire the values and it triggers an alarm if the temperature is too hot. The system is based on MQTT with a Mosquitto broker running on a central server to which the clients connects to. The device with the sensor publishes temperature values on a topic and the remote alarm device subscribes to this topic to receive updated values.

In addition to the two Netduino Plus boards, you need a temperature sensor like the common TMP102 from Texas Instruments (http://www.ti.com/product/tmp102) we chose for this example; you can buy the completed breakout board with all necessary components on SparkFun (https://www.sparkfun.com/products/9418).

Fig6.5

Figure 6.5 : TMP102 temperature sensor breakout board from SparkFun

The first operation is to connect our TMP102 breakout board to the Netduino Plus device as follows :

TMP102

Netduino Plus

GND

GND

V+

3.3V

SCL

ANALOG 5

SDA

ANALOG 4

ALT

DIGITAL 0

ADD0

GND

As you can see, the sensor has an I2C bus interface with the two signals SCL (Serial Clock) and SDA (Serial Data) fully supported on Netduino Plus using the I2C port mapped on pin Analog 5 and Analog 6.

Regarding the remote board you don’t need to do anything because you will use the onboard led to trigger the alarm.

You have everything you need for the example scenario : the Netduino Plus publisher with temperature sensor, the Netduino Plus subscriber with led alarm and the Mosquitto MQTT broker up and running from the previous chapter. Now you can start to develop the firmware for your first Internet Of Things application !

print
  Comments


Turkish porno izle video site in rokettubeporno izle