# building the 10KW Charger



## Citystromer (May 2, 2009)

Ok, I after an afternoon reading through the code, I now know: all pins on the 4D 144lcd left of the reset are unused. The lcd comunicates only over rx, tx pins. of course they have to be cossed, that was my mistake. just uploaded the code and I was able to cycle through the menue and set parameters such as type of battery, volts,..


----------



## swoozle (Nov 13, 2011)

Are you building from the EMW kit or from the open schematic?
Looks like the EMW kit...

Edit: I didn't answer your question. Yes, I'm in the middle of a build right now. It looks like you are a little ahead of me. Please post more pictures.


----------



## Citystromer (May 2, 2009)

I bought the "complete kit", consisting of all hard to get parts, and a unpopulated pcb. Although it should have been in the kit, I had to buy the TTL cable. Besides of this I don`t think I would have saved much, locating and buying all the parts myself, many times I have to buy a whole package to geta single component, and all the single shipping charges are also quite expensive. Europe is different.
Other than that the only documentation and source code I use is from the EM charger homepage.
The code is written and commented quite professionally. 
The schematic is staight forward, but has minor errors concerning part names, what took me some time to get it figured out.
What has to be changed on the schem is: H2, the 100A hall is wrong, it should be named H1.
Therefore H1 40mA hall on the output in the schem should be named H2.
And H1 on the input side should be named H3.
This way the schem fits to the boards.
And on the parts list these changes should be made too.
Then the 8 pin connector from the ardu to the lcd took some time to figure out. 
From left to right looking at the pcb from the top with the halls to the left the 8 pin pcb connector:
rst, nc, Tx, Rx, (vcc 5v), gnd, gnd, D2 ... 8 pin connector pcb
grn ................................................. blk ... ardu

(3.3vNc), (IO"Nc), gnd, (IO1Nc), rst, gnd, Rx, Tx, (vcc5v) 9 pin header LCD_144
TX and RX have to be crossed.
So far I have assembled the pcb, got the code running. 
Did you read through the code? I didn`t see any whatchdog timer. I wouldn`want to have the atmega hung up while in charging mode.


----------



## swoozle (Nov 13, 2011)

Ah yes, I see what you mean about the hall sensors. That one I didn't notice, though I got them installed correctly.

I'm running into problems with the supplied elcaps not syncing up with the BOM or the schematic, and similar issues with the high-watt resistors. Did you?

No, I have not looked through the code. I'm not code-literate. My son (and partner on this project) has done some arduino programming, I'll have to ask him to take look.


----------



## Citystromer (May 2, 2009)

here`re some pics:
obviousely the two smaller, light blue caps, ea 2000 uF 200V, connected in series double their voltage rating dividing capacity by two, placing them at the output after L1.
There`s a 15 ohms 2W resistor on the driver board, marked- TR20 15 R J 744322. 
You really need to doublecheck all connections on the driver board. The wiring comming from the main board has to be crossed. The connector located on the top right side of the main board - with both halls to the left- reads from top to bottom: 12V, gnd, 1K resistor - to the collector of the transistor on the output of the comperator and to the 1k resistor connected to pin 2 on the A3120.

The connections on the driver board from top to bottom with the dc dc on top are: 
12V
1k resistors.
Be sure to mount the driver correctly to the IGBT!
also be careful mounting the transistors! They are open collector, emitter goes to gnd.
In this aspect documentation for kit assemblers is lousy.- it`s a good excercise.
Which kit did you buy?
once you have the main board ready start wiring the rest, IGBT has to be mounted on the heatsink, also we`ll need some switch to turn on the fan, I don`t think I`l find one that draws under 500mA. don` t want to blow the PN2222.


----------



## swoozle (Nov 13, 2011)

I bought the full kit without PFC. What are the big caps to the upper left of your picture?

It looks like you have 12v power hooked up between the 12v and 5v regulators (the red/black at the upper left), is that right? If I read the schematics/PCB correctly, 12v (13v car power) power should be introduced at upper right.

What do you have hooked up to the 3-pin connector just below the arduino? AS far as I can tell only the lower pin (D3) gets used.

Question for you, I tried booting up the main board with just the LCD attached. I get the LCD initialization screen but nothing more. The arduino board flashes a quick green and a steady red. I've checked the tx/rx wire cross a dozen times, so I know it isn't that. Do you have any pointers where to start troubleshooting? - never mind, I figured it out. Doh.


----------



## swoozle (Nov 13, 2011)

Here I am, ASSuming that the arduino comes pre-programmed. It's not, is it.


----------



## swoozle (Nov 13, 2011)

Success.
I'm trying hard to catch up, Citystromer.


----------



## Citystromer (May 2, 2009)

swoozle said:


> I bought the full kit without PFC. What are the big caps to the upper left of your picture?
> 
> 
> What do you have hooked up to the 3-pin connector just below the arduino? AS far as I can tell only the lower pin (D3) gets used.
> ...


----------



## swoozle (Nov 13, 2011)

Yes, the FTDI cable was in the kit and I used it to load the arduino code.

It's actually a mini-pc case. It's a little tight for all of the components but doable.


----------



## swoozle (Nov 13, 2011)

How's it coming, citystromer?


----------



## Inframan (Jan 30, 2011)

I have some questions because I am thinking about building this charger too. Could I use another lcd than the one recommended? Because I already have a few laying around. Pin out is as follows-
1=logic supply voltage (plus 5v) 
2=ground 
3=LCD driver voltage+13v 
4=data or instruction 
5=r/w select 
6=enable signal 
7-14=data bus line 
15=chip selection segment driver 1 
16=chip selection segment driver 2 
17=reset signal 
18=dc-dc converter 
19=led backlight anode 
20=led back light cathode 
Where exactly would the RX and TX connect to?


----------



## Citystromer (May 2, 2009)

Inframan said:


> I have some questions because I am thinking about building this charger too. Could I use another lcd than the one recommended? Because I already have a few laying around. Pin out is as follows-
> 1=logic supply voltage (plus 5v)
> 2=ground
> 3=LCD driver voltage+13v
> ...


No.
This are new breed colour lcd, serial program abel, it has many lines, you would have to rewrite most parts of the code. unfeasible- for 30 bucks.

rx and tx are serial ports like on an r232.


----------



## Citystromer (May 2, 2009)

swoozle said:


> Success.
> I'm trying hard to catch up, Citystromer.


New Year`s weekend:

Mounting studs on heatsink
mounting parts,
wiring, 

I read your post about "unnecessary caps" Those are snubber capacitors, they take the shocks created through HV impulses they make the big electrolyte caps live longer - they only cost a few bucks.


----------



## Inframan (Jan 30, 2011)

Now its seems that I have another reason to try a different lcd 4d systems doesn't seem to be selling that particular lcd anymore and one link said they might still have it in stock but when I followed it http://shop.4dsystems.com.au/4dgl-display-modules/299-0001.html they didn't list the 144 or the replacement just a bunch of lcds that were $79 or more! I really like the idea this charger using arduino but some of the parts used were not the best choice... are there any other stores that sell a similar module for about the same $


----------



## Citystromer (May 2, 2009)

Inframan said:


> Now its seems that I have another reason to try a different lcd 4d systems doesn't seem to be selling that particular lcd anymore and one link said they might still have it in stock but when I followed it http://shop.4dsystems.com.au/4dgl-display-modules/299-0001.html they didn't list the 144 or the replacement just a bunch of lcds that were $79 or more! I really like the idea this charger using arduino but some of the parts used were not the best choice... are there any other stores that sell a similar module for about the same $


I´d ask Valery from eMwerks, or look at 4d for a similar lcd 5V serial connection - so you can use the code.


----------



## Citystromer (May 2, 2009)

that particular lcd anymore and one link said they might still have it in stock 

HERE iS ONE! 
http://shop.4dsystems.com.au/44-arduino-shields


----------



## Inframan (Jan 30, 2011)

50 bucks still doesn't seem to be very attractive how about this lcd?
http://www.microcenter.com/single_product_results.phtml?product_id=0356747


----------



## dougingraham (Jul 26, 2011)

Inframan said:


> 50 bucks still doesn't seem to be very attractive how about this lcd?
> http://www.microcenter.com/single_product_results.phtml?product_id=0356747


It won't be compatible software wise so you will still have to recode the display portion of the charger. But it looks like you could make it work at a hardware level pretty easily.


----------



## Citystromer (May 2, 2009)

Inframan said:


> 50 bucks still doesn't seem to be very attractive how about this lcd?
> http://www.microcenter.com/single_product_results.phtml?product_id=0356747


Considering the free code it`s a steal, rewriting code for a 16 letters, 2 line display would be crazy for that money. 
Hey you`ll be building a 2-3000$ charger, to save on stuff like that is not smart. I`d buy it while its there!


----------



## Inframan (Jan 30, 2011)

How about this one for $29 they just put up? http://shop.4dsystems.com.au/4dgl-display-modules/259-3010.html


----------



## Citystromer (May 2, 2009)

Inframan said:


> How about this one for $29 they just put up? http://shop.4dsystems.com.au/4dgl-display-modules/259-3010.html


looks just like what you need. for a good price


----------



## Inframan (Jan 30, 2011)

I know I must sound pretty shrewd but I just went to check out and purchase the item at 4d systems and the with shipping and taxes included this little 29 dollar module costs 58 dollars unbelieveable  other websites have got to have better deals than *THIS.* I mean what does the 99 dollar module cost and what did you guys pay for yours??


----------



## bjfreeman (Dec 7, 2011)

FWIW, I notice a link www.4dsystems.eu/
that was changed to 
http://www.tigal.com/4d


----------



## swoozle (Nov 13, 2011)

Citystromer,
Did you get your charger running?


----------



## Citystromer (May 2, 2009)

swoozle said:


> Citystromer,
> Did you get your charger running?


Not yet,
I interrupted the building because I had to take care of my batteries, brought them in from the garage, it was getting too cold, and I built a bms using cellogs.
Before I try out the charger I want some kind of bms. I don`t have a capacitive load to simulate 140V batteries. 

I have everything wired together, I tested the rectifying part, and found out that even using only one inrush current limiter , instead of 2 parallel, my 3A 220V breakers trip every time i plug in.
So I shorted the 50 Amp breaker with a 10K ohms resistor - sort of preecharge - I pull the breaker, plug in, than I wait several minutes for the caps to charge, and turn on the charger pushing the breaker.

I meassured the proper function of the mosfet driver by meassuring -15V off state and + 13V on. looking at the opto drivers data sheet this 2 V drop is to be expected. Looking at the igbts data sheet 13V is still ok to turn it on. 

I paid attention to the tips and tricks of Valery and kept the leads of the 5uF pulse cap as short as possible - between C1 and E2.
I`ll keep you informed.
Do you have any suggestions about testing single stages before powering everything up - at good luck?


----------



## swoozle (Nov 13, 2011)

Citystromer said:


> Do you have any suggestions about testing single stages before powering everything up - at good luck?


Well, I am NOT the one to be looking to for good luck.
For various reasons that I see no need to recount , I toasted 2 IGBTs, 2 15V DC-DC modules, a N2222, an IGBT driver and a comparator before I had success.

Ultimately my steps ended up being, based on Val's advice and the build thread:
1. Check the control board signal by itself;
2. Connect the IGBT (no input power) and check the driver board signal;
3. Apply low voltage DC input (I used 12v) and check input cap charging;
4. Crank up the controller with the low V input and check the IGBT output;
5. Connect mains, connect a stove-top burner to the output (good idea from jackbauer) and drive a few amps through it for awhile. During this stage I cooked some bratwurst in beer for dinner . Might as well use the power for something.

I have yet to go to the final charge-the-pack stage, though we did charge my son's e-bike batteries last night. It worked great.

I'm on only a 110V 15A circuit for awhile, so I'm not pumping very much power through the charger.
Oddly enough, the toastiest components so far have been the varistor and the 15V DC-DC. The 15V is running ~105F and the varistor went over 200F at very modest current level. Like you I went to a pre-charge setup; I packaged up a switch and a 20watt 100R resistor and pulled the varistor.

The IGBT, inductor and output diode barely warm up, to around 80F in ambient temp of ~40F.


----------



## Citystromer (May 2, 2009)

Congratulations, seems like you have it running, 
The varistor getting hot is a normal thing, its resistance is high only when cold - I think you`ll have to use a 15 A limiter, you could try both 36A in series. Series is allowed.
Don`t throw away the blown igbts, there are two in one package that can be used for another build.

When you write you check the signal of the main board you only check the output when applying 12V to it, there the output should be 0V. Or do you check the pwm? - meaning you are running the ardu? 

When you applied 12V as the power source, and you used the stove burner, what settings did you use on the programming part - it`ll ask for number of cells, voltagecheck ...


----------



## swoozle (Nov 13, 2011)

Citystromer said:


> When you write you check the signal of the main board you only check the output when applying 12V to it, there the output should be 0V. Or do you check the pwm? - meaning you are running the ardu?
> 
> When you applied 12V as the power source, and you used the stove burner, what settings did you use on the programming part - it`ll ask for number of cells, voltagecheck ...


Yes, with only the controller board powered (small 12V adapter) and the ardu running I sent it into a mock charge cycle and looked at the output signal (PWM). For the voltage calibration step before that I used a 12V power supply as the "battery" and then later my full pack itself to get more accurate high-voltage calibration. Unless you use low voltage mock battery settings it will go to high duty cycle rapidly, but it was still useful data for my numerous rounds of trouble-shooting.

For the full power testing with the burners I was able to use my real pack settings (144V). With my 110V feed, the max current with the particular burners (~10 ohm with 2 in parallel) I am using is low enough that it doesn't trip into the CV cycle and then think the charge is complete.


----------



## Citystromer (May 2, 2009)

swoozle said:


> Yes, with only the controller board powered (small 12V adapter) and the ardu running I sent it into a mock charge cycle and looked at the output signal (PWM).


Hi, 
I tried this too, but how do I send it into a charge cycle?
I`m trying to simulate charging a 12V battery using about 30-60V dc from a power supply as an input.
I had set the ardu to: Lipo, 360 cutoff, 4 cells, went through the calibration steps, and get the following reading: Duty=0%, Freq=2KHz (it slowly climbed that high), out =126A .... and off course pin D9 reads 0V - no sign of pwm.

BTW it reads in the manual: aftrer a few seconds the fan should come on- never did. Did yours?
In fact while playin around I never was able to observe a pwm signal.
Everything is connected and double checked.


----------



## Citystromer (May 2, 2009)

Ok, Stop - stop!
I just had something for a short while,  seeems to function must pay close attention to just the right settings - smart code.
But the fan never did come on yet.


----------



## swoozle (Nov 13, 2011)

Citystromer said:


> Ok, Stop - stop!
> I just had something for a short while,  seeems to function must pay close attention to just the right settings - smart code.
> But the fan never did come on yet.


The fan does not come on immediately for me either. A temp threshold must have been set in the code after Val wrote those directions. I haven't bothered to look to see what it is. Mine does work; a little help from a heat source applied to the thermocouple made it kick on.
I've not had it kick on during charging yet. As far as I can tell 110V charging won't get it warm enough.


----------



## toledi (Mar 7, 2011)

If anyone needs Pb charging, this line needs altering:

const char * battTypeLabel[] = { "  LiFePo4 ", " NiMh/NiCad ", " Pb "};

int battTypeLen = 3;

and this line uncomented:

if(configuration.battType==2) {
//---------------- Lead Acid - CV forever --------------------
CV+=10.0; // convention for CV parameter storage in flash
runChargeStep(2, configuration.nCells*CV, 2, configuration.AH*min_CV_Crating);
}

Thank Vallery


----------

