# New EV Charger Design - Modular



## dcb (Dec 5, 2009)

Hi Paul, thx for sharing, curious what the motivation is here though (good learning experience if nothing else). Couple thoughts (hope you don't mind):

The original $200 charger thread was also a buck converter. IIRC using a mig reactor at 10s of khz, doing 350v and 35A. It morphed into the multi thousand dollar EMW.

The onboard (inverter) charger thread could use a buck stage, relegating the motor coils/bus caps to 60hz pfc. I'm gonna be busy refining the series cap approach (and other sub-projects) for my own purposes. Getting a charger sorted was the missing piece.

You are going to be playing by yourself if it is all done in Mentor Graphics.

While 8 bit is probably sufficient, there are lots of offerings from atmel (and others) that could probably reduce the external parts count a bit. (differential adc, 20x gain, etc).

There should be some economies of scale, i.e. the "power" section is the only modular part.

Toroids are nice at higher freq. powdered iron will handle higher power levels better than ferrite.

The relay/cap thing is kinda perplexing.

Have you considered the pros and cons of buck-boost (i.e. CUK)? Buck or boost only are always of limited flexibility. A well considered cuk can have good power factor without huge storage caps and be adaptable to a fairly wide range of input/output voltages with one switching element (if I understand it, probably some gotchas I haven't considered yet). Some of the most efficient converters are CUK.


----------



## PStechPaul (May 1, 2012)

That original $200 charger thread was quite interesting. Seems like it grew from a simple design offered by Simon Rafferty in 2009 and then Valery used that as a basis for his project in early 2011. 

It appears that this design has gone through innumerable changes and tweaks and was a learning experience for many people, but there are still some serious flaws (IMHO) and as I tried to investigate the hardware and firmware it became apparent that it was in need of a major makeover. 

An isolated design is probably the way to go, and a PFC front end seems important also. But for now, I wanted to try a basic buck circuit with all the other circuitry that will probably be needed for any design. It may be better to use a single control board and then multiple power boards in parallel for higher power, although the control components are really not very expensive. 

I like the idea of a transformer design where the inductive components are used to transfer power rather than store it and retrieve it as is the case with single inductor buck/boost/flyback designs. Once the needed voltage is available, then a rather simple buck circuit can be used as a current source for charging.

Thanks for the input. I'm not sure just where I will go with this project - I often take on something and get to a point where it is no longer interesting or challenging (or useful or profitable for me), but if there is enough interest and need from the EV community then I think this will be worthwhile, and the feedback will be an incentive to continue. I know that Valery is working on his own next generation isolated charger and has asked for people to join his design team, but I like to be "in charge" to a large extent. I am often frustrated with having other people make decisions that I don't agree with, but I'm always willing to discuss alternatives and make changes based on other people's knowledge and experience. 

PS, the capacitor switching was an idea to put them in series for high voltage and parallel for low voltage. Similarly, a switched voltage doubler could be used. But the boost PFC may be even better.


----------



## dcb (Dec 5, 2009)

PStechPaul said:


> I like the idea of a transformer design where the inductive components are used to transfer power rather than store it and retrieve it as is the case with single inductor buck/boost/flyback designs. Once the needed voltage is available, then a rather simple buck circuit can be used as a current source for charging.



The magnetics are the trickiest bit to me (various core materials, flux densities, curie temps, etc etc etc). If you wan't isolation and lots of power, that typically means large iron core 60hz transformer, not well suited for onboarding. Unless you chop the input into higher frequency of varying amplitude, which is where pfc starts. I don't know how big a deal isolation is in general though, plenty of chargers don't seem to care. As well it seems like the isolated section would need it's own gfci, not sure of the value of the whole proposition, seems a little arbitrary overengineering to my naive self. But I don't think any of my home appliances have isolation (except as legacy transformer wall-warts, and even the newer adapters are not all that isolated, I get plenty of tingles with my bare feet using usb adapters).

FYI the CUK is a two inductor setup. You might be interested.


----------



## PStechPaul (May 1, 2012)

I decided to try a simulation of a simple PFC type boost circuit, using a 220 uH coil and fairly small capacitors (100 uF and 300 uF), and I was able to achieve a 1 kW output at 97% efficiency and 67% PF. This circuit uses only a sampling resistor (0.1 ohm) and a single Op-Amp, and a BSC42DN25NS3 MOSFET (although a real circuit would need one with higher voltage rating):










I may actually build this circuit to see how it works. I may also try adding a secondary on the coil to see if the same design can be isolated. I already have a two-winding toroid inductor with 2x50 uH coils which is about 2" x 2" x 1" and cost only $1.25. If this works well I may buy a bunch of these (which are surplus). The same sort of coil at normal pricing would probably be $5-$10, although it would be easy enough to wind on a $2 core. All the components are probably no more than about $20 - not bad for 1 kW. 

http://enginuitysystems.com/pix/240Sine-320DC_PFC_Boost.asc


----------



## PStechPaul (May 1, 2012)

Here is the isolated version. Simulation is very slow so I only display the first cycle of operation. Frequency is now 65 kHz with smaller inductors used as transformer, and other values were adjusted. I added an optoisolator and 300V of zeners to regulate the output. PF and efficiency seem not so good, but this is not an optimized design:










http://enginuitysystems.com/pix/240Sine-320DC_PFC_Boost_Isolated.asc.

It might be better to use a standard non-isolated PFC circuit with a dedicated IC for the DC front end, and then add isolation to the buck current/voltage regulator. Isolation will probably add some size, weight, and complexity, all things being equal, but if MOSFETs and higher frequency (50-100 kHz) can be used, size should actually shrink by a factor of 2 or 3.

The non-isolated boost circuit has the advantage that it it is essentially a pass-through when the input voltage peak approaches the output voltage, and it's only really working hard when it has to boost the lower voltage near the zero crossings. Larger front-end capacitors can reduce this at the expense of power factor.

[edit] I also ran the simulation at 100 VAC (142V peak) and it mostly holds about 280 VDC, but droops to about 160 V for about 4 mSec near the zero crossing. This is with only a 100 uF front end capacitor and 20 uF capacitor on the output. I used low values to speed the simulation somewhat. These designs use cycle-by-cycle current limiting on the inductor, which will prevent (or greatly reduce) the wasted energy and heating at saturation. Powdered iron cores are more forgiving due to their more random distributed gap, while ferrite is more consistent and predictable, but when it saturates, current rises very quickly unless the drive is immediately removed. The inductor current measurement also provides some current limiting, but this boost circuit only measures current in the MOSFET, and in general this topology cannot control the current once the input voltage exceeds the output.

Actually, the isolated version is protected because the MOSFET disconnects the inductor from ground and without any AC current, no energy passes through the transformer and the output drops to zero when the capacitors are discharged.

Here is the simulation with a 10 uF front end capacitor and 300 uF output, at 100 VAC:










The output is 792 watts with an input of 1133 watts for efficiency of 69.9%. 272 watts is lost in the MOSFET, which has 0.42 ohms RdsOn, so that can be improved greatly with a higher current device and a gate driver. It draws 14.7 amps at 100 volts or 1470 VA for a power factor of 77%. The output varies from 270 to 290 VDC. With a buck regulator, this ripple could easily be eliminated with a small amount of capacitance and a small inductor. The isolated PFC section can easily be modified to produce the highest nominal voltage needed for the battery pack, so the buck converter would only need to adjust it by a small amount, which will greatly reduce the size of the inductor and the power dissipation of the MOSFET or IGBT. Perhaps a 1 kW charger could be made small enough to fit in ones pocket, and maybe it could be called a "Pocket Kilowatt"!


----------



## dcb (Dec 5, 2009)

PStechPaul said:


> http://enginuitysystems.com/pix/240Sine-320DC_PFC_Boost.asc


I took a peek, this doesn't match the schematic in the screenshot FYI. Also 340 is probably more accurate than 320 (2x170)


----------



## PStechPaul (May 1, 2012)

I made a new simulation with a simple gate driver, but efficiency is still only 77%, and PF is 73%. But this is worst case, at 100 VAC input:










I made a new ASCII file as well:
http://enginuitysystems.com/pix/240Sine-320DC_PFC_Boost_Isolated.asc


----------



## sergiu tofanel (Jan 13, 2014)

Do you have a block diagram of the system? It would be easier to follow. Also, I would strongly recommend switching to a PIC24 series controller. The PIC24's are twice as fast for a given clock speed and feature a 16 bit bus.


----------



## PStechPaul (May 1, 2012)

I may use the Arduino, since it already has the libraries and functions to drive the existing display or the 1.8" module that is only about $5 and uses SPI. I won't be using the processor for any more than basic data acquisition, control, and reporting. 

So the PFC section will be an autonomous unit which produces about 300-350 VDC over a nominal 100-250 VAC (or 140-300 VDC) input range, probably using an isolated boost flyback converter. and high frequency dedicated controller like the MC34262. It may have the ability to measure the input voltage and also be controllable to some extent. The same basic circuit may be used for my purposes of boosting 12, 24, 36, or 48 VDC battery packs to 120-600 VDC for DC link bus voltage for a VFD rated 208/240 or 480 VAC. It will also have an EVSE interface and primary connect/disconnect using a two pole contactor.

The charger section may be a simple buck converter that will monitor battery pack voltage and charging current, as well as temperature and BMS status, and perform charging according to a preset and programmable protocol or algorithm. The main processor will probably be located here, and it may communicate with a computer or tablet device via isolated USB or Bluetooth. If there will be a separate processor in the PFC unit, they may communicate using a serial connection over a digital isolator, or simple optocouplers. 

Here, too, the PWM will be controlled using cycle-by-cycle sensing of the inductor current to avoid saturation problems and destructive currents when charging the output capacitor bank. But I don't think nearly so much capacitance will be needed. The current through the inductor (and into the battery pack) can be controlled so that it maintains continuous conduction with set-points perhaps 5% above and below nominal, and this small amount of ripple is insignificant. At the point of CV charging, the monitored current would just need to be set back to C/10 or whatever is required, and the output voltage can be monitored to assure that it is close to the ideal value.


----------



## dcb (Dec 5, 2009)

fyi, inspired by the original $200 charger, I grabbed a few of these
http://www.ebay.com/itm/400564725619?_trksid=p2059210.m2749.l2649&ssPageName=STRK:MEBIDX:IT

$5 is hard to beat (green transflexive, don't use blue, it sucks night and day)
it only has 2 pwm and 5 adc left after the lcd pins, but that might be enough for a lot of things. Has INT0/1 exposed too. And of course duo/uno clones are like $10.


----------



## PStechPaul (May 1, 2012)

I made a simulation using an LT1249 IC, with pretty good results:










This particular model uses a non-isolated output "OUT" as well as an isolated output "OUT2" with higher power. I got 0.92 PF with outputs of 37 and 369 watts or 406 watts with 112 VAC input and 192 volts on OUT2.

Here is the datasheet:
http://cds.linear.com/docs/en/datasheet/1249fbs.pdf

It's about $6 from DigiKey:
http://www.digikey.com/product-detail/en/LT1249CN8#PBF/LT1249CN8#PBF-ND/891322

I bought a couple of these similar devices that are less than $1:
http://www.digikey.com/product-detail/en/MC34262PG/MC34262PGOS-ND/1479304


----------



## PStechPaul (May 1, 2012)

I found a discussion that reports achieving over 1000 watts using the MC34262:
http://www.diyaudio.com/forums/power-supplies/147239-power-factor-correction-pfc-mc34262.html

I changed the current sampling resistor in my simulation for the LT1249 and got over 900 watts at good efficiency, and a lot of power seems to be in the rectifiers which are actually rated at only 1 amp. I also used 50 uH for both primary and secondary and it works OK.

The use of coupled inductors (transformer) seems to be simple enough, if the simulation is to be believed. The low power non-isolated part might not be needed, but there needs to be a signal to the Vsense input. Unfortunately I don't have a model for the MC34262, and the LT1249 is the closest I could find.


----------



## Tesseract (Sep 27, 2008)

PStechPaul said:


> ...The use of coupled inductors (transformer) seems to be simple enough, if the simulation is to be believed. The low power non-isolated part might not be needed...


You are running a boost and a flyback converter off the same switch but the voltage feedback loop is only closed on the boost; the only reason this appears to work (in simulation) is because you have fixed the load resistance for each converter. In the real world, the voltage across the open-loop flyback converter will vary wildly with load (roughly speaking, it will act as a constant current source with current proportional to switch on time).

Now, a curious thing about the flyback converter is that it can automatically provide PFC when run in discontinuous mode (which is also when it is easiest to compensate for closed loop operation). Of course the bandwidth (transient response time) is terrible, but as long as you don't need to process much power or deal with widely varying loads it's a viable option.

Unfortunately, the discontinuous mode flyback subjects the switch and diode to high peak currents and voltages and so it is generally limited to an output power in offline universal input supplies (ie - 100-250VAC) to 100W or less. No way do you want to try to process 400W+ through a discontinuous mode flyback. Well, you can, but because the semiconductors and magnetics are poorly utilized in the flyback, the cost advantage of its apparently simplicity quickly erodes compared to the more conventional approach of a boost converter for PFC and a bridge converter for isolation/output regulation.


----------



## PStechPaul (May 1, 2012)

I found that, for a 500 ohm load in place of the 100, the OUT2 voltage reached 400V and then throttled back to about 385, where with the 100 ohm load it rose to about 300. This would be OK for my purposes of generating about 300 VDC from a nominal 24 VDC battery pack. I made some other changes for this, where the primary of the transformer is 5 uH and the secondary is 200 uH, so I can get the boost with less stress on the components. 










http://enginuitysystems.com/pix/PFC_1249_DCDC_24-240.asc

I am still exploring various approaches to these designs and there will probably be quite a few differences between the PFC front end and a high power charger, compared to my need for a DC-DC voltage booster. In general I feel more comfortable with a transformer design that just transfers energy from a low voltage DC source to a higher voltage output, using the turns ratio of the transformer and not the flyback effect. 

My method for design and analysis is more intuitive than mathematical, and I am still trying to wrap my brain around some of the concepts. I'll try to explain my understanding of the difference between a transformer (energy transfer) design and one that uses an inductor for energy storage and release, like a flyback switcher.

For a transformer, I would select a core with rather high permeability and no gap, so that at the frequency being considered, relatively few turns would provide an inductance high enough to draw minimal current when unloaded. Thus, for a 24 volt input at 50 kHz, a 10 uH primary would present an impedance of 3.14 ohms and the applied voltage at 50% duty cycle would be about 12 VRMS, and magnetizing current would be about 4 amps. For a 1000 watt converter, this 48 VA is reasonable. As the load on the secondary increases, the current is reflected on the primary at quadrature (90 degree phase angle) and the magnetizing current becomes a small part of the total. The transformer will work until the ampere-turns create enough flux to saturate the material, at which point no more power can be transferred.

For an inductor-based topology, a material with low permeability may be used, or the effective permeability may be reduced by adding an air gap. In this case, you want to apply voltage and store energy in the magnetic material of the core, and then switch off the applied voltage and allow the stored energy to be released. In buck mode, the current increases when voltage is applied, and decreases when removed. This is ideal for a current source, and the output voltage will be lower than the input. For a boost topology, the input voltage is applied until a certain current (energy storage) is attained, and then the drive is removed. In this case the energy in the inductor will be applied to the load, and the voltage will be higher than the source.

The limitations of a single inductor buck or boost is that the inductor must "work harder" under conditions of large ratios of primary to secondary. To boost 24 VDC to 240 VDC, at 5 amps, the inductor needs to have 50 amps built up, and then the energy will be dumped into the load at a higher voltage and lower current. In continuous mode, the inductor is "recharged" before all of it energy has been transferred, so the ripple is less, but higher levels of DC are maintained. Using coupled inductors in a buck or boost can reduce the wide levels of current and voltage swing, and can provide isolation. But an isolated converter requires twice as much wire for the windings, so the size and weight are increased. 

Feel free to critique and correct anything I have said here. This is just my understanding of the principles and there is obviously much more to it than my brief explanation.


----------



## PStechPaul (May 1, 2012)

Now that the 12kW charger thread is borked, I'll add a bit to this thread. Here is a simulation of my basic voltage-controlled current-regulated buck converter:










Pretty simple, really, and probably could benefit from some improvements. There seems to be an anomaly at lower drive levels, where an increased drive voltage actually decreases the output at 100 and 200 mV and then it rises as expected from 500 mV (1.77A) to 2.5 V (2.68A). This is into a 1 ohm load, and frequency is about 25 kHz.

With a 5 ohm load, the output increases for all values of input drive voltage, but there is a big jump from 500 mV (1.46A) to 1 V (1.92A), and at 2.5 V it only rises to 2.03A. This is largely due to the input voltage limitation where 12V into 5 ohms is 2.4 amps.

With 36 volts input, the output is non-linear until the control voltage is 1 V (4.14A), and then it has steps as expected to 2.5 V (4.68A). It also now operates at 46 kHz. With a 1 ohm load, the frequency drops to about 18 kHz and the output is 4.8A at 1V and 5.5A at 2.5V.

I need to analyze why this is so. The basic theory of operation is that the control voltage turns the op-amp U2 on, which applies voltage to the IGBT gate, and the positive feedback from the output through R10 sets the (+) input to Vctl+(Vout-Vctl)*(R11/(R10+R11)). If Vctl = 1, and the op-amp is rail-to-rail on a 5 VDC supply, the setpoint will be 1+4*0.068 = 1.274V. The (-) input is ten times the voltage on 0R2 sense resistor R2, so at a current of 1.36A it should equal the value at the (+) input and the output should turn off, which resets the value of the (+) input to Vctl*(R10/(R10+R11) = 1*0.931 = 0.931V, which corresponds to a current of 0.466A. Thus the average current should be about 0.91A.

I notice that I had changed the inductor value to 50 uH rather than 200 uH as I have in my hardware prototype. But for the purposes of explanation, at 36 volts applied, the current should rise at a rate of 36/50 = 0.72 A/uSec. The simulation shows current rise of about 0.54 A/uSec, due to the lower voltage because of the output being at about 5 volts which is 5 amps into the resistor load. The (+) input of the op-amp has a brief low setpoint of 940 mV and rises to 3.98V when the output goes high. This may be due to the action of the 22pf capacitor and the high values of the control and feedback resistors.

I'll run it again with different values.


----------



## PStechPaul (May 1, 2012)

OK, this seems more reasonable. With the previous values, the PWM duty cycle was very low and the frequency rather high so the IGBT was only turned on for a few microseconds, and also the amplified signal from the sense resistor was hitting the top rail. So let's try this:










The waveform is shown at 300 mV control signal. With the output off, U2(+) is 200 mV. This turns the output on which is actually 3.5V with a 5V rail and the optocoupler drive. So U2(+) becomes 0.3 + 3.2/3 = 1.37V. The simulation confirms these values. With the 0.02 ohm sense resistor this corresponds to a current of 6.85A, and the simulation shows the comparator changing state at inductor current of 7.04A. However, there is a 17 uSec delay before the IGBT actually switches off, and this is probably due to the relatively slow PC817D. So the inductor current actually overshoots to 9.58A. The output voltage is about 5 volts so the voltage applied to the inductor is about 31 volts, which for 200 uH is a rise of 0.155A/uSec. The simulator confirms this closely as 0.144.

At this point there are a few shenanigans from the demons in the op-amp, but it settles down. The energy stored in the inductor now is applied to the output capacitor and load resistor. The energy transferred is the peak of 0.5*200*(9.58^2-0.99^2)=9080uJ (uw-sec). With load power of 25W, This would take 365 uSec. The simulation shows this time as 215 uSec, which is explained by additional energy being stored in the capacitor.

This may or may not be a viable and practical circuit for a surge current limiter or buck mode battery charger, but it shows that the topology can be realized with simple analog components and controlled by an applied voltage level. It also illustrates the effect of seemingly minor items such as the 17 uSec delay and overshoot. Hopefully this may also provide some insight into the operation of the PWM buck converter as implemented in the EMW charger. 

A major difference is that the current mode buck converter uses a lower frequency as the load voltage drops, resulting in lower switching losses. Of course, as the output power increases, the frequency also increases. For instance, with a 1 ohm load (about 5 amps and 25 watts) the frequency varies from 3.3 to 3.9 kHz with control voltage of 100 to 600 mV. With a 5 ohm load (about 5 amps and 125 watts), the frequency varies from 6.3 kHz to 5.6 kHz over the same control voltage range.

Here is the simulation showing the waveforms at control voltage of 600 mV:










The output power is 122 watts with input of 128 watts and efficiency of 95%. The MOSFET accounts for 1.3 watts and D1 contributes 4 watts.

If you want to play with the simulation: http://enginuitysystems.com/pix/Buck_Current_Limiter_1.asc


----------



## PStechPaul (May 1, 2012)

I have made a prototype of this circuit and it seems to work pretty well. I am using an Arduino Uno to generate drive voltages using PWM and an RC filter. Here are some data points:



```
12V input, load = DMM 10A
PWM  I(in)  I(out)
 0   0.01   0.00
10   0.43   1.77
20   1.09   2.61
30   1.58   3.70
40   2.43   4.65
50   3.49   5.62
60   4.26   4.76 (unstable)

24V input, load = DMM 10A
PWM  I(in)  I(out)
 0   0.05   0.01
10   0.26   1.80
20   0.41   2.75
30   0.81   3.70
40   1.22   4.67
50   1.68   5.54
60   2.18   6.33

24V input, load = 2 ohms
PWM  I(in)  V(out)  I(out)  W(in)  W(out)  Eff
 0   0.05   0.01    0.00    1.20   0.00    --
10   0.36   3.43    1.71    8.64   5.86   67.9%
20   0.72   5.22    2.61   17.28  13.62   78.9%
30   1.22   6.99    3.50   29.28  24.46   83.5%
40   1.85   8.68    4.34   44.40  37.67   84.8%
50   2.13  10.12    5.06   51.12  51.20   ?
```
Apparently the resistance of the load may have increased because I was dissipating about 25 watts in a 10 watt resistor (two in series, one 10W and one 25W). The 200 uH 10mOhm inductor got just barely warm, while the IGBT got fairly hot. At 10 amps, the inductor resistance accounts for about 1 watt. The IGBT is an STGB10H60DF which is rated 600V 10A, and has a voltage drop of about 1.5V at 10A, so that accounts for as much as 15 watts. The losses observed at PWM=40 are about 7 watts, and thus the IGBT is by far the limiting factor.

I had planned on using this for higher voltage input, and thus lower current. The prototype may not be safe at higher voltages, and in fact the output capacitor is only rated for 50V. It is a buck converter, so that might not be a problem. However, I might change the IGBT and instead use a MOSFET such as the HUF75645, of which I have quite a few, and it is rated at 100V, 75A, and 14 mOhms. With that I could make a higher current buck converter, with an output of perhaps 30 amps, at which point the inductor might exhibit about 9 watts of resistive losses and the MOSFET perhaps about 15 watts, while the output could be into a higher power 1 ohm load of 900 watts with an input of 48 volts and about 20 amps. 

My power supply is only 5 amps (300 watts) so I will have to limit bench testing to that. I might be able to use a lower resistance load of about 0.3 ohms for 270 watts output (30 amps and 9 volts). But eventually I'd like to see if this inductor is capable of being used for a 1000 watt module. I don't have complete specs for it, except that it has two separate windings that in series measures 200 uH and 10 mOhms. It is about 1.75" OD and 0.70" thick (with windings), and the core is a light greenish-yellow, 40mm OD, 22mm ID, and 15mm thick. They are available from Surplus Shed for $1.25 each, so if this performs well, I may purchase a large quantity. It should be simple to add a microcontroller (Arduino or PIC) to perform the other functions of a battery charger, and perhaps the cost of a 1 kW version could be well under $100 or even $50. If they can be connected in parallel and driven from a single control board, it should be possible to make a modular charger as I would like to do.


----------



## dcb (Dec 5, 2009)

I was playing with LT1249, then I remembered this thread.

I was thinking that instead of arbitrary 500watt, that since the most you can get out of a 120 wall socket is ~1.5kw, that would make a better target, but makes good PFC critical as well (and efficiency, so continuous mode is important there).

The LT1249 has some "magic" that sorts out the best switching pattern (I'm sure it can be done in software too) but it takes a few cycles to get everything in sync (more than 30ms), but it can provide terrific power factor with low THD. I attached the log output and a pic. I need to experiment with more practical inductor values.


```
start: 180ms=0.18
end: 280ms=0.28
p: AVG(-v(+,-)*i(v1))=1471.16 FROM 0.18 TO 0.28
vrms: RMS(v(+,-))=120.208 FROM 0.18 TO 0.28
irms: RMS(i(v1))=12.2759 FROM 0.18 TO 0.28
s: vrms*irms=1475.67
pf: p/s=0.996947
pout: AVG(v(out)*v(out)/110)=1428.388 FROM 0.18 TO 0.28
eff: pout/p=0.970928
```


----------



## dcb (Dec 5, 2009)

here it is with a much more obtainable 110uh inductor:

```
start: 180ms=0.18
end: 280ms=0.28
p: AVG(-v(+,-)*i(v1))=1467.76 FROM 0.18 TO 0.28
vrms: RMS(v(+,-))=120.208 FROM 0.18 TO 0.28
irms: RMS(i(v1))=12.4954 FROM 0.18 TO 0.28
s: vrms*irms=1502.05
pf: p/s=0.977173
pout: AVG(v(out)*v(out)/110)=1401.51 FROM 0.18 TO 0.28
eff: pout/p=0.954859
```


----------



## PStechPaul (May 1, 2012)

I will be using this thread to solicit ideas and feedback on my proposed charger project. At this point I envision a single control board and up to eight 2 kW power units. This will make for a low-cost "entry level" charger with 2 kW (120V 20A) for around $400 and then about $100/kW for the additional modules (about $200 each). 

Hopefully I will be able to make these chargers isolated, which may add some cost. It will involve incorporating a high frequency transformer, which may allow the use of high speed MOSFETs and a ferrite E-core transformer. An isolated design is generally about twice the volume of a comparable non-isolated version, but if it can operate at 50 kHz rather than 12-20 as presently used, it can be proportionately smaller and perhaps cheaper.

More to follow...


----------



## dcb (Dec 5, 2009)

one of the challenges is to have the right buck inductor(number of turns and gauge) for a given output voltage (something I dont see in the EMW) so that you can deliver the "advertised" 1.5-2kw for various battery voltages. 

There may be some optimizations in boost inductor selection for a specific battery voltage too, but it isn't critical.


----------



## PStechPaul (May 1, 2012)

One advantage of using a transformer is that the secondary can be wound specifically for the target voltage. The primary can stay the same, for a nominal 350 VDC from the PFC boost front end. Another possibility is to use dual windings for both primary and secondary. Thus for a 120V input the primaries can be in parallel, and switched to series for 240V. Similarly, the secondary could be parallel for up to 180V at 10A, or series for 360V at 5A. 

A toroid transformer is fairly easy to wind, especially for lower voltages. I would expect a core capable of 2 kW would have about 5 volts/turn at 50 kHz, so 180V would be just 36 turns. It may even be best to use 6 output windings of 60V each that can be connected for 60, 120, 180, or 360V. This would cover most battery packs from 48V to 320V, and thus a 2 kW charger could provide 33 amps from an ordinary 120V outlet. The output voltage selection can be done with a matrix of slip-on terminals on the PCB. It might be necessary also to switch the filter capacitors, rectifiers, and chokes, but having six small circuits may be more cost-effective than one with larger components. It is also easier to make a PCB with multiple traces for 5 amps than one for 30 amps.


----------



## dcb (Dec 5, 2009)

Problem is the buck inductor (and switch/diode) is what needs to be flexible. if you are thinking transformer for isolation, typically that is part of the pfc side (and introduces extra magnetic components and rectifiers/switches)
i.e.









I assume you want smooth power to the battery, i.e. some sort of buck converter feeding a battery instead of just a resistor there, and want pfc so you can get the most out of a 20A breaker. There may be a way to switch the transformer for good pfc without an additional inductor, haven't worried about isolation too much so I haven't thought about it really.

So a multi-winding buck inductor is probably more appropriate than a transformer, unless you have a different pfc/regulation scheme in mind. But it is still an interesting idea, some jumpers for different output voltages.

(and the advantage here is that you can use a high frequency transformer for isolation, as opposed to a 50hz transformer on the input, if you want isolation, but still a buck stage is an appropriate addition for a battery charger)


----------



## PStechPaul (May 1, 2012)

Once you have smooth DC from the input rectifiers, capacitors, and PFC circuitry, very little output smoothing will be required. The isolation transformer creates a square wave which, when rectified, has only some small high frequency components during the switching. Here is the rectified output of my DC-DC converter at 10 kHz with a 48W resistive load:










This is the prototype. It uses a ferrite E-core transformer with 1:10 ratio for a 10x voltage boost. The trace above is for 24 VDC input.










This design is probably good for at least 1000 watts, but I may need to use a higher frequency, and more or larger MOSFETs. Here is the basic circuit:










A simulation:










http://enginuitysystems.com/pix/Half_Bridge_24V-320V.asc

Note that the output inductor is only 20 uH. It may need to be larger for a buck current regulator. This is really a DC-DC voltage converter. But it will probably not need a very large inductor if the output voltage is fairly close to the raw DC, which can be matched pretty closely with the series/parallel arrangement of the transformer secondaries.


----------



## dcb (Dec 5, 2009)

It's looking smooth zoomed out, I find that a battery with a low esr is a lot more challenging than a resistor though, minor voltage fluctuations result in large current swings in the load. Post the asc if you would please, I would like to experiment with it a bit.

edit, disregard, got the link 

edit2, looking pretty smooth with a 312.58v battery @ .2 ohms, and ferrites are cheap and don't like dc offset anyway.. will have to chew on it a bit.


----------



## PStechPaul (May 1, 2012)

What you really need is the adjustable buck current charger, which I have also built and simulated:










http://enginuitysystems.com/pix/Buck_Current_Charger_36-24V.asc


----------



## onegreenev (May 18, 2012)

What's going to be the hardest to implement, bucking down to match a voltage or boosting to match a voltage? My Synkromotive will boost to pack voltage and works best when the source is closest to the minimum voltage of the discharged pack. In order to use the wall voltage I must have a pack with minimum of 58 cells so the lowest voltage the pack will see is above 120 volts. I skirted around that by using my old transformer welder to drop the 240 volts to just under 70 volts and charged my pack by boosting back up. This way I was able utilize the higher amperage available from that 60amp circuit. I pulled a solid 45 charging amps into the pack.


----------



## PStechPaul (May 1, 2012)

Using a transformer, the primary can be matched to the PFC-processed line voltage, 180 VDC for a 120 VAC line, and 360 VDC for a 240 VAC line. It can use 200V capacitors in parallel or series for optimum utilization. A three phase source does not really need PFC and the capacitors can be much smaller. Voltages as high as 600-800 VDC might be handled, but then the protective components (fuses, circuit breakers, and relays) become more critical and expensive, and other components such as MOSFETs and even resistors will become critical. And wire insulation and PCB trace spacing will be an issue.

The secondary can then be designed to produce close to the needed maximum battery voltage, and the wire size will be able to handle the maximum current according to the power specification. A buck switching regulator with a single winding on a choke, with a working voltage of 350 VDC, needs to be able to handle 34 amps for 12 kW, and if you want to charge a 180V pack at 12 kW you need 67 amps. So the single winding inductor design limits the charging power for lower voltage packs.

[edit] I tightened up the hysteresis and now this circuit runs at 20 kHz (rather than 10) and has better current regulation. It just involved changing R11 from 50k to 10k:










The maximum here is 486 watts output and 558 watts input for 87% efficiency, which could likely be improved greatly by some optimization.


----------



## arber333 (Dec 13, 2010)

I tried 3phase charging and i saw cca 780uF input caps are enough to smooth out the rail voltage. That being 580VDC still, and requires higher rating IGBTs and caps... 

On the other hand, if we used three isolated 2kW modules with central control unit (or even 6) i could connect modules from L1 to N and L2 to N etc... that would be a star connection with 6kW output while having only 3x 230VAC for input! Much cheaper construction vs full 400VAC phase to phase! Now that would be possible since input would be isolated.
Before i could only connect 3 diodes in 3phase bridge and - directly to N. That caused for terrible N line heating, but i could charge with 230VAC up to 8kW if the EVSE was strong enough. 
Now i use 3phase 580VDC input but can only charge up to 40A. That means 6kW max for 150V battery. Limits of single IGBT...

I believe separate module control is key. Make it resillient enough to drive 6x modules from 3 different phases and be able to disconnect (in aviation we say jettison) faulty modules and thus reducing output in case of trouble (or if there is no input present) on one line while still preserving function. 
There is also possible to run all modules from same phase and would be easier to implement. 
I am just saying dont forget unfortunate us that are limited to 16A phase input.

Good work!

A


----------



## dcb (Dec 5, 2009)

I would say that three phase is not really the target market for a 1.5-2kw charger. The common denomiator for @home charging has to live with 100 amp service @ 240v. The next thing to look at is all the j1772 evse's out there, where the common denomiator is 240v and 30 amp as far as I know. 

So probably 240v/30A or 7.2kw or 4 x 1.8kw will get you %98 market coverage, with "emergency" 120v capability.

3 phase is nice to have, but a little elitist at this point in time.


----------



## arber333 (Dec 13, 2010)

dcb said:


> 3 phase is nice to have, but a little elitist at this point in time.


Well i didnt mean full 3 phase phase-phase 400VAC! That IS asking a lot from 2kW units. Specially isolation standards are tough there... 
Rather i meant RST towards N connection. Each isolated 2kW unit could have R-N, S-N, or T-N connection that would be 230VAC. That way you could have threephase distributed load without having to worry about 600VDC isolation. 
We have a lot of Mennekes 22kW EVSE here in EU while powerful single phase are rare and if i could use at least 10kW from 3phase i would travel without worry.

A


----------



## PStechPaul (May 1, 2012)

I hadn't really thought much about three phase, but having multiple isolated modules is a good way to make that feasible. Three phase in the US is rare outside of industrial and large commercial distribution systems, and is usually 120/208 and 277/480. As long as there is a neutral, these can be accommodated, as well as the 220/380 in the EU and elsewhere. It might be possible to create a "phantom" neutral" and connect the charger modules in star much like a three phase motor has an internal winding connection that is nominally at zero voltage if the delta phases are balanced. However, some three phase delta sources have a ground connection on a phase (high leg delta) or on a center tap between two phases, and that would create problems. This can be dealt with by testing all three phases to earth ground and allowing power to be connected to the charger only if the voltages are appropriate.


----------



## arber333 (Dec 13, 2010)

PStechPaul said:


> I hadn't really thought much about three phase, but having multiple isolated modules is a good way to make that feasible. Three phase in the US is rare outside of industrial and large commercial distribution systems, and is usually 120/208 and 277/480. As long as there is a neutral, these can be accommodated, as well as the 220/380 in the EU and elsewhere. It might be possible to create a "phantom" neutral" and connect the charger modules in star much like a three phase motor has an internal winding connection that is nominally at zero voltage if the delta phases are balanced. However, some three phase delta sources have a ground connection on a phase (high leg delta) or on a center tap between two phases, and that would create problems. This can be dealt with by testing all three phases to earth ground and allowing power to be connected to the charger only if the voltages are appropriate.


Well here we normally use 3x 230VAC single phase L1,L2,L3 and are fused at 16A towards N. In our house i measured current and it is NOT distributed equally. One phase carries like 3/5 and other two each gives 1/5 of current. System doesnt care though... I loaded the poor phase with additional 1,5KW heater (cca 3,2kW phase sum) and lights didnt even go dim. I guess main safeties have some more margin still...

A friend connected 6x 1kW chargers the way i described earlier and he measured 2kW load on N line! His chargers take whole trunk though...
I guess the current from each leg subtracts from each other and in the end result is a single load. Strange... 
We could use that truth though.

A


----------



## dcb (Dec 5, 2009)

arber333 said:


> Well here we normally use 3x 230VAC single phase L1,L2,L3 and are fused at 16A towards N.


That adds up to 11kw, you will have a hard time getting 10k out of that without pfc per phase. but 6x 1.8kw pfc chargers would be a good fit if they can play nicely together.


----------



## PStechPaul (May 1, 2012)

I had forgotten about the advantage of using three phase rectification to reduce the need for capacitance and PFC. So although three single phase charger power modules could be connected with inputs to each of three phases, they would need the usual capacitance and PFC. A three phase bridge rectifier will produce a DC voltage equal to the peak voltage of the L-L input, so a 3-phase 380 VAC source with 220V to neutral will produce about 536 VDC. This is dangerously close to the 600 VDC rating of common MOSFETs, IGBTs, and other components.

Here is a simulation, and it also shows what can happen when two capacitors of the same value but different parallel (leakage) resistances are used to obtain higher voltage rating. After one minute, the capacitor with 500k sees more than 80% of the full output voltage. In practice, the leakage may increase with voltage and thus balance the voltages, but it is much better to use balancing/bleeder resistors across each capacitor. This is IMHO another "potentially" serious problem with the new V14 EMW charger.










http://enginuitysystems.com/pix/3_phase_380_L-L_FWB.asc


----------



## arber333 (Dec 13, 2010)

You could wire 2kW units 2S3P so each would see only 1/3 of the 600VDC input. That and the absence of need of PF correction could lighten the price/weight. However those series would be more prone to failure, since if one module goes whole line colapses. 

A


----------



## PStechPaul (May 1, 2012)

There is no way to wire three phase units in series to lower the voltage. A three phase bridge requires all three phases to be connected. It would be possible to wire two single phase units in series on each phase, but you need to make sure the input voltages balance. I think it will require a different front-end design for 380 VAC or 480 VAC three phase. Then a transformer can be used to obtain isolation and conversion to a voltage suitable for the battery pack with a buck current regulator.


----------



## PStechPaul (May 1, 2012)

This project is still in early planning stages, and in its simplest form would consist of a control unit with one or more user interfaces, and a power unit of about 2 kW that can accept 120/240 VAC (and perhaps other sources), and connect to a battery pack. Options are still open for details such as the processor. I am most familiar with earlier Microchip devices such as the PIC18F series and more recently the PIC12F18xx and PIC16F18xx which have some advanced features, are inexpensive, and available in DIY-friendly low pin count DIP and SOIC packages and choice of 3.5V L versions and 5.5V. 

The PIC24 series has 20 pin and 28 pin versions and cost only a little more than the PIC16, so I may consider them for a final version. But for now I'd like to stick with what I'm familiar with, and I have some tested and debugged code that may or may not be compatible with other devices. I have discovered that there is a lot of inconsistency in names for SFRs and their bit definitions, and the Microchip libraries often fail to resolve these. It may be that the development team is concentrating effort on the rapidly expanding new families and cutting back on support for "legacy" devices. 

If you have the skills to design parts of the hardware and software for this project, I would welcome your participation. I intend for this to be a collaborative open source effort to develop a relatively simple, robust, reliable, and inexpensive product.


----------



## dcb (Dec 5, 2009)

PStechPaul said:


> I intend for this to be a collaborative open source effort to develop a relatively simple, robust, reliable, and inexpensive product.


Check out kicad, open source schematic/pcb tool (good for collaborating), runs on linux (open source operating system) and windows/crapple. Makes baby food files directly (gerber).

http://www.kicad-pcb.org/display/KICAD/KiCad+EDA+Software+Suite


----------



## Baratong (Nov 29, 2012)

I use KiCAD extensively for all my personal projects and like it quite a bit. It would be a good option for an open-source project as it is both powerful, free, and open-source itself so everybody can use it.

On the controller, bare-metal firmware is something I've done extensively since the 1970's. For a project like this, the firmware probably won't be terribly large, so a small 8-bit micro would work well. I've done a lot recently with SiLabs c8051fxxx family. If we went more extensive in options and functionality, I would want to build in a Cortex M3 or M4, and there are some very nice options there. 

I also prefer building in touch-screen rather than push-button. I built this one into my BMS controller : 2.8" TFT with Touch for about $8. I used a C8051F850 (80 cents) micro to control the touch panel and provide an i2c interface for the main controller to read touch events. I use a SPI interface to an SD/MMC for the graphics data.

I suppose a next step would be to start nailing down the desired feature set for the system as a whole and break it up into modules. Maybe open up a collaborative workspace? Certainly for holding the working schematics and code, I prefer BitBucket, but git-hub works too.


----------



## T.J.L. (Mar 6, 2015)

I am also interested in building a DIY charger and might participate in the design process. I've never designed power supplies, just some motor and valve controllers with MOSFETs. 

I would be building an onboard charger for an electric motorcycle so the charger would have to be compact and preferably isolated. A PFC is probably a must since I would use it in our parking lot which has 230 V and 10 or 16 amp fuses and I want to get all the amps to good use. 2 kW sounds like a pretty good amount of power for one module, in my case it could be also a little smaller. For an electric motorcycle, three phase charging is not really an option.

I think there definitely should be a braind board separated from the power modules. I have experience with Atmel's Atmega series and for novice microcontroller users using Arduino IDE is probably a good option. There is also the 32-bit Arduino UNO option.

I will also cast a vote for KiCAD. I've used it for some years and to my understanding it is the most popular open source schematic/layout program. It is still under development and there is not a perfect version easily available currently. I would suggest using the latest build from kicad.nosoftware.cz, not the old stable build from a couple of years back. The developers are working to release a new stable build this year, but also the current development versions are good.


----------



## PStechPaul (May 1, 2012)

Thanks for your interest. I tried Kicad, but probably over 10 years ago, and did not find it suitable for my needs. But it has probably improved a lot since then. Since I have the PADS suite, and am familiar with it, I plan to use it for my development efforts, but these will not be very complex boards and it should be easy to transfer the design to another PCB package. Mostly all that would be needed is a netlist and an XYRS file that locates the components on the board. I have done some work with the PADS parts databases and there are VB scripts that can extract much of the information from the files. The PADS designs also can be exported into an ASCII format which potentially could be translated to Kicad or other design software. I even started working on that when I was making decisions about what to use for my own work.

It will be good to have a number of people willing to collaborate on the design, and I envision this taking two or three iterations to get it reasonably close to production level. I want to come up with a preliminary schematic and BOM to make a set of boards fairly soon, probably by some time in May. I have some other projects I am working on now, but while I'm recuperating from spine surgery April 16, I'll be on light duty and designing PCBs should meet that requirement better than the machining work I am involved in now.

Please stay in touch and feel free to offer suggestions in this thread. I will probably use a Microchip PIC because I am most familiar with them, but it should be no problem porting to an Arduino environment if desired.


----------



## brainzel (Jun 15, 2009)

One sentence to three phase:
If three separate and isolated units, sucking the same current/power, devided on one phase each (L1,L2,L3), the current through N is zero, because of an 120° phase shift form phase to phase.

So three separate units f.ex. 2kW each could suck 6kW on every 3phase outlet in Europe (germany).
The 3P outlets are usually rated 16A (11kW), 32A (22kW) and 63A (43kW).

So if you ever get into beta stadium, I would try one unit and if it works fine, my goal would be 22kW ;-)

Michael

PS: 54 LiFePO4 cells, 189V cut of voltage without CV stage


----------



## Tomdb (Jan 28, 2013)

I am thinking about designing a charger myself. 

So far i got a few requirements for myself:
-PFC is a must have, dont want any circuit breakers going out when pulling max juice. (planned implementation with a self regulating IC)
-Transformer design based smps as main conversion stage. Isolation from wall is required and desired.
- Output voltage range: 200-500V roughly
- Max power of 3,5 KW per module (standaard european socket)

I was considering running a dedicated PWM SMPS IC to do the main task of controlling the switches and monitoring the output voltage/current. Then to augment these values with an Master mcu, this would make the Coding side of the project alot easier and less critical. 

However running the switches using the mcu should also be possible however, the control loop design needs to be very robust to keep the currents under control. 

Paul have you continued developing the charger/chargers or has the EMW charger taken all your valuable brain time?


----------



## PStechPaul (May 1, 2012)

My work on the EMW charger, along with other projects, takes up most of my time, but much of it is a parallel effort because of what I am learning, so if and when I can dedicate more time to the modular charger idea, it should go faster. Perhaps we can collaborate on this, although being across the pond complicates things somewhat. 

If isolation is needed, (and I agree that it is) there is the question of where it should be placed. One concept is to make an isolated DC source of about 350 VDC from 120 or 240 VAC line, and then the buck charger can be a simple non-isolated design. But for lower voltage battery packs converting from 350 VDC to, say, 60 VDC at 60 amps (3600W) involves rather high current peaks. It may be better to design the output using a transformer which can be wound with appropriate primary and secondary conductors for the intended output. 

Thus a 3600 watt charger would have a primary of 350V and about 10 amps, while the secondary could be 60V and 60A. A 360V battery pack would require 6 modules and could provide about 20 kW.

It would be easy enough also to use a dual secondary for an alternate choice of 120V and 30A, and 3 modules would provide 10 kW for a 360V pack.


----------



## Vectrix150V (Dec 13, 2013)

I'm interested in both of these. 

'FlyBuck' topology is a viable thing to look at here as well I think - buck topology, but with a 1:1 ratio coupled inductor.

I actually considered this for the next iteration of my 2Kw KISS charger (uses a UC3842 driving a mosfet directly, with an inverted (negative) buck topology and a current mirror for voltage feedback). 

I wish I could have said I was unique and clever but I discovered someone who did exactly the same thing several years prior.

To give an idea of the topology - here is a working version designed by someone else - 160V, 3A output. http://ludens.cl/Electron/latsup/latsup.html

The one I am working on is using heftier parts (IRFP460, RURG3060 and a rather large inductor to avoid saturation).


----------



## PStechPaul (May 1, 2012)

I have considered such a topology and I think I did a simulation for it at one time, but there may be a problem with the choice of the output inductor when used as a transformer. I found the following application note on the Flybuck topology and it is described as being useful for low power. It also has relatively poor efficiency (about 70-80%):

http://www.ti.com/lit/an/snva674b/snva674b.pdf

This circuit has a main output which is non-isolated, and drives a capacitor and voltage divider. The waveforms show it operating in discontinuous mode, which is probably necessary because there is no DC current path unless there is a load on the output. And even with that, DC cannot be passed through a transformer, so the primary and secondary must have a net zero DC voltage. The current, however, can be non-zero but it may lower the inductance. (At least, that is how I understand the operation of inductors, coupled or not).

The circuit in the link you provided is interesting, and obviously works, but it is not really isolated, and the secondary is only used for a low power control supply.

I think perhaps it may be better to use a transformer to produce a DC voltage proportional to the input voltage (which is nominally 350 VDC from the PFC stage), and then use another inductor for the buck current regulator. If the raw output is closely matched to the peak output voltage needed, the buck regulator will not need to handle much power and can be made quite small and efficient. It should also have little ripple at high current since it will be operating in continuous mode and the inductor will act as a ripple filter, whereas at lower currents and smaller duty cycle it may enter discontinuous mode with higher voltage ripple, but at that point the output capacitors can be used to better advantage. 

These are my thoughts at present, but may change when I do more simulations or actually build a prototype. Matching the transformer output voltage to the battery pack may not be as difficult as it may seem. A high current high frequency transformer is best wound with multiple parallel turns of finer gauge wire, and four or even eight windings are not uncommon. Often they are connected in parallel right out of the transformer on the PCB, but they could each connect to their own rectifier and filter, which then could be connected in series or parallel to get the needed voltage or current. This may make it more difficult to market as a "universal charger", but for a DIY product it is not a big deal to require the setting of some jumpers, which may be soldered or use QC connectors for easy field changes. These chargers are usually mounted in the vehicle and married to the battery pack, so unless the pack is changed, there is no need to change the voltage, at least not by very much.


----------



## Tomdb (Jan 28, 2013)

I just bough a teensy 3.1,

This thing is powerful guys any other arduino got nothing on this simple break out board.

http://www.pjrc.com/teensy/teensy31.html

But even beter is the chip itself. Dead time injection hard coded in registers  This thing is going to keep me busy alot. Its 3,3 volts so compatible with Johannes inverter board if I want to try my hand at driving some motors. Also the system clock is crazy high compared to other "hobby" micros.

http://www.pjrc.com/teensy/K20P64M72SF1RM.pdf

Now i just need to finish off a schematic of a isolated DC/DC to test with.

Even some adavanced capturing of incoming channels with pwm signals on them. Duty cycle, period, Quadrature decoding ect.


----------



## PStechPaul (May 1, 2012)

Seems to be a nice little device for $20. But I don't think all those features are necessary for an EV charger and I want to maintain simplicity and compatibility with a wide range of common devices and software frameworks. I do like the true DAC output and the dual ADCs.


----------



## Tomdb (Jan 28, 2013)

It will be overkill for a charger, but id rather get familiar with one family of controllers and apply it to everything. 

This controller will be a good excuse for me to switch for arduino ide to C again. Which will allow me to unlock its full power. 

Since it should be arduino compatible you could easily port the code from the EMW charger. (As a base to gain more control over it.) 

Would you suggest sticking to mosfets or IGBTs for control of a isolated half/full bridge ? Still think about that part, lots of LTspice learning the past week.


----------



## Vectrix150V (Dec 13, 2013)

The circuit I provided as an example was to show how simple a charger could be - elegant simplicity, a current mode controller with feedback and an unisolated buck (the power for the controller just happened to be from an isolated winding - I wasn't showing this as an example of flybuck topology).

Once you throw microcontrollers etc. in the mix, it starts getting overcomplicated. Yes, you can do some interesting stuff with loop compensation in software that beats the heck out of doing it in the analogue domain but most micros really aren't fast enough.

Using a full bridge design is a better idea, I agree, maybe consider ZVS controllers - traditional power supply design done well. Micros have their place, but are better served for supervisory roles rather than running the whole show. There are plenty of capable dedicated SMPS IC's out there.


----------



## Tomdb (Jan 28, 2013)

I just got a great deal on two HP DPS-800GB‏

12.15v and 80 amps each, this will give me an total of 24volts at 80 amps to feed an simple boost circuit. Which I will control via a micro.

This will allow me to gain knowledge of charger topologies and programming, without having to design an complete mains isolation stage from scratch.


----------



## Tony Bogs (Apr 12, 2014)

Nice work on the EMW upgrade, Paul. 

I'd like to introduce SiC and LLC resonant in my suggestions for a modular charger. 
I need off line power for my EV diy projects, so I'll start a 3680 W 100kHz SiC boost (PFC) build as soon as possible.
That will get me up to 10kW from a standard european (3phase) socket.

I certainly expect that I'll be needing a flexible charger in couple of years once prices for batteries have plummeted. 
Without batteries I have to use the power grid to supply my EV homebrew projects. 
The stages of the grid supply are very similar to the charger: PFC and isolation. 

*PRIMARY STAGE 90 to 250V AC, 50/60 Hz, 3680W:*
100 kHz SiC PFC boost, SiC does not suffer from high hard switching losses, so CCM is possible. 
CCM requires a smaller input EMI filter than other methods. 
A huge reduction in boost inductor size (volume) can be achieved as part of an overall reduction of volume and cost. 
And there are more advantages. Cree has published a performance comparison, 10kW DC/DC, 100kHz SiC vs. 20kHz genIII IGBT :
http://www.cree.com/~/media/Files/Cree/Power/Articles and Papers/Power_Article_4.pdf

Boost inductor: iron powder, low cost, low inductance at high amps, high inductance at low amps, should be able to maintain CCM at all loads. 
For 3680W I've selected: Amidon T-300A-26 toroid, app. 3 inch width, 1 inch height, 2 mm diameter wire (maybe Litz). 
Apparently a popular toroid. Delivery will take almost three months. In the mean time I'll use a bigger toroid: T-400A-26. 

*INTERMEDIATE STAGE INTERLEAVING*
Paralleling PFC stages with interleaved PWM reduces the size of the intermediate capacitor bank.

*INTERMEDIATE STAGE ISOLATION*
Second stage LLC isolation DC/DC converter:


ZVS mosfet switching on the primary side, ZCS rectifier on the secondary side: low losses, SiC diode bridge on secondary side (single secondary winding, low conduction losses, reduced transformer size, simple design)
capable of handling large input voltage variation on the primary side, mitigates PFC ripple requirements
extreme high isolation: primary and secondary windings can be placed at great distance from each other, even on seperate legs of the transformer. 
The low coupling results in a leakage inductance that is an integral L part of the LLC topology.
 In a LLC current mode charger there's no need for buck output stages. LLC outputs can be directly paralleled. The MCU sets the operating point for hysteresis control (basically the same priciple as the EMW LM211 bang-bang) Only one current sensor is required on the output.

System concept (as Tomdb suggested): use dedicated hardware for PFC and LLC. My choice for LLC: Fairchild FAN 7631, cheap and many (necessary) features.


----------



## eem2am (Aug 9, 2015)

http://www-personal.umd.umich.edu/~chrismi/publications/2013.01.Hu.Sideng.Charger.IET_final.pdf

"Optimal design of line level control resonant
converters in plug-in hybrid electric vehicle​
battery chargers"
ietdl.org


-Be very careful because LLC converter is not suited to battery charging.....as the above article shows...one must first understand the above (difficult to understand) article before going LLC....there is a parameter "alpha" in the article which isn't properly explained, and without knowing what it is, the LLC cannot be used for EV charging. -there is a great danger of entering the ZCS region when charging a constant voltage load such as a battery...and then "bang"!


----------



## Tony Bogs (Apr 12, 2014)

For LLC, open loop (fixed operating point, hysteresis) under MCU monitoring for current sourcing should be OK. 
Long periods of operation in the ZCS region are prevented. 
Constant volt charging is not possible (as I mentioned, but maybe not explicitly).

Based on Hongmei Wan's (2012, Virginia Polytechnic Institute and State University) master thesis: 
High Efficiency DC-DC Converter for EV
Battery Charger Using Hybrid Resonant and
PWM Technique

scholar.lib.vt.edu/theses/available/etd-05072012-141855/unrestricted/Wan_HM_T_2012.pdf

A very practical approach, the resonant part is a LLC at fixed operating point.

To substantiate my suggestions I'll soon upload a first design for a LLC setup, 230VAC input.
Controllers: Fairchildsemi FAN7631(LLC) and Infineon ICE2PCS01G (CCM PFC). 
I'll build it and test it anyway. I need to power my inverter projects off line. 
The LLC EPCOS N87 ETD49 core I'll be using is a leftover from earlier full bridge converter tests in 2007. 
Up to 1 kW should be OK, since 2.2kW is the maximum power level for listed topologies in the EPCOS ferrite application manual. 
Experience with low power LLC tests (SiC gate driver and 30W DC/DC converter projects) indicates that the combination of LLC resonant, low flux density, and forced air cooling might take it up too higher power levels. Otherwise it's a good opportunity to test LLC in parallel.
Derating at higher ambient temperatures (above 20 degrees C ambient) certainly is an option for my lab tests, but also for charging Li-ion batteries to prevent excessive degradation. 
Actively cooled battery packs are not that common in the DIY scene AFAIK.
I've got two ETD49 core sets for testing LLC in parallel. 
I've placed an order for the rest of the special parts. 
Delivery may take several weeks.

Great umich article, could save a lot of time, looks like CV charging is possible with LLC.
First conclusion: keep the fixed operation clear of the ZVS/ZCS transition region or use SiC mosfets and diodes (no potentially deadly high ZCS losses)


----------



## Tony Bogs (Apr 12, 2014)

eem2am wrote:


> http://www-personal.umd.umich.edu/~c....IET_final.pdf
> 
> "Optimal design of line level control resonant
> converters in plug-in hybrid electric vehicle​
> ...


Thanks for the link.
Main objective of the authors is improving efficiency by preventing ZCS (in CC mode) and high resonant currents in the primary circuits (in CV mode, ZVS, light load). 
A great paper for a conventional mosfet LLC charger that stays powered for long periods of time (to keep batteries full at a constant voltage).

Not relevant for my charger design suggestions though since:


there's no CV charging, the charger power circuits are turned on/off under MCU control between high levels of charge in CC mode (say 80 to 82%, hysteresis control, to extend battery life)
the LLC runs in buck mode above the resonant frequency. The ZCS region is below the resonant frequency.
 I'll keep the IXYS mosfets, but I've placed a comment in the schematic about replacing them with SiC for buck/boost operation. To prevent mishaps, it might be good idea the use SiC in all cases.


----------



## eem2am (Aug 9, 2015)

Hello, I am not sure how always operating above the resonant frequency (f0) , or, always being in a slow hysteretic MCU loop prevents the ZCS disaster from happening as per the umich paper. I believe the problem is always there whenever the load is a battery...the paper tells us how to size the Cr capacitor to avoid it, but the analysis is hard to understand.

Id say the LLC is in serious quarantine for battery charging, unless we understand the equation of the umich paper, and can implement them in the LLC

As the paper says, this problem is present in all LLC's that have a constant voltage load, ie a battery.......whether you are above or below the peak of the gain curve does not matter, if we have not sized our Cr capacitor as per their (difficult to understand) equation, then we will get ZCS, and fets going bang.


----------



## PStechPaul (May 1, 2012)

There is much good information in the papers presented here. The designs are too complex and critical for my purposes at this time, but if anyone wants to contribute such a design to my overall concept, I would welcome that. My main goal is to make a modular design consisting of low power (1-3 kW or so) that can be connected in series or parallel to obtain the desired output for EV battery charging (or perhaps other purposes). The topology of the charger modules is irrelevant to the overall design, but certainly important to understand, discuss, and implement.

At this point I am still working on the modifications to the EMW charger, trying to keep the same overall power design but using new control and driver circuitry incorporated in a single PCB. There will also be circuitry to deal with inrush current to the capacitor bank, and a self-discharge circuit to bleed off the charge in a reasonable time period.

Thanks for the discussion of possibilities that may enhance the efficiency and reduce size and cost.


----------



## Tony Bogs (Apr 12, 2014)

Thanks Paul, the single schematic of the EMW charger you posted made the internal workings much clearer. 
For instance the LM211 circuit: hysteresis (also called bang-bang) control.

LLC:
First of all, ZCS can not blow up mosfets if a controller is used with a correctly set up overcurrent protection. 
And again, SiC mosfets/diodes do not suffer from ZCS losses, so efficiency is not significantly worse compared to ZVS.

The umich (ietd.org) paper assumes a feedback controlled LLC with *variable frequency*. I'd say: forget that for a charger.
If anyone likes a challenge, then the conventional feedback, buck/boost topology in the umich paper is the way to go.

Enter Hongmei Wan and MCU control. 
Hongmei Wan introduces a *fixed operation* frequency point in the master thesis: at resonance (better: just above, guaranteed ZVS), 
where the *DC gain is constant* (almost independent of the load) and the *efficiency is at maximum*. 
Combine this with MCU control, where the MCU checks and sets the optimal operating frequency at regular intervals (timer ticks), always approaching from above resonance. 
This way the LLC can never enter the ZCS region (is below resonance). 

So how about V/I control, if the frequency stays constant?
Hongwei Wan integrates LLC with another topology to enable V/I control. That is indeed complicated and tricky.

Instead, a buck hysteresis controller, like the EMW LM211 controller, can be used to turn the LLC on/off (pulse skipping method).
If that doesn't sound trustworthy, what does?

Pulse skipping is a standard feature on the Fairchild FAN7631 advanced LLC controller chip.


----------



## Tony Bogs (Apr 12, 2014)

Mud on my face. Missed a few things.

EMW LM 211. Probably not hysteresis control. Ordinary PWM output to buck IGBT from Arduino via LM211 strobe input. 
Comparator inputs seem to be overcurrent protection. 

LLC. As I mentioned it might be good idea to use SiC in all cases. I can now say it's definitely a good idea. And a buck output stage is necessary. Only ordinary Si diodes in the LLC output bridge.

Although the DC gain is load indepedent at resonance, the Q factor is not. The extremely low reflected AC resistance sends the Q factor sky high (>2000). Making frequency setting close to resonance at high gain a major challenge. 
The buck stage solves this issue (Q ~7 at max load). SiC doubles the range for frequency setting, since SiC has no high switching losses in the ZCS region below resonance.


----------



## PStechPaul (May 1, 2012)

I was going to mention that the EMW design seems to use the LM211 comparator only as an output current limiter, and does not measure peak inductor current for cycle-by-cycle switching control. I think this is a serious flaw but I don't plan to do anything about it in my initial retrofit. The current sensor is hard wired to the power PCB and I would like to be able to re-use it essentially as-is. But I might add a current sensor with one lead of the output inductor passing through it, for fast PWM shut-down as well as possibly implementing cycle-by-cycle control and waveform monitoring.

As for the LLC topology, I had to refresh my memory as to its details, and I see that it is a resonant circuit with two frequencies, determined by a tank capacitor and two inductors, one of which is contained in the output transformer. I found an app note that pretty well explains many topologies:

http://ww1.microchip.com/downloads/en/AppNotes/01114A.pdf

And here is a discussion of a digitally controlled LLC:

http://ipcsit.com/vol6/11-E019.pdf


----------



## Tony Bogs (Apr 12, 2014)

The microchip paper is a great overview of SMPS topologies. 

ST.com calls its application note AN2644 an introduction to LLC. But it is in fact a very detailed explanation.

www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00174208.pdf

Including mosfet losses, ZCS-ZVS, graphs, step by step time analysis, and a very important conclusion: 
ZCS on the secondary side is inherent to LLC in all states of operation. 
No need for SiC there.


----------



## Tony Bogs (Apr 12, 2014)

> http://ipcsit.com/vol6/11-E019.pdf


Digital control is an excellent option for low cost, high volume applications. 
The content of the paper looks rather complex: models, bode plots, z-transformations. 
And that's for a simplified case: a fixed load (LED TV, I believe).
Fortunately, for limited number DIY charger builds, it's even simpler.
There's no need for complex modelling (if it possible in the first place) or z-transformations (high Q factor makes feedback regulation very challenging). 
Instead, just keep the operating frequency close to resonance for maximum (open loop, load independent) gain and let a dedicated HW controller handle everything else: dead time generation, overcurrent protection in three stages, overvoltage and undervoltage protection, soft start, HV bootstrap half bridge driver, and more. All in a $2 16 pin package.

A buck output stage regulates by hysteresis control. Great for DIY. Cycle by cycle accuracy and there's no need for analysis in the frequency domain.

For PFC, I can't see a way around frequency compensation. Anyone?


----------



## PStechPaul (May 1, 2012)

I am ordering a couple Microchip devices:
PIC24EP http://www.mouser.com/Search/Produc...irtualkey57940000virtualkey579-24EP64MC202ISP

and dsPIC33EP: http://www.mouser.com/Search/Produc...irtualkey57940000virtualkey579-33FJ16MC102ISP

They appear to be virtually identical. I had thought to use them for a three phase VFD motor control but it looks like they can also be used for PFC and a buck converter suitable for a battery charger:



















Has anyone used these or similar devices? Do you know what the difference is between the PIC24 and dsPIC33?


----------



## Tony Bogs (Apr 12, 2014)

I haven't used PICs yet, but I've taken a look at their range of chips in the past. I remember that the ds stands for digital signal. 
The info on their website confirms that dsPIC is a range of digital signal processors. Here's the application note for a IPFC:
http://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en544158

Complete with software, z-transformations and digital PI controllers.

I'd go for the dedicated Infineon ICE3PCS01G with all functions onboard in a single 14 pin package, including a digital voltage control loop. 
It can be synchronised with a PWM channel of a MCU for interleaved operation. 
Far less external HW and SW necessary and a quick turnaround.


----------



## varun1600 (Aug 22, 2019)

I need schematics of this design


----------



## varun1600 (Aug 22, 2019)

varun1600 said:


> I need schematics of this design


please send me


----------



## PStechPaul (May 1, 2012)

This project was put on hold 4 years ago. It has not been built or tested except in simulation, and the only schematic (PDF) is the one linked above in a previous post. You are welcome to take it from there.


----------

