#OpenValve: Developing an open source smart radiator valve

89 messages · Page 1 of 1 (latest)

amber sky
#

Hello everyone,
I started my smart home journey last year to safe energy and resources. Looking at the market for smart radiator valves and their costs, by the time I would get to a break-even-point, I assume the device is ether broken or not supported anymore. (I am looking at you, Bosch Smarthome). For that reason, I started to look for an open source alternative, but even though I assume the market for radiator valves is quite big, there was not a project I could contribute to.
I decided to develop it myself, and I am at a point now, where I would start to work on a software prototype. With some experience in C/C++ and arduino framework, I feel comfortable developing a simple prototype, but I have not worked with ESPHome so far, beside flashing it on some devices.
The general Idea is to use cheap, off the shelf parts and 3D printing to allow easy rebuilding,

  • ESPbased IC
  • Stepper motor with linear actuation
  • Li-Ion Battery
  • 3D printed adapter to mount the motor to the radiator.

If you are interested in helping me, feel free to check the github. I could need a headstart with the ESPHome setup for the the TQ-T board and see how it works out controlling it from HA.
https://github.com/fabianmuehlberger/OpenValve

:TLDR: Looking for help developing a open source smart radiator valve.

naive agate
peak zealot
lavish wren
#

Nice looking project. Have you seen Honeywell Evohome, I have them setup on my radiators and would be happy to show you how they work so you can get some ideas

amber sky
#

I ordered some PM linear stepper motors from stepperonline to see if steppers are more suited for the task.

amber sky
amber sky
#

The gearbox and linear movement of the bosch smarthome radiator valve looks like: The bigger gear has a wormgear-like bottom and is embedded in the plastic housing to push the pin of the valve, and rides on the smaller longer gear. Very simple, but to small to print it in a FDM

lavish wren
amber sky
lavish wren
#

For a 3d printable model. I wouldn't attempt to print the threads for the linear actuator. Instead work on the core logic of the mechanism. Let the motor stall out once it reaches fully extruded, or fully retracted, you don't need any states in the middle.

I would use a M3 or M4 bolt for its 0.5-1mm extension per revolution, in a heat sert, as a sort of high strength bushing, and a large cog at the end to allow you to gear down a motor

#

If you are interested, I can mock up a design for the concept

amber sky
lavish wren
#

True, but a bit different than what I'm thinking. I think the first stage is making a low torque linear actuator similar to the base used by commercial electronic TRV's

#

In short I will see if I can replicate something similar to this

#

But with the core thread being a metric metal bolt, instead of plastic on plastic

amber sky
#

I tried to print something like that, but to get the tolerances right, it seems to small to replicate something with my FDM.

lavish wren
#

Keep things simple, don't print the bolt or nut, use off the shelf parts that are stronger and higher tolerance than we can print. But use a printer to make the big bits we can't buy 😉

amber sky
lavish wren
#

Oh, ok. So the motor moves up and down too? Interesting concept

amber sky
#

I know its not Ideal, but till I have a better solution, this is at least working

#

I fear, that making a nut as a interface between the m3 bolt and the valve pin creating additional friction, but maybe I'm wrong, I already ordered some long brass hex nuts to see if it is an option. the idea would be to have the motor fixed, and the brass nut constrained to allow only axial movement. Instead of the bolt, the nut would than push on the pin. the problem I see is that a m3 brass nut is hard to constrain radialy

lavish wren
#

If the thread is fine enough the friction shouldn't be much of an issue. Plastic on plastic isn't the lowest friction setup in the world, but the commercial one is definitely working well enough that it's 2 AA batteries last over a year

amber sky
#

with the current assembly, 3.3 V is barely enough to push the pin in, 5 to 6V is way more comfortable to work with.

lavish wren
#

Hmm, not ideal, but it's possible as the commercial devices can do it, with enough gearing down. Once we get the liner part working nicely, we can then look at different power sources. If we can get the top cog to extract and retract the pin with very little resistance to turning by hand, then getting it to be motorised should be doable

amber sky
#

a simple boost converter is not hard to implement if we decide to build a custom doughter board for the IC, but it limits the options for someone who is not willing to solder

#

therfor I would love to have a solution that just works before integrating further

lavish wren
#

That's a good way to go about it. I'm currently printing of a test part to see how well an M8 Nut and Bolt combo works to push the TRV pin down compared to the Honeywell version

#

Since the core part of the project is making a low power linear actuator, that doesn't break the bank and can be made from readily available parts, it's the best place to start. Figuring out the electronics is the easier/fun part

lavish wren
#

First attempt at modelling a base to connect a M8 bolt, with Lock Nut to the TRV

#

Needs work to get the end stops to work, so it doesn't break the thing apart or fall out at the end of travel, but at least it should show if the idea is worth persuing

lavish wren
#

I can screw the bolt down with my fingers to open and close the valve. Definitely needs a decent bit of gearing down though. Are you planning on using a Stepper or a Brushless DC motor?

#

If stepper, a 28byj-48 could maybe work

lavish wren
naive agate
#

Maybe look for a 3V high torque motor? Those typically already have the gears. I'll order some myself to experiment

naive agate
#

Going back to the linear actuator. Here's my thoughts at the moment:
A motor like this would save us some gear box design. Assuming they work. I ordered some to try.
https://www.aliexpress.com/item/1005005906793291.html?spm=a2g0o.productlist.main.7.66115b7aiV4ygJ&algo_pvid=973fe45a-63ce-4027-b0c3-c9b2a1d675ae&algo_exp_id=973fe45a-63ce-4027-b0c3-c9b2a1d675ae-3&pdp_npi=4%40dis!SEK!56.73!28.36!!!37.39!!%4021038ed816917755637368762ed57e!12000034794954664!sea!SE!0!A&curPageLogUid=yeS27C1L30l2

Using a Rigid Flange Coupling we can convert the shaft into a lead screw to push on the pin of the radiator valve.
And adding a sled-like construction for the motor, it could move freely and be somewhat adaptaple to various radiator constructions.

naive zinc
#

How much of movement is needed?

naive agate
#

I'd need to measure, though it's probably not too much.
3-5 mm?

naive zinc
#

Maybe using a wedge and a small ball bearing rolling against itwould be better solution then?

#

Also, at the end position, there should be some physical measures to keep the mechanism from jamming. End switches or sensors for example.

#
#

maybe mount a ball bearing on the shaft eccentrically and pushing onto some pin

#

But that of course leaves the open question of how do you do the feedback part

#

Maybe using RC servo is a better option - they already have potentiometer inside for position feedback and also have quite good torque.

amber sky
#

Small Update on the project Idea. After testing the Idea with the N20 Gearbox motor, I was not really optimistic that this would work, especially the power consumption an cycles that it goes through a heating period. Although it worked on 5V with approximately 100 mA under full load the motor was defiantly on peak of its capabilities.
I finally found a linear actuator that is made for Smart Home radiator valves. It is a 3.3 V stepper motor with linear actuation and a gearbox.
I bought it directly from the Chinese supplier and waiting for a batch of samples to arrive. The cost will be approximatly 7 euro + shipping. Looks very promissing 🙂

amber sky
#

Hey everyone,

I got the new stepper motors and did a redesign of the printed parts.
So, whats next?

  1. Decide for a stepper driver. My current preference is the TMC2300, due to the features it provides and the direct compatibility with the stepper motor. https://www.trinamic.com/products/integrated-circuits/details/tmc2300-la/ See: https://www.trinamic.com/support/help-center/old-products/discontinued/tmc2300-thermo-bob/
  2. Battery management/voltage regulation. Currently I am looking for a simple solution to provide 3.3 for the IC and Driver, as well as reading battery charge. Some tips would be appreciated. possible candidates: https://www.digikey.at/de/products/detail/texas-instruments/TPS61021ADSGT/6572480, https://ww1.microchip.com/downloads/en/DeviceDoc/MCP73871-Data-Sheet-20002090E.pdf
  3. create a simple esphome program to control the stepper motor. So far I have no experience in with programming esphome. It would be amazing if someone could give me a head-start. (for some motors in return ;))
  4. PCB design: At first I will rely on the reference design provided by ADI Trinamic, and make adjustments from there.

Feedback is more than welcome.

gleaming siren
#

I have a (basic) working implementation for TMC2209 and is currently working on one for TMC2240. Making one for TMC2300 shouldn't be too big of a hazzle.

FYI, the implementations do not use the S/D interface but rather the UART/SPI interfaces

amber sky
gleaming siren
#

The BOB should AFAIK expose all IOs from the driver, including serial interfaces. Still waiting for BOB for the TMC2240, but they should be more or less identical. The TMC2240 has encoder interface that I want to test. I don't know how they compare to the 2300

amber sky
#

by the looks they share some features, but they don't really compare, they are more on the opposite spectrum of the ADI lineup

gleaming siren
#

Hmm, to me they look more or less the same, except the 2300 is geared for low powered motors

#

Mainly compared to the 2209

#

I'll see if I can add the 2300 BOB to my order with the 2240

amber sky
#

I need to decide the power management part of the design first before I order one. Voltage Regulation, Battery charger, USB, and so on... Way to many decisions to make... slapping a MCU on the board and copy the BOB is the easy part, would be cool to see how it works

vestal ginkgo
#

I use 2209s in my projects a lot, I would love to test it out

gleaming siren
amber sky
# gleaming siren I'll see if I can add the 2300 BOB to my order with the 2240

I just checked the Fab cost for 100 pieces of the 2300 BOB (I just took the provided kicad files and created the gerber and fab files for JLC PCB) with 2 components missing I got ~ 230 euro for 100 pieces. I don't see a real advantage of creating a custom pcb now... :/ and only adjust the size to fit the desired Dev board. I found a llilygo board https://www.tindie.com/products/lilygo/lilygo-ttgo-t-oi-plus-risc-v-esp32-c3/ that comes with a battery holder. And I assume they can be bought in bulk too.
This would make a pretty compelling package.
Driver ~ 3 euro
MCU ~ 6-7 euro
Stepper ~6-7 euro
16340 Li-ion 7 - 10 euro

including shipping without import taxes that's around 25 euro per piece.

It would have the advantage that everyone could pick a ESP board suitable and get a driver board + the Stepper for a raw cost after import of maybe 10 euro

amber sky
gleaming siren
#

Yea, there is an integration using the TMCStepper library, but that thing wraps the Serial object which is super annoying to work with. Also it only uses the S/D for control (it uses uart for setup)

gleaming siren
#

@amber sky Let me know if I should create a basic driver that can configure the TMC. As a beginning you should be able to use the a4988 driver to control it with S/D interface. If you intent to use an AB encoder be aware that it will interfere with the stepping signal (interruptions in the frequency is audible when driving the motor)

amber sky
amber sky
#

Bob is done 🙂 just forgot how much time it takes to "just add a few features... " ... and aready found a mistake 🙄

gleaming siren
#

Looks great!

amber sky
gleaming siren
amber sky
#

Any specific Pinout or features you need?

gleaming siren
#

What driver do you plan to make a BOB for?

amber sky
#

I meant to create one specifically for your project, because you said you are interested in the 2240

gleaming siren
#

Yes! A square BOB like the one you just made, but with mounting holes for a NEMA17 (31mm spacings) and an AS5601 centered on the back/bottom. 😄

#

I'm interested in all signal pins being accessible except for the AS5601 PUSH pin

amber sky
#

alright, thats some feature creep, LOL

#

I see what I can do

#

Should I create a git for you or do you aready have on I can clone and push to

gleaming siren
#

I have one already, but it is a mess atm. Went for the full board, but I screwed up some things, so I'm taking a step back and doing things more slowly
https://github.com/slimcdk/esp-stepper-servo

I don't mind if you create a new directory in there, I'll sort things out at a later point 😄

amber sky
#

alright I make a new one, If needed you can just copy the content you need. I am working with kicad 7 btw

gleaming siren
#

Awesome! Also updated to v7, but the project was originally created with v6

amber sky
#

should not be a problem

amber sky
#

Small update on the OpenValve: boards got delivered and Step/Dir is working (I think). I am currently try to get the UART interface working and it is not as easy as I thought. I am currently thinking of getting a whole EVAL kit including the Landungsbrücke Board for easier testing.
Has anyone worked with the https://github.com/trinamic/TMC-API and is willing to give me a short introduction to it ? Unfortunately there is not much documentation how to implement the necessary functions correctly.

gleaming siren
#

Nice! The driver probably needs power on VM before it responds on UART. Yes, I'm using the TMC-API in my component which is still in the works btw. I figured that UART control is possible, but not super precise. I'm incorporating additional pulse signaling on STEP and also ramping, which might solve the overshooting with UART control

amber sky
#

hey, I decided to buy the full eval kit, to speed up the development, since it is using the API. I am mostly interested in the uart settings and just control the motor with step dir. My precission requirements are not that high, but features like stallGuard are very handy, as well as position feedback on off/on. with those, I think a reliable positioning is archeivable without any other sensors, even with deep_sleep

gleaming siren
#

Any specific parameters you want to play around with?