{"product_id":"mikroe-3415","title":"Thermostat 2 click","description":"\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003eThe Click board™ is equipped with all the necessary elements, required to provide a reliable operation: it has a varistor across the relay output contacts, preventing excessive voltage transients, it has a flyback diode for the backEMF generated within the relay coil, and a durable mechanical relay, that can withstand up to 20,000,000 mechanical cycles (no load connected). These features allow Thermostat 2 click to be used for a wide range of applications that have to be thermally controlled: various home appliances, air conditioners, cooling fans, small heaters, etc.\u003c\/p\u003e\n\u003cp\u003e\u003cimg style=\"width: 10%;\" src=\"https:\/\/www.mikroe.com\/img\/cms\/high%20voltage.png\" alt=\"Voltage\"\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eDO NOT TOUCH THE BOARD WHILE HIGH VOLTAGE IS APPLIED!\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eNote: The Click board™ is to be used by trained personnel only while the high voltage is applied. A special care should be taken when working with hazardous voltage levels.\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eHow does it work?\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThermostat 2 Click board™ is designed without the main IC; it allows an externally connected thermal sensor to be used, instead. It can be interfaced with the DS1820 compatible sensor which uses 1-Wire® communication. The Click board™ is equipped with a 3-pin female socket, which can be used to install the DS1820 compatible sensor in TO-92 casing, onboard. There is also a 3-pole screw terminal, that can be used if the sensor needs to be installed on a remote location, i.e. onto a heating component. The screw-terminal shares its lines with the socket.\u003c\/p\u003e\n\u003cp\u003e\u003cimg src=\"https:\/\/www.mikroe.com\/img\/images\/thermostat-2-click-inner.jpg\" alt=\"Sensors Thermostat 2 Click\"\u003e\u003c\/p\u003e\n\u003cp\u003eThe 1-Wire® communication with the host MCU is performed over the PWM pin of the mikroBUS™. Depending on the temperature information obtained over the 1-Wire® interface, the host MCU can take the necessary action: it can either open or close contacts of the relay.\u003c\/p\u003e\n\u003cp\u003eThe Click board™ uses the \u003ca href=\"https:\/\/download.mikroe.com\/documents\/datasheets\/G6D.pdf\" target=\"_blank\"\u003eG6D\u003c\/a\u003e series PCB power relay, from \u003ca href=\"https:\/\/www.omron.com\/\" target=\"_blank\"\u003eOmron\u003c\/a\u003e. This quality relay can withstand an amazingly large number of mechanical cycles, with no load connected. However, when there is a significant load connected at its output, micro-electric arcs cause the contacts to wear over time. With the maximum load current of 5A, it can sustain up to 70,000 cycles. Its contacts are made of silver alloy, yielding exceptional ON resistance of only 100m? (max).\u003c\/p\u003e\n\u003cp\u003eThe relay is activated by a magnetic field, generated in a built-in coil on the low-voltage side. The coil is activated by the host MCU. The voltage for the coil activation is 5V, while the current through the coil is 40mA. The MCU is not able to drive the coil directly, therefore an NPN transistor had to be added. Its base is controlled by the host MCU, allowing the coil to drain enough current from the 5V mikroBUS™ power rail. The base of the transistor is routed to the CS pin of the Click board™. The transistor packs two biasing resistors in the same casing, so it can be directly used on the MCU pin, without external biasing resistors. A red color LED, labeled as ACTIVE is used to indicate that the transistor is in an open state and that the current is running through the relay coil.\u003c\/p\u003e\n\u003cp\u003eWhen the current through a coil (or any other inductor) is suddenly changed, the backEMF will be generated, opposing the changes of the current. This can sometimes lead to damage to the control circuit: in this case, the transistor will become inversely polarized. To prevent this from happening, a flyback diode is added across the coil. During the normal operation, this diode does not conduct any current. However, when the coil is switched OFF, the inverse polarization will cause the current to pass through this diode with minimum resistance. This prevents inverse (flyback) voltage from building up, so the transistor remains safe.\u003c\/p\u003e\n\u003cp\u003eContacts at the output may be connected to a higher voltage and larger current may run through. To prevent high voltage transients in this case, a flyback diode is not a viable option. Therefore, Thermostat 2 click uses a varistor (VDR). This component rapidly drops its resistance as the voltage rises above its rated clamping voltage. The excessive voltage transient will pass through the VDR since it will become a current path with the least resistance. During the normal operation, while the voltage stays below the rated clamping voltage, VDR has a very high resistance, so the current runs through the electrical circuit, instead.\u003c\/p\u003e\n\u003cp\u003eThe operating voltage of the Click board™ can be selected by the VCC SEL jumper. This jumper allows selecting either 3.3V or 5V from the mikroBUS™. The selected voltage will be applied to the VCC pin of the connected DS1820 sensor.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eSpecifications\u003c\/strong\u003e\u003c\/p\u003e\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eType\u003c\/td\u003e\n\u003ctd\u003eRelay\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eApplications\u003c\/td\u003e\n\u003ctd\u003eThermostat 2 click can be used for a wide range of applications that have to be thermally controlled: various home appliances, air conditioners, cooling fans, small heaters, etc.\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eOn-board modules\u003c\/td\u003e\n\u003ctd\u003eG6D series PCB power relay, by Omron.\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eKey Features\u003c\/td\u003e\n\u003ctd\u003eAbility to use DS1820 or compatible temperature sensor, both onboard and connected over a terminal, overvoltage and backEMF protection, LED indication…\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eInterface\u003c\/td\u003e\n\u003ctd\u003eGPIO,1-Wire\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eInput Voltage\u003c\/td\u003e\n\u003ctd\u003e3.3V,5V\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCompatibility\u003c\/td\u003e\n\u003ctd\u003emikroBUS\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eClick board size\u003c\/td\u003e\n\u003ctd\u003eM (42.9 x 25.4 mm)\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003cp\u003e\u003cstrong\u003ePinout Diagrams\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThis table shows how the pinout on \u003cstrong\u003eThermostat 2 click\u003c\/strong\u003e corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).\u003c\/p\u003e\n\u003ctable style=\"width: 549px;\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003cth\u003eNotes\u003c\/th\u003e\n\u003cth\u003ePin\u003c\/th\u003e\n\u003cth colspan=\"4\"\u003e\u003ca href=\"http:\/\/www.mikroe.com\/mikrobus\/\"\u003e\u003cimg src=\"https:\/\/cdn.mikroe.com\/img\/mikrobus\/mikroBUS-logo-black.png\" alt=\"Mikrobus logo.png\"\u003e\u003c\/a\u003e\u003c\/th\u003e\n\u003cth\u003ePin\u003c\/th\u003e\n\u003cth\u003eNotes\u003c\/th\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e1\u003c\/td\u003e\n\u003ctd\u003eAN\u003c\/td\u003e\n\u003ctd\u003ePWM\u003c\/td\u003e\n\u003ctd\u003e16\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003ePWM\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e1-Wire® Data\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e2\u003c\/td\u003e\n\u003ctd\u003eRST\u003c\/td\u003e\n\u003ctd\u003eINT\u003c\/td\u003e\n\u003ctd\u003e15\u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRelay Control\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003eCS\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e3\u003c\/td\u003e\n\u003ctd\u003eCS\u003c\/td\u003e\n\u003ctd\u003eRX\u003c\/td\u003e\n\u003ctd\u003e14\u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e4\u003c\/td\u003e\n\u003ctd\u003eSCK\u003c\/td\u003e\n\u003ctd\u003eTX\u003c\/td\u003e\n\u003ctd\u003e13\u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e5\u003c\/td\u003e\n\u003ctd\u003eMISO\u003c\/td\u003e\n\u003ctd\u003eSCL\u003c\/td\u003e\n\u003ctd\u003e12\u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e6\u003c\/td\u003e\n\u003ctd\u003eMOSI\u003c\/td\u003e\n\u003ctd\u003eSDA\u003c\/td\u003e\n\u003ctd\u003e11\u003c\/td\u003e\n\u003ctd\u003eNC\u003c\/td\u003e\n\u003ctd\u003e \u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePower Supply\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e3.3V\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e7\u003c\/td\u003e\n\u003ctd\u003e3.3V\u003c\/td\u003e\n\u003ctd\u003e5V\u003c\/td\u003e\n\u003ctd\u003e10\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e5V\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003ePower Supply\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e Ground\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003eGND\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e8\u003c\/td\u003e\n\u003ctd\u003eGND\u003c\/td\u003e\n\u003ctd\u003eGND\u003c\/td\u003e\n\u003ctd\u003e9\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003eGND\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003eGround\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003cp\u003e\u003cstrong\u003eOnboard Settings And Inndicators\u003c\/strong\u003e\u003c\/p\u003e\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003cth\u003eLabel\u003c\/th\u003e\n\u003cth\u003eName\u003c\/th\u003e\n\u003cth\u003eDefault\u003c\/th\u003e\n\u003cth\u003e Description\u003c\/th\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eLD1\u003c\/td\u003e\n\u003ctd\u003ePWR\u003c\/td\u003e\n\u003ctd\u003e-\u003c\/td\u003e\n\u003ctd\u003ePower LED indicator\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eLD2\u003c\/td\u003e\n\u003ctd\u003eACTIVE\u003c\/td\u003e\n\u003ctd\u003e-\u003c\/td\u003e\n\u003ctd\u003eRelay status LED, lights up when the relay is CLOSED\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCN1\u003c\/td\u003e\n\u003ctd\u003e-\u003c\/td\u003e\n\u003ctd\u003e-\u003c\/td\u003e\n\u003ctd\u003eExternal sensor connector\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eTB1\u003c\/td\u003e\n\u003ctd\u003e-\u003c\/td\u003e\n\u003ctd\u003e-\u003c\/td\u003e\n\u003ctd\u003eRelay output connector\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eTS1\u003c\/td\u003e\n\u003ctd\u003e-\u003c\/td\u003e\n\u003ctd\u003e-\u003c\/td\u003e\n\u003ctd\u003eOnboard 3-pin sensor connector\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eJP1\u003c\/td\u003e\n\u003ctd\u003eVCC SEL\u003c\/td\u003e\n\u003ctd\u003eLeft\u003c\/td\u003e\n\u003ctd\u003ePower supply voltage selection: left position 3.3V, right position 5V\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003cp\u003e\u003cstrong\u003eSoftware Support\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eWe provide a library for the \u003cstrong\u003eThermostat 2 click\u003c\/strong\u003e on our \u003ca href=\"https:\/\/libstock.mikroe.com\/projects\/view\/2733\/thermostat-2-click\" target=\"_blank\"\u003eLibStock\u003c\/a\u003e page, as well as a demo application (example), developed using MikroElektronika \u003ca href=\"https:\/\/www.mikroe.com\/compilers\" target=\"_blank\"\u003ecompilers\u003c\/a\u003e. The demo can run on all the main MikroElektronika \u003ca href=\"http:\/\/shop.mikroe.com\/development-boards\" target=\"_blank\"\u003edevelopment boards\u003c\/a\u003e.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eLibrary Description\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThe library contains the One Wire functions for full communication from MCU to one of the DS18k20 sensors. The user also has a relay management function available.\u003c\/p\u003e\n\u003cp\u003eKey functions:\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ccode\u003evoid thermostat2_relay(uint8_t state)\u003c\/code\u003e - Relay control\u003c\/li\u003e\n\u003cli\u003e\n\u003ccode\u003evoid thermostat2_oneWireReset()\u003c\/code\u003e - One Wire Reset\u003c\/li\u003e\n\u003cli\u003e\n\u003ccode\u003evoid thermostat2_oneWireWrite(uint8_t dataIn)\u003c\/code\u003e - One Wire Write\u003c\/li\u003e\n\u003cli\u003e\n\u003ccode\u003euint8_t thermostat2_oneWireRead()\u003c\/code\u003e - One Wire Read\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eExamples description\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThe application is composed of the three sections :\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eSystem Initialization - Sets CS pin as OUTPUT for control of the relay\u003c\/li\u003e\n\u003cli\u003eApplication Initialization - Initialization driver init and sets relay state on OFF\u003c\/li\u003e\n\u003cli\u003eApplication Task - Waits for valid user input and executes functions based on set of valid commands\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eCommands : '+' - Relay ON '-' - Relay OFF 't' - Reads and display Temperature\u003c\/p\u003e\n\u003cpre\u003evoid applicationTask()\n{\nfloat Temperature;\nchar demoText[50];\n\nuint8_t dataReady_;\nchar receivedData_;\n\ndataReady_ = UART_Rdy_Ptr( );\n\nif (dataReady_ != 0)\n{\nreceivedData_ = UART_Rd_Ptr( );\n\nswitch (receivedData_)\n{\ncase '+' :\n{\nmikrobus_logWrite(\" Relay ON!!! \", _LOG_LINE);\nthermostat2_relay(_THERMOSTAT2_RELAY_STATE_ON);\nbreak;\n}\ncase '-' :\n{\nmikrobus_logWrite(\" Relay OFF!!! \", _LOG_LINE);\nthermostat2_relay(_THERMOSTAT2_RELAY_STATE_OFF);\nbreak;\n}\ncase 't' :\n{\nTemperature = thermostat2_getTemperature();\nFloatToStr(Temperature, demoText);\nmikrobus_logWrite(\"Temperature : \", _LOG_TEXT);\nmikrobus_logWrite(demoText, _LOG_TEXT);\nmikrobus_logWrite(\" C \", _LOG_LINE);\nbreak;\n}\n}\n}\n}\n\u003c\/pre\u003e\n\u003cp\u003eAdditional Functions :\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ccode\u003evoid thermostat2_getTemperature( )\u003c\/code\u003e - Reads Temperature (DS18S20)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eThe full application code, and ready to use projects can be found on our \u003ca href=\"https:\/\/libstock.mikroe.com\/projects\/view\/2733\/thermostat-2-click\" target=\"_blank\"\u003eLibStock\u003c\/a\u003e page.\u003c\/p\u003e\n\u003cp\u003eOther mikroE Libraries used in the example:\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ccode\u003eOne_Wire\u003c\/code\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ccode\u003eUART\u003c\/code\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ccode\u003eConversions\u003c\/code\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eAdditional notes and informations\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eDepending on the development board you are using, you may need \u003ca href=\"https:\/\/shop.mikroe.com\/usb-uart-click\" target=\"_blank\"\u003eUSB UART click\u003c\/a\u003e, \u003ca href=\"https:\/\/shop.mikroe.com\/usb-uart-2-click\" target=\"_blank\"\u003eUSB UART 2 click\u003c\/a\u003e or \u003ca href=\"https:\/\/shop.mikroe.com\/rs232-click\" target=\"_blank\"\u003eRS232 click\u003c\/a\u003e to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika \u003ca href=\"https:\/\/shop.mikroe.com\/compilers\" target=\"_blank\"\u003ecompilers\u003c\/a\u003e, or any other terminal application of your choice, can be used to read the message.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eMIKROSDK\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThis click board is supported with \u003ca href=\"https:\/\/www.mikroe.com\/mikrosdk\"\u003emikroSDK\u003c\/a\u003e - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the \u003ca href=\"https:\/\/libstock.mikroe.com\/projects\/view\/2249\/mikrosdk\"\u003eLibStock\u003c\/a\u003e and installed for the compiler you are using.\u003cbr\u003e \u003cbr\u003e\u003cbr\u003e\u003c\/p\u003e","brand":"MikroElektronika","offers":[{"title":"Default Title","offer_id":47400896102683,"sku":"MIKROE-3415","price":1579.0,"currency_code":"INR","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0676\/3325\/0587\/products\/thermostat-2-click-large_default-22x2yROYz3ZRselU.jpg?v=1701962996","url":"https:\/\/mgsl.in\/products\/mikroe-3415","provider":"MG Super Labs","version":"1.0","type":"link"}