Loading...
 
Skip to main content

EVSE-Hack

August, 2021

Automatic charger control on an off-grid solar system My house is off-grid with 6KW of PV panels on the roof. I have a custom made power-wall called a monolith. The monolith contains two PIP inverter/chargers each capable of 4KW in or out continuously. Its battery can store 20KWH of energy. The web interface in the monolith is a raspberry-pi 2 (RPI-2) running node-red. I can modify the node-red flow to add my own features. Using node-red I can access near real time information about the state of the monolith. By using information such as the state of charge, battery current and charger mode I compute a cost of power (COP) in the monolith RPI-2. The COP is just a number but you can think of it as cents per KWH if that helps. With sunny weather and little load the COP is typically 30 just before sunrise and -5 after the batteries are full. I deliberately drive the COP negative to allow smart loads to turn on in a sensible order. Node-red allows multiple node-red devices to talk over the LAN. I choose UDP ports to achieve this. Smart devices can request the COP or other information from the monolith.

My first smart load is the charger for my mitsubishi outlander PHEV (plug in hybrid electric vehicle). I bought the cheapest j1772 EV EVSE (charger) I could find on Ebay. It is unbranded and cost about $220au delivered from China. It is supposed to charge at 10 or 16 amps (230V in my case) but I'm seeing slightly lower currents.

Image

The system simply turns the charging on and off by switching the pilot signal with a relay. It is pulled high with a resistor in the off state. The so called "chargers" are really an interface between the car and the wall socket, the real charger is built into the car. The external box tells the car how much power it can have via a 1Khz +-12V pilot signal which varies in duty cycle.

993616e8171e69d5322db0f3e1b9be60

The relay is switched by an i/o pin on a raspberrypi zero-w. A node-red program (flow) decides when to enable/disable to charger and provides the online web interface. The blue line going high indicates the charger is enabled.

July, 2023

Two years on and everything has worked well but I'm hoping to take it to the next level with charging power control.

September, 2024

Success. Remote and automated charging power control is working.

Disclaimer. I thought the chance of damaging my newish EV was low enough to attempt this hack. So far so good but this has only been a minimal trial on one car. Don't attempt this unless you understand the risks to you and your EV. This isn't a beginners project and you need the gear to test the circuit before shoving it in the charge port.

In other good news the EVSE above is still in excellent condition internally. I see no signs of overheating or other damage. My idea for power control was to shunt the end of each control pulse to ground to reduce the duty cycle.

CP1

If the EVSE is sending 266uS pulses the car knows it can pull 16A from the 230V AC supply. If I chop the end off the pulse I can tell the car to use less. The shortest valid pulse I can use is 100uS which corresponds to 6A. A 50uS pulse can also be valid but it has a different purpose. The signal is +-12V but has 1K resister in series, the car usually pulls this down with a diode and a pair of resistors so it will appear as about +6 and -12V.

Cp2

I shunt the end of the pulse to ground (not -12v). I do this with a MOSFET and a diode. The car has a diode at pilot pin so the car's charger should not see the negative part of the pulse train. There may be other circuits on the pilot pin but they should be +-12V tolerant.

Cp3

If I don't have the diode in the shunt the signal looks like this and the "diode test" the EVSE likely performs on start up will fails and the charger will not work.

BB1

The custom circuit only has six electronic components. Two MOSFETs, three resisters and one diode. One MOSFET is used to convert the higher voltage pilot to logic levels to trigger the timing sequence. The other MOSFET is to shunt the pilot to ground at the correct time. I used 2n7000 MOSFETs. They might not be ideal but they are good enough and only 50c in lots of ten.

Nano

The shunt pulse generation is done in an Arduino nano which get commands from a raspberry pi zero W/RPi over a USB link. The white blob of polymorph contains the photo-MOSFET which drives the relay. Previously I used a RPi pin to control the relay but in this version I use an Arduino pin. Note that extra slack is needed in the hook up wires or it won't be possible to open the EVSE lid if necessary.

Rpz

Now all boxed up and screwed onto the EVSE. The Pi has WiFi to serve up web pages and to get information from the monolith.

Box

The EVSE already had the relay from before so the only extra thing it needed was a power supply to power the RPI and the relay. I bought a 240V to 5V/12V PCB but at only 500mA 5V it wasn't enough. I left it in place to provide 12V and used the PCB out of an old USB charger to power the Pi. One could possibly use photo MOSFETs in place of the relay - two because we need to replace a double throw relay.

I expect this hack would cost well under $100. EVSEs are selling for under $200 and some go to 32A. Evgui eddie

Aptera-EV


Created by eddie. Last Modification: Wednesday 13 of November, 2024 10:29:47 AEDT by eddie.

Main Index

Switch Theme

Switch Theme

Shoutbox

eddie, 18:52 AEST, Wed 11 of Sep, 2024: Most pages should be working again.
System Administrator, 08:03 AEST, Sat 10 of Aug, 2024: Lots of images are still broken. I'm working on it. Maybe 1/2 way through.
admin2, 14:05 AEST, Mon 05 of Aug, 2024: running tiki 27
admin2, 16:01 AEST, Sun 09 of Jun, 2024: Wiki running tikiwiki version 27alpha on a raspberry pi-3. About 1/2 the images are missing and most thumbnails not working. Slow manual rebuild. About %20 done.
eddie, 20:23 AEST, Sun 19 of May, 2024: Images moved from wiki_up to file galleries and wiki pages fixed.

Last-Visited Pages

Online Users

148 online users