eBike Master Switch Design

Alan B said:
Hi Richard, was thinking about different configurations and worrying about protecting the base of that PNP transistor from external spikes.

Came up with this which would seem to protect the transistor from the environment a bit, any comments?


I seem to be missing something there. Q5 would seem to come on and ground the gates of the main FETs when they are trying to turn on. Is Q5 a FET or PNP transistor?

In my version, the PNP transistor would only see the 12v gate voltage. The diode blocks the pack + voltage and only allows the PNP transistor to turn on when you turn the switch off.
 
Hi Richard.Thanks for your comments.

Here is my preferred schematic at the moment:

Ebike%2520Master%2520Switch%2520PCB%2520Schematic%2520I%2520c2.png


D2 and D3 could be 1N4148 type signal diodes, and Q5 is a P channel enhancement mode MOSFET with low gate threshold voltage, so it comes on when the gate gets pulled toward ground by R2. The FET I chose has a 2V max gate threshold and a saturated resistance of about 9 ohms so it will pull the gates down very quickly.

R1,2 are 100K, R3 is 1K, C1 is 1uF (same as before).

The two diodes clamp the gate to the [-0.7,12.7] volt region with 100K in series so it is quite well protected from spikes or inadvertent connection on that board input.

In normal "on" operation the gate of Q5 is biased 0.7V higher than the Source, so it should be totally cutoff and not affect the main MOSFET gates. When the input control drops from +battery to open R2 will pull down the Q5 gate and when it hits less than 2V negative with respect to the main MOSFET gates it will come on and yank it down hard, charging C1 quickly and shutting off the switch with a time constant about 100 times quicker than the charging time constant (set by the R1/R3 ratio). As Richard said, this shifts the supplier of current on the battery bus to be the controller's capacitor bank, so the inductive spike should be minimized.

The PNP transistor design looks like it will work, but I am concerned that a negative going spike of more than about 2 volts will kill the PNP's base-emitter junction. This line goes offboard so is subject to various risks and it would not take much to pop that little PNP.
 
Ah, I see now. Yes, that looks like it should work. It would be good if the P channel FET comes on before the main FETs if there is some charge getting pushed by the capacitor during hookup. This should stop any little sparks when making connections.
 
I believe there won't be sparks with this design, looking at that initial conditions case closely. Q5 will conduct as the main FET gate rail reaches 2V which is before the main FETs will conduct. So the only current will be to charge the 1uF cap through the 1K resistor, so limited to 100mA and decaying quickly, not likely enough to make much of a spark.

On the present design the 1K R3 charging up the 1uF C1 cap fires the Main FETs momentarily and causes the sparking.

So far the testing and other ES feedback has been extremely useful. Thanks!

What other comments, feedback and suggestions do folks have? I need to go re-read what has already come in and see what else there is to do.

Are the other testers going to have feedback soon? I'm trying to decide how long to wait before sending out the next round of boards. There are lots of small layout improvements, and the new quick shutoff circuit. I think this is fairly low risk, so perhaps we'll get six or nine boards made for the next test run, or how many folks want beta boards?
 
That seems like it should work well.

It will be interesting to see how hot it actually gets compared to the calculations.
 
Any other changes before the next boards?

Maybe the option for an ultra low power LED as an optical indication if the switch is on or not (i.e. between input and output)?
Some draw only a few uamps, I have a few which emit light with just my sweaty fingers touching them.
Or a mechanical switch or pushbutton to turn it on when needed.

Optical indicators are really helpful, better than fiddling around with a multimeter.

And of course the short circuit shutoff (sorry, had to bring that in again, I'm hopeful).

The other thing (again just a suggestion) are mounting holes. This is something I see missing in the bike world very often. Like my BMS, no way to mount it somewhere, and wrapping it up is not an option due to heat.

So for those who would like to keep it clean and would want to secure this onto a panel or board, a few 3-4mm holes would be great.

Thanks for this interesting project so far!
 
alan thanks from my side to test them! i surely will go for the final version as well, though i must say that the initial one still works fine as is.
i'm not sure if you will address the cap size issue. the higher the voltage the bigger the caps become. at least i couldn't find a smaller 100v version.
mounting holes are always welcome. o would install my switch in a small plasic box and it's nicer if the board can't rattle around.
i also must say how nicely those boards are manufactured. very precise high quality, easy to solder and solid through hole contacting. really impressive!
 
I too thought about the high voltage needs for the capacitor.

Even ceramic capacitors do fail, that is what I found with most dead laptops.

Could't that time delay thing be made with the gate of Q5?

Less capacity/voltage rating would be the benefit.
 
Testers Challenge

Anyone game to try a different capacitor/resistor combo on their test board? Use 1 Meg for R1 and R2 and a 0.1 uF for C1? That was my original plan, and my concern is that the voltage across the zener may be a bit low, so measure that when turned on and see if your zener will work well enough at low current. Anything above 8V or so should be adequate, it doesn't need to be all the way to 12V.

On the next Revision and Second Round Testing

I will add an ON LED and some small mounting holes M3/#4. It will cost more length, however. I will review C1 and using 0.1uF with larger R1/R2 as mentioned above. Sorry but I don't want to tackle overcurrent shutdown at this stage, maybe later on. On Q5, it doesn't help with turn-on, only turn-off. I plan to do six boards this time, and I'd like to at least recover costs for these boards. Any other last requests? It will go out soon. I will probably renumber the components, have not decided for certain yet.

I just got the resistive Throttle Adapter boards back from OSH Park. Another beautiful small PC board! But that's really for another thread. :)
 
Alan B said:
Anyone game to try a different capacitor/resistor combo on their test board? Use 1 Meg for R1 and R2 and a 0.1 uF for C1? That was my original plan, and my concern is that the voltage across the zener may be a bit low, so measure that when turned on and see if your zener will work well enough at low current. Anything above 8V or so should be adequate, it doesn't need to be all the way to 12V.
I'd be ok with trying it. However, since I don't seem to have a high voltage 0.1 cap in my bin, I would like first to know if for a 60 V system you would recommend other values for the resistors with the original 1 uF cap. I'll try those first and then the 0.1 (once I pick one up).

Also, on mounting holes, good idea. You might like to look at the Hammond 1551 boxes to see if there is something near the right size.
 
See posting on first page that now has a resistor table for the 1uF cap. The on-times are pretty unchanged, but the off-time can be reduced.

Those boxes are nice, but probably slightly too small for the current version. I like the idea though. Might play with it, but that might have to be a future version, it would require a lot of re-working.
 
Making a board fit a particular box is a good idea. It might take a little work to make sure it fits properly. If you used an aluminum box, it would be possible to use it as a heat sink.
This circuit is not going to be very water tolerant. Some kind of conformal coating or potting would be a good idea. Potting helps with heat dissipation too, but makes repairs or changes impossible.
 
Went back a few pages and looked at the layout again.
Remembered that somebody had mentioned one large hole for a thick wire instead of four.
I see that the top holes are all tight and there would be little space for a large hole.

Suggestion: use the holes of the FETs as through holes for the wires. This not only gives much better mechanical stability, it also helps take away some heat (if there is any). The holes need to be a little larger to give some tolerance for placement/soldering.

Now that those small holes are gone, the 2 FETs each can be pushed away to make space in the middle for two large holes for thicker wires.

Thanks for thinking about the shrotcircuit shutoff, from what I see it would be just another transistor/FET.
I would buy four if they had that feature. One directly at the battery, and one directly at the controller, plus two for the BMS/charger.

Thanks for your patience with us...
 
I don't think moving to a single wire is a good idea, the 1 oz copper cannot handle the high current over a distance. The multiple wires are making this board handle a lot more current than it normally could. Going to 6 oz copper triples the PC board costs. :shock:

Probably the best way to get a single wire is to make a copper bus bar that sits over the board. This can be a separate piece so folks who want to do it can add it to the board, and folks who want low budget can use wire. Then everybody's happy. :D

I'm experimenting with a layout that might fit into a box, but it is turning out to be a lot of work for various reasons.
 
How about exposing a path through the solder stop mask, leaving a track from the FETs to the big hole so people (who need it) could just add some solder or wire?
Basically leaving an exposed path on the solder stop mask.

A copper bus bar is much more work than to add some solder to existing traces.

Great that you implement mounting holes.

Very cool how you handle this brainstorming.
 
The buss bar idea is good. The cheap way is to just use some 12ga solid wire soldered down on the trace. A pair of holes to hold the 12ga on the ends would make assembly easier. Ideally you want equal resistance paths for each FET, but it may be hard to get exactly equal. The drains have nice heavy copper tabs to carry current, but the source legs are always the bottleneck.
 
This is not complete yet, but it might (should) fit in the Hammond 1551 box:

ebike%2520master%2520switch%25201.2.png


Mask-free copper stripes are on the back side for soldering on a buss wire along each of the wire hole sets.
There's an ON LED indicator, but it will not have much current to work with.
And of course the fast turn-off FET switch is included.
This is pretty much a new layout, due to the different shape required for the box.
The FET leads have been rearranged slightly into an inverted Vee for better current handling on the PCB.
The FET bolt holes have been changed to plated through to help carry the heat through to the copper on the back side.
The thermal vias are missing, and a number of other little details remain to be done.
In most cases this circuit will not be generating much heat so the plastic box should be sufficient.
 
Research on C1

At a value of 0.1uF there are 250V MLCC (Multilayer Ceramic) caps available that are very small and fairly inexpensive. This requires 1M for R1/R2 to get a 100mS turn-on delay. Consequently Z1 must be able to operate at 100 uA, it doesn't have to get precisely to its zener voltage, but should be over 8-10V to insure saturation of the main FETs.

This all appears to be reasonable and makes C1 much easier to source and fit on the PC Board. :D
 
Very nice Board Alan B :) What does the hammond box look like?

i am right that this board now will now do instant turn off by using a 2-wire switch? so no more need for a 3-wire switch which shut gate to ground in off position?

Is 0,1sec turn on delay safe to precharge about 4000µF to 100V?

I have 1M R1 and 1µF which means 1s delay. Would it be better to use two 1M in parallel for 0,5M and 0,5sec delay?
 
That short of a charge time might put the FETs outside the safe operating area (smoke).
1 second is kind of pushing it depending on voltage and controller caps. Somebody learned this the hard way somewhere in this thread: http://endless-sphere.com/forums/viewtopic.php?f=3&t=40142
Non-polar aluminum electrolytics or a pair of polarized ones back-to-back will work and are inexpensive, just physically large. A SMD version of a MLCC would be OK too.

On the zeners, I've tested quite a few on my breadboard. All of the ones I tested held to within 0.01V of their rating down to 10uA. The 1/2W ones I have the most of held to within 0.03V down to 2uA.
 
Hammond box

This was suggested by dg above, it is tight but appears possible.

http://www.hammondmfg.com/pdf/1551K.pdf

Charging Current and Safe Operating Area

Nice to do a little math early in the morning. :D

i = C * dV/dT = 4000*10^-6 * 100 / 0.1 = 4A

So, if I did this right, 4000uF charging to 100V in 0.1 seconds requires 4 amps.

Heat in the FETs equals energy in the capacitors, so charge rate doesn't really help much there.

But if we look at heat, it is 4 amps times 100 volts or 400W at the start, and zero at the end 100 mS later, or 200W average or 20 watt seconds which is not all that much. We could calculate how much that raises the temperature of an FET, I'll leave that as an exercise for the reader.

I haven't run through the entire thread Richard mentioned above, but I wonder if they were using an RC circuit on the gate rather than a feedback circuit, the RC gate approach doesn't moderate the charge rate very well. Jeremy and I had some discussion about that, perhaps in his RFID thread, I saw some very high currents in my models with that approach, but he felt it was moderated by the battery and wiring. I don't like to take credit for battery and wiring impedance because some folks put together low impedance setups and blow the theory, so to speak. :)
 
madin88 said:
Very nice Board Alan B :) What does the hammond box look like?

i am right that this board now will now do instant turn off by using a 2-wire switch? so no more need for a 3-wire switch which shut gate to ground in off position?

Is 0,1sec turn on delay safe to precharge about 4000µF to 100V?

I have 1M R1 and 1µF which means 1s delay. Would it be better to use two 1M in parallel for 0,5M and 0,5sec delay?

Link to the Hammond box is above, and the calculations for 4000uF charging.

Yes, 2 wire switch is all that's required, now we have an FET to speed the turn-off without a SPDT switch being required.

100K/1uF is okay, and will give the LED 1mA to light up at 100V. 1Meg/0.1uF will make the LED very dim, and may not get to full voltage on the FET, but it should work as long as the FET is low enough leakage and gets to 8V or more. We need to do some testing there.

100k and 0.1uF would be 10 mS and result in 40 amps charging into 4000uF which is too much current/heat (revised based on SOA).

Perhaps I should provide an SMT overlay on C1, there are some SMT 1uF caps that are not too expensive that would be suitable (as Richard indicated earlier). They are large enough that soldering them would not be much of a challenge for DIY.

Here's one, a surface mount MLCC capacitor 2225/(5664 metric) size part, 1uF at 250VDC costing a dollar in unit quantity: AVX 2225PC105MAT1A. I'll have to try that on the board for size.
 
Yes, I think most of the magic smoke releases were involving a simple RC on the gate with no feedback.
If you look at the safe operation area graph for a IRFB4115 though, it implies 4A at 100V for 0.1 sec will be substantially outside the safe area. For a 4110, 1A is on the edge (single FET), so with several parallel, it should be OK.

Maybe I am not interpreting the graphs correctly.

IRFB4110 safe operating area.jpg
 
Back
Top