Gas station without pumps

2015 October 3

AOI514 nFET I-vs-V

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 21:03
Tags: , , ,

I wasted a lot of time today trying to get a good current-vs-voltage plot for a diode-connected AOI514 nFET, which is the one I plan to have the students use this year.  When I started on it this morning, I thought I was working on my book, but in the end I decided not to include the I-vs-V plot in the book, so most of the time ended up being wasted.

I breadboarded three different test jigs for measuring the current of the nFET:

I started with the simplest test jig, and worked my way up to higher currents.

I started with the simplest test jig, and worked my way up to higher currents.

The simplest test jig just uses the function generator to provide the power for the measurements and a Teensy board running PteroDAQ to make the measurements.

The second jig allows higher voltages on the function generator, hence somewhat higher currents (limited mainly by the 50Ω output impedance of the function generator, but also by the current limits of the function generator).

The most complicated jig uses an external power supply with the function generator controlling the current by changing the gate voltage of an extra nFET.

The 10µF capacitors for removing noise on A10-A11 are almost certainly too big, introducing bias into the measurements, but the 22nF capacitor works well.

By changing test jigs and current-sense resistors, I was able to span a wide range of currents (almost 7 decades).

By changing test jigs and current-sense resistors, I was able to span a wide range of currents (almost 7 decades).

The weird plots at high currents show the effect of temperature changes on the FET characteristics. At 3A the transistor got warm, but as the current dropped it cooled off a little, getting a bit warmer on each 5 second cycle.

At the other end, I had some difficulty measuring currents less than 1µA—current-sense resistors large enough to give sufficiently large voltages would be too high impedance to handle the noise injected by the sampling circuitry on the Teensy 3.1. I also went to 60Hz sampling, to alias out 60Hz interference from capacitive coupling to the breadboard. I still don’t trust the measurements below 500nA.

I decided that the I-vs-V curve here is too messy to put in the book, so instead of working on my book all day, I’ve wasted my time getting nothing more out of it than this blog post and a reminder that even “simple” concepts like I-vs-V plots are not so simple in the real world.

2015 September 25

Teensy 3.2 available

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 08:22
Tags: , ,

A new board in the Teensy series, the Teensy 3.2, has just been released.  It is almost identical to the Teensy 3.1, but has a better 3.3V regulator, so that more 3.3V power can be used by peripherals.  We’ll have to make some tiny changes to the PteroDAQ data acquisition system so that it will recognize the Teensy 3.2, but nothing major, as it will use exactly the same code as the Teensy 3.1.  I’ll have to reinstall the Teensyduino development system and find out how (or whether) it distinguishes between the boards.

(Update 2015-Sept-19:00:  The Teensyduino software treats the Teensy 3.1 and Teensy 3.2 identically, so there is nothing that needs to be done to PteroDAQ but to change some info items to be “3.1/3.2” instead of “3.1”.)

The addition of the voltage regulator is a substantial improvement to the board, allowing about 500mA of current on the 3.3V line, rather than the 100mA limit of the Teensy 3.1.

I still think I’ll recommend the Teensy LC for the electronics class, as a somewhat better price/performance ratio for the needs of the class, but the Teensy 3.2 is a good choice if you need a little more processing speed or the more complex DMA capabilities.

2015 September 17

H-bridge Class-D hum problem solved

Filed under: Circuits course — gasstationwithoutpumps @ 17:12
Tags: , , , ,

I H-bridge Class-D works I mentioned

I was getting a rather annoying amount of 60Hz hum, probably from the microphone preamplifier.  I’ll have to play with it a bit tomorrow to see if I can avoid the hum pickup.


It turned out to be a fairly simple, but unexpected problem.  The TLC3702 comparator chip has 2 comparators in the package, and I had not connected anything to the second comparator.  Connecting the inputs to ground eliminated the hum!  I think that what was happening was that 60Hz pickup on the unconnected input was causing the second comparator to swing back and forth at about 60Hz, and that this was coupled internally to the comparator I was using (probably through the shared power connections). By silencing the second comparator, I removed this source of hum.

My son also noticed a high-pitched noise that was barely audible to me.  I figured that the source was probably the low-quality triangle wave from the FG085 function generator. If the period is not an exact multiple of 250ns, then the sampling of the triangle wave gradually shifts phase, and that changing phase turns into a PWM signal that is audible on the speaker.  By selecting 62.5kHZ, exactly 64 clock pulses of the FG085 clock, as my PWM frequency, I avoided phase shifts and eliminated the high-pitched whine.

2015 September 16

H-bridge Class-D works

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

The simplified class-D amplifier using a cMOS H-bridge works! Using an inverter chip (in this case a 74HC14N Schmitt trigger chip) to provide separate amplifiers for each nFET and pFET allows using the TLC3702 rail-to-rail comparator, despite its rather wimpy current output. Using an H-bridge allows 10V swing with only a single 5V power supply (in my case, just USB power from my laptop).  Driving an inductive load (a 220µH inductor in series with an 8Ω loudspeaker) got clean 800ns rise and fall times, and the LC filter design made almost all the PWM carrier frequency disappear from across the loudspeaker.  I got no noticeable shoot-through current, and I couldn’t see the Miller plateaus on the gate voltages (I’ll check that again tomorrow with my faster analog oscilloscope—I was just looking at the signals with the Bitscope B10 with the DP02 differential probe).

I was getting a rather annoying amount of 60Hz hum, probably from the microphone preamplifier.  I’ll have to play with it a bit tomorrow to see if I can avoid the hum pickup.

The high frequency triangle waves from the FG085 function generator are not very good, but I cleaned up the digital-to-analog converter steps by adding a 10nF capacitor across the output.  With the ~47Ω output resistance of the FG085, this makes a 340kHz low-pass filter, which is fine for triangle waves around 50—100kHz.  Any larger capacitor and the waveforms started getting too sinusoidal.

I think I’ll rewrite the Class-D lab around an H-bridge design, rather than the open-collector comparators and 3 power supplies. The parts are about $1.50 more (extra nFET and pFET, more expensive comparator, extra inverter chip), but the design is much simpler, and the PWM waveform clearer.


Class-D power amp lab revamp

Filed under: Circuits course — gasstationwithoutpumps @ 11:06
Tags: , ,

I’ve been struggling all summer with half-baked ideas to try to improve the class-D power amp lab in the applied electronics course.  Since the first run of the course, there have been too many concepts packed into that one week, and too much stuff to do for students to understand it all.  It also has been the one that been most difficult to convert to a home-lab exercise, because it used a triple power supply.

One idea that I have implemented, though I’m a bit worried about whether it will work, is to make the first amplifier lab, the microphone pre-amplifier, require soldering, so that the class-D lab can use the microphone pre-amp as a pre-built module, without having to rebuild it. I’ll need to think about the possibility of reordering the labs, to do a breadboard lab before the soldered pre-amplifier.  Perhaps the transimpedance amplifier can come before the microphone amplifier??

The other idea I’ve been toying with, and that I’ll have to build and test this week, is to use a single power supply and an H-bridge for the loudspeaker.  That way I could keep the voltage down to 6V (in spec for the op-amp in the preamplifier) and still get enough power to the speaker (4.5W for an 8Ω speaker).  Because the voltage range is now ok for many cMOS parts, I can eliminate the open-collector output comparators, and use a rail-to-rail comparator like the TLC3702.  I’ll need an inverter for controlling the two sides of the H-bridge, so I could use a hex inverter package and use a separate inverter as a driver for each of the four FETs.  I could even have students get a second 74HC14N Schmitt trigger chip, as they have the same drive capability as 74HCU04 inverter chips, and increasing the number lowers the cost below buying one of each for the students. I estimate that the gate rise and fall times will be faster than what we’ve been getting with the open-collector designs, so shoot-through current should not be a major problem.

H-bridges are probably more useful to the bioengineers than open-collector circuits, because many of them will be taking the mechatronics class and building motor controllers. Having seen and designed H-bridges before will make their motor control seem more natural.

For the argument in favor of open-collector circuits: Many students will be learning how to do I2C interfacing in the sensors class, which uses open-collector (or open-drain) wiring, but the reasoning for the pullups needed in those designs is somewhat different from what is needed in the class-D amplifier anyway.

I’ve drawn up a schematic for a possible design and will try building it tonight or tomorrow.  The last time I tried using a TLC3702 comparator in a class-D amplifier, I did not have much success, but I was trying to swing a much larger voltage then and did not have inverters as extra amplifiers for each gate—the inverters seem to have about twice the drive capability of the TLC3702 output.  The combination of smaller voltage swing and greater current should make the transitions on the gates fast enough that shoot-through current should not be a problem (fingers crossed).

Next Page »

The Rubric Theme. Blog at


Get every new post delivered to your Inbox.

Join 321 other followers

%d bloggers like this: