How does it work?
Thermostat Click is based on the MAX7502, a digital temperature sensor and thermal watchdog with bus lockup protection from Analog Devices. The MAX7502 measures temperature in a range of -25 up to 100°C, within the accuracy of ±1.5°C, and provides an overtemperature alarm/interrupt/shutdown output. Temperature measurements are converted to digital form using a high-precision sigma-delta ADC. Besides the temperature readings, you can set the overtemperature alarm threshold and configure other characteristics.
Thermostat Click uses the overtemperature shutdown output (OS) to control the G6D relay, taking into account the set threshold. The ON LED is a visual presentation of the state of the relay. Omron’s G6D PCB relay is very durable and allows over 300.000 operations with a 2A load at 250VAC or 30VDC. It is an SPST relay, in which the coil is powered by a 5V power rail of the mikroBUS™ socket.
To control the output of the MAX7502, thus the relay itself, as a switch, the Thermostat Click uses the SN74LVC1G126, a single bus buffer gate with 3-state output from Texas Instruments. With a simple logic state, you can turn on or off the output pin of the temperature sensor, no matter the set threshold. This way, the relay can be permanently disconnected from the sensor IC output. A feature like this can be useful when the sensor IC is only used as a measuring device or if the thermostat needs to be temporarily disabled.
Thermostat Click uses a standard 2-Wire I2C interface to communicate with the host MCU with a clock frequency of up to 400KHz. The sensor employs four standard I2C protocols: write byte, read byte, send byte, and receive byte. You can set the I2C address over the ADDR SEL, with 0 set by default. The temperature sensor can be reset over the RST pin, while the TE pin can be used to enable the thermostat circuitry.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the DATA LEVEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Specifications
Type
Temperature & humidity
Applications
Can be used for the development of HVAC systems, heating systems, cooling systems, simple interrupt ON/OFF temperature control, hysteresis controller, and more
On-board modules
MAX7502 – digital temperature sensor and thermal watchdog with bus lockup protection from Analog Devices
Key Features
Low power consumption, separate open-drain output controls a relay, programmable threshold, lowpass filter on I2C lines for digital noise elimination, single-pole single-throw slim miniature relay switches up to 5A of 250VAC/30VDC, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Thermostat click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
LD2 | ON | – | Relay Status LED Indicator |
J1A | DATA LEVEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
J2A-J3A | ADDR SEL | Right | I2C Address Selection 1/0: Left position 1, Right position 0 |
Thermostat Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Maximum Load | – | – | 5 | A |
Maximum Temperature Range | -55 | – | 125 | °C |
Software Support
We provide a library for the Thermostat Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Thermostat Click driver.
Key functions
-
Generic read 16-bit data function.
-
Get temperature in degrees Celsius.
-
Convert temperature in degrees Celsius to Fahrenheit.
-
Set configuration function.
-
Set temperature hysterezis function
-
Set referent temperature function.
-
Soft reset function.
-
Set on thermal switch function
-
Set off thermal switch function
-
Thermostat enabled function.
-
Thermostat disabled function.
Example Description
This application regulates value of temperature.
void application_task ( void )
{
float temperature;
float limit_max = 25.0;
float limit_min = 15.0;
temperature = thermostat_get_temperature( &thermostat );
log_printf( &logger, " Temperature : %.2f rn", temperature );
if ( ( temperature < limit_max ) && ( temperature > limit_min ) )
{
thermostat_switch_on( &thermostat );
}
else
{
thermostat_switch_off( &thermostat );
log_printf( &logger, "----------------------rn" );
}
Delay_ms( 2000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Thermostat
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.