JIM HASELMAIER
  • Home
  • Train Alert
    • NoCo Train Alert (Twitter)
    • NoCo Train Alert (Web)
    • Train Alert Dev Team
  • Lift Bridge Alert
    • Lift Bridge Alert (Twitter)
    • Lift Bridge Alert (Web)
    • Mackinac Bridge Cams
  • Suncatcher
  • Blog
  • Contact

Suncatcher:  Coordinating Tesla Charging With Solar Panel Output

12/19/2021

0 Comments

 
A few weeks ago I wrote of a project I was starting that would adjust the charging rate of a Tesla based on the electric production coming from solar panels. The goal is to "capture" excess solar being produced (i.e. power that normally would be sold back to the utility) and direct it to the car. There are two drivers for this goal:
  • Power our vehicle using electricity that was not produced by the burning of other fuels - such as natural gas, oil or coal.
  • Develop a deep understanding of our auto's electricity requirements in order to make a decision to add (or not add) solar panels to our current system.

Since "excess power" can vary widely through the day (solar production can change based on clouds, weather, etc.; and in-house consumption varies as well with tasks such as cooking, laundry, etc.) some form of automated solution is desired to respond to these variabilities and adjust the car charging rate as needed.

The First Half Of The Solution
Prior to the car's arrival I put together some basic code to talk to our Eagle-200 hardware device.  This little box connects wirelessly to our smart (electric) meter and reports whether electricity is flowing to the grid or being pulled from the grid. This is the key information that is required when deciding if the car charging rate should be increased or decreased.

The Second Half Of The Solution
Now that we've taken delivery of the car the second half of the solution has been able to be put into place: communicating with the car using Python. Initial interactions with the car's API was a fascinating experience all on its own. The amount of car information accessible via the API is simply astonishing. More on this will be written in a separate post. In order to implement this project the Tesla API is being used to:
  • Determine where the car is.
  • Determine if the charging cable is plugged in.
  • Initiate car charging.
  • Set charging rate (amps).
  • Stop car charging.

After establishing the basics of how to communicate with the car, work could begin in earnest to debug and refine the software.  After about a week of work the software is now in a pretty stable state - successfully changing the rate of car charging based on leftover or "extra" power coming from the solar array.

The images below show (on the left) a graph of solar production on a recent day and (on the right) a graph of car charging (amps) through the day. All adjustments to car charging (including identifying when the car was physically unavailable for charging and restarting charging on its return) were handled automatically by the software.
​

Picture
Picture
Anyone interested in running this solution is welcome to have it - free of charge. The code needs to be "cleaned up" to make it easy for users to change some settings based on how they would prefer the software to behave (e.g. how often the system checks to see if adjustments need to be made). I will also be putting together some documentation/instructions for getting the system running.

If you wish to be notified when this is ready for distribution please send me an email. I will contact you when it is ready for download. Or watch this site for new blog posts on the topic.

Jim
0 Comments



Leave a Reply.

    Jim's Blog

    Thoughts about Solar Energy, Electric Cars, Train Alert and more.

    Archives

    February 2022
    January 2022
    December 2021
    October 2021
    March 2021
    December 2017
    March 2017
    February 2017
    July 2014

    Categories

    All
    Electric Car
    Internet Of Things
    Product Management
    Solar Power
    Suncatcher
    Train Alert

    RSS Feed

Proudly powered by Weebly
  • Home
  • Train Alert
    • NoCo Train Alert (Twitter)
    • NoCo Train Alert (Web)
    • Train Alert Dev Team
  • Lift Bridge Alert
    • Lift Bridge Alert (Twitter)
    • Lift Bridge Alert (Web)
    • Mackinac Bridge Cams
  • Suncatcher
  • Blog
  • Contact