# €10 automatic precharge controller (discretes)



## boekel (Nov 10, 2010)

If you're at it...could you also incorporate an economizer into the contactor driver? Most EV contactors don't like 12v continuously...


----------



## arber333 (Dec 13, 2010)

I used 150R power resistor with TL431 reference, high (680k/xxx) resistor divider, 1W 5V DCDC converter with PC817 optocoupler and DPDT relay. Of course there is one 1A NPN transistor there too. And it works! While voltage is under divider setting TL431 is off and opto is keeping relay ON using pullup on signal line. If voltage goes higher than divider setting TL431 gets lit and PC817 pulls signal to GND. Relay goes OFF and precharge ends. NC contact wiring on relay enables DC contactor line to trigger only when "precharge complete" is signaled. Like a double interlock safety. If you need you can also wire a mushroom button into precharge line to release precharge relay GND and disable car precharge, DC contactor and everything.


----------



## arber333 (Dec 13, 2010)

boekel said:


> If you're at it...could you also incorporate an economizer into the contactor driver? Most EV contactors don't like 12v continuously...


You should use 24V AC coil it holds at 12Vdc and doesnt heat-up as much. Or just get used Tyco EV200 contactor type...

https://www.ebay.co.uk/itm/Tyco-Ele...218871&hash=item25f8b9d8e6:g:71AAAOSw8nxbGWO5
https://www.ebay.co.uk/itm/KILOVAC-...098530&hash=item1e97e18f92:g:g~AAAOSwMpZUq-fC


----------



## MattsAwesomeStuff (Aug 10, 2017)

For as often as you precharge (once per ride), I would use a resistor and a pushbutton and be done.

Push and hold for a few seconds, she'll be precharged enough. Solved problem.

Next.


----------



## Tomdb (Jan 28, 2013)

But you could also do this for sub 10 euros with a Attiny 85


----------



## boekel (Nov 10, 2010)

arber333 said:


> You should use 24V AC coil it holds at 12Vdc and doesnt heat-up as much. Or just get used Tyco EV200 contactor type...


But....the 12V ones are very cheap coming out of used car batteries...

If you want to go cheap: use the unit from a used battery: Fuse, + and - contacters, precharge resistor + precharge contactor, all in a neat package...(usability depends on brand / type of car)

Combine this with Tony's precharge controller... (or a bms with drivers)


----------



## Tony Bogs (Apr 12, 2014)

12 V economizer is easy with discretes. Real easy. Add 1 (well, maybe 2) component(s) and you're done. Much easier than for instance with an Attiny85. 

The layout for the 3mm thick alu ims.


----------



## boekel (Nov 10, 2010)

Tony Bogs said:


> 12 V economizer is easy with discretes. Real easy. Add 1 (well, maybe 2) component(s) and you're done.


resistor and capacitor?


----------



## Tony Bogs (Apr 12, 2014)

About €6. 

The controller can handle the high current of a DC contactor continuously. I have to do the math and measurements as a check, but I estimate 25A peak (200msec), 5A continous @ 50 degree C.

The 400V 300A Panasonic AEP-XX-300-12 draws up to 3.3A at turn-on, only 0.33A after 100 msec.


----------



## Tony Bogs (Apr 12, 2014)

@ Arber333 

I don't use voltage as a trigger. The output to the main contactor is triggered by the charging current dropping below a threshold (now set at 1mA). 

So it's independent of the SoC of the battery.

No current is drawn from the caps to be charged.

The circuit draws about 30 microAmps @ 100V from the battery but *only during precharge.*


----------



## jackbauer (Jan 12, 2008)

Circuit diagram ?


----------



## Tony Bogs (Apr 12, 2014)

How about a circuit description and a nice pic of the prototype ims first?


----------



## jackbauer (Jan 12, 2008)

...and because it's triggered by precharge current instead of voltage it's independent of the pack voltage I like it.


----------



## jackbauer (Jan 12, 2008)

Is the blue component in the bottom left a cap?


----------



## Tony Bogs (Apr 12, 2014)

No, it's a the toroid core of the pulse current transformer.


Not done yet with the final checks of the design. then a few measurements and finally a circuit diagram.


Oops, the toroid is in the upper right corner.


On the left there's a blue PTC thermistor.


----------



## Tony Bogs (Apr 12, 2014)

The circuit diagram. 

Done the stability analysis of the ac small signal model of the mosfet/optocoupler current sense and bypass circuit (second png). 

A 1uF cap (C?) provides adequate phase margin at zero crossing points with varying precharge resistor values and Gfs of the mosfet.

Major changes: divider network ohmic value is compromise, mosfet (Q1) bigger package (power rating),


----------



## Tony Bogs (Apr 12, 2014)

The circuit has been pushed forward and the measurements back and then you get this: the first mods.

Diode D2 was LL4148, now back to schottky SGL1-40 as shown in picture of prototype.
Resistor R5 will have a fixed value (10 to 15R probably). 
The value of resistor R4 will be determined by measurements for maximum gate pulse duration.
Toroid transformer will be 16mm, 10:10 turns 0,4mm, to support longer duration of pulses.


Great fun, this!


----------



## Tony Bogs (Apr 12, 2014)

OK, that's the discrete circuit. It can do with a 47R resistor in series with a 470u/35V elcap across the output thyristor, because the load has a high inductiance value. Helps with turn-on.

*BUT NOW, bring in the ASICs.*

Input (current sense):
First a isolated current switch with a open collector output: Honeywell CSDA1BA. https://www.digikey.com/products/en?keywords=csda1ba
Ten turns at the sense port will trigger the output low at 32 to 80 mA. Great.
But it does have a 6 to 16V power supply input. The discretes can do without.

Output: First pick is the smartmos switch BTS3110. https://www.digikey.com/products/en?keywords=bts3110. Built-in protection: ESD, overcurrent, temperature etc. 
Can be driven with PWM for ECONOMIZER purposes. Package: SOT223.

Maybe a tiny PWM ASIC for the ECONOMIZER? Why not the LTC6992IS6? https://www.digikey.com/products/en...rammable-timers-and-oscillators/689?k=ltc6992 It appears to be working OK in an inexpensive motor controller. 


Anything else? Hmm, no, think that's all the ASICs it takes.


----------



## jackbauer (Jan 12, 2008)

What about one of these guys for current sensing : https://www.allegromicro.com/en/Pro...ifty-Amp-Integrated-Conductor-Sensor-ICs.aspx


----------



## Tony Bogs (Apr 12, 2014)

Pick whichever one you like. 
I'm sure you're perfectly capable of dreaming up the ASIC circuit from scratch.

I'm pleased with the discretes. Lowest cost by far. And "it works".
Just fisnished the measurements. Continuous cap V monitoring does not work reliably, but the sensing of presence of the precharge voltage and the delay functionality of the diac are OK.

Done. Finalized circuit diagram will follow.


----------



## Tony Bogs (Apr 12, 2014)

The finalized circuit diagram after measurements. 
Because the V divider - DIAC method didn't work reliably (V sensing is a bad idea anyway), a second current sensor circuit has been added.
Now a current must flow from the precharge resistor to CAP+ (about 2 mA minimum) as a criterium for triiggering of the thyristor. 

This prevents the main contactor from engaging when there's no connection during precharging (for example broken wire, stuck precharge relay).


----------



## jackbauer (Jan 12, 2008)

Warming up Designspark A question on the mosfets Q1 and Q3, wouldn't they need to have a higher Vds rating for higher pack voltages? eg 200v parts for a 144v system?


----------



## Tony Bogs (Apr 12, 2014)

Firing up the speedo, eh? I'm afraid this means an all-nighter for me.

The mosfets? An understandable question, but they never get to that voltage. 
They act as current bypass. Max Vds voltage 4V, linear mode.  
I measured 3,06V at take-over with the tiny ones in the prototype. 
Another reason for the IMS.

The bulk of the voltage is carried by the external precharge resistor.
It can be kept small in size when a PTC is applied.


----------



## Tony Bogs (Apr 12, 2014)

This one is for the foundry.


----------



## Tony Bogs (Apr 12, 2014)

Specific for controllers 100 to 200V (dcseries), diagram and ims:


----------



## zippy500 (Apr 3, 2017)

Im sorry for my ignorance and stupid question.


Can someone explain in detail what the purpose of this circuit is.

My electronics engineering knowledge is probably 1% though I do find this stuff interesting.

OK....so I understand the purpose of the pre charge circuit

so will this control the precharge contactor for a certain time then shut it down ?



Ask the question and look a fool for 5 minutes- Don't ask the question and look a fool for your lifetime


----------



## jackbauer (Jan 12, 2008)

Tony Bogs said:


> Specific for controllers 100 to 200V (dcseries), diagram and ims:



Sweet. Nice work Tony I'll be trying this out in the E36.


----------



## Tony Bogs (Apr 12, 2014)

Dumbing down a notch on request.

Trimming howto.


----------



## kennybobby (Aug 10, 2012)

What does IMS mean/abbreviate?


----------



## Tony Bogs (Apr 12, 2014)

Insulated Metal Substrate. For improved cooling and thermal coupling. 

Layers: aluminium (up to 3mm), ceramic filled insulating compound, copper.


----------



## Tony Bogs (Apr 12, 2014)

1.5mm IMS should be OK. Easier to get. 

Resistors R1, R2, ... have to be trimmed. They are part of a voltage threshold fall-back circuit when F2 trips. 
The resistor values in the diagram should be the high values. 
Trim down until the SW thyristor is triggered when the lowest acceptable voltage is applied (no CAP connected to CAP+,-)


----------



## Tony Bogs (Apr 12, 2014)

Well, I'm not as blind as a bat yet, but it's getting close.
I read the value on some 1206 resistors as 10 x higher than they actually were. So the V threshold of the DIAC does work as it should.
Values of the resistors R1, R2 .. are too low. Multiply by 2. So R1=R2=1M in the last diagram. I've done the measurements.


----------



## Tony Bogs (Apr 12, 2014)

Thermal considerations and maximum capacitor values.


----------



## Tony Bogs (Apr 12, 2014)

The dual current sense circuit, no fall-back to voltage sensing.
Full power rated R (inexpensive) in sense trigger circuit. 

V trimming of the DIAC circuit is not necessary. 
NTC thermistor optional (use fixed value).

Addition (optional) for high inductance contactor coil: RC at the output.

Ims board ready on thursday or friday.

Edit: 

Sense current is low enough for optocoupler; removed mosfet bypass, and
addition of external pull down R-LED 
And again, cause TCLT1600 has dual led input.


----------



## Tony Bogs (Apr 12, 2014)

I belive we're there. No longer a project in progress. No trimming needed. And operation is now as intended: current sensing. 

Mosfets have been removed, there's no current bypassing needed anymore.
A seperate sensing resistor was the last piece of the puzzle. 

Most parts are now on the IMS. Only the main precharge resistor is still off-board.
With all these components on board and a LED drive circuit that indicates that the precharge voltage is present (isolated of course) the part count is about 30.


And yeah, it is almost as Inexpensive as dirt (silica sand).


----------



## Tony Bogs (Apr 12, 2014)

A few pics of the new prototype and a preview of the ims in pooling colors of the foundry.


----------



## jackbauer (Jan 12, 2008)

Tony, will the bare pcbs or the design files be available?


----------



## Tony Bogs (Apr 12, 2014)

All parts (or similar parts) will be in tomorrow. 


I'll post the design files as soon as I have done the measurements, the checks and the double checks.  And I think I'm going to add some kind of howto. 
Although I'm pretty sure it is going to work just fine, you never know, I may have overlooked something, so I want to try it out first.

At some point I'm going to order a few (max 5) for myself at the foundry.

It's not open source, but I doubt that these boards will sell by the thousands . 
If you like and want to build it or want to make a small series (say 10 or 20) to share, go ahead.


----------



## Tony Bogs (Apr 12, 2014)

A few last minute tweaks to the output cap circuit (just in case) and to the optocoupler "precharging active" output (emitter on seperate pad).

Here are the set of design files (GERBER/EXCELLON), a howto-precharge and a new diagram. Enjoy analog designing.


P.S. Assumed nominal precharging time: 2,5 seconds in howto-precharge.


----------



## Tony Bogs (Apr 12, 2014)

Checks and double checks going on. U1 is now a darlington optocoupler: TCLD1000. 
A diode and a resistor have been added in parallel with the input of the U1. R10 has a new value: 220.
IMS layout has been changed!!

Some important component selection and design considerations in the png.


----------



## Tony Bogs (Apr 12, 2014)

Ok, next attempt to wrap this thing up. Photo of the prototype and a screenshot of the real final diagram? Let's hope so.

No, seriously, this is it. I've checked and double checked and tried it out and kept what works well. Yeah, it did precharge an elcap array. 

Photo shows the prototype board with a RB50 sense resistor (1K). Matching R on board has not been soldered on yet.
Tried it out and I am very pleased with the result, i.e. it works.

The bypass circuit is back, a 1K sense resistor pushes the optocoupler outside of its comfort zone.
But this time it has an inexpensive BJT, that does not need trimming. 
The max bypass current for the BCX55-16 is about 250mA. 

And we're back to basics. Keep it minimal. The optocoupler output circuit has been dropped.
The end of precharging will be indicated by a LED light in parallel with the output, 
that draws <10mA from the low voltage supply via the coil of the main contactor.
Fewer connection pads. Great. 

A 1mA threshold is just too low for leaky power stages. The elcap array I used to try out the prototype had 2,5mA initial leakage. 
So the threshold is set to 5mA in the diagram. 
Although 4,7 uF is enough for frequency compensation of the bypass circuit, 
two caps in parallel provide a convenient way to get the very high value for
filtering out the possible EMI from an el cheapo DC/DC for the low voltage system (12 V) and other sources.
But if the battery source is clean, a single 4.7 to 10 uF will do.

Now the IMS. Much smaller. It does need the ELON treatment (lots of sticky goo and potting) for high voltages (>300V). Coming soon. Enjoy.


----------



## kennybobby (Aug 10, 2012)

a few questions:

Can you list the wire colors and the pads to which they are attached?

Which wire is the return for the power from the Precharge Relay?

What holds the main contactor ON during EV operation after pre-charging is completed?


----------



## Tony Bogs (Apr 12, 2014)

Sure, but the previous picture shows an intermediate prototype for measurements on circuit segments.
The attached png shows a rendering of the board that is in the shopping basket at the foundry.

Q:Can you list the wire colors and the pads to which they are attached?
Q:Which wire is the return for the power from the Precharge Relay?

ON THE LEFT HAND SIDE (LOW VOLTAGE SIDE):
PURPLE - PRECHARGE LED OUT, no longer present, LED connects directly to next two pads in the latest version:
GREEN - POWER SWITCH OUT TO CONTACTOR COIL
BLACK - GROUND LOW VOLTAGE SYSTEM

OTHER WIRES:
BLACK - RETURN PRECHARGE POWER
YELLOW - CAP-
RED - FEED PRECHARGE POWER
BLUE AND BROWN: SENSE RESISTOR
WHITE CEMENT R CLOSE TO THE BOARD: MAIN PRECHARGE RESISTOR

CAP+ NOT YET CONNECTED (PAD IN THE UPPER RIGHT HAND CORNER)

Q: What holds the main contactor ON during EV operation after pre-charging is completed? 

The output device is a thyristor. Once on, it stays on. Very hard to turn these things off.
Turn-off only occurs when the anode-cathode current drops to less than app. 1 to 20 mA. 
In practice: at power off or fault (for instance broken wire).


----------



## Tony Bogs (Apr 12, 2014)

This might also be interesting: the current sensing method.


----------



## Tony Bogs (Apr 12, 2014)

Leaving the prototype stage.

"Engineering" boards have been ordered at the foundry. No silk, no soldermask.


----------



## jackbauer (Jan 12, 2008)

Thanks again for this design Tony. Very important imho.


----------



## Tony Bogs (Apr 12, 2014)

If anyone can truly appreciate the benefits, it's definitely you, Jack.


So how about a nice discharge controller?
All discretes of course.


----------



## Tony Bogs (Apr 12, 2014)

Waiting for the IMS boards, it is time to take care of the other matter.

Once done driving, discharging is the next thing when the key is turned to the off position.
Here's the first diagram for it. 

Discharging takes a few seconds. Thyristor based circuit. 
So the diagram shows an optocoupler/thyristor circuit that prevents the precharge relay coil from getting power 
when the key is turned back to the start position during these few seconds.

Edit: duagram v2, higher output current to precharge relay, input utilizes stored energy of contactor coil

And v3 is coming: also initializes discharge of partially (pre)charged cap array
First v3 diagram has a load in parallel with the contactor coil (bad) and too many parts. Uploaded and quickly removed .


----------



## Tony Bogs (Apr 12, 2014)

This is the diagram for the first discharge prototype.
Another great thyristor application: the crowbar. 
Very fast, no key action can beat it.
The optocoupler is there to drive a LED light as an indication of the presence of "HV".


First mod: optocoupler cathode must be connected to CAP-. Of course.


----------



## Tony Bogs (Apr 12, 2014)

More dots on the i for discharging.
The real inexpensive circuit is the relay based circuit at the bottom (up to 220V, slow 10 seconds, RCD snubber). About €10 for the parts.
For higher voltages and faster action (100 millisec range) there's the thyristor crowbar. Up to 1000V with suitable parts (dc solar fuse, HV thyristor, varistor ...)


----------



## Tony Bogs (Apr 12, 2014)

Thank goodness, I'm no longer sort of stuck behind a computer screen because of an overloaded joint of my "fysique". So this thread will end soon.

Tomorrow the IMS boards for the precharge circuit wiil be in. I'll build two of them and there will be some pics and images.

I'm more interested in high voltage circuits (for some of my other projects). Here's the circuit diagram for a 500V thyristor crowbar. And the relay is wired up correctly in this one.


----------



## Tony Bogs (Apr 12, 2014)

A (almost) fully assembled 100V module for max 10mF cap array. 
Widap WDxxx resistors have a 10x overload rating for 5 seconds. 
I'm going to change a few resistor values on this module for my 50V senior EV build.


----------



## Tony Bogs (Apr 12, 2014)

The 50V in my senior citizen EV build is very safe and the initial measurements have been done at 90V from an unregulated power supply.

The icon in the title indicates that this is a safety thread.
In some of my other threads it has been demonstrated what can go wrong in high voltage, high power circuits 
when controlled by microcontrollers and other digital circuits in a noisy environment. 
A pull down resistor on an I/O pin is not always enough.

The all discrete hardware in this thread provides enhanced safety in cars and on the bench. 
Turn the key to the off position and the HV circuit is dead in 100 msec or so. 

Thyristor crowbar circuits have provided safety for years in all kinds of high voltage electronic products (TVs and more).


----------

