Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Automate Charging Based On Solar Output

This site may earn commission on affiliate links.
[Apologies if this has been covered previously. My searches didn't yield this topic getting too much discussion.]

My wife and I took delivery of a Model Y almost 2 weeks ago. We want to charge based on "excess" solar coming off the panels - power that under normal circumstances would go back to the grid. Our primary motivator is to see if we can satisfy our car needs using truly renewable power (i.e. trying to avoid power that is generated from other sources such as natural gas, petroleum or coal).

I've written a program that looks at our meter and adjusts car charging based on whether we're returning power to the grid or pulling from the grid. No special car charger is required. (We charge with a NEMA 14-50 cable.) In the configuration we're using we have a small box from Rainforest Automation (Eagle-200; ~$100) that connects to your smart electric meter. The code I've put together can be run on whatever you have lying around. I'm using a Raspberry Pi.

Below find a link to a short blog post on the solution. I'll be giving the sw away (probably through GitHub) once I clean it up a bit and make various settings and configurations better documented. If there is sufficient interest here I'll add a response to this thread when it's in a more usable state.


Jim
 
Nice work! You might want to add some code to help with charging efficiency. The charging system in your car does not operate at the same efficiency at every amperage. Generally the model 3/Y are more efficient above 20A but it depends on other factors such as ambient temperature and battery temperature. We found the maximum efficiency between 32 and 40 amps. Our solar system rarely puts out 20A over and above what the house is using. Controlling the charge rate and times can be useful for other reasons, too. Now that you have your system in place you'll probably be adding code on a regular basis!
 
[Apologies if this has been covered previously. My searches didn't yield this topic getting too much discussion.]

My wife and I took delivery of a Model Y almost 2 weeks ago. We want to charge based on "excess" solar coming off the panels - power that under normal circumstances would go back to the grid. Our primary motivator is to see if we can satisfy our car needs using truly renewable power (i.e. trying to avoid power that is generated from other sources such as natural gas, petroleum or coal).

I've written a program that looks at our meter and adjusts car charging based on whether we're returning power to the grid or pulling from the grid. No special car charger is required. (We charge with a NEMA 14-50 cable.) In the configuration we're using we have a small box from Rainforest Automation (Eagle-200; ~$100) that connects to your smart electric meter. The code I've put together can be run on whatever you have lying around. I'm using a Raspberry Pi.

Below find a link to a short blog post on the solution. I'll be giving the sw away (probably through GitHub) once I clean it up a bit and make various settings and configurations better documented. If there is sufficient interest here I'll add a response to this thread when it's in a more usable state.


Jim
Aloha, I'm very interested in your solution. I'm trying to figure out how to manage a fluctuating solar output ( we're off-grid) . The model 3 wi;; be fine when system is at it's peak ( 6kw 24amps, 240v outlet) but afraid car will have a "fault " when a cloud passes over etc. Car id supposedly coming this summer. Trying to find best solution. (6.1 kw, outback inverters , flex 80 charge controllers , Mate 3 monitor system using Optics RE for web monitoring) Mahalo! Jim
 
Aloha, I'm very interested in your solution. I'm trying to figure out how to manage a fluctuating solar output ( we're off-grid) . The model 3 wi;; be fine when system is at it's peak ( 6kw 24amps, 240v outlet) but afraid car will have a "fault " when a cloud passes over etc. Car id supposedly coming this summer. Trying to find best solution. (6.1 kw, outback inverters , flex 80 charge controllers , Mate 3 monitor system using Optics RE for web monitoring) Mahalo! Jim
I've made some changes to it to make it more efficient and reliable. I've got to clean it up and I'll put it on GitHub.

I'll let you know when the new version is up there.
 
  • Like
Reactions: relaxjim
Very cool and useful!

FYI, here's another such program, and maybe an opportunity to swap techniques:

 
  • Like
Reactions: Haselsmasher
Very cool and useful!

FYI, here's another such program, and maybe an opportunity to swap techniques:


Thanks for this! ^^^^^ I hadn't seen the post about TesSense. I really like the fact that uses a more mainstream piece of hardware to determine if there is excess solar being produced. (Sense, I think, has much more presence in the solar/energy monitoring space than Rainforest Automation does.)

A new version of Suncatcher has been put up on GitHub:
 
  • Like
Reactions: Transformer
It's interesting to re-read these posts. I've continued to evolve our charging automation and have arrived at what seems a reasonable balance between fully-automated and manual. I tried to live with fully-automated charging (and charge rate), but too often found our energy use habits required manual intervention with charging. Being off-grid means it had better be right, else we'll have to use the generator.

Where I ended up is a model that lets me specify a charge rate (exactly the function the Tesla app provides) or to automatically adjust the charge so as to consume the max power possible without causing the house battery state of charge to decline. The automation adjusts this every two minutes based on available PV power and other consumption in the house.

If the PV forecast shows days of little energy, I like to top up the batteries and may set the car charge rate to zero or 5A. Other days, I'll let the home battery get to 80% and then set fully automatic mode, where the home battery will be at least 80% when charging is complete or, if there's plenty of solar, the car will charge at max 7kw and the home battery will also charge at up to 10kw.

To me, this is the right mix of automation that doesn't always get in the way. That balance will be different for others.

Technology involved is node red (and the Victron and Tesla nodes), OpenHab3 for the UI and mqtt to integrate them. Useful info on the energy forecast is from Solcast.com.au.

A recent "enhancement"... really a bug fix, was to check if the car is awake and bail if not. I was preventing it sleeping.


Untitled.jpeg
 
  • Like
Reactions: Haselsmasher