Speak EV - Electric Car Forums banner

1 - 20 of 20 Posts

·
Registered
Joined
·
788 Posts
Discussion Starter #1
I'm sure you guys know that an EVSE signals to a car how much power to draw by altering the mark/space ratio of the control pin squarewave. A 50% mark (and 50% space) corresponds to 30 Amps, and a 10% mark (and 90% space) corresponds to 6 Amps.

Has anyone tried to change these on a non-adjustable EVSE? I'm wondering if a simple CR high pass filter could give the desired effect. Obviously the mark would no longer be a nice square shape, but how sensitive is a car to that?
 

·
Registered
Renault ZOE R135 ZE50 GTLine July 2020 (Sold: R90 ZE40 i Dynamic Nav June 2017)
Joined
·
554 Posts
A CR filter wouldn't do the job. It wouldn't change the mark/space ratio - just spread out the square wave until, ultimately, it wouldn't be recognised. You need to change the width of the mark and space. Adjustable EVSE do just that, and you could, I suppose add a circuit to generate a different mark space ratio.
 

·
Registered
Joined
·
21 Posts
Got any info on the controller in your charger Tandy0, I know in a previous thread we discussed using a resistor across a couple of the inputs to the controller to tell it to use specific charge rates. That not an option for you?

You could possibly use an arduino to create the square wave you need, would be very easily done I'd say?
 

·
Registered
Joined
·
788 Posts
Discussion Starter #5
Thanks guys. Yeah, I guess the arduino would be the best solution. Just am mentally fighting against learning yet another progamming language. So far I've learnt Z80 assembler, 68000 assembler, basic, and one or two others for microcontrollers at work.

The resistor idea only reduces the current to 13 Amps which is a bit pointless reducing my 16 Amp podpoint to.
 

·
Registered
Joined
·
21 Posts
The resistor idea only reduces the current to 13 Amps which is a bit pointless reducing my 16 Amp podpoint to.
Is that a limitation of the controller in your charger, mine is down to 6A which is plenty low enough not to overwhelm my solar generation most of the time?

Yeah, I guess the arduino would be the best solution. Just am mentally fighting against learning yet another progamming language. So far I've learnt Z80 assembler, 68000 assembler, basic, and one or two others for microcontrollers at work
I don't know the specifics, but I'd say you'll be talking a handful of lines of programming on an Arduino tbh. For example 50% duty cycle on 490Hz is literally just this -
Code:
int output_pin = 6;
void setup() {
  pinMode(output_pin, OUTPUT); }
void loop() {
  analogWrite(127);}
 

·
Registered
MG ZS EV Exclusive
Joined
·
339 Posts
Why would you want to do this?
 

·
Registered
Joined
·
758 Posts
Is that a limitation of the controller in your charger, mine is down to 6A which is plenty low enough not to overwhelm my solar generation most of the time?


I don't know the specifics, but I'd say you'll be talking a handful of lines of programming on an Arduino tbh. For example 50% duty cycle on 490Hz is literally just this -
Code:
int output_pin = 6;
void setup() {
  pinMode(output_pin, OUTPUT); }
void loop() {
  analogWrite(127);}
My understanding is that the control signal itself is a 1 kHz +12V, -12V square wave . Possibly the Arduino would need some level shift scheme at its output...
 

·
Registered
Joined
·
18 Posts
Why not use a simple 8 bit micro-controller with a built-in Pulse Width Modulation (PWM) module and then convert the logic level output to +/- 12V using MOSFETs, all controlled by potentiometer. A nice bit of low level assembler programming project. I bet the circuit could be designed to fit on 25mm by 25mm pcb using surface mounted components. (Sorry I'm a geek!). I'd be worried though in case the charger on the EV tries to draw more current than the supply can give!
 

·
Registered
Joined
·
21 Posts
Why would you want to do this?
For me it was wanting to leave the car charging during the day while there is excess solar, which may only have an excess of 1-2kW, so if the charger blasts away at 7kW you’re importing from the grid. You can get chargers that do this automatically based on watching for exported power and starting to charge then, but they’re not cheap, especially if you already have another charger.
 

·
Registered
Joined
·
11 Posts
Thanks guys. Yeah, I guess the arduino would be the best solution. Just am mentally fighting against learning yet another progamming language. So far I've learnt Z80 assembler, 68000 assembler, basic, and one or two others for microcontrollers at work.

The resistor idea only reduces the current to 13 Amps which is a bit pointless reducing my 16 Amp podpoint to.
Why not go old school and go for an analog only solution using a 555 timer circuit?
 

·
Registered
Joined
·
788 Posts
Discussion Starter #12
Why not go old school and go for an analog only solution using a 555 timer circuit?
I have been thinking along those lines.

Actually wondering if the squarewave produced by a podpoint is actually generated by a multivibrator of some sort rather than the microcontroller. There seem to be several small relays on the board which might swtch the control line to the generator.

I'm wondering if I could change a resistor value to give a different mark/space, or just substitute a 555 as you suggest.
 

·
Registered
Joined
·
788 Posts
Discussion Starter #14
Thanks. I'm looking at this little chip IC9 on the board at the moment. Pin 3 is connected to the control wire.

I thought for a moment that it was a mini 555, but pin 2 & 1 are joined together. Anyone know what it does, or have any data on it?

132889
 

·
Registered
Joined
·
3,429 Posts
There's a bit more to it than simply changing the mark-space ratio on the CP line. You need to monitor the state of the the voltage on that line, as the EV may decide it doesn't want any more power, and may change the resistance to ground at its end, so the DC level on the CP wire changes. That's a signal that you must stop modulating your own output. There's a J1772 spec (free) you can hunt for on the web, rather ancient but this bit of it is I believe still the correct protocol. Suggest you grab that & read.
 

·
Registered
Joined
·
788 Posts
Discussion Starter #18
There's a bit more to it than simply changing the mark-space ratio on the CP line. You need to monitor the state of the the voltage on that line, as the EV may decide it doesn't want any more power, and may change the resistance to ground at its end, so the DC level on the CP wire changes. That's a signal that you must stop modulating your own output. There's a J1772 spec (free) you can hunt for on the web, rather ancient but this bit of it is I believe still the correct protocol. Suggest you grab that & read.
Thanks. I downloaded this before the spec disappeared:

• Before there is any connection, the EVSE puts 12 V dc on pin 6.

• When the vehicle is first connected, a 2.74-kΩ “sense” resistor aboard the vehicle pulls down the voltage on the pin 6 line in the EVSE to +9 V. When the EVSE senses voltage drop, it starts to generate a 1-kHz square wave on pin 6 that toggles between +9 and –12 V. (A diode in the vehicle clamps this at –12 V. The diode clamping is a safety feature, intended to allow the EVSE to distinguish between a vehicle and some random resistance accidentally bridging the charging line.)

• What happens at this point depends on the vehicle battery’s state of charge, which is a parameter that the vehicle’s computer tracks. If the vehicle requires ac energy transfer, it closes an internal switch that throws a 1.3-kΩ resistor in parallel with the 2.74-kΩ resistor. This reduces the total resistance to 882 Ω and pulls down the positive peak of the square wave to +6 V. The EVSE interprets this as a request for ac power and turns on the charging voltage.
Probing around with my scope probe, I have found R61 which connects the 5v squarewave output from the microcontroller to a number of FET's which switch the higher voltages onto the control lead. I plan to remove R61 and replace it with some gates which will reduce the width of the pulses. I'll keep you guys informed if I get anywhere.
 

·
Registered
Joined
·
28 Posts
Interesting stuff.

mid you were using an Arduino, you’d want to set the PWM frequency to 1kHz (analogWriteFrequency). Id go for something like a Teensy or one of the ESP32 boards as they’re small and powerful.

Feed that into the logic level side and let the existing board do the level shifting.

you could sense the existing signal and use that to enable/disable your modified version.

It does sound exciting, by which I mean a bit risky.
 

·
Registered
Joined
·
3,429 Posts
... and if you're able to tap into the logic side, I'd go simpler than using an arduino/esp32 to reconfigure the pwm freq. By the sound of it, all you need is one input pin to sample the present sq-wave (or not), and 1 output for your version of this. Plus one more input pin to control it. It's asking for something tiny like a PIC 12F683, runs off 5V, 8pin DIP package, 20 MHz internal clock. I used one of these to make a synchronised 3-phase clock for a 3-phase 3V buck-converter, the entire program loop was 6 instructions (after the usual setup preamble stuff) so it ran like the clappers, as it needed to! My 3 output square-wave clocks ran at 625 kHz. Msg me if you want the code for this program. I see from the listing that a 12F1501 might be better as can run 20 Mkz with a crystal at 3.3V. There's probably an even better version of these PICS around today, this was back in 2014 I did that project. Happy to help - sounds interesting!
 
1 - 20 of 20 Posts
Top