Design & Order on EasyEDA, PCB+SMT $10 Off: https://easyeda.com/editor
Get coupon & Join JLC&EDA Group: https://jlcpcb.com/EDA
Building and testing the 1kHz square wave oscillator and thinking about EVSE states of operation. Big thanks to Bernhard Walter for letting me share his AnalogEVSE project.
AnalogEVSE webpage and schematic:
http://www.analogevse.xyz/AnalogEVSE-en.html
http://www.analogevse.xyz/analogevse-v2.0.0-schematic.pdf
Other datasheets:
https://en.wikipedia.org/wiki/SAE_J1772
https://omronfs.omron.com/en_US/ecb/products/pdf/en-g4a.pdf
https://www.hlktech.com/en/Goods-14.html
https://www.ti.com/lit/ds/symlink/lm339.pdf
https://e2e.ti.com/blogs_/archives/b/smartgrid/posts/untangling-electric-vehicle-chargers-exploring-standards
Subscribed to my 2nd channel? Watch all my 3 minute videos on Julian's Shorts: https://www.youtube.com/channel/UCeewzdnwcY5Q6gcbnZKIY8g
Interested in my new garden workshop? Follow the entire build on Julian's Shednanigans:
https://www.youtube.com/channel/UCXfDjPehpC7B7lW2JFxeS4w
Join me on Odysee/LBRY: https://lbry.tv/$/invite/ @julian256:d
Octopus Energy referral link: share.octopus.energy/aqua-birch-918
(We each get £50)
#EasyEVSE
#ElectronicsCreators
Get coupon & Join JLC&EDA Group: https://jlcpcb.com/EDA
Building and testing the 1kHz square wave oscillator and thinking about EVSE states of operation. Big thanks to Bernhard Walter for letting me share his AnalogEVSE project.
AnalogEVSE webpage and schematic:
http://www.analogevse.xyz/AnalogEVSE-en.html
http://www.analogevse.xyz/analogevse-v2.0.0-schematic.pdf
Other datasheets:
https://en.wikipedia.org/wiki/SAE_J1772
https://omronfs.omron.com/en_US/ecb/products/pdf/en-g4a.pdf
https://www.hlktech.com/en/Goods-14.html
https://www.ti.com/lit/ds/symlink/lm339.pdf
https://e2e.ti.com/blogs_/archives/b/smartgrid/posts/untangling-electric-vehicle-chargers-exploring-standards
Subscribed to my 2nd channel? Watch all my 3 minute videos on Julian's Shorts: https://www.youtube.com/channel/UCeewzdnwcY5Q6gcbnZKIY8g
Interested in my new garden workshop? Follow the entire build on Julian's Shednanigans:
https://www.youtube.com/channel/UCXfDjPehpC7B7lW2JFxeS4w
Join me on Odysee/LBRY: https://lbry.tv/$/invite/ @julian256:d
Octopus Energy referral link: share.octopus.energy/aqua-birch-918
(We each get £50)
#EasyEVSE
#ElectronicsCreators
Good morning all i've built the oscillator on my printed circuit board. This is the oscillator that's going to provide a one kilohertz square wave, so this is built out of a cmos cd4060 and a crystal and all the associated components you need for a crystal oscillator. So, let's put the relevant components in a bit of grounding, not very effective, probably cmos. 406.
0.. Let's poke that into my socket. I only had a 20 pin, so i cut it down, but it'll do this is going to be quite roughly built really just want to get it working and the 4.096 megahertz crystal i've put a socket on for that uh really just to get it to a Position where i can plug it in so that's it i'll, put 12 volts on here ground, and these two points here are to link my relays connection to ground, because i don't really want the relays on all the time while i'm testing this part of the circuit. So, let's attach 12 volts from my bench, power supply negative, make sure they're not touching well, doesn't really matter.
It's current limited to about 10 amps uh right, so that goes on plus 12.. This one goes on zero volts the relays pull in now. If i link this point here, which is zero volts to the relays line, the relay's dropped back out again. So now, i'm just running my little cmos circuit and now we're going to need an oscilloscope.
So i'm going to use this aaron tech. So let's get that up and running okay. So let's put the probes i did notice. It says on here max input 40 volt.
So i will watch out for that, put the probe in there route that around the desk and see what we get right ground. The probe onto there now it i believe it's pin one which gives us the one kilohertz square wave. So let's take a look at pin one and there it is. Let's bring that in and yes, you can see on there.
I think you can see on there that it's exactly 1.00 uh kilohertz. Yes, that's right! If i press auto, perhaps that'll, oh, yes, that's better um! So yeah, that's the one kilohertz square wave coming out of here, derived from a crystal oscillator at 4.096 megahertz and then divided down lots of times. There are other divisions on this chip, so pin 2 is 500 hertz pin 3 is 250 hertz pin 4 is, what's that say: 16 kilohertz. Let me just widen this out uh.
No, it's actually 64 kilohertz. I think it was having problems counting and pin. Five is something else: 128 kilohertz, but they're all uh divisions down from 4.096 megahertz, so that all looks fine. The voltage is 12.5 volts, that'll, be the voltage of this battery pack.
So, looking at the analog evse schematic here's this clock, crystal 4.096 megahertz couple of load capacitors i've used 20 puff one meg, resistor mine's, actually on the bottom, the board and on the data sheet. It sometimes shows a resistor in here to limit current. But this schematic didn't have it, i didn't bother with it. It seems to work, and it also has an explanation on the 4060 data sheet for what that one meg resistor is so we'll have a quick look at that uh. Yes, here on the datasheet uh, the typical crystal circuit, it's got rc, which is the one meg across the crystal as broader frequency response. So without that presumably um, the resonant point is much tighter and you may not hit it possibly um and our s, which is this one resistor from the output of the first inverter stage, just says current limiting but doesn't appear that you need it. Incidentally, if i take off this relay suppressor thing and let the relays kick in, of course, you get a slight reduction in the amplitude of the oscillator, but also i noticed over time it was pulling the voltage down ever so slowly because it's just draining the batteries With a 150 milliamps of current, so yeah better to test this with the relays turned off, so the next stage is to put comparators on my prototyping board, but i'm looking at this circuit thinking how many of these one two three four five, six seven eight comparators Do i actually need - and i think i only need three - this one, for example, is just driving through this zener an led. That's all it does um.
This one is looking for the nine volts to say that the plug the evse plug is connected to the car. Now that enables it it turns an led on, but it also enables this comparator, which is used as a gate. So here the square wave output of the one kilos that we've just seen is turned into a rough approximation of a triangle wave through this. I suppose it's a low pass filter, isn't it integrator type circuit um? The voltage of that waveform is compared with a fixed voltage, although it can be variable in case you want to change the pulse width, so the output of this comparator.
We have the pulse width modulated square wave coming out here now. This is a gate. So if the car is connected, this line goes into this gate and enables this possibility modulated square wave to come through to the line driver which is ultimately driving the cp line, which is here and goes out to the car. But if the vehicle is not connected, this gate turns off and what appears at the output here is 12 volts, 12 volts dc, not oscillating.
So the question is why, when the vehicle is not connected, do we want 12 volts dc on this line and not a square wave? It's certainly not for safety reasons, because it's not going to um hurt you if you put your fingers into a pin where there's a 12 volt to minus 12 volt square wave coming out, so it must be for some other reason. So, looking back at this j1772 state diagram, we can see here that state a is 12 volts dc and it doesn't oscillate. This is a fixed voltage, so in order to achieve state a that gate in the schematic is needed when the 12 volts gets pulled down to 9 volts. The comparators in that circuit enable the square wave and you get an output, now pulled down to nine volts, but which can traverse from nine volts to minus 12 volts at one kilohertz. Now, looking at this schematic, the instant you put, the plug into the car, the 12 volts gets pulled down to 9 volts by the resistor, that's in the car, and that will be sensed here. This will be gated to enable the square wave to come out of the driver and the square wave will appear at the car. The instant you put the plug in so i think the car is never going to see that static 12 volts dc. It just isn't going to see it.
There isn't enough time delay in this circuitry there's a few microseconds of delay. While this 100 end cap charges up, but it is microseconds so reading all the various documents that i've read. I think the purpose of this is that until this square wave oscillation starts, the evs is essentially telling the car there's no power for you, you don't you can't pull power because there isn't any, and i think that as well as this state, a um with 12 Volts dc and the state b, with nine volts at the top oscillating at one kilohertz. I think there's a case for saying there's an extra state in here, and it is this state where it's pulled down to nine volts because you've plugged physically the plug into the car.
But it's not yet oscillating, because the evse is essentially saying: there's no power, i'm not going to start the oscillator, because i can't supply you with power now. Why might it do that? So i'm going to call this state a b because it sits between state a and state b, and this, i suspect, can be any length because if the evse, let's say, is connected to solar panels, for example, and it's night time and you plug a car into This evse. Well, then, it can't supply any power because there isn't any or you might have a situation where you've got multiple uvses on a site with only one power supply and currently that all the power available is being used up somewhere else. Maybe on other ev charging or just somewhere in the building and the evs is essentially saying: well, i'm sorry but there's no power available.
So, despite the fact that you are plugged in - and this is pulled down to 9 volts - i'm not going to start this oscillator because i'm not prepared to supply you with power. So i'm going to call this state a b evse power not available. So if the power is not available, then the evse will simply hold a dc 9 volts on here continuously and not start the oscillator. If the car doesn't see this oscillation, it won't start the battery charger and it won't pull any mains power, and so looking back at the schematic, that's why i believe that i don't actually need this gate or this gate or this comparator, because this comparator is sensing.
The pull down to 9 volts that enables, via this gate, which is just another comparator, the square wave to pass through to the cp line driver. Never i think i can get rid of that comparator and that comparator, because the car in this setup is never going to see the straight 12 volts dc. So why have this gate? And why have this voltage sensor? This comparator also drives an led, but i'm not intending to put any leds on this. So i think i can do without those two feed. The uh possibility modulated via this voltage here square wave straight into the cp line driver and have that um one kilohertz pulse, fed out to the car at all times, because power is available from my mains outlet at all times. I'm never going to be in a situation where the evse needs to tell the car sorry there's no power available, because it always will be now. What i'm doing here is i'm making a case for a simplified cut down version of this evse, where i think i only need three comparators this one to positive, modulate the square wave and these two to set a window comparator so that voltages on the top of The cp signal, but which are either at six volts or three volts, enable the relays to be pulled in, and i think that's all i need now if you're thinking you're drifting away from the j1772 spec. Yes, i am because i'm also not going to bother with this comparator, which checks for the diode that's in the car, but then the evse that i bought and i wouldn't be surprised if my mg evse - does the same, didn't even check for that diode.
It enabled the relays, even if that diode wasn't there, we saw that in the previous video. So certainly yes, i'm going to cut this right down to the minimum i can get away with now. There have been evse designs where they didn't even bother with the negative 12 volts. They simply put out a square wave between plus 12 and 0 0 being protective earth.
So just 12 volts relative to protective earth and didn't bother with the negative part of the square wave at all and the car charged. I think it was probably the nissan leaf, because these were older designs. I'm not going to go quite that far. I'm going to have the negative 12 volts, but i think i'll just have the minimal number of comparators to just get this to work now, of course, there are other things that are built into typical evses, which this circuit doesn't have like ground fault detection.
There are also ways of checking for stuck relay detection uh how you would disable the mains if your relays were both stuck on. I don't know it's highly unlikely, but yeah you can check for stock reload detection by detecting whether there's mains on the out put side of the evse and flash a red light or something if there is, you can also have on the little current transformer. That's doing the ground fault detection. You can also have a little extra coil so that you can simulate a ground fault to do ground fault, detection, uh functionality, detector stuff, which i think in open evs.
If you look in the open, evse documentation, they have all of this stuff. Well, i'm going to have none of this stuff and because i don't have any sort of ground fault detection, i'm going to not charge the car from full strength - mains, domestic mains! When i first test this i'll be charging it from a large power bank with a two kilowatt pure sine wave inverter, so that um i can put at least i think it's the six amp setting and the eight amp setting will be within the spec of that Inverter and i can charge the car from that - just means i'm not having to worry about uh ground, referenced mains. So sorry that was all a bit wordy, but i just wanted to go through my rationale for only having one two three comparators in the first version of my evse uh non-ground referenced mains, plug it into the car and see whether it charges so the next thing. I need to do put one of those comparator chips: the lm2901, probably here, they're quad comparators. I think i only need three comparators, so one chip package will be enough put the pair of transistors, which drives the cp line. There's my cpu line running across the bottom. There, why are that all up and get it uh, sending a cp signal out? Here's the cp output. Here i need to put the transient suppression diode in and, of course, the relay drivers will enable uh mains live and neutral.
If we see the top of the cp pulse, pull down to uh between well six or three volts, so between seven and a half and one and a half volts now cmos chips, um, i think most of them work up to 15 volts. There are some high voltage ones that work up to 20 volts. I don't know whether this is one of those, but there are no cmos chips that run at 24 volts. So this 4060 is slung between 0 volts and 12 volts.
So the signal coming out of it is all above the zero volt line, there's no negative 12 volts yet, but the comparator chip, i think all of the comparators - are slung between plus 12 volts and minus 12 volts. So they have a full 24 volt swing on their output and for that reason i'm going to need my minus 12 volts. I probably won't fit the big 12 volt power supply yet because that means putting mains into this thing. Don't really want to do that until the last um leave it as late as possible, but i could put the minus 12 volt power supply in which is this little 1212 s now this is isolated, so the positive output of this i'll tie to zero volt.
So i have tied to zero volts. The negative output will then be my minus 12 volts. So i think i'll put that in now get some caps in here and just see what we're getting out of this little regulator to see that uh, minus 12 volts is going to be available to the comparators. When i put them in so solder that little four pin regulator in one two, three four, so that's in let's get a couple of um uh.
What are they radial? Aren't they uh electrolytics, stick them in there. Uh found some of these hundred mike 50 volt they'll. Probably do where's it say: 100.50 volt, there, 100 microfarads, 50 volts i'll shove them in either side of this regulator; one's on the input one's on the output. There's also a couple of hundred ends: surface mount on the board already and we'll test the output of that regulator. Solder, these electrolytic caps onto the board that'll be the output one. This will be the input one: okay, let's check it out with a dmm. Well i'll. Just do a quick test to uh check whether anything goes pop.
Oh, oh! No! That's the relays! Isn't it? Oh! It scared me a bit there um, okay, so no smoke. Now we need to check the minus 12 volts so power, the circuit up and measure from zero volts, which is up there and minus 12, which is here and we've got -13. Now i was warned sdg said these things can be a little high. I could put an led on that, but i've got a feeling that when the comparators drawing a bit of uh current from that that that'll, probably settle down to minus twelve must be, i was thinking it might be a bit higher than that.
But that -13 is pretty good, not too bad. So i just thought i'd check it again with the relays disabled, so they're not quite pulling the input side down. Quite so much and yes, it does drift up slightly to minus 13.2 but, as i say, i think, that's i think that's acceptable and once the comparator chips on there drawing a bit of quiescent current and that should pull down nicely. I think so.
I'm going to fit another socket in there do all the wiring necessary to get the comparator functions. That's just floating now, um working with my three comparator version of this and then um. My first test of this will, of course, be actually to plug it into my car, so i'll show you that whole process got some slightly better weather. Coming up.
It's been a bit tricky uh up to now, because we've had all these storms barreling across from the atlantic, but the weather does seem to be settling down a bit now. So hopefully that'll be timed nicely with when this thing is ready to have its first test. But i think from from today's perspective, that's all i wanted to do today, so cheerio.
Will EV's ever have a flap on the side with a self retracting cable and standard UK plug on the end so you just pull it out and plug it in the wall and thats it ?…cheers.
I know literally nothing about EV charging and so am really liking this series.
Isn't there a case where, for example you have a domestic power outage, the CP signal goes to 9V, your 'connected but no power' AB state indicates the vehicle cant draw power, but couldn't it 'supply' power if it supports vehicle to load? You wouldnt want the vehicle feeding back to the domestic supply.
I know thats all rubbish, just letting my fingers do my thinking….
hmmmm
yay