Zero-Draw, Solid State Contactor w/Precharge (Arduino)

Wow... I lost a couple of weeks. Time just flies...

So Some time back, around when the CroMotors landed I managed to squeeze in an entire day at Starbucks playing with different layouts. Again, the goals were:

* All surface mount parts that can be placed with tweezers and baked on with solder paste
* No hand work including beefing up traces, cutting legs, etc
* Low parts count, smallest board possible

Now if you are reading this thinking that you want to have a go with OSH park - let me share a few important tips.... ok, one tip - the most important...

PRINT OUT YOUR CIRCUIT AND SET THE PARTS ON IT

That is the most important thing you can do if you are inexperienced and you want to win. So much can be learned - and things that were not obvious before become obvious. Here is a version of my board and what I learned by looking at it with parts on it.

First - lets recall some lessons learned so we know why I did it the way I did this time (i.e. what was fail last time)

* Soldering in thru-hole fets that need a heat sink is FAIL - added complexity, expense, etc. Laying the fets down to heat sink through the board into the cabling is FTW!

* Beefing up traces is FAIL - a PCB should be designed such that it does not require traces to be beefed up at time of manufacture. It is time consuming, complicated, the boards warp, it just sucks. The way to win... is to have the user do the work by replacing the traditional thru-hole with a big long landing strip. In this way the end user lap-solders their wire to the board which beefs up the traces, creates a heat sink, and makes for a very strong bond.


2013-04-14 10.24.37.jpg

Ok - what are we looking at here:

Swapped the TO-220 package for a surface mount package. One less leg to solder, no thru-hole issues under the board, smaller footprint, nominal cost increase.

The green bars represent 10AWG cable. First look at the bottom left - see how the wire runs parallel to the two fet bodies? Those are the drains and they connect directly to the wire (good electrical path) and there is a reasonable heat path. Vias are not shown - but they are there.

The sources are the legs in the upper right. See how they have a reasonable path to the cabling? It is assumed that the user will float the solder a bit and beef those traces up at the time of solder. We will of course offer a version where we do this for folks - but we are really trying to get away from that as it is very time intensive.

The upper left hand corner has a JST-XH-2 connector on there (actually it is on the bottom I think...). Could be used as the HVC input or the user ON/OFF control. Just a place holder - Kywin will make up a set of custom cables for us so we have not decided on a connector yet

In the lower right hand corner we have the Attiny. I tried to keep it as far away from the heat as possible. Ah - see a lesson learned? See how tightly I packed those capacitors? That is a fail - too easy to bump one cap while laying another. Some spacing will need to happen to make it a produce-able design

There is another JST-XH-2 above the uController. That too I believe is on the bottom. COuld be HVC or Power. Just a place holder

The regulator can be seen - it probably could use a better thermal pad. Speaking of which - the polygons have not been drawn yet but all of these thermal traces have matching pairs on the back side.

The 6 pin header is another place holder for the in-circuit programming port. I will probably just make them pads and build up a little pogo for it. Placeholder


2013-04-14 10.24.58.jpg

Ok - I have just fallen out of love with these coin cells. To do two of them stacked the holder is HUGE. HUGE HUGE HUGE. In my mind I was picturing the tiny little 40mAh cells on my RTC GizMo board - in reality I choose the much larger CR2032 - and a huge holder for them. Looking at this makes me think fail - not sexy at all.

Seems to me what would be much more sexy is one of those tiny little micro-helicopter batteries plugged in. You know - the ultra tiny little pouch cells that sometimes have a little plastic housing around them. Most are 1S I think - but I am sure that some are 2S. Opens up a whole new can of worms... I guess I could just hard-solder in a little lipo pack and leave a charging port. Supply one of those crappy little USB chargers - bah. Bummed that my whole coin cell thing kind of flopped.

Anyway - you can also see that the footprint I made for this battery holder was not very good. Truth told - I made a foot print to the manufacturers spec and did not like it. This is just a standard Spark Fun footprint that I figured I would tweak later. I am pretty sure that in the end folks always end up wanting bigger pads for these things...

Changing subjects: I did not meet a few of my requirements:

* Battery holder is on the bottom of the board, so will need hand soldering
* There are two thru-hole JST-XH connectors... they will require hand soldering (or dipping - but I dont think they can take an oven bake)


View attachment 2

See how tall that fugger is? Ugh... what a fail.

Below is the current schematic. A few realizations happened.

* A 5V regulator is required
* A pull down resistor is probably required (though I will test without it)
* The circuit will stay on 24/7 - brown out will be turned off any time the fets are off.
* We are pretty short on pins - sigh...
* Gates are now tied together and not on a PWM pin. 3 drivers, 2 gates, no gate resistor (I think they will be fine) I can play with rise time by the number of driver pins attached

Some bads:

* We are tied to the logic level fet - so that means 100V across it until someone comes out with a >100V high quality gate drive power fet. For charging this is not a limitation - but for discharging or turning the controller on and off 100V will be the limit. Hmmm... I guess we could get clever and use these fets to switch some other fets (ugh...)

* Still no hardware test has been done

* We are depending on the end user to make the heat sink... if they are using a 10W crappy RadioCrack soldering iron and 10AWG high strand count Hobby City wire there is a good chance of poor solder joints. We may have to re-think this part. I think that anyone who is serious about DIY electronics basically MUST own a 200W soldering iron. They are like $30 at almost any store (the weller gun style with two power levels). Quality is low but if use is low they will last a lifetime.


2013-04-14 10.25.21.jpg

Here is the current state of the schematic.

Schematic.jpg

Today I plan to think some more about the layout. I want to eliminate the thru-hole connectors, possibly replace the coin cells, talk to Keywin about what kind of harness he can build for us, think about options for pigtailing that dont take a bunch of labor, confirm that this uController will do what I need it to, set up a proof of concept circuit, order some logic level surface mount fets, and... oh yea... GO TO THE BEACH

I got a new surf board :p

It is a wretched old 9' 2" board that looks like it crawled out of someones ass and died. There are more patches and cracks on it than original material... it has a fin the size of my leg... but I took it out to Pleasure Point yesterday (there were like 75 people in the water) and I rode one wave for an interval of time longer than all of my previous rides combined. I started surfing as a kid in Junior High - we lived like 300 steps from the beach... but I wanted to be cool so I got a short thrasher board... then I basically just posed on the beach and out in the water because I could not even stand up on it. Anyway - now I have a proper learning board and I am going to add one more skill to my bag of tricks. Surfing.

Here is what Pleasure Point looks like - an international surfing destination.

4110096230_ba4bb24415_z.jpg


Tell me that you dont want to ride those?

At low tide you can walk out like 200 yards... basically you can ride a wave for 30 seconds+ in knee deep water. The location is beautiful too...

7810573330_b3eb8ddb9c.jpg


So - hopefully by the time you are reading this over-written crap I will be there riding waves in the sun. Sometimes I forget that THIS is why I quit my job... not to toil over bullshit... but to live the dream.

-methods
 
I am so tempted to just put a JST-XH-3 90 degree board mount connector and buy an ass-load of these....

http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=24217
19422-main.jpg


Half the capacity
An order of magnitude more expensive
Way cooler
Rechargeable
Much larger... but inline with what I think is cool
Smaller than the board outline
7.5mm thick

Users could then operate this bugger for 6months or a year (now we are talking higher self discharge rates...) and give it a balance charge with an of the $3 balancers that are widely available for next to nothing... sigh...

If I could find a way to surface mount the JST (that would survive the oven) I would eliminate two of the solder steps
Man oh man...

I would just plug this battery in and throw a loop of rubbery heat shrink around the whole thing. Make it so that you could pop the plug and balance charge without removing the shrink.

So tempted...

On the lookout for smaller 2S packs.
I like the idea of only one connector for both balance and discharge
Would prefer one of those slick 1S designs that "click in" but I dont see any

-methods
 
If I eliminate the coin cell holder on the bottom of the board that affords me several things:

1) I can now run as many thru-hole parts on the top as I like because I can solder-pot-dip them as a final step. Basically we paste the boards as an array, place parts, bake them, press in the thru-hole parts, brush them with flux, break up the array, dip them in the solder pot, then dump them in the ultrasonic cleaner.

On my Detector boards I can solder 6pcs of JST-XH-7 in about 8 seconds including fluxing. Longest pole on those is actually pressing them in.

I am liking this hobby king pack idea - going to order a few along with some cheap-o chargers that I can supply.

-methods
 
Ok - nano packs ordered. Changing direction again.
Now I am going to go back and re-work with this new paradigm.

Two stage build process - bake then dip
Totally do-able.

Rechargeable battery - awesome

Pretty soon I just need to spin 20 of these and see what happens. I am still stuck in the old thinking where I had to spin like 200 boards to make them affordable... now that I can just spin 20 - I need to adjust my expectations and move back toward iterative design. Hell... I might even just do the basic deal and spin off 2 boards.

-methods
 
The more I think about it the more I realize that you MUST be able to reflow JST surface mount connectors...

The board needs 2 or 3 connectors:

JST-XH-3 for the battery

JST-XH-2 (two pcs) for the HVC input and the Manual power switch (which I may set up as a solder only part

Alternately - the two JST-XH-2 could be replaced by a single harness JST-XH-4

Anyway - point being... I need to run a test on these JST connectors and see what happens when I bake them. If they are not disturbed - I bet they can survive the bake just fine. If I go with surface mount connectors we are back to a single stage process with no thru-holes needed (so no solder dip, so much less cleanup

As a matter of fact... if we get clever - we can use a no-clean solder paste :shock:

I am going down to my lab to bake some JST connectors.

-methods
 
Ok - I thrashed on this thing for most of the day. In the end this is what I got done:

* Re-sized board to be 1" x 2"... bigger yea - but I am paying for the sq inches anyway and it will make for an easier to populate layout
* Dumped coin cells and replaced with 2S Lipo that uses JST-XH-3 90 connector
* Fixed a few schematic bugs
* Moved parts around on the board
* Replaced TVS diode with proper sized SMC part
* Replaced ICSP with a straight line version
* Put all three JST connectors on one end
* Ordered Lipo samples and lead free (because that was what was in stock) 4030's in a D2 pack
* Spent a great deal of time thinking about how the board will be populated...

Simple things are not obvious - like if you have 4 capacitors and a resistor to place... if you put them all in the same orientation you have to do less mechanics with the tweezers. If you have them on 90 - you are constantly either having to rotate your wrist, rotate the panel, or move your parts. Anyone who has placed like 500 parts to then swipe a shirt cuff across the board and ruin it all :evil: :evil: :evil: understands the importance of this. I get almost superstitious toward the end of a placement session.

Soda Can Schematic.jpg



The battery will be on the back side (where are no other parts on the back side - or pins poking thru. The connector will snake around to the JST-XH-3 in the bottom right hand corner.

One of the other two JST's will go off to the Detectors and one will probably not be used for this application (unless people use this for discharge.

It just occurred to me that if someone wants to use this for discharge I could probably piggy-back the 4030 fets and fit 4 of them on there pretty easy for a very reasonable discharge rate. Hmmm....

Anyway - working for yourself at home is a total trip. In order to find any time to work on a circuit like this I have to block out almost everything else... it is so easy to get distracted with all of the other bullshit in life. Just like at work - it is so easy to get distracted by fools rambling in the hallway. I kind of miss work in that sense - I can get way more done if I am trapped someplace (like an office... or Starbucks) than I can at home.

-methods
 
methods said:
I can get way more done if I am trapped someplace (like an office... or Starbucks) than I can at home.
-methods

I found this out also... have been pondering it. I thought I would be much more productive at "corporate headquarters..."
 
On a day for day basis I swing back and forth between the option of producing something that is actually profitable (i.e. not just what I like to produce) and taking a 9-5 job. If it were only me - I would have no problem choosing... I would choose to be poor and design that which gives me pleasure.

I have a wife and kid tho - and they like money... sooo pretty soon I will either start producing profitable things (barf) or I will pick up a job at one of the local EV companies. The thought of working on something big is actually kind of appealing right now... I got turned off before because the big thing I was working on was a horrible weapon that was used to coerce the world and kill people... but maybe working on an electric car or electric motorcycle would be fun.

- on topic

I printed out the latest and did some fit checks

2013-04-15 08.31.05.jpg

Ok - above... note how much room there is now to place all the caps. Everything is tweezer friendly. Note that I did not populate the JST-XH headers.
In hind sight I am really glad that I widened and elongated the board - now the lands for the 10AWG are much wider. Once I pucker them with vias I think they will be FTW.

Now below... yea... not so good. So we need to sort out whether this is:

* Bad part footprints
* non-1:1 print ratio
* different manufacturer (2.54mm vs 0.100", but that usually only shows up after 7+ pins and it is usually a TINY error)

I suspect the drawing printed out at slightly under 1:1 - as those are SparkFun footprints that I have used in the past.

2013-04-15 08.35.36.jpg

-methods
 
Oh wow... bad footprints!

Guess I used some standard that is 0.080 spacing instead of 0.100
wtf>??

___________________________
This is the description:

"Header 3 Standard 3-pin 0.1" header. Use with straight break away headers (SKU : PRT-00116), right angle break away headers (PRT-00553), swiss pins (PRT-00743), machine pins (PRT-00117), and female headers (PRT-00115). Molex polarized connector foot print use with SKU : PRT-08232 with associated crimp pins and housings.

Package: JST-3-PTH"
__________________________

But between the pins I measure:

0.080
0.080
on the dot....

See?
That is why you print stuff out before you send your money to OSH park :mrgreen:

-methods
 
I realized laying in bed last night that I can have my cake and eat it too... I can put the pads on the back of the board for the dual coin cell holder, then choose to populate it or not.

If I populate it, I can populate with either disposable or rechargeable cells. If I populate with rechargeable cells folks can charger them through the 3 pin JST battery plug :wink:

Alternately - if I dont populate the coin cell holders the unit can work off of the little nano pack on the back

If someone has an isolated DC-DC - this could also be plugged in to the 3 pin JST.

Hmmm... 4 power source options.

Laying out traces today. Going to just spin up 2 of these for a look before committing to a run.

-methods
 
Make that 6 choices...

Since I am reconsidering my design constraints - here is a much lower profile dual coin holder.
http://www.batteryholders.com/part.php?pn=BHX1-2032-SM&original=CR2032&override=CR2032

Description CR2032 Holder
Features reverse polarity protection and includes gliding tray
Also Accepts 2 BR2016s, 2 CR2016s, BR2032

Ah... only 3mm tall instead of 6mm tall. That might actually be slick
Can run 2pcs of 2016

Uses the same footprint as the other dual coin holder

2 x 2032 (high profile, non rechargeable, long life, cheap and easy to find)
2 x 2016 (low profile, non rechargeable, shorter life, cheap and easy to find)
1 x Nano Pack (high profile, rechargeable, expensive and I will supply)
2 x 2032 rechargeable (high profile, rechargeable through battery plug, cheap and easy to find)
2 x 2016 rechargeable (low profile, rechargeable, tiny capacity, expensive, hard to find)
1 x Isolated DC-DC (this would totally blow the whole concept of protecting the main pack from overdischarge... but the possibility exists.

The more I work on this project the more I realize that I am only making the HVC breaker to fill a needed hole in my ebike product line. I am not really all that excited about it... what I am more excited about is using the board as a 4S BMS for all my battery lights etc. Yea - I realize that 4S BMS's are easy to find... but what kind of current do they draw??

Hmmm... I just looked - many of them cost only $10 and draw only 30uA. They will discharge only 5A - but that could be worked around. Sheeeiittt.. might just be smarter for me to make an add-on board for one of those to beef up the mosfet current carrying capacity.

Distraction
There is always someone making something that is better, different, worse, similar, etc. I think it is best not to even look around some times because it is just too easy to quit and assume that someone else will make something.

Ok - no more frigging talking - going to go lay out my 6 option system.

-methods
 
Ok I worked on it all day
Fixed a bunch of bugs
Made up silk top and bottom
Fixed up all the masks (so users can solder on the 10AWG)
Worked on the paste file

Worked and reworked the layout - ugh I suck at layout... but I managed to keep good copper where I want the heat to go, to take a few steps to keep the heat away from where I dont want it, and the only thing I regret about the design is the crappy Gate traces and the proximity of the bypass caps to the chip.

Whatever - it is going to work

I set it up for all five battery options - so prepare to win

I ordered 9 boards - 3 for me to blow up and 6 for folks to try out. Open for Beta Testing but I will charge your ass a fortune... so think twice before offering.

thumb_i.pngthumb_i (1).png

Ignore how the JST connectors hang off the side - the board is 1" tall by 2" long
Yes I know the via's are crooked - I had to avoid the battery on the bottom.

-methods
 
methods said:
Ok I worked on it all day
Fixed a bunch of bugs
Made up silk top and bottom
Fixed up all the masks (so users can solder on the 10AWG)
Worked on the paste file

Worked and reworked the layout - ugh I suck at layout... but I managed to keep good copper where I want the heat to go, to take a few steps to keep the heat away from where I dont want it, and the only thing I regret about the design is the crappy Gate traces and the proximity of the bypass caps to the chip.

Whatever - it is going to work

I set it up for all five battery options - so prepare to win

I ordered 9 boards - 3 for me to blow up and 6 for folks to try out. Open for Beta Testing but I will charge your ass a fortune... so think twice before offering.

View attachment 1

Ignore how the JST connectors hang off the side - the board is 1" tall by 2" long
Yes I know the via's are crooked - I had to avoid the battery on the bottom.

-methods

+2 to +3 units for Beta Testing Please!
Really Methy, all jokes aside
-Mike
 
Now that the easy part is done.... :x

I have to totally change head spaces and figure out:

* How to get Arduino to load on that little chip
* Make up a custom ICSP plug that is reliable
* Write up a few testing sketches
* Build up a testing rig to find the limits (100A power supplies :twisted: )
* Write up some labview to put a few thousand cycles on one under inductive load

OSH park is SO AMAZING... 3 prototype boards for $10 shipped. I mean - are you frigging kidding me? For $30 I got 9 boards. I used to pay $350 to get 2 boards!!!

So I figure a couple of weeks to get the boards and all the parts I ordered. A couple of weeks for some other emergency that will surely pop up. A couple of weeks for developing the software and testing... then the production run. I figure we are still 2 months out on these.

OH YEA>.... and then I need to go back and do what the title of this thread says... make my SSR :roll:
Totally glad I detoured down this road tho - learned a ton

-methods
 
methods said:
Now that the easy part is done.... :x

I have to totally change head spaces and figure out:

* How to get Arduino to load on that little chip

http://hlt.media.mit.edu/?p=1695
This is the tutorial I used for loading Arduino on ATTiny, hope it helps.
-Mike
 
Wonderful thread. Cool stuff, I want. Haven't had enough time to absorb yet and it's late. But ...

When pushing around big power with a microprocessor it's important to have failsafes in mind at all times. What are all the possible states and what happens if the processor crashes in any one of them?

Thanks very much for moving things forward!


Richard
 
rf said:
...When pushing around big power with a microprocessor it's important to have failsafes in mind at all times. What are all the possible states and what happens if the processor crashes in any one of them?

Totally good point

Since the default state of the system is ON like 99.99% of the time - and the system is an emergency backup, and not a main system switch, I am not super worried. If the resting state was OFF and an ON state would result in physical action (such that a blip would get someone hurt) I would be much more concerned - we would need redundant control - but since we are not powering anything - but rather just acting as a gateway... I feel confident

You bring up a good point in that since I moved the power switch from actual power - to a digital input - the controller hypothetically never gets power cycled! I need to think on that a bit... I would really like to see a reset every time the bike is powered up. Lots of ways to do that.

So - there are an infinte number of states right? No way to map them all. I intend to manage this risk through user procedure... basically the user can interact with the device to confirm that it is operating as expected.... but that has problems.... yea....

Yea... you bring up a good point... I need to think through the states again and change my plan. The plan is very different for Charge control vs Discharge control.

Thanks! I got too caught up in finding a clever way to control the power and forgot to work the details. I am positive that I can find an acceptable solution in a mix of user procedure and software.

-methods
 
OSH park has shipped the PCB's and they should be here in a couple days.

I got a golf cart - lifted, upgraded headlights, flat bed, rumble seat, awesomeness. Converted it to 50V Emoli and still using the original mechanical resistor speed control (out of nostalgia ... I literally have 20 Alltrax controllers) and I need a way for LVC to stop the cart. While I was thinking about how to solve the problem it totally hit me that my new toy is just what I need

I want to break the Key Switch line
No idea what the voltage is
No idea what the current is (tho it is pretty low)

With my old HVC breaker I would have had to measure that crap, it would have to be over 9V, I would then have to adjust the vdrop resistor... blah blah blah. LAME

Here is the real reason why this new design is awesome..... It is self powered so it does not matter what the voltage or current is of what you are switching!!!

When my boards get here in a few days I am just going to populate, throw some code on there, and wire this thing inline with the key switch. I know it is going to work because I know it is not over 100V or over 50A. That is a good feeling... not having to worry about biasing for different voltages is a really, really good thing...

Like with the Infineon controllers and the drop resistor - having to tune that for each voltage range SUCKS. Having a controller that will work from 20V to 100V rocks.

yea man... I am excited. I can only make things that excite me - so lucky I am excited :mrgreen:

Thinking of all the low voltage projects I want to hook up with this SSR... all the big 4S flashlights I have - man that will be perfect. Also have a couple of 24S packs used for powering Laptop bricks... PERFECT for those... like 90V at way less than an amp. The ultimate protection system that does not draw down the battery (except for the 3uA bias for the detectors).

Yea - excited!

I have a super gnarly set of Jumper Cables that Matthew made up for me. 4S5P Lipo with 4AWG. I want to make a beefed up version that can handle the jumping inrush (500A for a few seconds?). I am guessing that 4 fets will do it.

The key is going to be the onboard over-temp protection! 85C thermal switch mounted directly to the fet bodies... cut power to the system if current gets too high. No way for the uController to malfunction on that! Redundant safety for $0.35 cents and 15 seconds of install labor. FTW!

oh yea... I screwed up the 3 pin Lipo connection... turns out it really was the smaller JST connector, not an XH, so er... back to the drawing board for that one. I can just bend the pins for this first run of boards.

Working prototypes in like a week!

-methods
 
hella yeah! :)
 
woah, I'm not sure how I missed this thread. b

I really like the coin cell battery. I think this brings it above and beyond the ideas I had running through my head. Damn, such a simple solution to the problem.


Because you're a busy guy I just want to add
(1) this is wonderful. I'm jealous your method [arrrghh, pun of sorts] seems to implement better just the few things that I wish I had thought of myself!
(2) AHhh! do you use KiCad? Or is that just another PCB program for your schematic that is not kicad? I am fond of KiCad, it just made more sense than eagle for me; I am glad I jumped ship to learn KiCad instead.
(3) please keep rocking.

[You even did things like switch from the Atmega to the tiny, which I was going to suggest, but you already were way ahead.]
 
Kin said:
....
(2) AHhh! do you use KiCad? Or is that just another PCB program for your schematic that is not kicad? I am fond of KiCad, it just made more sense than eagle for me; I am glad I jumped ship to learn KiCad instead.

Those are Eagle schematics. I spent like 10 years wishing I could do PCB layout and then finally a super nice guy named Jamie taught me. He used Eagle so I started using it - never tried anything else. It is pretty buggy and there are a lot of things I would do different. The two things about eagle that I really like are that it is free..... and that so many companies release schematics in Eagle (i.e. Arduino projects). I am just happy that I can actually lay out a half decent board. I just wish I had not waited so long to learn.

Since I am rambling - the same guy taught me how to solder surface mount in bulk. Guy was a machine. Sadly he still works for "the man" and his talents are wasted.

Kin said:
[You even did things like switch from the Atmega to the tiny, which I was going to suggest, but you already were way ahead.]

That's just because other members made so many awesome suggestions :wink: Most of the tweaks to the original design were suggested by members, iirc someone right off suggested using the ATtiny - took me a while to come around to the idea. It is humbling developing out in the open like this (where people can see your painfully slow progress and technical soft spots) but worth the trouble as each new idea brings excitement and each small bit of knowledge fills in the gaps. It seems that every time I expose my weakness it just makes me that much stronger.

-methods
 
This day and age. You never have to worry about being "taught" something... If you are willing to put the time in and use google you will succeed. Although it was you guys who taught, and are teaching me, IM living proof ;) I found my way into Kicad and have it mostly figured out. I produced Gerber files for osh park and I have had 9 boards from them which were all awesome. I have another set on the way and I'm designing 2 more powerstage versions ATM so I can offer/post files from 100-(LOTS) of phase amps at a user select able voltage.
 
Back
Top