Help required with Thermostatic Mixer customization - Page 1
Forum section: electronics / beginners

author: Martichoke
author_rank: Newbie
timestamp: April 29, 2018, 06:10:29 am
content: I recently purchased a digital thermostatic mixer for my upcoming bathroom renovations.The thermostatic mixer has a small console that controls temp adjustment to the mixer.the mixer is just like a faucet mixer but controlled with a stepper motor.The console has temperature control and temp display. The temp control buttons are also touch sensitive.My plan is to have a Faucet and a N.O. latching Piezoelectric switch controlling a slow close water valve to allow or not allow water flow.With another 2 N.O momentary Piezo switches to control temp adjustment (I like the aesthetic look of buttons and not the console)I basically want the temp and water flow controlled from 3 piezo switches and the console hidden or not installed.I did a tear down of the mixer and found 4 cables running to the console, 5vdc (red), GRND (Black), CLK (yellow) and DAT (blue). Pictured*I measured the voltage down to ground and played with the touch buttons on the console to monitor any voltage change.There is a constant 2.9v to yellow and 2.0v to DAT with basically no voltage change when adjusting temp.I need help with trying to achieve adjusting the temp with a couple of simple N.O switches (hotter and colder).Any suggestions are very appreciated.

author: Ian.M
author_rank: Super Contributor
timestamp: April 29, 2018, 06:23:57 am
content: It uses some sort of clocked serial bus. You'll need a DSO with protocol decoding to make any sense of it. You *MAY* get there with a logic analyser and a lot of luck, but it will be a lot harder if you cant see the waveform risetimes to detect when the bus is being actively driven.

author: Martichoke
author_rank: Newbie
timestamp: April 29, 2018, 07:58:27 am
content: Quote from: Ian.M on April 29, 2018, 06:23:57 amThank you.what is a DSO? My electronics is very limited.

author: Martichoke
author_rank: Newbie
timestamp: April 29, 2018, 08:03:39 am
content: Do you think it might be worth doing a tear down of the console and trying to cut into the console touch buttons?

author: cowana
author_rank: Frequent Contributor
timestamp: April 29, 2018, 08:13:46 am
content: Quote from: Martichoke on April 29, 2018, 07:58:27 amA Digital Storage Oscilloscope. That may allow you to decode the control format (data/clock), and then 'spoof' it from your own controller.

author: Ian.M
author_rank: Super Contributor
timestamp: April 29, 2018, 08:36:40 am
content: DSO == Digital storage oscilloscope. It can capture the waveforms and freeze them on screen while you pick your way through them figuring out what they mean. Decent ones start at around $500 and the sky's the limit for high end ones. USB ones tend to be a bit cheaper but you certainly wont get protocol decoding on a low-end USB one and at the bottom of the market the software is often so flaky they are virtually unusable.CRO == old-skool Cathode Ray (tube) Osciliscope. It will only give you a stable display if the waveform is repetitive and it can be the absolute devil to get a complex pulsetrain (e.g. serial data) triggered stably. Only a greybeard expert on a tiny pension would even contemplate manually decoding the protocol using a CRO without a logic analyser. Working ones can be found for as little as $100Logic Analyser - what it says. It captures N channels of purely digital signals (high or low) and you can then scroll through the traces looking at the relationship between the pulses on different channels. Cheap 8 channel USB ones that will work with the FOSSsigroksoftware are readily available.A controller teardown wont be the slightest bit of help, as at best all it will tell you is what brand of custom programmed microcontroller they used. Interfacing to touch buttons to fake a touch is nasty at best and likely to be near-impossible for a novice.You do need to confirm whether or not its battery powered, and if its mains powered, if the controller's PSU is isolated. If not, attempting to probe the bus to decode the protocol is likely to blow up your scope or your logic analyser pod and PC. You may not care much as if you don't know *exactly* what you are doing safety wise when working on a device with a non-isolated PSU, they'll probably be measuring you for a pine box sooner rather than later.For interfacing your preferred buttons, if its *NOT* battery powered you can probably use an Arduino Pro Mini. If it is battery powered an Arduino is likely to be too power hungry (unless you give it its own 6x D cell battery pack), and as this is for a wet area with large area wet skin contact, any extra PSU *MUST* have medical grade isolation.

author: abraxa
author_rank: Frequent Contributor
timestamp: April 29, 2018, 08:38:26 am
content: If you're lucky, the protocol is I2C and you can easily tap into the bus with a microcontroller. You say however that your electronics is very limited, so I'm assuming you're not familiar with microcontrollers. Without this kind of knowledge though, I don't see this going very far. If you're willing to invest the time to expand your knowledge, I suggest you get an Arduino. There's an I2C library for it as well, so interfacing it to the CLK/DATA line is easy - assuming that the protocol indeed is I2C, of course.

author: Ian.M
author_rank: Super Contributor
timestamp: April 29, 2018, 08:53:48 am
content: Yes, Assuming you can program Arduinos, if you are anywhere near a hackerspace, or know anyone who teaches in a college physical department and knows how to use a scope, or know any electronics hobbyists with DSOs you best course of action is to trade someone experianced beer money and favours to find out the type of protocol its using - I2C or some clocked serial protocol vaguely similar to bidirectional SPI, then you can probably start trying to 'sniff' the data transfer and decode it with an Arduino Uno.If you've never done *ANY* computer programming you are probably S.O.L. as the concepts involved are fairly advanced and the learning curve is *STEEP*. If you can code in C or have done hardware level programming back in the 8 bit era before the IBM PC was mainstream, you should be able to pick up on using the Arduino platform fairly quickly

author: Martichoke
author_rank: Newbie
timestamp: April 30, 2018, 11:50:01 am
content: Thank you very much!I am currently learning Lua for future programming of a Nodemcu esp8266 for home automation in my renovations. I haven't fooled around with Arduino before though.On a side note, it is mains powered through a 240v adapter down to 12vdc.After reading all of this, it seems it could get very in-depth before I make any breakthroughs. I was hoping it would be simplerI'll follow all of this up with a friend who is an elec. engineer, maybe he has dabbled in some of the above.EDIT: UPDATE: after a few i2c serial protocol YT videos it doesn't seem so far out of reach, and possibly self achievable, if indeed the protocol is i2c.I appreciate all the information!

author: Martichoke
author_rank: Newbie
timestamp: May 01, 2018, 07:25:41 am
content: ok so i've done some research into i2c protocol decoding. Once I'm able to decode the protocol with a DSO (assuming that its safe to tap into the clock and data protocol because its 12v supplied?), I obviously need to relay that into code so i can make use of it through an arduino or similar i2c compatible board.Looking at the clock and data waves on the DSO, do they define the 8 bit protocol of the address, read, write etc.?Also do you think a cheap portable usb powered DSO would suffice for this?There is an I2c scanner library for arduino, but this would only give me an address, which is a start i guess. What should i look for to program into an arduino to get more information of the data it sends and the clock speed it runs?