Saturday, January 10, 2015

OpenEVSE II logic/display board theory of operation

The OpenEVSE II design for the logic/display board is fairly well set by this point. All of the iteration lately has been on the feature set of the various types of HV/power boards. I thought I'd set down exactly how the various parts of the logic/display system operate.

I'll do this by showing one sheet at a time of the schematic and explaining all of what's there.


The first sheet is the power supply and GFI subsystems. The HV board has an isolated AC/DC power supply that feeds 12 volts to the logic/display system. EVSEs need +/- 12 volts and +5 volts to operate, so -12 volts and +5 are made with two DC/DC converters built from the venerable MC34063 DC/DC converter module. This chip can be used in buck, boost or inverting topologies, and we use the inverting topology to make a -12 volt supply rated for 50 mA max and the buck topology for a +5V @ 500 mA supply.

The GFI system is largely copied from a CR Magnetics application note. A capacitor is added to the amplifier stage to act as a low-pass filter, which adds some noise immunity. Rather than a second amplifier stage, the output from the first is simply fed into a comparator with a peak detector. That line is fed into an interrupt input pin of the ATMega chip that watches for a rising level. An interrupt service routine will quickly turn all of the relay output pins off.

There is a GFI test system, which simply consists of a current limiting resistor. A wire will go from that output and take 3 or 4 wraps around the GFI coil and then connect to ground. The code will pulse this line at approximately 60 Hz to simulate a ground fault. The expectation is that during this test the GFI will detect the pulses. The software will note a GFI failure if it doesn't.


The second sheet consists of the ammeter and the pilot generation and read-back circuitry. The pilot generator converts TTL output from the controller into +/- 12 volts. It does this using two pairs of transistors that make up a modified H bridge architecture. Two transistors are used to switch +12 or -12 volts onto the pilot output, and those two transistors are themselves switched on and off by transistors that are intended to translate the TTL levels into current flow to trigger the other two. Since the circuit is acting as an H bridge, it is critical to insure that the input is either TTL high or low and never a voltage that's in between. That could result in both output transistors being switched on, which would short +12 to -12 volts. R4 acts as a pull-up resistor to protect the pilot generator whenever the pilot output pin is in a high impedance state (which happens when the controller is being programmed or during and shortly after power-up reset).

The 1k resistor on the pilot output is required by spec to set the output impedance. The three resistors after that form a feedback network that scales the +/- 12 volt pilot to 0-5 volts to feed into one of the controller's A/D pins. The firmware will use this feedback to detect a missing pilot diode and the J1772 state requested by the attached car.

The ammeter is quite simple. It's a current transformer with a burden resistor and one leg offset to 2.5 volts. This is intended to keep the entire AC signal within the controller's input A/D range of 0-5 volts. Two zener diodes form a clamp to protect the controller from excursions beyond the acceptable range. The burden resistor must be carefully chosen. Too small and the ammeter's resolution will be poor. Too large and its range won't be high enough. The capacitor to ground on the anchored leg reduces noise in the readings.


The controller/display sheet includes the controller itself, which is clocked with a 16 MHz external crystal, the real-time clock chip and its backup battery, and the display. The display is the same design as the AdaFruit i2c RGB backlit LCD Arduino shield. JP3 is a bit tricky. It's not actually a separate connector, it's just the extra two pins for the RGB backlit LCD (the standard EAGLE part library only has a standard backlit LCD, which has only 16 pins).An i2c GPIO chip is used so that the I/O pins on the controller can be dedicated to EVSE functions rather than the display. The real-time clock chip also shares the i2c bus and has a CR1220 battery to keep the clock running during power outages or storage. The SPI bus pins of the controller are unused, and so can simply be connected directly to the AVR ISP connector for reprogramming. There are two solder jumpers present, One allows selection of the polarity of the backlight common pin for the LCD module. By default it's wired for common anode backlight LEDs, but changing the jumper (and the software) can allow use of a common cathode LED backlight instead. The other solder jumper connects the serial port's DTR pin through a capacitor to RESET. Closing that jumper will mean that transitions on the DTR pin will reset the controller. This is required if you want to upload new code over serial using an Arduino style bootloader, but is not recommended in any other context.

The FFC connector to the HV board has two otherwise unused pins (RELAY_B and AUX) that can be used for additional expansion functions in the future.

No comments:

Post a Comment