What don't we put some positive energy into developing a safety circuit?
I need a circuit designed that will limit the maximum EVSE pilot signal "duty cycle / pulse wave modulation" to the following:
1) EVSE pilot signal > than XX duty cycle, output XX pulse wave modulation (PWM) only
2) EVSE pilot signal <= to XX duty cycle, let the EVSE's PWM pass through unchanged
I've been thinking about this:
1) Luckily, it's theoretically possible for this to be self-powered (leached from the pilot signal itself): the car only draws current from the positive half-cycle of the square wave, and since our circuit needs to reduce the duty cycle of the square wave (in the cases where it is doing anything at all), then the power delivered to the car is less than the power drawn from the EVSE [talking here of the very small amount of power in the pilot signal itself, not the AC!]. Hence in the case where we are reducing the duty cycle, there is power available to run our circuit; in the 'do nothing' case, we either need to arrange that our circuit consumes a negligibly small amount of power, or else we always need to reduce the duty cycle very slightly (which would be a shame, not a show-stopper). If the pilot signal had been the other way up, then this would have been a non-starter.
This is also a good secondary safety effect: the circuit can't get it wrong and significantly increase the duty cycle over what the EVSE specified without running out of power.
2) Analogue approaches: it's easy enough to turn the duty cycle into a voltage and threshold it (though maybe issues with accuracy), but building something that modifies the square wave having decided to do so is tricky - simply interrupting the current to shorten the high pulse isn't guaranteed to work, as it needs to be actively driven negative (even though the car isn't drawing a load on the negative half-cycle, the input it uses to monitor the duty cycle is entitled to expect it to go negative. Not impossible, but it's all getting a bit complicated and hard to demonstrate that it works in all cases.
3) Digital approaches: the required logic is a trivial piece of software if you can get a small micro in there - the challenge is to power it while keeping all the other conditions correct:
- Mustn't draw more than about 1mA (and preferably less) when not pluigged in to the vehicle, to prevent the EVSE thinking there's a vehcile plugged in.
- Must draw enough current during positive half-cycles to keep the voltage in range - so that the EVSE neither thinks the car has gone away nor thinks it is demanding ventilation [ideally, we pass through the ventilation request, but would probably be OK just to detect it and shut down, with this adapter specified not to work for vent-required charging).
- Must track duty cycle changes during operation, in case of a smart EVSE.
- Must detect the car having gone away (or requested end of charging) and reflect this back to the EVSE.
- Avoid exceeding the load capacitance permitted on the pilot (2.4nF). This will be a bit marginal, since we will be presenting a complex load, but unlike the other values the spec limit here is rather arbitrary.
By way of scale, in the charging state the car draws approx 6mA @6V [50% duty cycle], and 3mA @ 9V before starting to charge. So a micro such as MSP430F5172 which uses 100uA while running and about 10uA in sleep is just about feasible - if running all the time, would have to reduce the duty cycle by 1.7% (charge at 29A rather than 30A) to make up for the micro's consumption; if it can be kept mostly in sleep mode then the effect becomes negligible (and can probably be lost in system tolerances).
Simplest approach would be to separate the two sides: just rectify the pilot to supply +/- power and then talk to the EVSE on one side and generate pilot from scratch (using that supply) on the other side. However, this would look very bad for the effective capacitance. Better approach is to run the output synchronous with the input: still rectify the EVSE's pilot to power the micro and the negative rail, but take the positive output directly from the input with a FET, drive the output to the negative rail for the other half cycle, and have an additional means to load the input to burn off excess power. Probably it can all be done just by accurate timing, but a micro with an ADC (as above) would allow for monitoring the voltages and tweaking the duty cycle if necessary to keep them in tolerance. Also with that particular micro gives you a temperature sense 'for free'.
All sounds quite doable, though I don't personally have a need for it since I'm in Europe where the type2->type2 cables are already self-identifying.