OpenEVSE with MG ZS EV

Hi Glyn.
I have now got my other ev car the MG Zs this seems to be causing all sorts of problem s. For rolec and other chargers . Trying to do timed charging .
I have just had the upgraded software installed on the MG zs ev. And I am still having problems I have put a scope on the pilot line and what I see as the normal operation. Is 12 volt until plugged in the car . This then gets pulled down to 9 volts and sits at this until the Eves starts timed charge when we have a square wave. At +9. - 12 volt At this point the MG should pull the 9 volt down to 6 to signal the charger to close the contractor . But the MG goes to sleep and does not pull this down .
I have fitted a switch in the pilot line and I find that if I now plug cable into the car and lock it with the switch open ie no 12 volt pilot. Then when I want to charge I close the switch to give the 12 pilot the normal handshake commences and the MG starts to charge normally .
I am trying to find a circuit diagram for the lates v5 board to see if we have control over the 12 volt pilot signal . I would like to remove this while we are waiting for the timed charge period to start and only bring it up when we are ready to charge . I manage to load the source code in my aurdino ide and get it to compile and run but for some reason did not seem to be stable . I need the Eu source code. Is it possible to control the pilot this way Or do I need to use a additional output and mosfet to gate the 12 pilot on /. Off I am still investigating this going to try my second eves charger see if have same problem . They both work on the bmw. No problem
Edit
Just found a diagram showing a pwm signal being used to switch an opamp between +12 and -12. I wonder if I could use this to give the -12 volt output while waiting for the timed output to begin this should be blocked by the diode at the charger end so would apples as no pilot signal this may make this all work any thoughts on this ?
Regards bill

Hi Bill,

Thanks for posting, this is very interesting. I’ve been following the issues with MG, I’m aware of the timed charge issue. Does the update fix timed charging on other charge points e.g Rolec or the granny cable?

Here is the V5 controller schematic: OpenEVSE_PLUS/OpenEVSE_PLUS_v5/OpenEVSE_PLUS_v5_sch.pdf at master · OpenEVSE/OpenEVSE_PLUS · GitHub

Selection_317
Here is the EU source code: GitHub - openenergymonitor/open_evse: Firmware for OpenEnergyMonitor OpenEVSE

I’m not sure if it’s possible to remove the pilot signal without switching off the whole unit. On (sub optimal) solution could be to add a relay to replace your switch.

It’s a shame MG has not fixed this issue, the car is obviously not complying with the J1772 protocol as it should.

Hi Glyn.
Thanks for the speedy response

It is a bit of a strange one I have been waiting for my car for a few months just got it Saturday .

The reported problem was that timed charging was not working and it also would not recover from loss of mains when it returned . MG have released two updates on software for the charger. Today I have had these installed . So now I can test with my system
I am using the precompiled latest version of Eu software. And also latest version I believe of the WiFi interface .

It would seem that once you plug the car in to charge the pilot signal is now at 9 volts you have about 15 to 20 min to respond with the sq wave

Pwm. The car will then pull pilot to 6 volts and charging can commence with contractor coming in .

If you do not respond in the 20 min time then the car goes to sleep and when you do respond with the pwm sq wave the car does not pull down the pilot to 6 volts charger reports car connected …

What I have found if in this condition you remove the pilot signal back to 0 volts And then reapply it The car will now respond compleat the hand shake and start charging

At this moment I have set car up to charge but have put a switch in the pilot signal so the car does not see the 12 volt. The car reports that it is connected as the plug is being sensed . I am going to wait an hour then make the switch on the pilot line
I think that it will then start to charge as it should .

I have been looking at the soft ware source code and have found red to a pin that can be defined which will go high when sleeping and low when not. It is headed “ sleep_status_ reg &pinb I am not sure if this is in the precompiled code ?

I could use this pin to control a relay

On the pilot signal .

or is it possible to reverse the pwm output to give -12 volt output when sleeping . This is easier than getting the board out and soldering .

Would this be an easy thing to compile ? So I could upload and test ? Would it cause problems with other car s

I must admit that I am struggling to follow the source code it’s a bit more involved then what I play with .

Regards. Bill

Hi

Regarding the granny cable that will now work if you switch it on and off with a timer .
Rolec are still having problems

Zappi some ppl say they can charge with this and do delay charge but I think that some of them are using a get round by starting charge at low rate 6 amp. Then ramp up to max when in the correct time charge period

Thanks for the links just see them after sending you other msg.

The diagram of the pwm signal into the opamp. Looks the only way to control pilot would have to fix that signal to give -12 out and hope that the blocking diode at car end does its job so car will think that is same as 0 volt
Regards. Bill

Think I agree with you
Fitting a relay controlled by a output pin may be the way simples

I was just looking at the souce code for the pilot and I see that it takes -12 volt steady as a fault indication .

Regards. Bill

Hi Glyn
Ok been over an hour now went out car left alone all plugged in I remade the switch on pilot signal and car responded as expected and began to charge .

Video.mov (1.65 MB)

(Attachment ATT00001.htm is missing)

Any help would be aprecated here
I have down load the latest Eu source code the Glyn
Listed above .
How Do to put this in a directory
In audino IDE So I can edit it and compile
At the moment I have copy in to a dir. on its own but when I try to test compile it tells. Me that PROGRAM = version. Is not defined ?

All my programming to date is a single file with some includes
I do not understand all these defin if statement
But presume that a file some where is thrilling them the sections you want compiling
Bill

Hi Glyn well i have sorted the charging problem . i decided to leave the evse alone
and inserted a relay in the pilot line this is controled by a audino uno .
i have programed this to monitor the pilot voltage and also to detect the presence of the PWM signal . when it sees 9 volt and the pwm it waits 10 seconds and if it does not then see the pilot voltage drop below 7 volts it then opens the pilot line to the car removing the 12 volt signal
waits 5 seconds and then closes the relay restoring the 12 volt signal to the car … this does the trick the car then responds by pulling the pilot down to 6 volts and all works well …
the aurdino then just monitors the pilot line after that and if it sees the pilot line return to 9 volts it makes a note that the car has teminated the charge but does not try to reset the car .
when it senses the loss of the PWM signal and that the voltage is 9 volts or above it then resets ready for the charge to begin this could be a timed charge or just the car being pluged in again . this seemed a faster fix for me to impliment … And if MG ever get there software right i can remove it easy as it is only 3 conections and a 12 volt feed .
this is the circuit i used to do this . if anyone wants the source code i used just ask and i will post it . you should find the code here
MG_ZS_Wakeup-master.zip (1.5 MB)

a copy of the code would be good great work

hi just seen your msg to day i hope that i have done this right as first time i have used this
to try and post code you should find code and a simple drawing here Ernest-burgess/ MG_ZS_Wakeup

Please don’t link to files on external sites. Unlike others, we want you to attach your code, screenshots, log files, etc to your post. If the external site goes away, the material is likely to be lost forever. If that happens, when someone reads your post, your post will have little or no value.

Your privileges should allow you to do this - let us know if you have a problem.

Thanks.

hi must admit i am a bit confused here as the links i follow from this site normaly take me to github . so i thought that was how to make this code avalable .
i am happy to bring the code onto here … ok think i have found out how to do this
i will try it now

MG_ZS_Wakeup-master.zip (1.5 MB)

1 Like

You can have it in both places of course. But generally, we prefer all contributed data to be here, where it’s backed up along with the thread and all the other information.

thats fine it makes sense to me ok think i have it sorted now in fact that worked well as the zip file has all the infomation in it cheers bill