Regulator: stealth-ultd's project #1
Replies: 61 comments 13 replies
-
Hi. my project reads the Smart Meter. With zero-export there is no way to know how much power would be available. You would need to know how much power would be available without dynamic reduction. I think this information is not available anywhere. I think the MPPT configures the parameters, but there is no way to know how much would be produced with optimal parameters. I added the secondary Smart Meter for SolarWeb data and I used it to fine tune the calculation of consumed power done in Arduino from CT readings (ElSens.ino). |
Beta Was this translation helpful? Give feedback.
-
Maybe one way would be to ramp the consumption until Smart Meter reports that power is draw from grid and then regulate to some small power draw from grid. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
the SunSpec has status I_STATUS_THROTTLED. So until status is THROTTLED the consumption can ramp up. (or until max power is reached). |
Beta Was this translation helpful? Give feedback.
-
Although little detail is available on how the Ohmpilot exactly manages this, others report indeed a gradual ramping up of the power. Will explore this a bit further. |
Beta Was this translation helpful? Give feedback.
-
I didn't commit the code yet, but I replaced the Kemo modules with a Triac dimmer |
Beta Was this translation helpful? Give feedback.
-
Good to know, that makes things more simple. Does the Triac dimmer also eliminate the need for the Grove MOSFET module? |
Beta Was this translation helpful? Give feedback.
-
I already forgot that I used a MOSFET :-). I had the MOSFET only for 3.3 V boards (Wemos D1 R2 and M0). I didn't use it for AVR boards (Uno (WiFi) and Mega). Same applies for the I2C ADC. to other hardware: I had the I2C ADC for esp8266 (D1 R2) because it has only one and not very good analog port. The Chinese relays don't last long. One, maybe two seasons. First they start to generate strong EMI which disturbs the Ethernet chip. Finally they stop switching. I plan to replace them with DIN rail relays with 230 V coil switched by the new Grove 230 V sold state relay modules. I have an ATmega1284p board ready to use with Regulator but no time to put it in and test. I want to test the Triac control with AVR and revisit AVR analogRead. If the AVR doesn't turn out fantastic, then I will return to SAMD, but not to M0. I plan to buy the Arduino MKR Connector Carrier (Grove compatible) and MKR ETH shield for my MKR Zero. The configuration will better fit in the box and I hope it will be less sensitive to EMI with ground lines not going over the Eth Shield like with Grove Base Shield. |
Beta Was this translation helpful? Give feedback.
-
That’s quite some modification going on in the background! Some thoughts before updating my component list :-) The Chinese relays failing with lots of EMI likely points to sparking (bad contact). Apart from maybe suspicious component quality, one other source could be low activation voltage / current. The relays have an operating voltage of 4.75V~5.25V at 185mA . Especially when driven with 3.3V boards the combination of voltage / current available may just be not enough to properly trigger them (two of them: 0.4 A, which is quite a draw on those boards). That had made me think of using a "30A 1-Channel Relay Module with Optocoupler H/L Level Triger”. They can be independently powered with 9 or 12 V directly from the main power supply, while the signal (3.3 or 5V) comes from the MCU. Have you maybe thought of that option too before considering the solid state relays? I am curious how well the CT reading works at higher powers, as the CT is “only" rated at 5A and has to operate at nearly 9A (2kW). It may experience saturation of the (ferrite) core and give a distorted waveform (harmonics). I don’t know if this explains some of the CT readings at the SAMD (M0) or that something else is at play there. EMI may in general be a plague due to all the switching electronics (SMPS, PMW, …), so I was planning to add (larger) ferrite cores to filter EMI on all the cabling getting in and out (power, ethernet, etc.) and where necessary on the internal connections. Also I have been wondering about the connection with the inverter – I was looking at ModBus RTU, rather than TCP. We have the Fronius smartmeter already connected over RTU and extending it to the regulator may be easy – and less prone to possible communications errors from all the other “talk” that is going on over TCP (router, laptops, etc.) or EMI. I found some small Modbus RTU controllers that may do the trick. And I am still in doubt about the Robotdyn triac dimmer versus the Kemo 150/028N module. The fist being inexpensive, but maybe underrated (or: overstated!) with risk of blowing out / the second supposedly more solid but significantly larger and expensive. Not sure where to go here. (In any case, both benefit from EMI chokes, the 028N has an extended filter design in the manual included.) The Arduino MKR looks like a good choice indeed, especially with its small form-factor. Nice suggestion, I consider jumping on that one immediately. I guess this has no immediate effects on the sketch, as that all should be compatible? |
Beta Was this translation helpful? Give feedback.
-
all boards I used in the project have a regulator and the power source is good. The planed MKR Connector Carrier would be even better. The Grove modules get only the signal from MCU, the power is from regulator in my setup. the Grove CT is to 10 A. the datasheet has wrong calculation of ratio. For SAMD I measured only half of the current (see the dashed line in 'schematics'). With Smart Meter you can't use Modbus RTU because the inverter is Modbus RTU master. In some moment of understanding I realized how unnecessary complicated is to go over the Kemo modules. First PWM to digital pot and then the regulation module controlde by the pot. The direct control of Triac works fantastic. It is very exact compared to commanding the modules by PWM. The formula to calculate the period for available power is simpler and cleaner. I installed the Triac in Jun so it worked all Summer. Yes the MKR Zero is compatible with the Regulator sketch. |
Beta Was this translation helpful? Give feedback.
-
I made the commit of the code with dimmer module support. and some development utility sources |
Beta Was this translation helpful? Give feedback.
-
This is very helpful - thanks. You convinced me about direct control via the Robotdyn triac, will surely include that ;-) Regarding Modbus RTU – I had missed that. Indeed, no other option than TCP. As for the relays, I consider to go solid state option completely, for instance with DIN-rail mounted TRA23D25L (they include heatsink). We’ll see how this works. Hardware list now getting complete. |
Beta Was this translation helpful? Give feedback.
-
I think the TRA23D25L are based on a Triac. a 230 V SSR could be used instead of the Triac module for phase cutting. |
Beta Was this translation helpful? Give feedback.
-
Before the Kemo modules I had power regulation box controlled by PWM signal. It was based on a Triac and some MCU. I didn't understand phase cutting then. The cooler in the box was heating-up to very hot (now I know it is normal) and it didn't get to full power. Full on it enabled 1950 W but with direct connection the heater consumed 2050 W. So I implemented a 'bypass' relay for full power. Now with direct control of the Triac I can regulate from 10 W to 2050 W, but the cooler is very hot at higher regulated power and on full power too. So I still use the 'bypass' for full power and my current algorithm stays in full power even if there is no surplus, if the Fronius battery is over 95% SoC. The Triac based SSR you linked will get hot too. And this SSR can be used to regulate the power with phase cutting and there is no point to use one as a 'bypass'. The specs table says they have 'zero-crossing'. I wonder if they turn of on zero-crossing like a plain Triac. If not, then the MCU would need to hold the pin HIGH instead of sending a short pulse to Triac. My Triac journey started here https://arduino.stackexchange.com/questions/63631/fan-regulator-control-from-arduino/63674#63674 |
Beta Was this translation helpful? Give feedback.
-
The TRA23D25L is based on a Triac. What attracted me is that it is compact, DIN-rail mounted and has a heatsink attached. Reading more about SSR’s during these last days show that they indeed may run hot like you mention – maybe more than I hoped for. We’ll see. This specific SSR has a zero-crossing detection circuit. So it will turn on only at the ZC point. As long as the input is HIGH, the gate will remain triggered, and when the input goes LOW, it will switch off at ZC. To keep it on, the pin needs to be held HIGH. From what I now understand, this is not the best type of SSR for phase cutting. A ‘random firing’ SSR would be better here, because it can be triggered at any desired point of the wave (but will wait for ZC to switch 'neatly' off). Among the many, this article (https://hackaday.com/2017/09/26/an-introduction-to-solid-state-relays/) was helpful summing it up. Probably for power regulation the Robotdyn (with direct control of the Triac) is the most elegant solution (even if running quite hot). And if the SSR keeps cooler, it may be an alternative for the bypass. In any case, I plan to use it for space heating ;-) |
Beta Was this translation helpful? Give feedback.
-
Hello
I have surplus power first in March. Then I plan to add to PowerPilot support for zero export setup if I_STATUS_THROTTLED will be reported over Modbus as expected. Juraj |
Beta Was this translation helpful? Give feedback.
-
Thanks for this! I will try to see how best to implement. ((BTW: In the new PowerPilot the Triac:start(); seems to miss "::" [as in Triac**::**start();] if I understand well?)) In general, I am still reviewing how my setup works (it looks all OK, but had little sun for robust testing!). Once all is fine, I can share my implementation, if you are interested. Currently trying to implement a weather-prediction based night-charging module. |
Beta Was this translation helpful? Give feedback.
-
If you make a git fork of my Regulator repository, then it will be possible to compare and move commits between the forks. |
Beta Was this translation helpful? Give feedback.
-
sorry, I changed it, but it is simpler now. start and stop is handled in setPeriod. I removed the start() and stop() functions |
Beta Was this translation helpful? Give feedback.
-
I am running it since this morning and all looks perfect, thanks! This now saves me from hacking the PowerPilot to make the start/stop work :-) |
Beta Was this translation helpful? Give feedback.
-
Latest state of hardware, with among others addition of a bigger display (Oled SSD1327, 128 x 128). Components used (from left-up to right-down): |
Beta Was this translation helpful? Give feedback.
-
I am implementing WebServer.ino. Two quick questions. Some hints appreciated :-) |
Beta Was this translation helpful? Give feedback.
-
Heating season is on again, so the Regulator has been started up! Plan to do some modifications and fixes. Will report progress (and fork the code when it's sorted out). |
Beta Was this translation helpful? Give feedback.
-
@stealth-ultd Hi, do you have a repository of what you have done until now? I have a zero export installation too, and I am interested only on dimming some heaters with the surplus energy. A simple one without extra features. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Finally – I have now forked the zero-export branch. Was about time :-) |
Beta Was this translation helpful? Give feedback.
-
@stealth-ultd I simplified the power2period formula. It makes more sense now and is faster to calculate (the speed doesn't matter much though). I modified dimmer-dev.ods, power2period.ods and util/README.md too. The new 'ratio' line in chart in dimmer-dev.ods shows the input values for the formula. |
Beta Was this translation helpful? Give feedback.
-
I replaced the speaker module with Grove passive buzzer and I adjusted the beeper frequency to the buzzer's optimal frequency. It is loud when it beeps and completely silent in between. It doesn't catch interference. |
Beta Was this translation helpful? Give feedback.
-
Some months ago I updated some of the libraries used in this sketch, and since the webserver output gives an error (the index page loads, shows the 'Values' label, but for the rest remains blank with a pop-up window telling just '0'. Checked the code multiple times but found nothing obvious. Today I quickly reverted back to StreamLib 1.2.1 and it all works perfectly again. Updating to 1.3.0 gives a compiler error (on MKR Zero) and 1.3.1 breaks the web page. Not sure if this is an issue with StreamLib, or how WebServer.ino or script.js handle the request, or something else. In any case, I thought better to report it. |
Beta Was this translation helpful? Give feedback.
-
Hello, thanks for looking into this! I am out of reach of the Regulator right now, but after the weekend I'll try out the small fix to see if it does the trick. |
Beta Was this translation helpful? Give feedback.
-
Hello. I recommend you changes from commit 3fbee9e |
Beta Was this translation helpful? Give feedback.
-
Hi Juray,
Great to come across this well-documented DIY energy diverter. I am looking at a comparable setup for a Fronius Galvo, with the difference that in this case the utility company does not allow any power-to-grid (=zero export). This is implemented with a Fronius smartmeter (at feed-in point, modbus RTU) and with activation of Dynamic Power Reduction in the inverter DNO Editor settings ("Max. grid feed-in power: = -0.5%"). This last setting may look odd at first, but guarantees that there is always a minimum consumption taking place to avoid any export.
What I would like to achieve is that surplus power can get diverter to a small supplementary heater (1.5 kW) while maintaining export limiting. Now I am not sure how the Regulator interacts with such a zero-export setting in the Fronius inverter.
Two initial questions about this: (1) Is there any reason to assume that the Regulator would not be compatible with zero-export, and (2) is it in any way necessary or helpful to have the secondary Fronius smartmeter (like you installed in 2019/5) for this setup?
Beta Was this translation helpful? Give feedback.
All reactions