Heat Pump Expansion Valve behaviour

I think possible, given an emonTH2 (probably) with a RFM69CW radio. You’re going to need two interrupts to the processor to time the valve, and the processor has two interrupt inputs. The problem is, the RFM12B necessarily uses one of them. But the RFM69CW doesn’t work in the same way (it does a lot more inside itself) and this frees up the second interrupt. You’d need to tack wires onto the p.c.b. to make the connection to the second interrupt, the first is the pulse input. Then it’s a matter of writing a sketch to do the timing and report the result.

Battery life wouldn’t be much because you need to power the LEDs all the time, but if 5 V is available, that goes away.

Many thanks Robert.
I know very little about such things. I vaguely understand how the interupt works (as oposed to a 10s ‘look’). I had wondered if once triggered, it could then ask the question - is LED2 on of off, a few ms later. the 10ms is a guess. it might be 100. I had hoped that it could all be done with one interrupt… but I know nothing!
I would really like to get mine going, and this may then be useful to others where the heat output is ‘crashing’. Yes, 5v from mains should be no problem.
I have just put back my EmonTH with LDR on the interrupt. It shows how often and when pulses happen, but not if they are opening or closing pulses

To take this any further, I need to know how the LEDs relate to the valve position and direction of movement. Can you supply a timing diagram showing a complete cycle, from idle, stationary open - initiation - moving to closed - stationary closed - idle - initiation - moving to open - stationary open, idle, and what your LEDs are doing at any point in that cycle. (All basic stuff to understand the process.)

Can you complete this diagram…

ExpansionValve

Well… actually I dont know the timing. I dont know if it can be looked up, but I guess I could get my osciloscope out and try to puzzle it out. All I know is that there seem to be 4 poles. I have wired these via resistors to LEDs. The thinking is that 1)even if shorted they would not take more than 7-8mA. 2) the output to the stepper motor take far more than this.
So, I understand that the short pulses go 1,2,3,4 or 1,4,3,2. to make it open or close in steps. (e.g. 1,2,3,4, is one opening pulse). Not sure how many pulses to fully open. So, my approach was going to be experimental, and to look at say LED 1 & 2. i.e. to ask if ‘2’ is on or off, Xms after the ‘1’ pulse. I guess I should try the scope and try to estimate the timings.
The valve continually modulates. It may never open fully, and i expect it does a few more closing pulses that opening pulses. This ensures that it fully closes.
I will try to draw a graph with time on the X axis to show the duration of the pulses.

I didn’t know it was a stepper motor.
:astonished: :roll_eyes:

This clarifies it somewhat - I know something useful about it now. How many wires are there? It’s likely that timing isn’t significant, it will only be the sequence of pulses that you’re interested in.

These snippets of information coming a bit at a time doesn’t do much to help my understanding. Maybe we should start again and put everything you know down in one place?

To characterise its behaviour you could possibly start with something like an LTV-846.

Wire the diode side like you have wired your LEDs, with a suitable series R dependent on the voltage of signals. Wire the transistor side with suitable pull-ups into 4 GPIO pins on your fav processor (Arduino, RPi, stm32 etc).

If you choose 4 IO pins that all live in the same port you could then write a very tight loop reading that port (capturing all 4 at once). If it’s different from the last time you read it, log it with a msec (say) timestamp. Effectively you’d have created an isolated 4-channel logic analyser.

1 Like

Posted on behalf of @johncantor :

I don’t think time needs to be considered, provided you look at more than 2 pulses. @dBC suggested using a quad opto-isolator and if you have this, then all you need to check is the pulse sequence.

Say you use Pulse 1 as the reset pulse, defining the sequence start. If the next pulse is No.2, it’s opening. Or if the next pulse is No.4, it’s closing. It doesn’t matter how slowly or how quickly the pulses arrive, provided you check the three you’re using quickly enough not to miss one.
You could extend this to use all four - because it doesn’t matter where you start, so
1 then 2 OR 2 then 3 OR 3 then 4 OR 4 then 1 = opening
1 then 4 OR 4 then 3 OR 3 then 2 OR 2 then 1 = closing
and this way, you know on the second step which way it’s going.
If it’s either opening or closing, it’s moving, otherwise it’s not. (I put it this way because defining not moving is hard – it’s much easier to say something has changed, therefore it’s moving.

Yes, I get your thinking there.
I suppose I am coming at it from a get-something-simple-going-quickly point of view. Timing could be faffy from my suggestion. Thing is… we dont know what we might learn, so hard to know if it warrants the time of doing a proper job. But the more I think about it, the more useful it might be to others… with daikins etc.
Thinking about how it might be displayed… I expect that on shutdown it gives plenty of closing pulses. e.g. over say 10 pulses always means its closing fully (unit stopping). so the count could be zeroed (if pulse = -1; pulse =0 etc). Then at start. I think it makes a best-guess of where it wants to be, e.g. it opens 24 pulses, and from then on it modulates with 1-2 open or close pulses accordongly. Anyhow, I can imagine adding the EEV position to a graph. It should be very enlightening.

You could add a physical switch to detect the end position, or you could assume that whatever is controlling it just drives it well past one end and then declares that as the reference position.

If you know the steps per revolution of the stepper motor, and the angle over which it travels from one end to the other, you’re almost home and dry. Any count of steps more than this means it’s hit the stop at one end or the other, and the moment it reverses, you know the position. After then, you go by dead reckoning adding and subtracting to infer the angular position, until the next time you count too many steps.

I think all will become clear when you’ve got some data and logged it in some form.

Exactly. We need to see it working in order to know what it does and what is needed. I expect it does ‘drive’ it closed by extra close pulses. After a powercut, surely it has to assume it could be anywhere. On the Ecodan, we can read the position off the screen, but its only updated every minute or two, but a useful tool to see if there is a agreement.

thanks for your thoughts here. I guess a physical complete separation between LEDS and monitor does give extra comfort. I’m assuming not everyone would be happy ‘hacking’ into the EEV cables wrt warranty. I would not bother me. I put resistors direct into the valve plug, so the heat pump should be safe. Anyhow, I am used to luddite LDRs on an EmonTH. Not as proper as opto transistors I guess.

Don’t you mean on a GLCD? Those may well not respond quickly enough to count pulses - depending on how quickly the valve moves (and the steps for full travel).

I mean Light dependant Resistors. That is what I seem to have been using with EmonTHs for pulse counting

I knew what you meant. The emonGLCD also used a LDR to dim the display at night. Speed of response was immaterial in that application, in yours it could be crucial.

From Photoresistor - Wikipedia
“Photoresistors also exhibit a certain degree of latency between exposure to light and the subsequent decrease in resistance, usually around 10 milliseconds. The lag time when going from lit to dark environments is even greater, often as long as one second. This property makes them unsuitable for sensing rapidly flashing lights…”|

Thanks, I had always assumed they were quick. Anyhow photo transistors etc sound a better idea.
I have yet to crank up my old scope to try to estomate the pulse duration

In a 30 years old RS catalogue, I’ve found some numbers:

‘Miniature’ type
Rise time at 100 Lux: 45 ms
Fall time at 100 Lux: 55 ms

‘NORP12’
Typ resistance rise time: 18 ms
Typ resistance fall time: 120 ms

1 Like