OK, with fantastic solutions like OpenEVSE around, here is something with a different design goal:
A bare minimum circuit
to successfully charge a Nissan Leaf with components that just sit idle in your parts box.
No programming required. Well, here it is:
It's a good old NE555 that's putting out the 1 kHz PWM pilot signal. You can adjust the duty cycle and therefore control the maximum current that the Leaf onboard charger will draw.
It is small enough to fit into a J1772 plug. No more clunky in-cable box!Pros:
A great 2nd cable for top up charges while traveling. Easy to repair. No great loss if stolen. No in-cable box.Cons:
Must be present to start charging. No preheating or timer charges, no 80% charges. DTC warning code can be logged.
Hate the cons? Then continue reading to the end for the no-cons relay version.
The minimum components for the circuit are
any two diodes (1N4148, 1N4001...),
two 1k resistors (>=1/8 Watt, <=5%),
a 10nF capacitor
a 100k and
a 10k potentiometer (any type will do but precision pots are preferable).
a 12 Volt switching power supply that operates on 100-240 Volts. As the circuit draws less than 15 mA any type will do. Verify that it is well designed and isolated. Check the temperature.
So far you are looking at less than $5.
The bummer is the J1772 EV plug that sets you back a $130. With some good quality cable and a mains plug you are still under $170.
In this first version the mains plug is directly and permanently connected to J1772 plug!
The US electrical code for example, allows this only for devices up to 125V, 15A or 20A. For other countries please check you local electrical code if 240V 16A are acceptable.
So why does this technically work???
Well, there is the elaborate J1772 protocol but the Nissan Leaf does not enforce all requirements. Might be because it results in a better user experience if charging with all the non-compliant EVSEs around actually works.
The spec says the pilot should be a constant 12V in the idle state. The Leaf does not particularly care. It's happy even if the PWM is provided right away on the first plug in.
The spec says the pilot signal that the EVSE generates should alternate between -12V and 12V a thousand times per second. The Leaf does not care about the -12V. Alternating 0V and 12V is fine. The standard actually requires a diode so it can be assumed that most cars behave that way.
The spec says the power should be switched on only after the car drops the pilot voltage further and the Leaf onboard charger tests for this but there is a 10 second grace period. This is documented in the service manual.
So if you plug in the J1772 connector first
, you have 10 seconds to turn on or plug in the mains. If you can fulfill that requirement, the Leaf will charge. It will slowly increase the power as usual. There will be no arcing when you plug in the mains. If you miss the 10 secs you can repeat the procedure by unplugging the Leaf. The Leaf will shut off normally after the batteries are full.
Now to unplug before the batteries are full, it is good practice with all EVSEs to unplug the J1772 first. If you press the proximity switch on the J1772 connector the Leaf will immediately stop drawing power. (Actually it drops to 70 Watts). If you disconnect the mains first, it will arc at the mains plug. Same thing happens on the standard EVSE, so generally it's a good idea to do it that way.
Now for the mains connection you must use a GFCI plug rated for your intended voltage and current. Preferably one that also contains a fuse or acts as circuit breaker. The nice thing here is that you can use it as an on-switch. That's faster than plugging in. There are units that automatically disconnect on power loss. That's even more convenient because you know the switch is always off when you plug in.Is it safe???
Technically it is just as safe as the billons of other 220V-240V every-day household appliances worldwide (like electric stoves, (dish)washers, dryers, A/C units, electric lawn mowers). All of these require a good ground connection and follow code but none of these use a pilot signal and relay at the power source. It's up to you to figure it out! Technically the charge cable is just an over-priced extension cord.
Of course, the -12 V and the relays provide an extra safety margin.
The AC part is high voltage which can kill or burn down your house, so please only attempt to build this if you are qualified to do so. General rule: If you do not know what you are doing then please don't do it. Buy an EVSE and live.
It is your decision and you are doing so at your own risk!
Please do not violate your local electrical code!
The US electrical code only allows systems rated up to 125V 20A to be used without a relay located at the mains connection.
GFCI saves lives and is a must!
Some people think using no relay can kill your Leaf's on-board charger. Include a relay as shown below. Your choice, your risk.
Don't use this design with a car that is capable of drawing more current than the specs of your cable and plugs unless properly fused.
Note that the EVSE DTC code B29C1 can be logged if you miss the 10 sec grace period or sometimes if the battery is full. They just cause a display of the yellow warning symbol the next time the car is turned on. This will automatically go away when the car is turned off and on again. They cause no damage of loss of functionality.
R2 is optional and not populated. R1 can also be dropped if you use and need a resistor to adjust the supply voltage closer to 12V like the PCB in the photo.
Pin 1 of JP2 connects to the pilot signal. R3 is important and must be 1K. No substitutions.
The 10k pot adjusts the frequency. The 100k pot adjusts the duty cycle. 25% at 12V is about 15A, 26.66% would be 16A. The Leaf should never go over 18A regardless of what the EVSE pilot advertises. (At 120V the maximum is 12A, so the same cable works for both voltages).
Please use a scope or multimeter that is capable of measuring frequency and duty cycle to adjust the pots.
And yes the signal is dynamic. The Leaf will adjust it's charging current and slowly follow the signal's duty cycle.
The Leaf charger does not care too much about the accuracy of the 1 kHz pilot, so the usual temperature drift of the NE555 RC based oscillator does not seem to affect it.
Here's what it could look like. The PCB is on the left, the 12V switching power supply on the right under the wires. Both warped in self-vulcanizing electrical tape rated at >200F and >400V.
Wiring up the proximity switch is a must! There are some pictures of how to assemble the cable on the web.
But wait there is more...
... the relay version
of course. Add a few more standard components and turn this into a more complete EVSE with none of the cons. Here's the right hand side of the schematics:
The upper OP amp switches the 1 kHz signal on when the car says so. Puts out a constant 12V on idle as per spec.
The lower OP amp switches the power relay connected to JP3 on when the car requests it.
If you can find a proper >=16A relay that fits into the J1772 plug you can have your cake and eat it too. Make sure the transistor (and also the power supply) is rated properly for the required coil current.
For the Leaf to be happy it is sufficient to switch only one phase. No more DTCs. If you can find the space you can switch both.
Again, for 240V operation in the US both AC lines must be contain a relay and it must be near or in the mains plug.
Note that with this solution the relay will still be switched on if the pilot is shorted out.