This project creates a connected temperature sensor that is used as a thermostat from a TapNLink module. The project uses TapNLink's embedded Java Virtual Machine (JVM) as the application processor. The JVM runs a simple Java program to drive the temperature sensor.
THE THERMOSTAP IN THIS DESIGN CONNECTS DIRECTLY TO 220 VOLT MAINS POWER.
Physical contact with any component of the design can cause electrocution resulting in serious INJURY, or DEATH.
DO NOT reproduce this design without appropriate knowledge of, and protective measures for working with mains power.
Disconnect power before handling the material or manipulating the connections. Ensure that material is properly grounded and isolated. Always work with another adult present in case of an emergency.
Note: Before starting, learn how TapNLink and the associated tools work in this Getting Started.
This project is on Github !
The project has 4 folders:
app_generated/ThermosTap.apk: Source for the mobile application. It was auto generated by IoTize mobile app build server.
java/ThermosTap.java: Contains a Java code which will be executed by the
iotize_studio/ThermosTap.iotz: IoTize Studio configuration file to configure the TapNLink for the demo.
doc: Contains a pictures and java code readme file.
The main components used in this project are:
- TapNLink (the communication module), it's here.
The hardware setup
General view of the project
The schematic below contains 3 blocks that can be used to control the temperature:
- a simple relay that is supposed to start/stop heating.
- an OT+ (opentherm) interface,
- a 'pilot wire' that is an interface very popular on the French market (and almost unknown everywhere else).
In the application below, only the 'simple relay' block will be used.
Java code executed by the
onCheck() is called periodically (the period is specified in the
TapNLinkVar construct). Using this method, we determine the power by evaluating the differences in the pulses counts during the elapsed time.
- for more
Javacode information, click here !
- Open the TapNLink configuration project
iotize_studio/ThermosTap.iotzwith IoTize Studio. For more information about Studio click here.
- In the
User internal JVMto
Yes, and set the
- In IoTize Studio, execute the
javabuild to generate the
- Configure your
- Reboot the TapNLink to apply the new configuration.
- Because this app has not been published on app stores, you have to install it manually. See how this is done here.
- After your circuit is properly connected, and your TapNLink configured, launch the mobile app. The fastest way is to approach your mobile phone (with NFC enabled) to the TapNLink. NFC will launch the app and connect the mobile to the TapNLink automatically.
TapNLinkyou can now monitor the target and current temperatures.
View of the app
You can activate any mode. However, if
Auto recovery mode is enabled, then the mode will automatically be reset to
AUTO at the start of each time period.
Selecting the mode
The temperatures for each mode is changed from the app using a slider.
The temperature sliders
You can modify the hysteresis to avoid frequent On/Off switching.
For each day, set the type as Work Day or Weekend. This will determine the program that is applied for each day.
Setting the type of day
For each type of day, set the schedule with heating modes (Comfort, Eco, etc.) for each time period.
Programming the Weekend