Speak EV - Electric Car Forums banner

1 - 20 of 158 Posts

·
Registered
Joined
·
1,150 Posts
Discussion Starter #1
Hi,

I'm considering a project to adapt or enhance an EVSE to provide an option to make best use of solar PV energy by actively controlling charge rate without taking energy from the grid.

I've considered a few options, but the one I'm favouring most would be to make use of the EPC-IC feature on the Mainpine unit to actively step up/down the charge rate depending on available surplus. End-to-end the project would look something like:
  1. Some hardware from the Open Energy Monitor project: eMonTx (monitor meter supply, PV generation, and EV Charger circuit). Apply logic here based on the Solar PV Router workstream to activate & control EV charging. Trying to remove the additional sensor requirement to monitor the EV charger circuit but not sure how else to reliably detect if a car is present, plugged-in & attempting to charge. If it's not, send the power to immersion heater or other dumb load.
  2. Microcontroller talking to the eMonTx and connected to the Mainpine EPC-IC. This will control a digital potentiometer IC to set the required resistance across EPC-IC & GND. Would likely be embedded or co-located with EVSE to facilitate solar override & user-selectable charge rate via button & LEDs.
Questions: @Kevin Sharpe or other Mainpine hackers
  1. Is there a safe source of 5V DC (or 2.7V->5.5V) from the EPC that can be used to drive the microcontroller - max 10mA but probably can be much lower.
  2. Any more elegant options like feeding a PWM signal to the EPC to avoid the potentiometer?
  3. Any signal available to determine a car is connected and attempting to charge (without being too invasive by tapping car side of EPC)?
I'm intending to prototype this by building a portable unit to interface with a suitable 13a outdoor socket on a dedicated circuit. As an added advantage, this solution may also allow a fancier option to select various charging rates when out and about from the unit itself. If I think about it a bit more, this could probably be expanded to include some automatic passive sensing to apply limits to detect special plug adapters with some indicating resistor in them to ensure someone doesn't attempt to pull 32A from a 13A socket. First things first though. My rate of ideas well exceeds my ability and speed of actually finishing things. In my day job, I'm an ideas man and not a completer/finisher so don't expect great things!

For completeness, and in case it fires inspiration in someone else to find a better way the following options were discounted:
  1. Use of a standard solar PV router. Immersun etc. or the DIY solar PV routers of the Open Energy Monitor project. I was deeply concerned about the choppy nature of the power output and how the EVSE & car would respond. This may be ok for a standard dumb charger or a resistive load but I was nervous (maybe un-necessarily so) about sending dirty wave forms by using triacs to switch the high current load off/on with either burst-fire or phase-control.
  2. Non-invasive methods. Control via existing Car APIs. This has some promise but may require hacking with OVMS to get data as much isn't available or is restricted, and not all vehicles have online APIs. Possible to get some info via polling the Leaf's Carwings API and maybe control charging off/on. Not ideal as Nissan have talked about withdrawing the API, its model specific, and you can't control rate. I'd like to vary rate in 1A increments from 6A to 10A.
  3. Basic switching on/off of a 13A socket when sufficient PV output. Would only be able to operate in pure solar mode when around 3kW of surplus PV power. My PV is not installed yet but I'm guessing this is not likely to happen often! Need to manage duty cycles for switching as worried about repeatedly killing & resuming the power mid charge.
Paul
 

·
Registered
Joined
·
1,514 Posts
I would approach the remote intelligent control to be a relay switching to replace the rotary switch so the mainline sees the fixed resistance values as per spec. You need a waterproof connection to get the link from control to internal components. I would do a microprocessor driven control board in a separate unit and try and fit a manual rotary switch with one setting taking the relay controlled resitor selection, with some hard wired choices in the other positions. You have to decide whether to locate the relays inside the charger or in the external control unit. The signal path from control to charger enclosures needs to be exceptionally low resistance to keep the control voltage presented to the mainpine within tolerance. If all the relays and resistors are housed in a larger EvSE box then more connections are needed to the control unit but they would less susceptible to minor resistive connections.
I have no experience of the monitoring the import/export state to give the info to the control unit as to what current is available for free. D.i.y. Kyoto make the monitor I have and sell the current clamp sensors as spares, so could be the basis of a home designed control unit input.
 

·
Registered
Joined
·
8,106 Posts
As far as my own investigations have shown most of these "solar diverters", for want of a better description, only work with resistive loads.

i did see one under development in a Transitions event that switched the power on or off to any load but it couldn't regulate who much power the device then took. It was basically an on/off switch triggered to switch based on whether you were exporting or importing.

Might still be useful but I can't think on what just at the mooment :)
 

·
Registered
Joined
·
1,150 Posts
Discussion Starter #5
You cannot use immersun as that requires pure resistive load - hence the name
Thanks @RickMGoldie , was pretty sure that would be a non-starter. @Paul_Churchley the socket on/off control is fairly easy and I could monitor but not control how much it takes. I also think cutting the power un-gracefully might upset things.

wrt. the intelligent control, I plan to use the microcontroller to drive a digital potentiometer IC so I can set any of the pre-defined resistances precisely using digital serial control from the uC. I need to use an IC with two pots to use parallel resistance steps to hit the precise fixed values but the IC is small and <£1. I think its more elegant than using relays and conventional resistors. The unit should be smaller than the size of a matchbox so would aim to fit inside the box and fit button & leds for standalone charge selection with a small waterproof data port with a few pins for auto-solar control and re-flashing the uC.

The big question, is can I get a DC source from the Mainpine unit between 2.7V-5.5V or do I need to incorporate a small SMPS to take it from AC input? It's possible to use a small encapsulated SMPS from the 240V side but it quadruples the build cost for the uC side and increases size. Its still only about £8 for the SMPS, 80p for the potentiometer and about a quids worth of other parts but if it can be avoided it's worth avoiding!
 

·
Banned
Joined
·
3,715 Posts
@PaulMorris great project and Open Energy Monitor is something we've wanted to support for a long time. We do have a new version of the EPC in development and will happily consider any feedback/wishlist you have :)

Is there a safe source of 5V DC (or 2.7V->5.5V) from the EPC that can be used to drive the microcontroller - max 10mA but probably can be much lower.
No, the power budget is very tight so you'll need to include an external power supply. I think this would be useful anyway for expansion.

Any more elegant options like feeding a PWM signal to the EPC to avoid the potentiometer?
Unfortunately we don't expose the comms channel in this version of the EPC. A simple electronic switch/potentiometer will provide the most reliable solution.

Any signal available to determine a car is connected and attempting to charge (without being too invasive by tapping car side of EPC)?
The three led pins encode most of the EPC charge/connected states and will be easy to monitor. I'm sure @Lee Howard can provide a list of the led outputs :)
 

·
Registered
Joined
·
707 Posts
@PaulMorris - As Kevin stated, currently the most-reliable method for determining the connection and charge status is to monitor the green, blue, and red LED pins (GN, BL, RD, respectively).

Blinking blue = not connected.
Steady blue = connected, not charging.
Steady green = connected, charging.
Steady red = connected, vent required, not charging.
Blinking red = error.

The LEDs are 5V each.

Be aware that at the time of power-on the EPC blinks a coded sequence in all colors which should be ignored for your purposes. (The sequence indicates some elements of the firmware configuration.)
 

·
Registered
Joined
·
1,150 Posts
Discussion Starter #8
@PaulMorris - As Kevin stated, currently the most-reliable method for determining the connection and charge status is to monitor the green, blue, and red LED pins (GN, BL, RD, respectively).

Blinking blue = not connected.
Steady blue = connected, not charging.
Steady green = connected, charging.
Steady red = connected, vent required, not charging.
Blinking red = error.

The LEDs are 5V each.

Be aware that at the time of power-on the EPC blinks a coded sequence in all colors which should be ignored for your purposes. (The sequence indicates some elements of the firmware configuration.)
Thanks, that's really useful! Should have enough inputs left on the micro to make things a bit more coordinated and handle errors more gracefully.
 

·
Registered
Joined
·
179 Posts
:)
As far as my own investigations have shown most of these "solar diverters", for want of a better description, only work with resistive loads.

i did see one under development in a Transitions event that switched the power on or off to any load but it couldn't regulate who much power the device then took. It was basically an on/off switch triggered to switch based on whether you were exporting or importing.

Might still be useful but I can't think on what just at the mooment :)

The solarimmersion one allows this . http://solarimmersion.co.uk/solarimmersion-support/downloads/
I think this is a great project and will be looking to buy one .:)I have a 3.6 kw system and am about to order a Leaf under the electric avenue scheme. Ever since deciding to get the Leaf I have been searching the internet for such a device and failed.
 

·
Registered
Joined
·
1,150 Posts
Discussion Starter #10
:)



The solarimmersion one allows this . http://solarimmersion.co.uk/solarimmersion-support/downloads/
I think this is a great project and will be looking to buy one .:)I have a 3.6 kw system and am about to order a Leaf under the electric avenue scheme. Ever since deciding to get the Leaf I have been searching the internet for such a device and failed.
Proportional control of power supplied is possible using open energy monitor today. The problem is, like all units I've seen on the market in simple terms it switches the 240v on and off very quickly which is why they only suggest using dumb loads like immersion heater, or storage heater. My concept will monitor the output surplus and politely ask the controller in the charging station to ask the car to step up or step down its charging rate, so it shouldn't upset any complicated electronics :)
 

·
Registered
Joined
·
179 Posts
Sorry Paul I was not clear on what the solarimmersion allows. I was answering (Other) Paul point about a device that can switch on and off a supply at pre set generation . From what I have read this one does. I realise this does not do what you want to do in your project.

I was looking at Grant Thomas project. Building the future: Portable Electric Car Charging station (http://grantthomas.com/?p=787 ). In which he says about installing a switch to control the Amps from 7 to 32 .
Nigel
 

·
Registered
Joined
·
1,150 Posts
Discussion Starter #12
Sorry Paul I was not clear on what the solarimmersion allows. I was answering (Other) Paul point about a device that can switch on and off a supply at pre set generation . From what I have read this one does. I realise this does not do what you want to do in your project.

I was looking at Grant Thomas project. Building the future: Portable Electric Car Charging station (http://grantthomas.com/?p=787 ). In which he says about installing a switch to control the Amps from 7 to 32 .
Nigel
Exactly the same concept. I'll be using same hardware but implementing an electronic switch to vary the charge current based on real time solar output from 6A up to around 10A (1.5kW to 2.5kW) based on surplus over domestic demand so the car will charge only on zero carbon solar unless you override the auto setting.

The switch info is available here under EVSE technical information:
http://zerocarbonworld.org/zcw-evse

I'll warn you the build isn't going to be cheap. To do something to the same quality as the components & housing shown there I'm budgeting around £400. @Kevin Sharpe mentioned Mainpine may produce a commercial portable unit with switchable current. Depending on pricing and time to market that might be worth waiting for.
 

·
Registered
Joined
·
1,150 Posts
Discussion Starter #13
Unfortunately not much progress to report so far, partly due to other commitments, but also still waiting for delivery of the EPC & Type 1 cable, which should be here next week. Most of the other parts are now here though, and I managed to steal an hour last night to plug the digital pot into a breadboard and have a play. Getting carried away with the design and now also planning to add a small 7 segment digital display to show the charge rate, and allow you to select local charge rates on the EVSE. One thing at a time though!

Arduino clone talking to a breadboarded digital potentiometer over SPI to vary the brightness of the two LEDs. Haven't decided what micro to use, but might try this xinoRF to prototype with as it has RF comms implemented over a serial port. Could make comms with the Solar PV monitor very easy if its reliable enough.





And finally, sample code to set 9A charging...


Next week will be busy, but hope to make some real progress next weekend just before the LEAF turns up :)

Plan at the moment is:
a) get the DIY EVSE built in standard dumb 32A format (or with fixed resistors to let me charge @ 10amp)
b) once the EVSE is safety tested & proven working integrate the micro controller, digital pot, led display and button for local control.
c) make the code changes for remote control via RF or other connection method. Possible to provide a web/smartphone interface at this stage via an internet connected RPi.
d) integrate code changes back into emonTx (openenergymonitor.org) to ramp up/down charging rates based on SolarPV output.
e) relax and enjoy zero carbon motoring.
 

·
Soul EV & Tesla Model S
Joined
·
269 Posts
I don't pretend to understand much of the technical stuff but it something I would buy too. Of course this would be dependant on price point. I would think there would be a small but loyal market for this. Keep working at it please.
 

·
Registered
Joined
·
3,308 Posts
Was just thinking that this sounded like an ideal Raspberry Pi project !
Presumably, if the sky clouds over, the current will drop off substantially. How about adding in a battery/capacitor to smooth out the current, so it goes down to 6A rather than turning off straight away. Almost like the controlled shutdown through a UPS?
 

·
Registered
Joined
·
1,150 Posts
Discussion Starter #16
Was just thinking that this sounded like an ideal Raspberry Pi project !
Presumably, if the sky clouds over, the current will drop off substantially. How about adding in a battery/capacitor to smooth out the current, so it goes down to 6A rather than turning off straight away. Almost like the controlled shutdown through a UPS?
A RPi will do it but is overkill - way too powerful, about 4x cost and will take much more power. I'm hoping to run the finished article on uber-low power as it then might be possible to source enough juice from the mainpine EPC LED terminals without a dedicated PSU.

No need to worry about smoothing the current flow, the EPC/EVSE is plugged into a standard 13A or 16A socket wired into the consumer unit. The only issue is whether you're importing "dirty" electricity from the grid (and paying) or using carbon free solar energy. All my module does is signal the mainpine unit to negotiate a charging rate with the car so everything should be managed gracefully, it doesn't just switch on/off. As the PV output goes up it will step up to 10A or more, as PV output drops it will take the car down to 6A then if output drops below that level, optionally signal the car to stop charging. Will need some logic to smooth the switching levels to avoid flip-flopping and cycling too quickly, but other than that fairly simple.
 

·
Registered
Joined
·
585 Posts
Hi Paul,
I've been looking at a very similar project for my Leaf, but I was planning on replacing the EPC unit with an Arduino/OEM type board which can alter the duty cycle of the 1kHz 'pilot signal' that tells the car how much current it's allowed to pull. I've just read up about the Mainpine EPC you're using. Is it a 'special' version or are they all controllable? Also how much does it cost?

On another tangent, if you're going to be using OpenEnergyMonitor type kit, just use a barebones Arduino and the RFM12B radio module on a square of stripboard, much cheaper, I've built several.
 

·
Registered
Joined
·
585 Posts
Ah! Good! I have a Leaf. However, if it's not in the EPC's firmware, you won't be able to use it, which is a bit of a showstopper. 6A is already much higher than I'd like (4A would be much better), but the 7A minimum is approx 1.7kW. That's a lot of output from the PV during the winter...
How are you planning on integrating the EVSE with the OEM kit?
 
1 - 20 of 158 Posts
Top