Software apps and online services
Hand tools and fabrication machines
The use of rotary knobs is an important aspect of the design of user interfaces in electronic devices (e.g. car MP3 player, microwave oven, washing machine). Generally, a knob is used to provide input to a device when grasped by an operator and turned, so that the degree of rotation corresponds to the desired input. A control knob works by turning a shaft which connects to the component which produces the actual input. Common control components used include potentiometers, variable capacitors, and rotary switches.
But all of these have disadvantages. Rotary knob may malfunction after using a long time. Most of the cases rotary knob become unresponsive for dust and friction. Besides resistive and capacitive knob are not very precise. Resistive and capacitive knob can be rotate limited number of 360 degree turns, most of the case only one turn with maximum 300 degree rotation.
To overcome the above limitations of traditional rotary knob, we can use 3D magnetic sensor as rotary knob. They are frictionless and no angle limitation. You can rotate this as much time as you need (unlimited multiple of 360 degrees).
I made a multi-functional desk clock with the option of controlling the home appliances remotely using WiFi. Wemos D1 Mini was used to access time, weather update and AC home appliances. For controlling the home appliances I used MQTT protocol. Cloud MQTT was used as MQTT Server. The interaction (controlling) is done by Infineon's 3D magnetic 2GO kit & Rotator Knob based on TLE493D. Before going the details please watch the demo video.Features of the Project
1. WiFi switch used to control home appliances remotely using MQTT
2. Internet clock
3. Alarm clock
4. Weather update
5. Single rotary knob for user interaction (controlling)How I Made This
I used Wemos D1 Mini as the main controller of the project. A 1.8 inch tft lcd is used to display the information. Infineon 3D magnetic sensor is used as rotary knob for user interaction. I designed a 3D printed enclosure for my device.
For easily connecting the display to the Wemos mini I made two breakout board for both Wemos mini and the TFT display using perfboard and female header. After making the breakout boards I attached two boards using jumper wires (white color wires in the picture). The connections between Wemos board and display are shown in the schematic.
For accessing all the menus and options I used Infineon's 3D Magnetic Sensor 2Go kit. The kit has integrated microcontroller with the magnetic sensor. The built in microcontroller is used to read the sensor using I2C channel. The sensor data is processed in built-in microcontroller and according the data three GPIO is controlled for generating button press for the Wemos board. The GPIO is used to act as physical button. I used three GPIO from the integrated microcontroller which are connected to the Wemos mini board through transistor. The logic is very simple. The output of the the microcontroller is connected to the base of the transistor. The collector of the transistor is connected to the input pin of the Wemos board and the emitter of the transistor is connected to the ground. When the microcontroller pin goes high transistor becomes on and make a short circuit between collector and emitter which a physical switch does.
To read the sensor data and control the GPIO you need to upload a sketch in the 2Go board. The sketch is attached in the code section. To know the details how to program 2Go board using Arduino environment follow the official github page: https://github.com/Infineon/TLE493D-3DMagnetic-Sensor.
After uploading the sketch on the kit I placed the kit in the box using hot glue so that it can not move on press or rotation. The knob should be place in a manner that it can easily rotate or press.
The whole connection is shown in the following image.
The desk clock can be used as WiFi switch. Using a WiFi switch you can control any electronic device remotely. I am using MQTT protocol for implementing WiFi switch. Wemos transmit an MQTT message on cloud MQTT server on the topic esp/test. You need to subscribe the topic to receive the message sent from the desk clock. To receive the message you need another WiFi device like ESP8266. I am using NodeMCU for receiving the mqtt message and controlling the devices according to the received message. A relay module is required to control the AC appliances.
If you are new in MQTT protocol you may read this nice tutorial: https://www.hivemq.com/blog/how-to-get-started-with-mqtt. For any MQTT communication a MQTT server is required and I am using a cloud based MQTT server name as CloudMQTT. The following image shows the received message from the desk clock.
If you are new on cloud MQTT you can read this documentation: https://www.cloudmqtt.com/docs.html
For testing I made a setup using NodeMCU and two AC lamp. The lamps are connected to the AC source through a relay module. The 5V relay module is connected to the NodeMCU board.
The complete device is like as following image. Home screen has 5 menu like Home Control, Internet Clock, Alarm Clock, Weather, and Setting. You can choose any menu by rotating the knob. The arrow mark shows the selected menu. You can go down by rotating the knob clockwise and go up by rotating the knob anti clockwise. To enter a menu just press the knob. To back from an option you need to double press on the knob.