-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solar charging #265
Comments
I would like to have this feature too. |
Ill see if i manage it, i have just implementera it with some additional automation rules so i need to check how to extend your solution and if i can do it so it more independable of ev type
//Mathias
…________________________________
From: Anders Höglund ***@***.***>
Sent: Saturday, June 8, 2024 12:10:21 PM
To: jonasbkarlsson/ev_smart_charging ***@***.***>
Cc: Mathias Andersson ***@***.***>; Mention ***@***.***>
Subject: Re: [jonasbkarlsson/ev_smart_charging] Solar charging (Issue #265)
I would like to have this feature too.
@maand75<https://github.com/maand75> If you have a solution, implement it and issue a PR. This is how open source works.....
/A
—
Reply to this email directly, view it on GitHub<#265 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AF6CO5AMOF3DKNBV7VAXRY3ZGLKA3AVCNFSM6AAAAABH5QCWAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVHE3DANBYGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
Classified as General
|
Hi guys, here is my automation to limit output current (A) for tesla it that helps in your effort. I tried to keep it as simple as possible while extracting variables so it can be tested / verified while modeling different conditions.
|
Same topic was discussed in #212. At that time, it was suggested to keep this outside of the integraton and use automations instead. My concern is that there will be a lot of different installations that requires various variants of functionality. It will be diffiucult to verify and maintain. One would need to find a simple enough usage that would make sense for enough people. |
@pluskal, thanks for the automation. Have you noticed any instability problems with that solution? In addition to
|
Not so far. I have been using it for a few months and is seems stable. The only issue with automation is make it "smart"/"automatic". Cases such as:
It is also not convenient solve this using automation when I want to add possibility to lower charging amps when my FVE battery is not fully charged, or the tariff is high (I have high tariff only 4 hours a day but separate time intervals.).
Tesla have ability to set only Amps and that is independent on 1 or 3 phase outlet. 3 phase charging is extremely inefficient because you either waste up to 3*240W, or using solar battery or grid power.
I am using multiple automations in chain to enable / disable "smart" charging. Using module would be more convenient because the FSM can easily store inner state making it more flexible to handle edge cases. |
First implementation of solar power based charging! See pre-release v2.1.0-dev1. The core logic is what was suggested by @pluskal. Now this kind of closed-loop regulation can have problem with stability. It's important that the regulation is done slower than how fast the charger is reacting to new controls. In my case, I have a CTEK Chargestorm 2 charger. It takes about 20 seconds from off to full charging current, and it takes a few seconds to change the charging current. So in this version of the integration, I have included a 30 second delay from that the charger is turned on until the first change of charging current will happen, and changes of charging current will then happen at most once every 10 seconds. The initial delay is maybe not so critical, but if someone has a charger that is slower than 10 seconds to update to a new charging current level, that will probably cause problems. What will happen is that the current will oscillate between the maximum and minimum levels. If this happens, please let me know. |
Ping to @JakobEgPedersen, @RienduPre, @janneho, @AMajland, @tubalainen, @jonasgustavsson, @gijs007, who have showed interest in solar based charging. |
Thanks for the heads up. If I understand correctly, this feature tries to match the grid export energy and adjust the charge speed on the EV charger accordingly? If so, my EV charger (Alfen) has a feature which matches my home's net solar energy export, and uses this data to makes real-time adjustments to the charging speed, to reduce import/export to a minimum. What I'd like to see in EV smart charging, is a feature that takes the predicted solar energy generation in account (including perhaps solar export fees/negative energy prices), and adjust/optimize the planned charging moments accordingly. |
Tjenare! Ok. Thanks for the update. TL:DL - In Sweden it rarely economically viable to solar charge, hence you get more when you are exporting regardless of the spot price. There has been occasion's recently where the spot price has been like almost -1 kr.. Then yea... I boiled water, charged the car, house battery, ran the tumbler and cranked the AC. Anyhooow... Thanks for the feature! Will give a try. |
In finland it is almost always economical to charge in solar. For import one pays spot price + transport price (to grid operator, price varies between operators but for me it is about 7,5c/kWh including vat). Many chargers can be toggled between 1 and 3 phases in middle of charge (mine does). So for under 4,2kW there should be automatical switching to 1 phase charging (from about 1,5kW to 3,7kW). |
@janneho What input control is such a charger using? "Charging current" and "1 or 3 phases"? How fast can the number of phases be changed? Would it be reasonable to limit the change of number of used phases to once every 10 seconds, once every 30 seconds, or once every 5 minutes? |
Some chargers have allready option for this integrated, you just feed in total power, and it adjusts amps and does phase switching automatically. Atleast go-e and alfen does this (i do not remember if alfen can switch phases - really should, as its my employer :) |
Tack @jonasbkarlsson for working on this! |
@janneho I have a major concern related to dynamically changing the number of phases. The OCPP specification points out that "Switching the number of used phases during a schedule or charging session should be done with care. Some EVs may not support this and changing the amount of phases may result in physical damage." I recall that there are EVs (can't remember which one) that if you switch from 1-phase charging to 3-phase charging, the car's onboard charger will short-circuit and burn… Note sure how to handle this. I don't want to contribute to such damage. Edit: After some searching I found two Zappi forum post related to this issue. Would it be reasonable to assume that if the charger support change of number of phases, then the charger is responsible to make sure it executes the change in such a way that no physical damage occurs? |
I think that it is car that charges from 1 or 3 phases. Changing from 3 to 1 phase does not mean that phases are cut away in charger. Charger only signals to car that 1 phase charging is preferred. Same for changing charge current, charger sends signal to car for preferred charge current |
There is a significant difference between changing the charge current and changing the number of phases used for charging. The way to perform change of the number of phases seems to be
The Zappi implementation uses 90 seconds waiting time. You wrote that the go-e charger has 10 seconds as the minimum waiting time. What instructions do they have regarding this setting? Have you used it yourself? |
With Easee you can change Phase during charging, but it won't have any effect until the next charging session. |
Hi Jonas, I also have the go-e and it just defaults to 10s. There is nothing in the documentation that states why / reason. But usually you have it set to auto switch phase based on load power in W. If it's above 4200W (defaults) it will switch from 1 to 3 phases. I think the Solar integration here is almost there. What you COULD do is to have a phase sensor that is either 1 or 3 or on/off that indicates how many phases to use. Remember it has to be 3 phases when normal charging is done as it always charges at max power, while on solar it should calculate. Based on this sensor, one should create an automation that switches or sets phases on their charger. |
Yes i have. It stops charging for 10s (or whatever time is configured), and starts again with newly configured phase setting. |
EVCC docs has good information about different chargers. HERE Maybe it can help someone on this. |
@woopstar What does the above mean? Can you use power in W as input, instead of current in A, to the go-e? Or does it mean that can set the current to less than 6 A, and if you do, it will automatically change to 1-phase (if you have set psm=auto)? If it is the first case (charging can be controlled by wanted power instead of wanted current), then it would open up a different way to control the charger. Not sure if that is preferable, if it can only be used by some chargers. If it is the second case (lower the 6 A desired current will make the go-e automatically switch to 1-phase), then the current implementatin (v2.1.0-dev1) will be sufficient for go-e, right? |
A possible solution that could worked with several chargers is
|
It has PV-surplus charging in charger (eco mode). So you feed in your total input power (for whole house), and if it is negative (export), it starts charging and tries to keep export at zero (setting current and 1/3 phase). So it already has this function that we are here discussing buildt in. See this, and PV-surplus example. Not all chargers have this, so home assistant is used to automate this. EDIT. I am thinking that maybe it would be better to use energy sensor. For now we have hourly balance and it is going to 15min in future. Just try to keep import and export equal for every hour (add amps if there is more export than import and vice versa), and hourly balance does rest, |
With easee you can also change it during charging. It only takes calls to set_dynamic_max with the current for each. If you set the current for all phases (above 6) my VAG MEB car vill charge with all phases. If i then set two of them to zero. it will stop charging and resume on one phase. My automations has evolved a bit since this - but the principle is still the same https://gist.github.com/AMajland/6ffc6814df2a92e99cff2c901447efee A helper that decides how charging is done. Automations to change the charge mode (ie from 1 to 3 phases and back) and another to set the current depending on the charge mode. I now also use EV smart charging as an input and have added a mode for negative spotprices |
At least in Denmark we are charged immediately. The tarif's and spot prices are by the hour (and might switch to 15min) but with solar charging you wants to match the current so as close to zero goes trough the meter. Two principles are used in meters here. Either one that measures each phase independently and one that looks at the sum of them all. All with solar can get the second one (at their own cost) So if i i.e have 3 phased solar producing and the house appliances taking a bit i might have an export of 6,5,4 A In that case i want to charge with as close as possible to 15A on a single phase. And it should drop as fast as possible when i make myself a cup of coffee or a cloud passes by |
As far as i know the charger only signals the max current by the pulse width signal, but do not have any way of signaling prefered phases. It is my understanding that when you change the settings the easee charger will stop the charging and then change the relais arround before allowing the car to charge again. It also allow to draw power for one phased charging from any of the 3 phases. Thats the reason that there is more than 3 relais so i.e 3 chargers on the same circuit can allow 3 cars to charge one phased and the same time with an even load on the circuit |
So it is charger that cuts power from two phases then. That propably is the reason that charging is interrupted, then relays cut power to two phases before continuing. If charger is dumb enough to just cut power from two phases middle if charging, i can understand that domething can gi wrong then. |
@AMajland Do you know how long the easee charger waits after stopping the charging until it starts charging again?
@janneho The problem is when the charger turns on the two unused phases. Apperently there are some old versions of Hyundia/Kia cars that short-circuited the two unused phases during 1-phase charging, and did not remove the short-circuit in a proper way when the charging was stopped. So that's why Zappi have implemented a 90 second delay in order to give enough time for those cars to remove the short-circuit. |
That is different from what we have here. Your import and export is metered in hour level, then export is subtracted from import and that is what you pay for. Also it does not matter how import/export is divided in different phases. So here you can have 1 phase pv system, and export continuously in one phase, and have import in two phases. It still cancels out in hourly level. |
In my experience it takes around 20s for the whole process (ha scans every 10s and i don't se more than 10-20s drop in power consumption as read from my meter)
and my automation continues adjusting the max_dynamic current 3 times a minute forcing the car to follow. If there is an residual current error or the car draws more power then allowed the chargecan open the relais. But in normal operation it should not do that |
I can only speak for my Easee charger with my MG5. I don't use the "switch" functionallity to switch beween 1 or 3 phase charging. I set the A on two phases to 0. When doing so it will stop the charging, waits a bit and then starts charging on one phase again as described earlier. But to make it safer for yourself, maybe you can include a switch like "my car supports switching between 1P and 3P charging". If this is opt-in, people wouldn't get their car shortened because of this automation. What I think would be important to avoid constant changes between 1 and 3 phase charging is to account an existing home battery into account. Maybe you could let us decide which SOC we would like to retain for the battery. If SOC is above, charging can be a bit more aggressive. If below, charging should be less aggressive that the home battery also gets solar energy to charge. |
Hi,
would be Nice to integrate solar power so the car starts to charge depending on how much solar power you are producing
I have done this already in my own integration but through it would be a Nice additional feature to add?
If you want i can show you how i have implemented it.
The text was updated successfully, but these errors were encountered: