Design & Order on EasyEDA, PCB+SMT $10 Off: https://easyeda.com/editor
Get coupon & Join JLC&EDA Group: https://jlcpcb.com/EDA
Testing the relay drivers and looking at schematics for the control pilot circuitry. 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://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 relays have arrived in here and uh, i'm going to solder them into my pcb, so these are hong. Far hf102f dash p relays 12 volt dc coil 20 amp at 250 volt ac contacts. Now these hong far relays are clearly modeled on the omron g4a relay the g4a. Has these top terminals, which are just duplicates of the switch contacts, not the coil? These are not coil connections, uh the non, the one that doesn't have the tags on the top.

Has this sort of lump on the top? Instead, now, interestingly, i've printed out a data sheet for the g4a relay and you can see um, there are two types: the terminal or the spade receptacle type on the top or this strange additional box on the top. So very much uh, the hong far well is a copy of the omron or vice versa. I suspect that the hong kong is a copy of the omron, so let's get these two relays soldered in um. These i can put aside for a later variant where there's perhaps a bit more headroom in the box in the box.

I'm currently working with there isn't enough room to take these relays with the spade receptacle on top, so i'll put them to one side. Now i have noticed something on here and it's this ratings coil we have the 12 volt dc relay, has a rated current uh for the coil of 75 milliamps, that's 160 ohms coil resistance and of course there are two of them. So that's 150 milliamps and that's potentially a problem because my chosen little 12 volt power supply has here. It is the hlk pm12 and it has a short-term maximum output current of 350 milliamps, but the maximum output current for a long time greater than or equal to 250 milliamps, so 150 milliamps of that is used up just in the relays, and that might be an Issue particularly when later i'm considering adding an arduino to this uh, not quite high enough that, oh, i wonder if that would work put that under there.

Oh, yes, that's just about right! I think yes, perfect, right, let's solder these relays in now. Actually, i only need the coil terminal soldered in for now, so perhaps i'll do that just put the coils in not worry about the mains. All these holes are quite big. I think it's because the pins are not circular they're flat.

So it's taking a fair bit of solder. Anyway, that's got the coils soldered in now. If i put 12 volts on this port this board, the coil should pull in right, 12 volt current limited power supply. That is negative, so that goes on zero volts and this is plus 12 volts, which is there and they pull in fantastic.

I should have put some leds on these shouldn't. I because it's not very visual, although i expect you heard that right. Let me just sketch out the schematic for these relay driver circuits, and it is this um 12 volts, plus 12 volts relay coil like so, and then transistor npn. So it's that way, isn't it and um now across the relay coil.

There is also a diode like so going up to 12 volts and also on here, there's provision for capacitor, which looks like this, which also runs across the relay coil. Now. The purpose of that capacitor is to prevent chatter on this relay, so it just provides a little bit of energy storage to either hold it on or hold it off stops it clattering at a high frequency on here. I've got a 1k resistor and that is pulled up with a 10k with this.
Oh i'll, draw that one as a box, because that's how i've started 10k, which goes to there now there are times two of these circuits, because there are two relays um. I think i use separate base resistors for the two transistors, but a single common 10k pull up. This, of course, is zero volts. So that's the schematic of the relay driver circuit.

This is a 4007, i believe. So if i reapply 12 volts to this circuit, i should be able to looking back at this schematic pull this point here, which i've called relays: it's actually there. It's these points across here, pull that to ground, and that should turn the relays off. So, let's give that a try so 12 volts on the board.

The relays are both pulled in now, let's connect relays, which is there two naught volts, which is there and when i connect that three of those actually uh turn off. So that's good. The transistor relay driver circuits do work very nice, so in terms of mains from your house to the car, an evse, an ac charger. Evse like this is actually very simple.

It is just mains from your house, through a couple of relays, one for live one for neutral uh to the car. Now, why? Wouldn't you just have mains from your house directly connected without the relays to here? Well, here is the 10 amp granny charger that came with my car. The car is an mg zs. Now, at one end, you've got this: it's a 13 amp plug which goes into a domestic outlet.

They limit these to 10 amps. Just in case your wiring is a bit dodgy. They don't want to run at the full 13 amps. So that's at one end relays are inside that box and at the other end, you've got this and if i take the cap off like so, you can see why you wouldn't want mains continuously on there, because if you were silly and played with screwdrivers, that's live.

One that's neutral, as you can see, it wouldn't be a good idea to have permanent mains on there. So the idea of the relays is that mains is not applied to these pins until the evse knows that this connector is plugged into the car and nobody can stick their fingers in it. Now, when you do plug this plug into the car, this plug instantly will be connected to the terminal block here and these relays close then what's to stop the car pulling the full seven kilowatts, because my car can pull seven kilowatts. Now that's about 30 amps! What's to stop the car pulling seven kilowatts and with this at the other end blowing this 13 amp fuse.

Well, it's all down to this connector here, which is called cp, the control pilot. So what does the control pilot signal? Look like? Well, it looks like this. This is from a texas instruments, webpage i'll put a link to that in the description. This signal can be in a number of different states in state a it's simply, plus 12 volts dc.
In most of the other states, it is a one kilohertz square wave, uh bipolar, so it um oscillates between plus 12 volts at this point and minus 12 volts. In fact, this square wave should always drop to minus 12 volts at the bottom end and then at the top end it can be 9. Volts. 6, volts can sometimes be 3 volts if it drops to 9 volts 6 volts and 3 volts at both the top and the bottom.

That is actually a fault condition. That means that there's a missing diode in the car we'll come back to that later. But what we're really looking for is the car pulling this down to nine volts. The evse then says: okay, i'll i'll turn on the oscillation.

It starts off as 12 volts dc, the car pulls it down to 9 volts. The evse then starts the oscillator running. The carbine sees the oscillations, pulls the control pilot signal further down to six volts if it pulls down to three volts. It's saying i need ventilation, that's for lead acid batteries, it's not something that happens these days, so it should pull it down to six volts.

But of course the bottom end should still be 12 volts, and at that point the relays close and mains is sent from your domestic uh household main socket into the car. Now the thing that tells the car not to pull the full seven kilowatts, the full 30 amps - is the width, the duty cycle of this one kilohertz square wave. You can see here that the duty cycle is shown as 50 percent. Now that actually means pull 30 amps in order to pull lower currents.

We have to reduce the width of this pulse, the width of the high part. Of course the width of the low part gets wider and i think for 10 amps i'll. Just look it up. Uh, yes, for 10 amps well 9.6.

It says here 15 duty cycle on that square, wave um for six amps. We have 10, so the mg evsc i just showed you will probably have a 16 duty cycle on the control pilot output. So what i need to do next on here is to build some circuitry in this prototyping area that can produce a variable duty cycle, one kilohertz square wave, which oscillates between plus 12 volts and minus 12 volts, but can be pulled down on its positive side to 9, volts or 6 volts by the car, the car will do that. So i need a clock oscillator and then i need some circuitry to check these 9 volt 6 volt voltage levels and when it sees six volts on the positive side of the square wave, the circuitry will turn these relays on.

That's it in essence. Now, as i said in a previous video, i am going to be basing um the circuitry for this very much on bernhard valtter's, analog, evse project and bernhard has very kindly given me permission to show his website. This is the front page of analog evse and to use his circuitry. So this is the schematic um that he put together for a very basic analog now analog.
I think um in terms of this circuit means no programmed devices, so i mean there's a little bit of digital circuitry here. This is an oscillator with a crystal and a lot of dividers to bring it down to one kilohertz and some comparators and some transistors and a few other bits and pieces, but it just means there are no microcontrollers in this and the reason i'm building my first Version of this evse with no microcontrollers is because, with circuitry like this, you can see how it works with microcontrollers. It's just a big software listing. This is easier to see.

What's going on, i will put links to this website and also this schematic in the description below now. Just taking a quick look at this schematic, we've got power supply up here, i'm doing mine slightly differently, i'm going to use this for plus 12 volts and for minus 12 volts. Oh, i think it's turned up. Actually, yes in here, i believe: let's have a look.

Yeah this thing - and this is the correct b1212 s - uh 1 watt, with the four pins at 0.1 inch spacings that now should be compatible with that footprint there. So that's going to generate the minus 12 and this thing's going to generate the plus 12.. This is a 4.096 megahertz crystal divide that down a few times and you get exactly one kilohertz. This is an integrator so that you get something approximating to a triangle wave.

Actually, it's probably more like that and that and that and that, because it's uh, just a simple capacitor charging up and discharging put that through a comparator, and we can chop out a piece of that. So that gives you your variable duty cycle square wave variable because you can vary the voltage on one input of the comparator. This comparator, i believe i don't need i'm thinking of connecting this comparator straight to the plus and minus 12 driver here. This is a complementary emitter follower circuit, so that'll push the uh actually it'll only go to about 11.4 positive and 11.4 negative, but that should be adequate.

This is a peak detector or peak follower, so this will provide a voltage which is the uh top of the waveform minus another 0.6 volts, of course, because there's a diode there and then there's also a negative peak follower down here. This just checks that the bottom of the waveform well it'll follow the bottom of the waveform, but this comparator just checks that this is -12 and not one of those reduced negative waveform voltages that we saw on that this section and over here we have four comparators. Now two of them are just driving leds for the user feedback. Well, i'm not intending to have any user feedback.

It'll just do its thing, so i think i only need two of these comparators. They are essentially a window comparator. They have open, collector outputs and the outputs are tied together, there's a diode in there, but i believe that's just to make sure that only one of these four leds comes on at any one time. So these are open, collector, wire, anded, and if you are within a certain window of voltages now it should be about plus 7.5 at the top, so that we see the six volt voltage which allows the relay to pull in and no more than about 1.5.
At the bottom, i think it is so that the 3 volt signal or 6 volt signals are both valid. Then it will turn on the relay driver. The relays will pull in and mains will go from domestic household supply out to the car. That's essentially what this does now up here: um strung between plus 12 and -12.

There is a resistor divider and that provides all the voltages that the comparator inputs are comparing against. When i first looked at these, i thought oh they're, all a bit low this 6.1. I thought well that should be 7.5 and this 1.2. I thought well that should be 1.5 and i think they're low, because we've got the diode drop from 12 volts here.

So this only goes up to 11.4. Another diode drop here so plus 12 volts will actually only be 10.8. At this point, i think that's why these are all a bit low. So in terms of what i need to put on this board um, i'm thinking it's uh, this chip, which is a cd 406 0..

I got one of those from cpc with my last order and i think i'm going to need one two two three comparators and bernhard has used the lm2901, mainly because it's got a wider temperature range. It can do temperatures below zero, which could be quite handy, so i've got some lm2901s here. I think i'm only gon na need one, because these are quad packages, and i think i need one two three comparators. I think.

That's all. I need couple of transistors diodes. Resistors capacitors job done now. I need this 4.096 megahertz crystal for the master clock frequency to generate one kilohertz here that should be in here.

This came from ebay. Let's take a look yep, crystals and yep. Those are indeed 4.096 megahertz. Now one thing that bernhardt didn't include in his design is a transient suppression diode on the cp line, so that would be here um to ground or protective earth, and i can't remember how this is drawn.

I think it's drawn as a double diode like so, and so i've got these p6ke g. I think these are for glass passivated. It's the only ones that cpc had. They didn't have the standard ones and i've gone for 18 ca.

So that's bidirectional, 18. Volt. Remember this only goes up to plus or minus 12 volts, so this should just clamp out any transients above 18 volts you've got to remember that this line is potentially quite long and runs all the way along that cable to the vehicle. Now, i believe, there's a suppression diode in the vehicle, but i think it makes sense to also put one here.

So i've got that just there between pe and control pilot. So i think we're good to go as long as the oscillator here and the comparators don't draw more than 100 milliamps and they really shouldn't uh from the power supply, because that's all i've got left on this little mains power supply. Then i think this circuit should work. I will start uh assembling that in the next video, but i just wanted to get everything uh sorted out for that process in this video.
But i think, as far as this video is concerned, that's pretty much it so i'll, say: cheerio.

By Julian

Youtuber, shed dweller, solar charge controller aficionado

4 thoughts on “Easyevse build part 1”
  1. Avataaar/Circle Created with python_avatars Andrew van Leeuwen says:

    AHH still using the flashlight haha awesome …I miss the post unboxing vids alot

  2. Avataaar/Circle Created with python_avatars S.A.C. - says:

    para vehiculo electrico…por un momento me imagine a Juliann en patinete electrico…bici o moto electrica…despues me pregunte…no sera un carrito de golf electrico que tendra para menearse en su pueblo para hacer compras el y su mujer?….jejeje
    …lo mismo tiene un coche hibrido…tambien podria ser una avioneta ultraligera si tiene cerca un aerodromo de los muchos que hay en Inglaterra….o barco electrico si tiene cerca lago o rio….jejeje
    en patinete electrico me hace reir mas….y no es tan descabellada la idea de usar uno actualmente…jejeje…
    Saludos desde Tenerife – Islas Canarias

  3. Avataaar/Circle Created with python_avatars Jo Russ says:

    You don't need full holding current if you won't be kicking relays mid operation. I think you can still reliably drive it with 10v instead of 12. Should save you some power. But I guess the easiest route is to just beef-up on power supply.

  4. Avataaar/Circle Created with python_avatars Mark Flack says:

    What happens if your circuit does not switch off the relays at boot up. as you have it as soon as the 12v line is there the relays will pull in, unless they get a signal not to, should your relay drivers be biased off and pulled high to switch on power.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.