Gas station without pumps

2018 January 17

Long weekend, little done

Filed under: Circuits course — gasstationwithoutpumps @ 10:01
Tags: , ,

Last weekend was a long weekend (Martin Luther King Day on Monday), and I briefly had fantasies of getting a lot of stuff done.  The trouble is I never settled on exactly what it was I would get done, so I ended up doing very little.  I read science fiction, I slept a lot, I tinkered with my book a little bit, I got the live Christmas tree out of the house, and I adjusted the brakes on my bike. but that’s about it.

The main addition to the book wasn’t even a very important one—this picture:

Some of the most common packages for FETs.

We used to use TO-220 and TO-251 packages for the class, since that is how power FETS are most commonly packaged, but the power FETs are getting expensive (the cheapest ones keep getting discontinued—maybe they were cheap because they were end-of-life, or maybe they were discontinued because there wasn’t enough profit at the low price point).  We had problems last year with TO-251 packages not staying in the breadboards—the springs seemed to pop the leads out rather than grabbing them.

This year we’ll be using the SOT-23 transistors, which are much cheaper, and soldering them to a breakout board.  I’m a little worried about how many of the students will have trouble with hand-soldering the small parts.  They’ll have had a little more practice soldering by then, so I’m hopeful that it will go ok.

The other changes to the book were mostly typo fixes for problems found by my students.  The students have been very good this year at reporting problems to me, and there were a lot more typos than I expected (averaging about 1 every 3 pages).  So far they’ve not pointed out any substantive errors, though there was one omission that I’ve fixed—it seems that some students have not heard of raster image formats, and thought I was trying to say “faster image formats”, so I’ve added a couple of paragraphs about image formats.  The changes that I’m making this quarter will be in the next release, which will probably be in March, during spring break.


2018 January 3

SOT-23 FETs for half H-bridge

Filed under: Circuits course — gasstationwithoutpumps @ 20:53
Tags: , , , , ,

In Breakout board for SOT-23 FETs, I gave the schematic and layout pictures for a half H-bridge breakout board using SOT-23 surface-mount FETs.  The boards arrived today, 12 days after I ordered them. The boards cost $4.86 plus $23.79 shipping, but I had them panelize the design, and they sent me 13 copies instead of 10, so I ended up with 546 boards (instead of 420), making a cost of 5.24¢ each.

One of the panelized board. The panels are just separated with V cuts, so the corner rounding is not very good, but there is some, and I did not end up with sharp corners after cutting off a row of boards with tin snips.

With the transistors, capacitor, and headers, each half H-bridge will cost under 40¢ in 100s—much less than the approximately $1.37/half H-bridge that separate TO-220 FETs cost.

Today I tried soldering on a  PMV20XNER nFET (14.9¢ in 100s) and SSM3J332R pFET (12.4¢ in 100s), a 5-long right-angle header, and a 10µF ceramic capacitor. I wanted to do this with pretty much the same tools the students would have, so I did not use a board holder nor cross-lock tweezers (both of which would have made the job slightly easier).  My technique was simple:

  • Put the board face up on the bench.
  • Place one FET using sharp-pointed tweezers.
  • Tape the FET and the drain side down with a tiny piece of blue painters’ tape.
  • Solder the source and gate.
  • Remove the tape.
  • Solder the drain.
  • Repeat for the other FET.
  • Put the headers through the holes (from the component side).
  • Flip the board over and solder the header.
  • Put the header pins into a breadboard at the edge of the board.
  • Insert the capacitor from the component side.
  • Prop the breadboard up so the solder side of the board is exposed.
  • Solder the capacitor in place and trim its leads.

Soldering the first board went well.  The second one was a little harder (I had a bit of hand tremor), but still only took a few minutes.  Having made the lands huge (big enough for wave soldering) made alignment fairly simple—I did not have to be exact.

I tried one FET without the trick of taping the FET in place—that did not work at all, as the FET moved completely off the pad when I tried to solder.  I had to remove solder from the board with a solder sucker and redo the FET using tape.

Here are the front and back of the boards before and after populating, along with the pointed tweezers I used for placing the FETs.

Here is a close-up of one of the two boards I soldered (the one with the worst alignment—see the pFET at the top left).

I spent the rest of the afternoon checking that the boards were OK.  I used essentially the same setup as I used for Ron vs Vgs for pFETs and nFETS, with a 24Ω load and a 10V ramp that gradually turned the transistor off.  Because the test was the same, I plotted the results together with the old results:

The PMV20XNER transistor has a much lower threshold than the other nFETS I’ve looked at, but a comparable Ron to the other power nFETs.

The SSM3J332R pFET also has a low threshold voltage and the on resistance is in the same range as others we have used in the past.

It looks to me like the half-H-bridge will be a perfectly reasonable way for the students to get FETs for the class-D amplifier.  The current will be somewhat limited by the power dissipation of the pFET, but with an 8Ω speaker and 0.1Ω pFET, the power to the loudspeaker should be 80 times the power lost in the pFET, so the 10W limit on the loudspeaker should be reached well before the half H-bridge overheats.

Update: the EAGLE and Gerber files for this board are available at

2017 December 22

Breakout board for SOT-23 FETs

Filed under: Circuits course — gasstationwithoutpumps @ 23:25
Tags: , , , , , ,

After a discussion in the comments of Ron vs Vgs for pFETs and nFETS with Michael Johnson, I decided to design my own breakout boards for SOT-23 surface-mount FETs, with the possible use of them in the class-D amplifier lab in place of the through-hole TO-220 FETs we’ve been using.

I picked a couple of 30V FETs (one nFET, one pFET) whose data sheets indicated that they would have adequately low on-resistance with a gate voltage of only 2.5V (–2.5V for the pFET), so that the FETs could be controlled by a 3.3V logic signal with no problems.  I ended up picking PMV20XNER for nFET (14.9¢ in 100s) and SSM3J332R for pFET (12.4¢ in 100s).

Although the drain-to-source voltage is allowed to go to 30V, the gate-to-source voltage is more limited (±12V for both the nFET and the pFET).  That should be adequate for anything we do in the course, as our maximum power supply is ±5V, so we shouldn’t see any voltage differences bigger than 10V.  (I could have saved a few cents by using 20V FETs instead of 30V ones, maybe.)

Because the students use the FETs in an H-bridge, I decided to make my breakout board be a half H-bridge, with an nFET, a pFET, a bypass capacitor, and 5 right-angle header pins:

The schematic is quite simple. (The diodes are the body diodes of the FETs.)

The layout took me a while, because I wanted to make as much heat sinking as I could get on a small, cheap board.  The standard footprint for a ST-23 allows a thermal resistance of about 120 K/W. I did not push too hard though, because even with ideal layout, the SOT-23 packages still have terrible thermal conductivity (about 90 K/W)—essentially all the heat is being conducted through the thin drain pin.  (The SSM3J332R reports even worse numbers: 300 K/W with minimum footprint and 120 K/W with a square inch of copper.)

Solder side of the board. Visualization provided by

Component side of the board. Visualization provided by

My board is not nearly a square inch of copper—the entire board is only 15mm × 12.5mm, and only half of that is used for heatsinking the drains. I used the back of the board for radiating heat and provided thermal vias around the drain pads to connect the front and back. The footprint for the pads is one provided by the manufacturers for wave soldering—I thought it would be easier for had soldering than the much smaller pads used for reflow soldering.

The gate connections are on the outside, the source connections just inboard of them, and the shared drain in the middle.  The board is basically symmetric with respect to nFET and pFET, but I labeled the two sides so that there would be less variation in how students soldered them up.

The bypass capacitor is close to the FETs (much closer than the students ever got on a bread board), so we should see less noise injection back into the power rails than we’ve seen in the past. The resistance of the source and drain traces adds another 5mΩ of resistance to the H-bridge, which is not too bad—the beardboard probably adds more like 50mΩ.

If I understood their website correctly, I should be able to get 10 copies of the tiny board panelized in a 6×7 array (so 420 boards after I cut them apart) for only $4.90 from  Of course, I’m in a hurry, so I ended up paying an extra $23.79 for shipping with DHL, so the order costs $28.69, or <7¢ a board.  I also ordered 10 40-pin right-angle male headers (enough for 80 boards) for $4.11 from AliExpress, raising the price to 12¢ a board.

With the transistors, each half H-bridge will cost under 40¢ in 100s—much less than the approximately $1.37/half H-bridge that the separate TO-220 FETs cost.

The difference in cost is not important for the course ($2 a student), so my main consideration is whether the students will learn more by doing some surface mount soldering with a fixed cMOS half-H-bridge design or by continuing to wire up separate transistors on the bread board (making the usual student errors of getting the pinout wrong or general miswiring).  There is still plenty of room for error on the half H-bridge: swapping transistors, getting 2 nFET or 2 pFET instead of one of each, putting the whole board in backwards to short the power supply through the body diodes, …. .

The SOT-23s can’t dissipate quite as much heat as the TO-220s, but we’ll probably not have much heat to dissipate in reasonable designs.  With a 5V supply, 8Ω load, and 73mΩ on-resistance, the power dissipation in the pFET should be only about 28mW and the nFET even less—way less than the 500mW or so that I expect the boards to be able to handle.  Shoot-through current is mainly what the students will need to worry about, as that can get quite high with the low on-resistances of both the nFET and the pFET.

I’ve ordered the boards and parts to test out using the SOT-23 FETs and half-H-bridge boards.  If they work out well, I’ll probably rewrite the class-D lab to have students do a little surface-mount soldering (SOT-23s are about the simplest intro).

2013 June 30

SMD tools and custom plastic parts

Filed under: Uncategorized — gasstationwithoutpumps @ 02:02
Tags: , , ,

I did a little printed-circuit board design over the last couple of years, designing some motor controllers for Arduinos, some sensor boards, and some boards for my Applied Circuits class.  Almost all my designs have been for through-hole parts, so that I could assemble them with a soldering iron.  (That was an essential constraint for the boards for the course, as the students had never done any soldering before.)  Some of the sensor boards had surface-mount parts, but relatively easy ones to hand solder (0.05″ gull-wing leads).

Almost all electronic parts are cheaper and smaller in surface-mount packages, though, so I’ve been wondering whether I should get a hot-air rework station to be able to work more easily with surface mount components.  Sparkfun has a hot-air rework station for about $100 and Amazon has several, including a Kendal 898D 2-in-1 with a soldering iron for about $82.  I’m curious about how good these tools are and whether they are worth the price (my soldering iron, which works fine for through-hole parts, is only $15 from Parts Express).

One reason I’m considering getting a hot-air rework station is that my son is getting interested in hardware.  He’s been interesting in programming for years, and last year he did some fairly low-level programming involving interrupts for the data logger, but he’s not been particularly interested in the hardware. This summer he’s been teaching himself to use Eagle to do a surface-mount printed-circuit board design for a product design he and a friend of his came up with.  I don’t know whether they will ever finish the design and actually manufacture it, but their goal is to get a completed design by the end of summer and do a Kickstarter project to get enough funding to do a small run of 50.

My son has been learning a lot about product design, computer engineering, small-scale manufacturing, product pricing, design for upgrade, wear leveling in flash memory, power supply components, placement, … .  This project is easily the equivalent of many senior engineering capstone projects I’ve seen.

I’ve been learning some stuff along with him, as he asks me for advice and we have to search the web for information.  For example, we found that there are now small-run production services like Seeedstudio that could manufacture, populate, and test 100 small PC boards for about $14 a board (plus the price of the components).  One gotcha is that they need an engineering prototype, so you have to make one by hand first, hence the usefulness of a hot-air rework station.  I even looked into getting a reflow oven (which would allow doing more than one-at-a-time prototypes), but I don’t think I want to spend $390 (for the cheapest reflow oven I could find) when it is not clear that either of us will ever get beyond doing one-at-a-time prototyping.

I think that they may be able to make 50 of their devices for about $3500 for the assembled electronics and they want to sell at around $100–120 retail (direct sales).  Their biggest problems will probably be in the mechanical design: making the custom cases and stuff like that.  Although they have access to a 3D printer, I don’t think it has the precision and strength of materials that they need—they could probably make a prototype, but not 50 units that way.  Small scale manufacturing for mechanical parts seems to be harder to find and more expensive than for electronics.  Companies like Shapeways can do higher quality 3D printing, but the cost would be about $50 for the product—way too high for their $100–120 price point.

Short-run injection molding companies  (like DragonJewel) also exist, but the tooling is expensive: probably about $3000–5000 for what they want, which is too much for a run of only 50–100 units.  (The same tooling could be used for a run of 1000 or even 100,000 units, at which point it becomes cheap, but they’re not thinking of taking their first design to that scale.)  I mentioned DragonJewel by name only because it was one of the few sites we found that had any sort of estimate of costs.  Most of the sites are “quote only”.  Of course, real prices will require a quote, but it is good to know whether you are talking $300, $3000, or $30000 before you even start thinking about a service. Protomold has an automated quoting system, where you just upload a CAD model and they quote the costs, but they do have a minimum of about $1500.

Resin casting seems like a more feasible technique for very small runs.  Companies like Specialty Resin and Chemical claim prices like $50–100 for a mold and $4–8 a part, which is in the right ballpark for the cases for their product, if cast resin is suitable for the cases.  (Again, I picked this company out of many found by Google, because they gave a rough estimate of prices, and not just a “call for a quote” number.) The mold has to be made from a sample, but 3D printing by Shapeways might be a suitable way to make the sample. For that matter, there are companies (like Scicontech) that make molds from 3D printed models in house and do the casting, so there may be ways to go from CAD file to molded part quickly within one company—I’m actually surprised that Shapeways doesn’t provide that service. Perhaps the constraints on what is moldable are too complex to communicate easily.



2012 April 20

Make: Kit Reviews | The Ultimate Kit Guide

About a month ago, Make magazine released their reviews of various kits, Make: Kit Reviews | The Ultimate Kit Guide.  I have been a big fan of kits as a way to get kids into the habit of building things and knowing how they are put together.  They provide an intermediate point between ready-made consumer goods and hand-made artisanal goods.

I’ve talked before about my fondness for Heathkit electronics kits when I was growing up (Thanks, Dad!) and about how I was glad to see that they were finally back in the kit business. The kit issue of Make has a number of cool things in it ranging from the $3 Learn-to-Solder badge to $800 model submarines, $1000 mini CNC milling machines, $1300 3D printers, and $863 wood-fired hot tubs.  Although there are few kits in the issue that I really want, it is cool to see just how much is available in kit form these days.  Some are old-school kits (tube amplifiers! crystal radios! Nixie tubes!) and some are very modern (RFID breakout boards, quadracopters, drone planes).

My son has made a number of kits over the years (like the Velleman MK150 shaking dice kit or the K5300 Stroboscope with a xenon tube), and he is now moderately competent with soldering iron, solder sucker, diagonal cutters, and long nose pliers.  I suppose I should get him doing some surface-mount soldering, as my fine-motor control is a little shaky for 1mm × 2mm capacitors and 0.05″ pitch leads on ICs.  (Yes, I’ve seen instructions for making solder reflow ovens out of toaster ovens, and doing soldering with a skillet, but I’m not yet convinced that those are functional enough to be worth the investment in time and fried parts.)

Leads torn on pressure sensor.

The point about SMD soldering comes up this week because the pressure sensor superglued to the inside of the dry box for the underwater vehicle had its leads torn apart. This is probably my fault, since I had suggested the idea of supergluing the pressure sensor to the inside of the dry box without giving any consideration to the forces on the tiny little leads of the pressure sensor.

I had some spare sensor boards, but I had to order more pressure sensors from Digikey and assemble a new board for them.  This weekend, they’ll drill yet another hole in the drybox and glue the replacement pressure sensor in place, but this time there will be a couple of pieces of plastic glued to the PC board (about 4.8mm thick, to match the thickness of the pressure sensor body) also glued to the inside of the dry box, so that unplugging the cables will not put strain on the tiny wires of the pressure gauge.

The new hole will make the 6th penetration of the dry box.  Somewhat amazingly, none of these penetrations have leaked, although we have had problems with the underwater connector that they designed for the motor wires.  We’re hoping that problem will be fixed this weekend.

Next Page »

Create a free website or blog at

%d bloggers like this: