OEM based electric vehicle charging

Hi all

Having just bought an electric car, I was looking into the options there are for charging it at home. There are subsidised chargers available from £200, but I thought I'd look at open-source options. I looked at openEVSE, which looks great, but I've already got a load of OpenEnergyMonitor stuff monitoring all sorts of things in my house for my website (http://www.redelectrical.co.uk/solar-iboost-heatpump-monitoring/).

I found a guy selling all sorts of EV charging components via his website http://evbitz.uk, including a Mainpine  Electronic Protocol Controller (EPC) that handles all the charging of the car. The EPC has a control input to set the charge current that is advertised to the vehicle. This has an internal 1K pullup resistor to its 5V supply line. You simply connect a resistor between it and ground to create a potential divider and set the charge rate between 7A and 32A.

I built a simple circuit using a X9C102PZ digital potentiometer and a partly-built emonTx V2 on a breadboard and wrote a sketch that varied the charge rate. I've developed it a bit and put it on a veroboard.

It now has the following features:

  • Proportional charge rate between 7A and 32A depending on surplus PV generation (measured using CT1)
  • Measurement of charge rate using CT2
  • 3-stage boost facility using push button to cycle between 'spare' power only, minimum 9A boost, minimum 16A boost and 32A boost.
  • Two-colour LED to indicate mode operation (green = pilot relay on, number of red blinks = mode)
  • Upload of charge amps, watts and boost mode to emoncms.org

I initially looked at using an emonTX v2 to receive the packets from the existing monitoring, but then decided on a standalone system with its own CTs as this would be more reliable.

I built the emonTX without the CT3, pulse and temperature circuitry to free up some IO pins. I then put headers on it so that I could stack a veroboard on top. The schematic of the EVSE 'shield' is attached, along with photos of it on veroboard. I used a 555 timer IC to debounce the boost switch.

I later found that the car sometimes failed to respond to the EVSE telling it to charge. I found that unplugging the car and plugging it in again fixed this, so I added a small relay board that I bought from eBay. This disconnects the pilot pin of the EV plug when not in use.

I do currently have an issue with false triggering of the boost switch, which may be due to the volt drop when the car starts charging, or noise inside the EPC enclosure.

The external enclosure houses the Mainpine EPC, small relay board, mode indicator LED and boost switch. The other enclosure houses the emonTX and EVSE shield. In the main consumer unit there is an 8V bell transformer for the voltage measurement and a 5V DIN rail power supply for the emonTX board.

I've also attached the code.

Hopefully all this makes some sense, it's not intended to be a 'proper' write-up but I'm aware of others with similar projects so I thought I would put this up in case it inspires anyone.

Stuart

 

Robert Wall's picture

Re: OEM based electric vehicle charging

That's a pretty impressive build.

I'd certainly reduce the value of the pull-up resistor on your push-button switch - 100 kΩ is excessive, and, depending on the contact material inside the switch, you may well have reliability issues if there's no wiping action and not enough current to 'wet' the contacts. 1 kΩ - 10 kΩ would I think be more appropriate. You could also add a small capacitor (say 100 nF) across the input to GND which should help to minimise and noise pickup (which is surely not hindered by the 100 kΩ pull-up).

TrystanLea's picture

Re: OEM based electric vehicle charging

Thankyou for sharing Stuart, I'd like to try this myself, got a leaf here :) although the 3kW charger version so can only vary from 7-13A. Great to see this!

stureid's picture

Re: OEM based electric vehicle charging

Thanks for the feedback Robert, I am a bit rusty with electronics so it was a bit of a re-learning curve. It's 20 years or so since I last used a veroboard! I'll take your suggestions on board and see how it goes.

Trystan, I got the digital potentiometer and DIN rail 5V power supply from Farnell. Everything else is fairly generic so I got it locally. I had to set the minimum charge at 9A because my Zoe wasn't happy with anything below that.

 

nrgbod's picture

Re: OEM based electric vehicle charging

Looks good Stuart. How are you working out how much of your solar is spare solar power? Or are you using all solar power as spare?

I have a similar setup working sending 6 to 16 amps to my 3.6kW LEAF and 7 to 14 amps to my Ampera electric car using a Mainpine EPC. However I had a couple of Rolec chargers fitted for free on the government scheme through www.nuworldenergy.co.uk.

I already had the EmontxV3 setup near the consumer unit so used that to send the amount of spare solar power to  a Funky V3 which is mounted on a piece of veroboard with power supply and MCP4261 potentiometer. Like your setup the potentiometer sets the mainpine epc to tell the car what current to take.

The part I have been struggling with is trimming the efficiency of the software.....it needs to react quickly to changing amounts of spare solar so as not to waste any but also the reactions to passing clouds needs to be dampened so the charger is not switching on and off too often. Mine will cope with things like the oven reducing the amount of spare PV power but as yet I havent figured out how to make it switch off when the induction hob is rapidly cycling the amount of spare PV other than to manually switch it off.

I have a manual boost in the form of a rotary switch on the Rolec which selects between Auto, 6A, 10A, 16A or 32A depending on car.

stureid's picture

Re: OEM based electric vehicle charging

Hi nrgbod

The system uses a CT clip on the tails. This measures the spare PV because my PV inverters are connected via the house consumer unit.

I have implemented a minimum charge time of 60 seconds in my arduino sketch, to reduce short cycling due to cloudy days or intermittent loads.

However, at such times I often put the charger into mode 1 (minimum 9A charge) and live with the fact that there are short periods when the car is charging from the grid. It's only 9A after all and the majority of the charge is powered by the PV.

I suppose a more desirable setup would be to write a sketch that resets the minimum charge time when there is excess PV again, i.e. the charge would not end if there has been surplus electricity in the last 60 seconds. I might just do that this week - I'll post the sketch if I get round to doing so.

 

nrgbod's picture

Re: OEM based electric vehicle charging

I also reset the timers in my sketch. They keep restarting the shutdown timers unless the spare pv is below a set value and not rising.

See the attached sketches which might give you some ideas.

SnaxMuppet's picture

Re: OEM based electric vehicle charging

Have any of you spoken to Dave Davies about this? He is working on a similar project. Get him on Twitter @dodavies. 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.