How to charge an EV using Solar, OCPP, and EVCC

How to charge an EV using Solar, OCPP, and EVCC

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI

Оглавление (3 сегментов)

Segment 1 (00:00 - 05:00)

My problem started when I bought this car. As an electronics engineer, I didn’t want to leave this planet without owning an electric vehicle. With its 650 horsepower, it’s a thrill to drive — and with 3. 8 seconds from 0 to 100 km/h, or 60 mph, it reminds me of my sporty motorcycle. The car is a Smart #5, BTW. But what was the problem? I had to learn a lot of new things, mainly how this beast's charging really works. Particularly because I wanted to use my solar power for it, a wormhole opened. Perhaps this video helps you avoid problems, or consult a colleague or neighbour if you don't intend to buy an EV soon. Grüezi YouTubers! Here is the guy with the Swiss accent, bringing you a new episode with fresh ideas around sensors and microcontrollers. Remember: If you subscribe, you’ll always sit in the first row. In this video, we’ll uncover many secrets of EV charging, like: • How EV charging actually works • The different connector types and how they communicate with the car • How wallboxes operate, and what to watch out for when buying one • Common pitfalls if you want to use your rooftop solar power for charging • How to control wallboxes with the open OCPP standard • And how to integrate everything with EVCC and Home Assistant Since I live in Europe, some details might differ in other regions, but the principles seem to be universal. Let’s start with my new car. It can charge with up to 400 kW DC or 22 kW AC. Here, we’ll focus on AC charging — that’s what we typically use at home. To charge on AC, you need a wallbox and a cable. Fortunately, everything is standardized: In Europe, we use Type 2; in the US, NACS connectors. They’re not compatible, but for this video, that doesn’t matter. The first thing I learned: Wallboxes are surprisingly simple. They mainly switch power on or off and include safety circuits we won’t cover here. Three main limits determine how fast your car charges: - Your home installation - The wallbox - And the car Because they’re all in series, the weakest link sets the overall limit. In my case, the car supports 22 kW, but my home only allows 11 kW. Most modern wallboxes support at least 11 kW — so my home is the bottleneck. (We’ll see later why that’s not always true. ) But how does the car avoid blowing the fuses by pulling 22 kW? Interestingly, it’s not the wallbox that controls the charging power — it’s the car! How? The wallbox announces its capabilities through a 1 kHz PWM signal on a specific pin. That signal tells the car the maximum current it’s allowed to draw. So all the power electronics are located in the car. Let’s take a look at the connector pinouts. The primary difference between Type 2 and NACS is the use of DC pins. Type 2 has separate ones, while NACS uses the same pins for AC and DC. This is easier in the US, as homes typically have only two phases, unlike the three found in Europe. That is why Type 2 connectors have independent pins for AC. Another difference is that NACS uses the connector shell as a protective earth, whereas Type 2 has a dedicated PE pin. The remaining two pins are “Proximity Pilot” and “Control Pilot. ” The Control Pilot pin carries the PWM signal mentioned before, and also is used by the car to indicate whether it is ready, charging, or to report an error to the wallbox. The pin lengths are deliberately staggered: PE (Protective Earth) is first to connect and last to disconnect. AC or DC Power and CP are in the middle. PP (Proximity Pilot) is the last to connect and the first to disconnect. It ensures that no power is delivered

Segment 2 (05:00 - 10:00)

if someone accidentally pulls the plug. The signalling cannot be more primitive: PP uses one resistor to ground, and CP uses 2 to pull down the voltage to defined levels. 12V is unconnected, 9V is ready, and 6V is charging, while 0 volts indicates an error. Perfect — now we can charge at 11 kW, as long as the car is near the wallbox. Most modern wallboxes come with an app and an RFID tag, allowing you to start or stop charging and prevent your neighbour from freeloading. However, there are more challenges. First, solar power is only available during the day. And second: That energy is limited and also powers your home or charges your home battery. The first issue is partly a planning question: Should the wallbox be installed where the car park is at night, or where it is parked during the day? In the future, we’ll probably realize that charging overnight is convenient but not the most efficient option, and wallboxes should be mounted in your company’s car parking. This would create another benefit: Companies usually pay much less for electricity than private homeowners. In my case, it’s fine — my car is usually parked at home during the day, too. The second issue is more serious: Solar power isn’t constant. To use all available energy efficiently, the charging power must be controlled dynamically. Most modern wallboxes support remote control over Ethernet, Wi-Fi, or Modbus. Unfortunately, many use proprietary protocols — not what I want. I use OCPP, version 1. 6J (“J” for JSON). This standard is public, but not very precise. Like USB, it allows many options, and manufacturers interpret it differently. And some even implement it incorrectly — bad luck if you plan to control your wallbox remotely. If you buy from a reputable brand, you’ll probably be fine. Not so in my case. I took another route: A colleague wants to import Chinese wallboxes — a perfect learning opportunity for me, because I only learn if things do not work. Let’s dig into how the protocol works. One important thing to know: OCPP is based on web services. That means the wallbox must initiate communication — the server can’t contact it directly. Once the wallbox connects to the server’s address, the server can send “requests,” and the wallbox replies — usually with “Accepted,” “Rejected,” or with data like voltage, current, or total energy delivered. So, in technical terms, the wallbox is the server and the remote control “server” is the “client”. Not easy. Then came the next surprise: Wallboxes are sold with their maximum power in big letters — but they also have a minimum current, typically 6 A or about 4. 1 kW. That’s higher than I expected. Why is that important? My two solar arrays produce only about 7. 5 kW peak, and part of that powers the house — so, during most of the day, 4. 1kW would be more than the spare energy and the wallbox would pull a lot from the grid, even at that minimum level. Not what I want. Fortunately, there’s a small loophole: These boxes can also operate on a single phase, lowering the minimum power to around 1. 4 kW — much better for solar-only charging. Unfortunately, the peak power drops below 4 kW on one phase only, making overnight charging impractical. Luckily, a few models can automatically switch between one and three phases — but it's essential to know this before making a purchase. Now we can finally charge using solar energy. But who sends the control signals to the wallbox? That’s where software comes in. And that’s why we wanted OCPP in the first place. Also here, you can get proprietary software. But again, not what I want. Home Assistant could do the job, but there’s a cleaner way: EVCC. It’s open source, though not entirely free. If you use OCPP, you need a sponsor token, which costs two dollars per month, or 100 dollars for a lifetime.

Segment 3 (10:00 - 12:00)

That’s fine with me. Commercial solutions are more expensive, and I prefer supporting young developers of open-source software. If you know other options, let me know in the comments. EVCC can read data from my Huawei inverter, battery, and smart meter, and adjust charging dynamically. It lets me choose between “solar only,” “fast,” or “mixed” modes. It supports many solar systems, wallboxes, and other devices — and even works with solar forecasts and variable tariffs. Some experimental users even use AI to optimize charging based on forecasts, consumption, and tariffs. Very cool. Since Home Assistant is my primary home automation tool, I run EVCC as a Home Assistant add-on. As a side note: Before I had a working system, I had to solve many problems you probably will not have: I had to build a wallbox test tool to test the unknown wallboxes. And an EV simulator, because I was not able to park my EV in my lab for testing. Frequent viewers know that my parking lot is in an atomic bunker outside my home. To integrate the wallbox into my house, I had to hack the communication between the Huawei smart meter and the inverter, and build a Modbus proxy to fake the smart meter data to include the charging power. So, no, I wasn’t lazy over the past months! And you can benefit from all that work. First: They are all on GitHub. And second: Because all these projects were created with AI assistance, I will create a video to show you how easy it is to use these new tools and dive into this wonderful new world. In parallel, I also built two iOS apps and wrote a SIP server and a network management tool for a tiny MikroTik router using AI. All will be part of this new video. If you are interested, I’ll create a video on how to build an EV simulator that can connect your coffee maker to a public wallbox! Today, we learned: • How to charge an EV using your solar power • What connector types exist, and how they communicate • How wallboxes work — and what to watch out for • How OCPP enables open control • And how EVCC and Home Assistant tie it all together That was all for today. As always, you find all the relevant links in the description. If you found this video useful or interesting, please support the channel. Thanks for watching, and see you in the next video. Bye!

Другие видео автора — Andreas Spiess

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник