I would like to control my water heater element with a power controller. The controller requires 0-5V DC to control the element output.
At present I use Node Red to control two relay units to provide 500W to 1500W when there is enough solar.
I was hoping to use a Click analog output module (ADAC Click) atop my raspberry Pi but am struggling to work out how to control the output module.
Should I use I2c or GPIO?
Information provided is here: ADAC Click | Mikroe
Out of curiosity what is the controller you are using ? . Looking at the data sheet for the AD5593R the chip used in the ADAC, I2c would be your best bet as the chip looks like a straight forward DAC/ADC - Iâm not a expert on the PI and I2c.
Dave.
You could also look at the energy diverter by Robin (@calypso_rae) documented in âLearnâ. The basic logic would require very little change to output a 0 - 5 V signal (using a 5 V Arduino of course, not a Pi), which would feed your power controller directly.
Youâd still need a DAC though, right?
Not if the PWM output is used, but a rudimentary low pass filter will probably be necessary.
Hi Dave,
When I get home I will reply about the Power controller. Where would I look for good I2c documentation?
Hi Robert,
Thanks for this heads up. My Mk1 approach had the Arduino generating a DC control signal which (via a voltage doubler ) went to a proprietary controller. The main improvements for the Mk2 are its ability to use an inexpensive output stage and its rapid response time.
Sorry I havenât checked this thread in a while, a link for the AD5593R can be found here http://www.analog.com/media/en/technical-documentation/data-sheets/AD5593R.pdf
For I2C in general the Node-Red group is very good Redirecting to Google Groups scrub that itâs moved to https://discourse.nodered.org/
Dave.
I have a 16A Eurotherm Efit controller to control the energy consumed by the Hot Water Element. Slowly getting my head around the AD5593R and communicating using Node-Red. Thank you for your help.
Updating this project
I have put the ADAC Click board in the drawer and purchased a DAQC plate from Pi Plates.
Using node-red-contrib-pi-plates I now control the Efit controller using node-red-node-pidcontrol .
This allows me to use the available solar energy on heating my hot water cylinder.
I have an issue in that the PID control still operates when I send no signal to it. This causes the output of the PID control to lower during the night time period as it attempts to correct the error. When the solar arrives the PID output must increase to start to operate the controller again. Have not had much luck with any of the PID controllers on Node-Red. Can someone help?
Thatâs what you had, now you have a PID controller. It sounds to me as if you have the PID set up wrongly - presumably the output is the proportional input to the power controller, it should have two inputs, a setpoint and a measured value. Where are those inputs derived from?
Hi Robert,
I monitor the consumption by the home via mqtt and the emonpi. When the consumption is negative I am exporting the power back into the grid. I invert this value so to provide a positive input into the PID Node. E.G 0-2500 Watts of generation. Lets call this âspare capacityâ.
The setpoint (200) is set in the PID node.
This provides a buffer between the solar generated and the consumption (200 watts).
When the solar lowers the PID lowers the energy supplied to the water heater to keep to the setpoint of 200W.
This works until the spare capacity input goes negative (Actual consumption positive)
At this point the PID tries to provide a negative value to lift the actual to the setpoint. As time goes by the output grows.
This causes a delay relative to the output growth before the PID output starts to turn on the Power controller. This could be 2 hours after an evening of darkness.
To correct the issue I just need to restart Node-Red by a redeploy.
How do I make contact with the creator of the PID Node so I can ask for assistance?
Or maybe I have the control system set up incorrectly. Whenever I try to use another PID node I struggle to get control.
I have a screen capture of the flow. How do I attach it?
You attach by dragging and dropping, or click the âup arrowâ icon above the box youâre typing in, and find the file. But while I know about real PID in the real world, I know nothing of Nodered, so thereâs no point.
I canât quite see why you actually need the I & D terms. The I term will be the one causing the trouble - itâs there to provide long-term stability of the measured value, but I canât see the value of that - once the energy has gone through your meter, itâs gone. And the D term is there to give it a kick in the right direction when thereâs a step change. But likewise, I canât see the usefulness of that. So can you set the coefficients for those down to zero?
Or do you throw away the PID controller, and do straight proportional control? (Which should be the same as setting the D & I components to zero anyway.)
Or can you clamp both the setpoint and the spare capacity input to zero (or 200) when you are not generating? If the maths in the PID controller is correct, that should freeze the output - but if it happens to be non-zero when the inputs are clamped, youâll need to clamp that to zero too in order to turn the heater off.