AnalogEVSE

A basic analog SAE J1772 charge controller

Last updated: 2019-01-01
German English


AnalogEVSE PCB
AnalogEVSE case Charge box
Assembled PCB
PCB with DIN Rail enclosure
Finished EVSE

Contents

1. Overview
2. Why Another EVSE?
3. Circuit States & LEDs
4. Charge Current Selection
5. Circuit Description
6. Emergency Shutdown
7. Access Control
8. Limitations
9. Hints & Modding
10. Construction Manual
11. Testing
12. Downloads
13. Ordering
14. Disclaimer

1. Overview

AnalogEVSE is a simple SAE J1772 compliant charge controller for EVs. The charge current can be adjusted from 8A to 62A with a resistor or control voltage.

The circuit resides on a single PCB (10.2 cm x 8.4 cm) containing both the power supply and the pilot signal management. The PCB is designed to fit into a DIN rail enclosure. However, the PCB can be reduced to 10 cm x 8 cm in order to fit two PCBs onto a single Euroboard. The circuit generates the pilot signal, measures its voltage levels and operates a relay which can be used for switching on the high current relay.

It was designed using only common and inexpensive parts. The main components are 2 LM2901 or LM239 quad comparators (LM339s with extended temperature range), a few transistors and some diodes. Everything is analog and there is no software. Virtually any transistor of the right type (NPN/PNP) will work. The cost for all components should around 50€. The PCB is single sided with large tracks and can easily be reproduced by hobbyists.

The PCB has the following connectors:
Most other analog EVSEs I know generate the positive part of the pilot signal only. The car doesn't use the negative signal so charging works with many cars even if this does not comply with the J1772 standard. However, the negative half-wave is used for the diode check which is an essential safety feature. AnalogEVSE has a J1772 compliant -12V/+12V pilot signal and supports the diode check. Rain water, dirt or a child's fingers will not be able to turn on the EVSE. With no EV connected, the Pilot signal is at 12V DC.

If the EV requests ventilation the circuit will close the relay and enable charging. Since there is no extra relay for a ventilator the circuit must be used outside only with lead acid batteries.

Charging will begin at the EV's request when the connector is plugged in. There is no extra button for triggering the operation.

2. Why Another EVSE?

There are three major reasons: curiosity, price and simplicity. Commercially available charge controllers (Phoenix Contact, Wago..) are expensive and provide a set of features that I don't need. I rarely switch between charge currents and if I do I want to do it easily (preferably with a rotary switch). I also want some sort of status display but it doesn't have to be a text display. I'll never use a RTC, network, wifi or sophisticated authentication.

OpenEVSE works great (I have two wall boxes built with OpenEVSE) but it is not the perfect match for Germany. Service detection (l1/l2) makes no sense for 3 phase AC which also renders the ground verification check useless. And the GFCI circuit built into the device is illegal in most of Europe. Finally, I'm only using a fixed Type 2 connector cable without button so there is no need for the proximity circuit. With all the extra features gone it is too expensive and overly complex for my taste. And finally, both boxes I have sporadically freeze and need to be reset. I have not yet found the cause for this issue but I have heard that others have the same problem. It may have to do with voltage spikes caused by the relay coil which freeze the micro controller.

So I studied the SAE J1772 standard and its simplicity is striking. Making a basic EVSE with analog circuitry is pretty straightforward. I have found a few analog EVSE circuits on the internet but they are either too minimalistic/unsafe (BareEVSE), ignore parts of the standard (only +12V pilot signal) or come without schematics. So I decided to design a simple analog circuit that complies with J1772, delivers a +/-12V pilot signal and supports the diode check for safety reasons.

3. Circuit States & LEDs

The following table shows the possible states of the circuit and the corresponding LEDs. Please note that the behavior of the onboard LEDs differs from the external LEDs. The onboard LEDs use a simplified driver circuitry since they are only intended to serve as debugging aids.



External
LED green
Connected
External
LED blue
Charging
External
LED red
Error
Onboard
LED yellow
Connected
Onboard
LED green
Charging
Onboard
LED red
Error
Pilot signal
Relay
No EV connected off
off
off
off off
on +12V
off
EV connected on
on
off
1 kHz
square wave
EV charging off
on
on
on
EV requesting ventilation
Pilot short circuit off
on
off
on
1 kHz
square wave3
off
Diode failure on1
off 2

1 with EV connected
2 without EV connected
3 J1772 requires -12V DC vor. See chapter Limitations.

Note: Using an RGB LED with a common anode is possible since all LEDs have one pin at Vcc and only one LED lights up at a time.


4. Charge Current Selection

The charge current can be set with an external resistor according to the following table. Intermediate values are supported since the circuit is all analog. Using a potentiometer is also possible. Please note:

Rext
Ladestrom
--
8A
47k
11A
33k
13A
27k
14A
22k
16A
15k
18A
10k
23A
6k8 28A
5k6
30A

Rext
Ladestrom
4k7 32A
3k9 35A
3k3 37A
2k7 40A
2k2 43A
1k5
47A
1k2
50A
1k 56A
820
63A

5. Circuit Description

Power supply

The power supply is a simple +/-12V stabilized circuit using 7812/7912. The current requirements are so low that a simple half-wave rectifier is sufficient. The positive branch is elevated by 0.8V using a diode in order to compensate for the voltage loss of the pilot signal generation circuit.

Note: the negative supply voltage requires a few milliamps load in order to remain stable. Therefore, the onboard power LED is mandatory.

Square wave signal

The square wave signal is generated by one comparator producing a triangle wave and a second comparator transforming it into the square wave. The second comparator's reference voltage defines the duty cycle and can be adjusted using an external resistor. Using no external resistor sets the charge current to 8A.

Voltage window detection

The square wave signal is split into its negative and positive half-waves. Both are rectified and filtered to a stable DC (peak) voltage. The negative part must remain below -11V at all times (diode check) or the circuit will go to error state.

If the positive part is below 10V the EV connected LED will light up. If it is between 7V and 7V the relay will switch on and the charging LED will light up. For all positive voltages below 2V (short circuit) the circuit will go to error state. The various reference voltages are generated by a string of resistors forming a multi-voltage divider.

Pilot signal

The pilot signal is generated by two comparators and boosted by a transistor. It is at +12V DC when no EV is connected.

Relay driver

The relay driver has a 4.7μ capacitor for slightly delaying the relay. In case of a pilot short circuit the rectified peak voltage falls slowly and crosses the charging voltage window for a very short period of time. This would trigger a tiny undesired relay click. The capacitor delays the relay signal for a moment and suppresses the spike.

LED drivers

The LED driver circuit has some extra transistors for suppressing undesired LED signals. The "Error" LED and the "EV Charging" LED switch off the "EV Connected" LED so that only one LED at a time is on.

6. Emergency Shutdown

An emergency shutdown is not part of the circuit. However, it can be implemented easily with a switch that interrupts the 230V power supply. This will remove power from the circuit and the relay will open. Please note that an emergency shutdown should only be used in cases of emergency because the EV prefers to shut down the charging process gracefully.

7. Access Control

There are several ways for implementing a simple mechanical access control:

8. Limitations


9. Hints & Modding


10. Construction Manual

10.1 General Hints

The kit contains all components that are required for assembling and testing the AnalogEVSE controller. Populating the PCB requires a certain amount of soldering experience. Misplaced or misoriented components will lead to erroneous behavior and may be dangerous. Please read this manual before starting the assembly.

10.2 Security

This circuit has 230V mains voltage and low voltage on a single PCB. When working with the controller, please be extra careful if the PCB is connected to the mains.

10.3 Tools

You will need the following tools:


10.4 Preparations

Identify all components using the BOM and make sure the kit is complete.

Hints for the kit: R9 (1k/1W) has a green body, D9 has pieces of tape

10.5 Assembly

10.5.1 General Hints

The basic assmebly procedure is as follows:
All components should be soldered into place that they touch the surface of the PCB free of clearance. Transistors and the voltage regulators should be installed so that their pins are approximately 7mm long.

10.5.2 Assembly and Test of the Power Supply

Components: P1, P3, F1, T1, D1, D2, D3, D10, C3, C4, C6, C7, C10, R28, U2, U3

The PCB has pads for different types of transformers. First, solder the transformer into the matching holes. Check the polarity of diodes and electrolytic capacitors. The voltage regulators U2 and U3 face towards the main connector (p3).
When all components have been mounted properly insert the fuse and connect to 230V
~ mains voltage. The power LED should light up and you should be able to measure +12.8V between P1 Gnd and pin 3 of the IC carriers and -12V between P1 Gnd and pin 12 of the IC carriers. If this is not the case power down immediately and look for the error.


10.5.3 Assembly and Startup

Mount the diodes D4 and D5 first and use the clipped off wire ends for the two wire bridges, then mount the IC sockets. The terminals and the relay are mounted next. The terminals P5 and P6 must be joined with the tiny guide rails before soldering them to the PCB. Mount P4 and P7 in the same way. Then assemble the resistors, the remaining diodes, the trim pot and the transistors. The trim pot can be preset to roughly 32kΩ. When all components are assembled insert U1 and U4 into their carriers. You may need to bend the pins slightly inwards.

Finally, solder C11 piggyback onto D7. Make sure the polarity is correct. Unfortunately, this modification became necessary after the PCBs had been manufactured.

Update for PCB 1v8r2 (starting from 2017-04-19): the PCB was redesigned to accommodate C11.

Check the PCB carefully and connect it to the main voltage. Only the power and error LED should light up. If this is not the case switch off immediately and look for the error.


10.5.4 BOM

The following components are required for building the controller:

Value

Components

Count

5.6nF (NP0, low temperature drift)

C1

1

100nF

C2,C5,C6,C8

4

1uF

C10

1

220nF

C7

1

4.7uF/16V

C9

1

220uF/16V

C11

1

330uF/35V

C3,C4

2

1k

R10,R18

2

1k/1W

R9

1

1k5

R3

1

2k2

R22

1

3k3

R15

1

4k7

R14,R23,R24,R25,R28,R29,R30

7

5k6

R1,R16

2

10k

R2,R6,R7,R8,R11,R21

6

15k

R17

1

47k

R19,R27

2

100k

R4,R5,R20,R26

4

1M

R12,R13

2

Trim pot 100k

RV1

1

Trim pot 10k

RV2 (optional)

1

Fuse 100mA - 160mA

F1

1

Fuse carrier

F1

1

Relay

K1

1

Terminal 2 Pin

P1,P2,P3,P4,P6

5

Terminal 3 Pin

P5,P7

2

Transformer 12V

T1

1

DIP 14 carrier

U1,U4

2

1n4002

D1,D2

2

1n4148

D3,D4,D5,D6,D7

5

SD101C

D9

1

BC337-40

Q1,Q2,Q4

3

BC557

Q3

1

LM2901

U1,U4

2

LM7812

U2

1

LM7912

U3

1

LED 3mm yellow

D10,D11

2

LED 3mm red

D12

1

LED 3mm green

D8

1


10.6 Oscillator Calibration

Unfortunately, it is impossible to pre-adjust the oscillator frequency due to component tolerances. The frequency must be adjusted to 1kHz as precisely as possible using the trim pot RV1. The signal can be picked up from pin 2 of U1 with an oscilloscope or a frequency counter.
speaker
If none of these measuring equipment is available the calibration can also be performed acoustically. Connect a diode and a speaker to the Pilot signal terminals as show in the diagram. When the controller is switched on you will hear a beeping sound from the speaker.
You can either compare the pitch of the sound to an instrument (it must lie between h'' and c''') or you can measure it with a tuner, using your phone, with a spectral analyzer or oscilloscope app.

If the frequency is not adjusted properly the car will not respond to the controller reliably or not at all.


10. Testing

Once the PCB is completed the interesting quesion arises: will it work? In order to test the functionality of the assembly you need an EV simulator and an oscilloscope for troubleshooting.

The EV simulator is a simple circuit which mimics the correct behaviour of the EV and can simulate two distinct errors. The simulator is available as a kit from OpenEVSE but it is so simple that it can be built point to point.


EV
                simulator SW1
EV connected
SW2
EV charging (with SW1 closed)
SW3
CP short circuit
SW4
Diode failure


With the pilot signal from the AnalogEVSE PCB connected to the EV simulator you can test the following conditions using the onboard LEDs:


SW1
SW2
SW3
SW4
Zustand
LED
Conn
LED
Charge
LED
Error
Relais
off
off
off off Idle / no EV
off
off
on
off
on
EV connected
on
off
on Charging
on
on
don't care
on Pilot signal short circuit
off
on
off
SW1 and/or SW2
on Diode error


12. Downloads

AnalogEVSE was designed using KiCad 4.0.2. KiCad is a free EDA software package available for Windows, Linux and Mac OS X. The KiCad project is hosted on Github. Please remember that the latest revisions may not work.


Github: https://github.com/helmutheinz2002/analogevse

Files of the KiCad project

Zip-Archive:
analogevse-1v8r2-2017-04-19.zip

Archive of version 1v8r2 which matches this documentation and was used for manufacturing the current batch of PCBs

analogevse-1v8-2016-09-20.zip

Archive of version 1v8 which matches this documentation and was used for manufacturing the first batch PCBs

KiCad:
Downloads

KiCad Software Download

Wiring Diagram:
AnalogEVSE-1v8-Wiring.pdf

Wiring Diagram for a wallbox using the AnalogEVSE controller


13. Ordering

You can order the PCB or a full kit from me using the email address listed below. Postage is included for shipping within Germany. For shipping to foreign countries please inquire and I will investigate shipping costs.

Delivery time for a kit is approximately one week since I may have to obtain some components before shipping. PCBs can be shipped immediately as long as my stash lasts.

Please note: if you order the PCB only you will need to find a number of components that match the footprint on the PCB (e.g. the transformer). Moreover, the PCB size is tuned exactly to the DIN rail enclosure I use. The kit includes all components that will match the PCB and the PCB will fit nicely into the box.

PCB

Professionally manufactured single sided PCB
with solder resist and assembly pressure
Order PCB

No longer available
Kit

All components required for a complete controller:
PCB, components, transformer, DIN rail enclosure

Without external resistor Rext
Kit

No longer available


12. Disclaimer

(C) 2015 Bernhard Walter

AnalogEVSE is open source hardware. I designed it for my needs and although I designed it carefully I cannot guarantee that it is free of errors. Use it at your own risk.
You are free to build, copy and modify the circuit and its documentation as long as you include the original copyright notice and this disclaimer.

Use caution when working with high voltage. It may kill you.

I am not responsible for the content of linked external web pages.

Contact: analogevse@web.de


Changelog:
2015-11-19: Correction of minor error in PCB layout. Version changed from 1.3 to 1.4.
2015-11-22: PCB redesign for a standard transformer

2016-09-10: Version 1.8
2016-09-20: C11 added
2016-11-04: correction of charge current table

2016-11-07: correction of C10 in BOM
2017-04-19: New PCB layout, new email address
2018-09-25: Minor corrections: C1 NP0, LED states for testing
2019-01-01: Kits and PCBs no longer available