- There are 2 curtains, each controlled by their own motor: the outer one is a vitrage (lace/net curtain).
- Control the curtains motors
- React immediately on the two buttons
- No need for interrupts and sleep mode (since we are mains powered and for simplicity). Hence we can also be repeater.
- There are RJ11(??) connections for two mechanical buttons combined in 3 stable positions: up, down or idle. The module can be mounted hidden on the wall behind the curtains.
- The buttons can be configured for impulse (so, the relais only give a puls of 1s), or for switch (the motor moves as long the switch is actuated, and stops when released).
- The Dooya motors do not provide a means to know what the state of the curtain is. Still, if only remotely operated, we do know.
- Two Dooya DT82TN motor with RJ11/RJ14 style connector with 4 wires for "dry contacts".
- Local buttons to control the movement.
There are two statecharts like the one below: one for the vitrage, and one for the curtain.
|idle||the motor is not running|
|opening||the motor is opening thanks to a remote command|
|closing||the motor is closing thanks to a remote command|
|open||the curtain is completely open|
|closed||the curtain is completely closed|
the motor is not running
we do not know what the position of the curtain is
|timeout||after a minute, we presume the motor reached the target|
|remoteOpen||not state Open||a command has been received from remote for open|
|remoteClose||not state Closed||a command has been received from remote for close|
MISO = M1 MOSI = M0
|NRF24L01+ Adapter||VCC||red||5V||PowerSupply HLK-PM01|
|NRF24L01+ Adapter||GND||black||GND||PowerSupply HLK-PM01|
|NRF24L01+ Adapter||M0 (MOSI)||yellow||D11||ArduinoNano5V|
|NRF24L01+ Adapter||M1 (MISO)||purple||D12||ArduinoNano5V|
Protection with inductive load
It is advised to use a Varistor over the contacts of the relay.
- Board: Arduino Nano
- Processor: ATmega328P (Old Bootloader)