18
http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/ Food Living Outside Play Technology Workshop Arduino EV J1772 Charging Station by flyguy161 on February 22, 2012 Table of Contents Arduino EV J1772 Charging Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: Arduino EV J1772 Charging Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 1: Setup ARDUINO Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 2: Status LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Step 3: Relay Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 4: Pilot DC/DC converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 5: Pilot Opamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Step 6: Pilot Voltage Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Step 7: GFCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Step 8: Load EVSE firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Step 9: Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Step 10: High Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Step 11: Charging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Arduino EV J1772 Charging Station

  • Upload
    akozy

  • View
    433

  • Download
    44

Embed Size (px)

DESCRIPTION

Arduino-EV-J1772-Charging-Station

Citation preview

Page 1: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Food      Living       Outside        Play        Technology       Workshop

Arduino EV J1772 Charging Stationby flyguy161 on February 22, 2012

Table of Contents

Arduino EV J1772 Charging Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro:   Arduino EV J1772 Charging Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1:   Setup ARDUINO Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2:   Status LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 3:   Relay Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4:   Pilot DC/DC converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 5:   Pilot Opamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 6:   Pilot Voltage Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 7:   GFCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 8:   Load EVSE firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Step 9:   Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Step 10:   High Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Step 11:   Charging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Page 2: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Intro:  Arduino EV J1772 Charging StationArduino Electric Vehicle Charging Station "Electric Vehicle Supply Equipment" (EVSE) implementing the J1772 protocol.

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

The EVSE advertises the Maximum current available to the EV with a 1khz pilot signal. The Duty Cycle of the pilot sets the available current the EV may draw. The EVSEalso functions as a safety device, the 240V AC lines of the J1772 plug are not hot until the EVSE and EV command the start of charging. The EVSE also functions as Aground fault interrupt device (GFCI).

Parts list and Schematics are attached as images.

Image Notes1. A12. R5 - 56k Ohm 5V to A13. R6 100k Ohm from A1 to GND4. R7 200K from A1 to pilot connection5. R1 1k 1% resistor from opamp pin 1 (pilot output to pilot connection6. Pilot Output

Step 1: Setup ARDUINO ShieldBuild and ARDUINO proto 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

Page 3: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Step 2: Status LEDsSolder Common Cathode RGB LED to proto board and 1 x 330 Ohm resistor each for Red, Green and Blue.

Solder the Common Cathode to Ground.

Solder Signal Wires:Red - D5Blue - D8Green - D13

LED pinout (CC RGB LED from Sparkfun)Blue - Green - GND (longest lead) - RED

Image Notes1. 330 Ohm2. RGB CC LED

Image Notes1. D5 - LED red2. D8 - LED Blue3. D13 - LED Green4. RGB CC LED

Page 4: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Step 3: Relay Driver2N2222A NPN transister connects to R11 (330 ohm) then to D8 (also connects to LED blue), GND and the Relay Output.

Image Notes1. STMicro 2N2222A

Step 4: Pilot DC/DC converterThe J1772 Pilot requires a 1khz signal that swings from -12V to +12V. A D107E DC\DC converter from MicroPower Direct converts 5VDC to both positive 12V andnegitive 12V. The converter requires a minimum draw so a 2.4k resistor and 1uf capacitor is added from each output to ground.

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

Page 5: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Image Notes1. Input 5V and GND2. Output 12V, GND, and -12V

Image Notes1. -12V2. 12V3. GND

Image Notes1. 2.4k resister from each output to GND

Step 5: Pilot OpampThe 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 topin 4.

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

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.

Image Notes1. -12V2. 12V3. GND

Image Notes1. A12. R5 - 56k Ohm 5V to A13. R6 100k Ohm from A1 to GND4. R7 200K from A1 to pilot connection5. R1 1k 1% resistor from opamp pin 1 (pilot output to pilot connection

Page 6: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

6. Pilot Output

Step 6: Pilot Voltage MeasurementThe Charging station and the car communicate witht he pilot. The Charging station must read the voltage 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 -12V levels. R5 provides a bias to keep the voltage positive, the Arduino does nottolerate negitive voltages on the analog inputs. -12v will be 1V on A1 and +12V will be 4.5V on A1.

Page 7: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Image Notes1. A12. R5 - 56k Ohm 5V to A13. R6 100k Ohm from A1 to GND4. R7 200K from A1 to pilot connection5. R1 1k 1% resistor from opamp pin 1 (pilot output to pilot connection6. Pilot Output

Step 7: GFCIGround Fault Inturupt (GFCI) is an important part of a charging station. GFCI works by measuring the differance of current out verses current in. If there is a differancethe circuit trips. Standard GFCI trips at 5mA, however EVs need a less sensitive trip point. Most comercial 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. Thesmall voltage from the CT is first amplified in the first stage then compared to a referance voltage in the second. If the amplified CT voltage is higher than the referancethe Opamp goes high and causes the Arduino 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.

6. Solder 330 ohm resistor R17 to the header. (the value of this resistor can be changed to change the 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), connect other end of resistor to Gnd.

Page 8: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Page 9: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Page 10: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Page 11: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Step 8: Load EVSE firmwareUse the Arduino IDE to load "Open EVSE " firmware to the Arduono board.

Page 12: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Step 9: TestingThe J1772 Pilot is a 1khz +12V to -12V square wave, the voltage defines the state and the duty cycle defines the current available to the EV. The EVSE sets the dutycycle and the EV adds resistance from the pilot the Ground to vary the voltage. The EVSE reads the voltage and changes state accordingly.

State Pilot Voltage EV Resistance DescriptionState A 12 N/A Not ConnectedState B 9 2.74k ConnectedState C 6 882 ChargingState D 3 246 Ventilation RequiredState E 0 N/A No powerState F -12 N/A EVSE Error

State A - To test State A, power up the EVSE. The EVSE should go to the ready state. LED should light Green.State B - To test State B, with the EVSE powered connect the EV Simulator (or diode and resistor) with a resistance of 2.74k Ohms. The EVSE should go to the EVConnected - EVSE ready state. LED should light Yellow.State C - To test State C, with the EVSE powered connect the EV Simulator (or diode and resistor) with a resistance of 882 Ohms. The EVSE should go to the EVConnected - EVSE ready state. LED should light Blue.State D - To test State D, with the EVSE powered connect the EV Simulator (or diode and resistor) with a resistance of 246 Ohms. The EVSE should go to the ErrorVent required. LED should light Red.State E - To test State F, the EVSE should be disconnected from power. The EVSE should turn off, the LED should go out.State F -To test State F, with the EVSE powered connect the EV Simulator (just a resistor) with a resistance of 2.74k Ohms. The EVSE should go to the Error DiodeCheck Failed. LED should light Red.

Frequency -The Pilot should have a frequancy of 1kHz(1000Hz). The acceptible J1772 tolerance is from 980-1020Hz. Test Frequency by attaching the EV simulator inState C "Charging Mode) (or diode 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. Test Duty Cycle by attaching the EV simulator in State C (Charging Mode).Attach an occiloscope from pilot to EVSE Ground. Duty cycle should match the chart below.

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

Duty Cycle Max Current< 3% Error3% - 7% Digitial Com Required10% 6A20% 12A30% 18A40% 24A50% 30A60% 36A70% 42A80% 48A86% 55A88% 60A90% 65A92% 70A94% 75A96% 80A

Image Notes1. EV simulator set to 2.74k

Image Notes1. Blue - Charging State C2. EV simulator set to 882 Ohm

Page 13: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Image Notes1. Red - Error Vent required - State D2. EV Simulator set to 246 Ohm

Image Notes1. Pilot Frequency is right on at 1.0khz

Image Notes1. Pilot set to 30A (50% on 50% off)

Step 10: High VoltageThe Arduino EVSE can charge at any J1772 rate from 6 Amps to 80 Amps. I chose to use a 240V 30A J1772 cable along with a 30A relay and L6-30 twistlock plug. Themax charge rate of the Nissan Leaf is 16 Amps so that leaves plenty of margin.

WARNING - please do not 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 or red) and Ground (green) wires. Strip each wire back and solder orcrimp the appropriate connectors on the Hot and Neutral wires for your relay. (optional) Add a second set of wires if required to power your Ardrinos power supply.

2. Prepare the J1772 plug by removing about 6 inches of outer insulation exposing 4 or 5 wires. If the 5th wire for proximity is present just fold it over and shrink wrapover it so it cannot short anywhere 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 your relay 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 and connect 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.

Page 14: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Image Notes1. L6-30 twist lock

Image Notes1. Hot2. Hot to power supply3. Neutral4. Neutral to power supply5. Ground

Page 15: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Image Notes1. Hot Neutral and Ground for power supply

Image Notes1. Hot from J17722. Hot from J17723. Neutral/Hot2 from J17724. Ground from J17725. J1772 Pilot

Page 16: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Image Notes1. Ground block

Image Notes1. CT CRMagnetics CR8420-1000G on J1772 Hot/Neutral

Page 17: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

Image Notes1. Universal power supply 90 - 264V

Step 11: ChargingAfter testing its time to charge.... plug in power and test again. Check your relay, did you get the high voltage wiring correct?

Plug in the J1772 and your EV should start charging.

Future plans... clean up the low voltage wires and put Arduino in proper enclosure.

Image Notes Image Notes

Page 18: Arduino EV J1772 Charging Station

http://www.instructables.com/id/Arduino-EV-J1772-Charging-Station/

1. J17722. Charging...3. Arduino Charging station

1. Ready2. Vin (12V) and Ground3. Pilot4. Relay 12V coil

Image Notes1. High Voltage parts2. I need another shaller box for the Arduino and shields.

Image Notes1. Charging.....!

Related Instructables

USB IphoneIpod DynamoCharger by2robotguy

008 Part 2-Electric CarConversion:Dodge NeonBatteries andChargers (video)by bennelson

Ramps for aLow Car by PhilB

Powering theArduino Megawith a LithiumBattery byinthebitz

008 Part 1-Electric CarConversion:Dodge NeonBatteries andChargers (video)by bennelson

EASY SOLARCHARGER byepman