13
Arduino EV J1772 Charging Station Written By: Feitan Arduino EV J1772 Charging Station © 2017 www.botsbits.org Page 1 of 13

Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Embed Size (px)

Citation preview

Page 1: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Arduino EV J1772 Charging StationWritten By: Feitan

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 1 of 13

Page 2: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

INTRODUCTION

Based on the OpenEVSE project

OpenEVSE

OpenEVSE Store

Arduino Electric Vehicle Charging Station "Electric Vehicle Supply Equipment" (EVSE) implementingthe J1772 protocol.

J1772 is used in the current generation of Electric Vehicles and Plug ins such as the Nissan LEAFand Chevy Volt.

The EVSE advertises the Maximum current available to the EV with a 1khz pilot signal. The DutyCycle of the pilot sets the available current the EV may draw. The EVSE also functions as a safetydevice, the 240V AC lines of the J1772 plug are not hot until the EVSE and EV command the start ofcharging. The EVSE also functions as A ground fault interrupt device (GFCI).

Parts list and Schematics are attached as images.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 2 of 13

Page 3: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 1 — Arduino EV J1772 Charging Station

Insert wisdom here.

Step 2 — Setup ARDUINO Shield

I used the Shield from Adafruit. http://www.adafruit.com/products/55

Solder 2 x 8pin and 2 x 6pin headers to the outside holes.

Solder 2 x 5mm 2 Position Terminal headers to the protoboard for the Relay and J1772 Pilot

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 3 of 13

Page 4: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 3 — Status LEDs

Solder Common Cathode RGB LED to proto board and 1 x 330 Ohm resistor each for Red, Greenand Blue.

Solder the Common Cathode to Ground.

Solder Signal Wires: Red - D5, Blue - D8, Green - D13

LED pinout (CC RGB LED from Sparkfun)

Blue - Green - GND (longest lead) - RED

Step 4 — Relay Driver

2N2222A NPN transister connects to R11 (330 ohm) then to D8 (also connects to LED blue), GNDand the Relay Output.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 4 of 13

Page 5: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 5 — Pilot DC/DC converter

The J1772 Pilot requires a 1khz signal that swings from -12V to +12V. A D107E DC\DC converterfrom MicroPower Direct converts 5VDC to both positive 12V and negitive 12V.

The converter requires a minimum draw so a 2.4k resistor and 1uf capacitor is added from eachoutput to ground.

I connected the MPD D107E such that the 5V and GND pin lined up with the central 5V and groundrails on the proto board.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 5 of 13

Page 6: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 6 — Pilot Opamp

The Opamp for the pilot is a LF353 which is powered by the DC/DC converter from the last step.The positive +12V output connects to pin8 and negitive -12V connects to pin 4.

A voltage divider with 2 100K (R8 and R9) resistors is connected to +5V Gnd and Pin 2 of theLF353.

Pin 3 or the Opamp connects to the ARDUINO D10 on the protoshield.

The output, pin 1 connects to a 1% 1k ohm resistor and then to the pilot output.

A P6KE16CA bidirectional TVS diode is also connected to the pilot output and then to ground.

Pins 5, 6 and 7 are not used.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 6 of 13

Page 7: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 7 — Pilot Voltage Measurement

The Charging station and the car communicate with the pilot. The Charging station must read thevoltage so it can correctly respond.

1. Solder R5 (56k) from 5v to Arduino Analog 1 (A1).

2. Solder R6 (100k) from Gnd to Arduino Analog 1 (A1).

3. Solder R7 (200k) from Pilot output to Arduino Analog 1 (A1).

This circuit workis by providing a voltage divider (R6 and R7) to scale down the -12V to -12Vlevels. R5 provides a bias to keep the voltage positive, the Arduino does not tolerate negitivevoltages on the analog inputs. -12v will be 1V on A1 and +12V will be 4.5V on A1.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 7 of 13

Page 8: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 8 — GFCI

Show All 8 Items Ground Fault Inturupt (GFCI) is an important part of a charging station. GFCIworks by measuring the differance of current out verses current in. If there is a differance thecircuit trips. Standard GFCI trips at 5mA, however EVs need a less sensitive trip point. Mostcomercial EVSEs use 20mA.

This Circuit work by using a Ground Fault Current Transformer (CT) from CRMagnetics (CR8420-1000-G). THe CT creates a small voltage when there is a fault. The small voltage from the CT isfirst amplified in the first stage then compared to a referance voltage in the second.

If the amplified CT voltage is higher than the referance the Opamp goes high and causes theArduino to register an inurupt on Arduino pin D2.

1. On another protoshield solder a 8pin socket.

2. Solder power wires, pin 4 to 5v and pin 8 to Ground

3. Solder Diodes 1N4148 to the Op-amp outputs pins 3 and 5. Opamp Output A

4. Solder header pins for CT coil.

5. Solder zener diodes to the header.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 8 of 13

Page 9: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 9

6. Solder 330 ohm resistor R17 to the header. (the value of this resistor can be changed to changethe GFCI trip point)

7. Solder R16 from the CT coil header to Opamp pin2

8. R17, and a .1uf Capacitor from Opamp pin 2 to the diode on pin 1. Opamp Output B

9. Solder R15 (20k) to Gnd and R14 (100k) to 5V, connect resistors together then to Opamp pin 6.

10. Connect Opamp Output pin 7 diode to 10K resistor and the to Arduino Digital 2 (D2), connectother end of resistor to Gnd.

Step 10 — Load EVSE firmware

Use the Arduino IDE to load " OpenEVSE" firmware to the Arduinoboard.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 9 of 13

Page 10: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 11 — RGB LCD (optional)

If the Adruino and 2 shields is not tall enough for you, add an RGB LCD shield from Adafruit.

Assemble according to the guide on the adafruit site...

Add LCD code to Open EVSE code...

LCD code

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 10 of 13

Page 11: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 12 — Testing

The J1772 Pilot is a 1khz +12V to -12V square wave, the voltage defines the state and the dutycycle defines the current available to the EV. The EVSE sets the duty cycle and the EV addsresistance from the pilot the Ground to vary the voltage. The EVSE reads the voltage and changesstate accordingly. Test result

Frequency -The Pilot should have a frequancy of 1kHz(1000Hz). The acceptible J1772 tolerance isfrom 980-1020Hz. Test Frequency by attaching the EV simulator in State C "Charging Mode) (ordiode and 882 Ohm resistor). Attach a multimeter or occiloscope from pilot to EVSE Ground.

Pilot Duty Cycle - The Pilot Duty Cycle is dependant on the Max current setting of the EVSE. TestDuty Cycle by attaching the EV simulator in State C (Charging Mode). Attach an occiloscope frompilot to EVSE Ground. Duty cycle should match the chart below.

Up to 51A Amps = Duty cycle x 0.6 Duty cycle = Amps / 0.6 51 - 80A Amps = (Duty Cycle - 64)2.5

Duty Cycle Max Current

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 11 of 13

Page 12: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

Step 13 — High Voltage

Show All 9 Items The Arduino EVSE can charge at any J1772 rate from 6 Amps to 80 Amps. Ichose to use a 240V 30A J1772 cable along with a 30A relay and L6-30 twistlock plug. The maxcharge rate of the Nissan Leaf is 16 Amps so that leaves plenty of margin. !WARNING - please donot play with 240V if you are not qualified...

1. L6-30 Strip about 6 inches of outer insulation back to expose Hot (black), Neutral/Hot2 (white orred) and Ground (green) wires. Strip each wire back and solder or crimp the appropriateconnectors on the Hot and Neutral wires for your relay. (optional) Add a second set of wires ifrequired to power your Ardrinos power supply.

2. Prepare the J1772 plug by removing about 6 inches of outer insulation exposing 4 or 5 wires. Ifthe 5th wire for proximity is present just fold it over and shrink wrap over it so it cannot shortanywhere it is not required for the charging station.

strip back about 1/2 inch of the 4 wires Hot (black), Neutral/Hot2 (white or red), Ground (green)and pilot (Orange on my cable but some are blue). Solder or crimp the correct connectors for yourrelay on the Hot and Neutral wire. 3. Tie all ground wires together.

4. Place both the Hot and Neutral wire of the J1772 cable through the Current Transformer andconnect wires to relay.

5. Connect power supply. Note power supply must be 12V output and Input should be universal(from about 90 - 260V).

6. Connect the Pilot Wire to the Arduino shield Pilot output.

7. Connect Relay coil to the shields Relay output. 8. Connect the Power Supply to the Arduino.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 12 of 13

Page 13: Arduino EV J1772 Charging Station - dozuki-guide-pdfs.s3 ...dozuki-guide-pdfs.s3.amazonaws.com/pdf/botsbits/guide_171_en.pdf · Pin 3 or the Opamp connects to the ARDUINO D10 on the

This document was last generated on 2017-06-23 01:37:24 PM.

Step 14 — Charging

After testing its time to charge.... plug in power and test again. Check your relay, did you get thehigh voltage wiring correct?

Plug in the J1772 and your EV should start charging. Future plans... clean up the low voltage wiresand put Arduino in proper enclosure.

Arduino EV J1772 Charging Station

© 2017 www.botsbits.org Page 13 of 13