![windows iot i2c blind write windows iot i2c blind write](https://cdn3.botland.store/88110-medium_default/gravity-uart-obloq-iot-module-microsoft-azure.jpg)
- #Windows iot i2c blind write how to#
- #Windows iot i2c blind write install#
- #Windows iot i2c blind write software#
- #Windows iot i2c blind write code#
- #Windows iot i2c blind write plus#
![windows iot i2c blind write windows iot i2c blind write](https://www.mdpi.com/sensors/sensors-14-01918/article_deploy/html/images/sensors-14-01918f3.png)
In my implementation configuring it as Ethernet in the localhost.
#Windows iot i2c blind write install#
In both cases I use a RPi as master with a nRF24L01+ module directly attached to it, and a controller (Domoticz) installed.įor the first option, using MySensors, it is needed to install the MySensors MQTT gateway.
#Windows iot i2c blind write code#
The provided code includes two ways of remote control via the radio module nrf24l01+: using MySensors (recommended), or by sending an integer with the number of blind and command 0 or 1 for up or down. The aim of this tutorial was to solve the inductance problem, but as an extra, there is also the remote control capability. If you use the web IDE for the Arduino sketch it should find automatically all needed libraries. The way I made it was to put everything into an open wooden box using hot glue gun: practical, quick and easy. As you can see, it fits in a 22 x 15 x 5,2 cm wall box, but quite tight though. Sorry, that it is not very fancy and clear, but it is the real installation, made time ago, not just a prepared circuit for this tutorial and I can not show it to you assorted on a table. The system altogether looks kind of like this: :) If you are using the MySensors version of the code, then you can connect up to 256 nodes with 4 blinds each one not changing a single line in the code, fair enough if you live in a palace. The duplicated circuits react to the remote commands exactly the same, but where there is nothing connected, there is nothing to activate. In fact I just lied to you, we have three circuits, but in total 8 blinds, in one circuit we occupy all four motors, but the other four blinds are split in two by using the first three inputs in one Arduino and only input number four in the second. If you are mounting only one circuit, you don't need to change anything, but if you will build two, there you have already the solution for free. Since remote commands must be unique, I have made the code to be valid for any of those by commenting one line at uploading time. You may use from one to four motors, with no need to modify the code, it won't harm to have the logic for the other motors if you don't use them, unless you need the pins for something else, obviously.Īt home we have two stories and hence, two circuits. To break the circuit the process is the opposite, first triacs and then relays, so relays never suffer a live commutation.
#Windows iot i2c blind write software#
No filter is needed, inputs are software debounced.įirst the Arduino activates the relays module to select the motor direction, after a small delay, so the relay contact is already in place, it activates the triac, feeding the motor with the 230 VAC through the cheap relays and triacs modules with no issue. Instead of using one pin for the up command and another for down for each blind, the switches share a common line that indicates whether the blind has to go up or down. [ PS2: SebDominguez also made a nice schema with the actual configuration:
#Windows iot i2c blind write plus#
The resistor plus capacitor forms a RC Snubber circuit that absorbs the energy during the breaking commutation. The varistor protects the triac from an over-voltage. :) In the schematic attached below you have the solution to spare this big relays just by adding one resistor, one capacitor and one varistor. As an engineer I could not allow myself not to get the most efficient solution. I realized by googling, that other people had issues with this, but they took the easy, expensive and voluminous way, they just get bigger relays, still needing the cheap relays just to activate the bigger ones, while the contacts will still suffer and may fail eventually. If you try to break the circuit with no precautions with a small relay, their contacts will stick together, and if you use a triac (solid state relay) the over-voltage (in my case I measured peaks of more than 1600V) will destroy the semiconductor. When controlling motors, an important issue is their inductance, which causes that when trying to open the circuit, the current insists on keeping flowing through your breaking device, causing a very high voltage. Finally I managed to solve all those issues with very cheap components and hopefully I can help someone else to spare these headaches and a lot of time.ĭon't like to program, but love to solder? Read anyways the tutorial and at the end you find a discrete circuit, which does the same, but with no intelligence.
#Windows iot i2c blind write how to#
What seemed to be an easy project turned out to be a bit of a nightmare: the relative high power motors (150W) were destroying my relays and triacs, what wireless communication and controller to use and how to make it work was not obvious, noise in the lines were causing random activation of the blinds (pretty scary in the middle of the night). Just bought a new house and wanted to automate everything, starting with the blinds.