PARTS USED:
VACUUM:
TOOLS:
VELCRO-HINGE-REDUNDANCY-THINGIE
On my first attempt, I used a 750N actuator and it needed around 15 seconds to complete a cycle. The 100N only needs about 3s to fully open/close - this is the one I’m currently using.
The speed and noise level of the 100N actuator are great, but those 2-3s made me think about redundancies…
The actuator is held in place by 4 screws on the back and 4 screws on the door; the door itself has another 4 points of support (4 screws, topside, on the furniture) and the door/furniture is made of solid MDF . . . so . . . if that thing catches a leg, arm, cat, children, guests . . . whatever unfortunate thing that can fit in there at the right moment, the actuator will definitely win its battle against bones, so I tried to figure out a way to make it safe (drunk-proof)…
After a couple of failed over-engineering attempts using magnets or a custom plastic hinge based on a spring that can only expand one way, I figured a simple, cheap and durable method to finish this project - a velcro based hinge . . thingie.
By ‘durable’ I mean something that is just strong enough to support the weight/stress of the system but not strong enough to generate . . . medic appointments.
For testing purposes, I had that door opened for a week and the velcro bonds didn’t seem to mind the gravity.
I also used the same amount of velcro on a testing rig to see how much weight (pulling down) would support - the result was around 3.5 kg.
One thing I don’t trust is Chinese ‘3M’ adhesive tape; their adhesive can’t properly hold a LED band for long so I used some metal washers on the door side to decrease the stress on the adhesive, and zip ties on the actuator side, going through the screw holes.
As you can see in the video above, the actuator extended arm weight is supported by only a few threads of velcro, so this seems to be working out great, but this is not the only use of velcro in this project…
TOPSIDE MOUNTED ELECTRONICS
This is a kitchen…so there is water, drains…alcohol spillage. .you know - fluids! And fluids don’t mend well with electronics - so I put the electronics box on the top side of the furniture in case there is a flood or something that can damage the system or create a 220V AC puddle in my home.
…To be honest…there are already enough redundancies; the electronics are encased in a solid ABS box with IP65 and IP68 cable glands and I have 30 mA differential breakers, so there is no real danger - I just thought it looks cleaner and professional, plus, I had some extra velcro…
ELECTRONICS
The electronics box only contains the power supply and the relay. The wiring that goes to the linear actuator and the electrical connections are isolated using IP68 cable glands
Connections scheme:
I know there are out-of-the-box motor drivers on the market but all seem to be 433MHz and I wanted something smarter (ESP based) preferably with WiFi. I could use a Shelly 2.5 but that works on 24V and I wanted a 12V actuator (for its sound level and speed)…so I had to make my own controller.
The relay is flashed with Tasmota and it has the following custom settings:
-
Interlock1 1,2
- Set Interlock mode True, and group channels/relays 1 and 2 in interlock mode: when one relay is turned on, the other relay will automatically be turned off beforehand -
PulseTime1 30
- Cut the power to channel1 after 3 seconds -
PulseTime2 30
- Cut the power to channel2 after 3 seconds, no reason to send power towards a relay after it cycled the motor and opened/closed the door.
Having interlock capability is crucial for such a controller. The actuator is based on a DC motor, so the rotation direction is relative to the DC flow; you change the polarity and it spins the other way around.
Motor/Actuator are bot connected in the COM sockets of the relays, so when not in use, both leads are bridged to the NC sockets. When powered (with interlock) one relay will bridge to NO; switching between active relays (channel1 or channel 2) changes the rotation, therefore opening or closing the door.
Tasmota documentation can be found here
PS: Something I wish I knew from the start - To flash this board you will need to supply power (3.3V DC) to the ESP from the programmer and 12V DC to the board to its integrated micro-USB port at the same time.
Overall a clean build. Time for software integration
HOMEASSITANT INTEGRATION
Since the relay is flashed with Tasmota it runs locally via MQTT and is defined as a cover in HA:
cover.yaml
# VACUUMM DOOR CONTROLLER
- platform: template
covers:
vacuum:
device_class: shutter
optimistic: true
position_template: "0"
friendly_name: "VACUUM"
open_cover:
service: script.vacdoor_open
close_cover:
service: script.vacdoor_close
scripts.yaml
# ---------- VACUUM DOOR
vacdoor_open:
alias: OPEN
sequence:
- service: mqtt.publish
data:
topic: cmnd/VACDOOR_RF/POWER1
payload: ON
vacdoor_close:
alias: CLOSE
sequence:
- service: mqtt.publish
data:
topic: cmnd/VACDOOR_RF/POWER2
payload: ON
To make things look cool and practical I’m using Lovelace Xiaomi Vacuum Map card
In order to open the door, or generally run something before operating the vacuum using this custom integration, the following scripts will be required:
scripts.yaml
# ---------- VACDOOR PYTHON CONTROLLER
vacuum_send_command:
sequence:
- service: script.vacdoor_open
- service: python_script.vacuum_send_command
data_template:
entity_id: "{{ entity_id }}"
command: "{{ command }}"
params: "{{ params }}"
python_scripts/vacuum_send_command.py
entity_id = data.get('entity_id')
command = data.get('command')
params = str(data.get('params'))
parsedParams = []
for z in params.replace(' ', '').replace('],[', '|').replace('[', '').replace(']', '').split('|'):
rect = []
for c in z.split(','):
rect.append(int(c))
parsedParams.append(rect)
if command in ["app_goto_target", "app_segment_clean"]:
parsedParams = parsedParams[0]
hass.services.call('vacuum', 'send_command',
{'entity_id': entity_id, 'command': command, 'params': parsedParams}, True)
Closing the door is based on a simple automation:
automations.yaml
# ---------- VACDOOR CLOSE
- id: vacdoor_controller_close
alias: "VACDOOR CLOSE"
initial_state: on
trigger:
- platform: template
value_template: "{{is_state('vacuum.roborock', 'charging') or is_state('vacuum.roborock', 'docked') }}"
action:
service: script.vacdoor_close
I don’t think there is any point going into details about automations related to the vacuum or the integrations around cleaning, since this is a post about the ‘housing’ system of the vacuum so . .
That’s it! Have fun and thanks for the read!