# Limiting current/power dynamically

I recently installed solar panels and now I was looking at using the energy as efficient as possible. All the energy produced I don't use goes to the grid, I get a small amount of money for that. I never produce more than 2kW at a time. At the moment with bad weather it's more around 200~300 watt.

I was thinking if there was a way to create an outlet that only provides the consumer with the wattage that is left, that I am not using. So I could for example plug in a (custom) heating element that only heats when there is power left that would go to the grid.

So by limiting the current or power dynamically. I'm pretty basic with electrical engineering, so if this is too far fetched or just impossible, that's also an answer.

Edit/Clarification: Let's say my solar panels are producing 500 watts, and my current total consumption is 300 watts. That would mean I would deliver 200 watts to the grid. Instead of those 200 watts going to the grid, I would like an outlet that provides those 200 watts to a consumer (like a heating element).

If my consumption would go up to 400 watts, the outlet would only deliver 100 watts. If my consumption goes over what my solar panels are producing, the outlet just stops "working".

• If I gather it correctly, you want to be able to optionally plug something in to a socket and if there is something there able to draw power, you'd prefer to supply it with power than to supply the grid which pays you far too little. So you want something that can supply whatever load exists on a socket. But anything generated over and above that will be sent to the grid, since it is better to get something than nothing. Kind of a priority thing? Dec 7, 2023 at 13:18
• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Dec 7, 2023 at 14:49
• @periblepsis if this makes it any clearer. I think you got it from your explanation. Let's say my solar panels are producing 500 watts, and my current total consumption is 300 watts. That would mean I would deliver 200 watts to the grid. Instead of those 200 watts going to the grid, I would like an outlet that provides those 200 watts to a consumer (like a heating element). If my consumption would go up to 400 watts, the outlet would only deliver 100 watts. If my consumption goes over what my solar panels are producing, the outlet just stops "working". Dec 7, 2023 at 15:43
• I know how many watts I've got to spend. So what I'm actually looking for is how to make an outlet that just provides the power that I want. I'm a software engineer with some basic electrical knowledge. I just don't know how to go about making a automatically dynamically power supply based on wattage. Dec 7, 2023 at 16:11

Yes this is possible, and is in fact fairly commonly done.

You need current/power sensing on the solar feed, and on the main site feed. You also need a controllable low priority load, such as a water immersion heater in a hot water tank with controllable power draw.

You monitor the net power generation / load of your site on a suitable frequency (often around the 1-10s level, but can be higher frequency), and then adjust the power of the HW tank heating element according to how much "free" electricity is left over.

In terms of how to achieve the power control, there are three main schemes:

• Gross on/off control of the element. This is very coarse grain, and won't be a good match for your application unless you have multiple smaller elements in parallel which you can individually control (to give you stepped load).

• AC control mechanisms. This could be a high-power phase angle controller (like a large lamp dimmer switch) which has either voltage or serial control. Multiple vendors available, or you could even build your own controller out of something like an Arduino.

• DC control mechanisms. You use an AC/DC PSU which includes enough capacitance to even load over multiple cycles, then use PWM on the DC side to provide control of average power to the heating element. You need to match the PSU voltage to the element rating, but there are often high power AC-DC converters on eBay with output voltages in the 100-240V range. You can then use a suitably sized MOSFET to modulate the power to the heating element.

If it were me, I'd go the DC control route, but that is entirely based on kit I have to hand and past experience. The AC route should also work for you, though heavy phase angle controlled loads can interact badly with some solar inverters.

(There is also "burst fire" AC controls which do cycle-by-cycle switching, but this will typically not play nicely with the averaging period of you utility meter.)

• I already have the means to monitor what my total consumption is and what my solar panels are producing, so I know how much power I have to spend so to say. The only thing I don't really know how to do is the "controllable power draw". How do I go about the "adjust the power of the HW tank heating element"? But thanks already for your answer, it is exactly what I'm looking for. Dec 7, 2023 at 15:47
• I have extended me answer to provide additional details, which hopefully tells you what you need. Dec 7, 2023 at 16:57