Gas station without pumps

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 https://users.soe.ucsc.edu/~karplus/bme51/pc-boards/

Advertisements

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 https://gerber-viewer.easyeda.com/

Component side of the board. Visualization provided by https://gerber-viewer.easyeda.com/

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 Smart-Prototyping.com.  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).

2017 November 27

Power board soldered

Filed under: Robotics — gasstationwithoutpumps @ 13:26
Tags: , ,

This morning I managed to fix the problems that I had created for myself by my mistakes in soldering yesterday.  The power board is  now soldered and passes continuity tests (no adjacent pins shorted, all header pins connected where they are supposed to be.

Finished board, with annotation for the header pins. The whole board is 5cm×7cm.

The power board has several functions:

  • The pair of H-bridges for the motors, powered directly from battery power input at the lower left, and controlled by PWM and DIR signals from the Teensy board (header pins at the top). The motor output wires are red and white header pins on the left side of the board, to match the red and white wires on the motors.  The two motors have red and white with opposite M1/M2 connections, so that matching DIR signal drives the motors in opposite directions.  Because the motors are mounted with shafts in opposite directions, this should result in the wheels turning the same way.
    There is a row of header pins on the right (input side) of each H-bridge, for hooking up oscilloscopes or other test equipment.  The EN– signal could be shorted to GND with a shorting plug, but the documentation claims that there is a pull-down resistor internally, so floating should be fine.
    The VM pins of the H-bridges have 220µF electrolytic capacitors as bypass, to reduce PWM noise from propagating back through the battery.  I was planning to add 10µF ceramic capacitors at the Vin pins, to reduce high-frequency noise, but I ran out of room.  If the high-frequency noise is a problem, I can try to squeeze in some bypass capacitors.
  • NCP7805 5V 1A regulator (bottom center).  All the red and black pair to the right of the motor control are 5V and GND.  The GND pin of the regulator is the only place where the 5V and battery power systems are connected.
  • The multiplexer connects one of the 8 white pins on the top right to the “out” pin, controlled by S2, S1, and S0. Up to 8 tape sensors can be connected with standard 3-wire servo cables.
  • The 8 yellow pins are not connected to anything—they are there just to provide alignment for servo cables sending 5V power to other boards.  I may not need any of these connections, as the Teensy board can be powered from the 5V and Gnd connections adjacent to the motor signals and tape-sensor signals.
  • There are also 4 pairs of yellow pins just above and to the right of the regulator.  These are intended for gathering the encoder wires from the two motors and transferring them to a single cable up to the Teensy board.  The power and ground connections there can also be used for the encoders.

This board will have a mass of connectors to it:

  • battery (3-wire servo cable)
  • motor connections (4 separate wires)
  • motor encoder connections  (8 separate wires: +5V, GND, ENC1, and ENC2 for each motor)
  • motor cable from Teensy (4 wires or 6 wires, depending whether 5V and GND included)
  • tape-sensor cable to Teensy (4 wires or 6 wires, depending whether 5V and GND included)
  • encoder cable to Teensy (4 wires)
  • tape-wire sensors (3-wire servo cable to each sensor)

I still have to lay out and solder the carrier board for the Teensy, but that should be relatively easy, as I don’t have nearly so many wires and I only need to populate a few of the connectors.

2017 November 22

Pololu MAX14870 H-bridge with current limitation

Filed under: Robotics,Uncategorized — gasstationwithoutpumps @ 23:36
Tags: ,

After about an hour of frustration, I finally got a 0.1Ω resistor soldered in place of a cut trace on the Pololu MAX 14870 H-bridge board.  This is supposed to limit the current to 1A, by doing PWM when the current is exceeded.

I then tried seeing how well it would do current limitation, using a 300µH inductor in series with various combinations of power resistors.

When the resistance is large enough that the current is limited to <1A by the power supply voltage, no PWM is done. At lower resistances, current control is done, but the resulting average current is not a constant 1A, but varies with the load.

The current control is a little more aggressive than I expected, with currents as low as 700mA rather than 1A.

With a 5Ω motor, I expect the stall current to be limited to 750–800mA, delivering about 3W to the motor.  A beefier motor with lower resistance would actually get less power (a 2Ω motor would be limited to about 800mA, delivering only 1.3W.  Without the current limits a 9.9V voltage source would deliver 19.6W to a 5Ω load and 49W to a 2Ω load. Of course, the internal resistance of a battery limits the voltage and current it can deliver to a 2Ω load.  The LiFe batteries we are using are only rated for 1.5A at 9.9V, so 14.8W is about as much as we can sustainably get from the battery, and I doubt that we get even that much.

The motors have no trouble starting with the <1A current, but stalling the motors with a heavy load starts the current limitation, and the average voltage stays well below the 6V rating for the motor.  So I think that using the current limitation with the sense resistors on the H-bridges gives enough protection for me to be able to use the 6V motors with the 9.9V battery

First test cuts and progress report

Filed under: Robotics — gasstationwithoutpumps @ 12:27
Tags: , , ,

Yesterday, I again spent most of the day struggling with SolidWorks.  My goal was to model the tape sensor boards, fix the modeling of the threaded rods to be 8-32 instead of ¼”, check the positioning of the tape sensors and ball set screws to make sure there were no conflicts with the M10 nuts for the set screws, and check the modeling of the motor mounts, tape sensor boards, barrel jack and voltmeter, to make sure that the pieces I will cut for the robot will align correctly.

To check the modeling, I laser cut test pieces in MDF.  The test pieces are much smaller than robot layers, so as not to waste MDF on pieces I’ll end up throwing away (I was sure that I would find errors in my modeling).

Here is the first test piece showing the tape sensor mounted with no problems, but the motor mount showing misalignment of the hole pattern. The corner holes are an appropriate size for 8-32 rod.

The tape-sensor board can be mounted with 12mm M3 machine screws, though if I want to double-nut them I’ll want to switch to 14mm M3 screws. For the motor mounts I’ll use 16mm M3 machine screws.

I remodeled the motor mount to have the holes correctly spaced, and even with sloppy hand alignment the holes match well enough for inserting M3 screws.

Besides the screw holes, I wanted to check the sizing for my power panel, which holds a voltmeter/ammeter and a barrel jack that will be the main input for either battery or wall-wart power input (9.9V from LiFe battery, up to 12V from wall wart).

Here is the power panel showing the voltmeter and the barrel jack. This is the second cut for the power panel—the first one had a rectangular hole barely big enough for the voltmeter. The first cut let the voltmeter slide in until it reached the snap-in locks, but then would not fit the rest of the way. I changed the size of the hole without changing the voltmeter model.
The barrel jack is too short for the thickness of the MDF—the nut barely fits on the remaining threads.
Also, the drill hole on the right for a threaded rod is too close to the power panel, not leaving room for a nut. That doesn’t matter on the test piece, but would on the final robot—I have to check the position of the rod holes carefully.

To fix the barrel-jack problem, I used a ½” Forstner bit to cut halfway through the MDF. Note that the press-fit springs on the voltmeter are gripping theMDF (though not very tightly).

After thinning the MDF, the barrel jack protrudes an appropriate amount from the panel.

I won’t have much time to work on the robot tomorrow, as I have family obligations out of town for Thanksgiving.

I checked the schedule for the course and I’m about a week and half behind schedule. Electronics and mechanical prototyping was supposed to be done by 17 Nov, and I’m still working on both. I hope to have the track-wire sensor tested and soldered today, and perhaps a crude prototype of the bumper.

I’m still trying to decide how to power the motors. I’d originally thought to use switching regulators to reduce the 9.9V battery power to 6V and then Pololu MAX14870 H-bridges to do PWM control.  I still like the H-bridges, but the regulators oscillate rather badly under high load (probably because the resistor and capacitor used for controlling the feedback loop are the wrong size for a 6V output, but replacing the surface-mount components would be a pain).

I’m now thinking of running the H-bridges directly from the battery, but using their current-limitation capability to keep from burning out my 6V motors. I’ll have to test to see how well this works.  The current limitation is set by a surface-mount sense resistor, with the max current being 0.1V/R.  I bought 100mΩ and 51mΩ resistors of the right physical size, so I can do a 1A or 2A current limit.   The 2A limit is appropriate for the beefier 300rpm motors I bought (which I have 2 of) and the 1A limit is appropriate for the wimpier, nominally 210rpm motors that I now have 6 of.  Given that the battery is a 1500mAh, 1C battery, I shouldn’t be taking more than 1.5A from it anyway, so the 1A limit on each motor is probably the best choice.  I’ll have to cut the trace on the boards and solder in the tiny 100mΩ resistors, then test the motors with the H-bridge to see whether the current control works.   The internally generated PWM for the current regulation has a fixed off-time around 15µs (7.8–22µs according to the MAX 14870 data sheet), with a variable on-time (minimum 2.5µs), so at 60% duty cycle (the equivalent of running the motor at 6V rather than 9.9V at stall current), the period would be around 26.7kHz (18–51kHz).  There is some risk that this will interfere with the 25kHz track-wire sensor.  Luckily, I don’t expect to be running the current-limitation PWM very often—generally only when starting or reversing the motors for the robot.

By 24 Nov, I’m supposed to have “Working Prototype for moving robot and ball launcher; State Machine”. If I’m lucky I may have the robot layers cut on the laser cutter that day, but I don’t even have clear plans for the ball launchers. It is unlikely that I’ll have a moving robot and state machines implemented by then. If I’m lucky, I’ll have the low-level code for all the sensors and motor control done.

My fall-back position—having a moving platform that does the detection and control but replaces the launchers with just LEDs to indicate when a launch would happen if I had time to design and build launchers—is looking more and more likely.

Next Page »

Create a free website or blog at WordPress.com.

%d bloggers like this: