Laser water cooling, part 1: Peltier element theory

September 8th, 2014 No comments

I just ordered a laser engraver/cutter from China.  While I wait for the slow boat to come into port, I thought it would be a good idea to start preparing the infrastructure.  These products don’t include any hardware for the required water-cooling, other than a submersible pump.  Most people just say “just have a few gallons of water circulating, and you’ll be fine.”  I say “if it’s worth doing, it’s worth overdoing.”

In the spirit of overdoing it, I remembered that I had a peltier element-cooled fridge in my lab for a while, and that the parts were still kicking around somewhere.  Peltier coolers are really neat.  They can use an electrical current to drive a difference in temperatures on the opposite plates.  I found an interesting page with a simplified model for calculating their performance across a range of conditions.  It’s interesting to note that you can’t just drive it harder to move more heat.  Because the modules are consuming energy themselves, self-heating can (and often does) overwhelm the coolers ability to move heat.  After spending a couple days understanding the models, I discovered an error in the page, so I’m going to re-post corrected equations.

Computation of T1

This equation computes the temperature of the “cold side” of the cooler.  The model depends on several variables:

I = Drive current (Amps)

Rp = Cooler resistance from the data sheet (Ohms)

Q1 = Thermal load that we’re trying to cool (Watts)

C1 = Thermal conductivity from load to ambient (Watts/°C)

Cp = Thermal conductivity through the peltier (Qmax/ΔTmax) from the data sheet

Ch = Thermal conductivity of the heatsink on the hot side (Watts/°C)

T1 = Temperature of the object being cooled (°C)

T3 = Temperature of the ambient environment (°C)

I’m going to ignore P.  For now, it suffices to say that it’s a constant that models the peltier junction’s performance.  (Watts/Amp)

The article that I got this model from doesn’t really explain the terms at all, so I’m going to try to interpret the pieces of it.  First of all, the T3 term references the entire model to ambient.  If you used something else as a counterpoise, I’ll call it, to the peltier you could remove this term and model it.

The middle term models the heat flow out of the hot-side heatsink.  The numerators of this term are the thermal load (Q1) and the self-heating from the peltier cooler’s current (see Ohm’s law for the inspiration of this).  The entire term is divided by the thermal conductivity of the heatsink, Ch.  Thermal conductivity is a very useful specification, as it tells us the °C across the device per Watt.  In the case of a heatsink, that is referenced to ambient.

The first term models the heat flow from the load through the peltier.  Again, there is the Q1 term, as we have to get the thermal load through the device.  Second, we have half of the peltier’s self-heating.  My assumption is that only half of the peltier’s self-heating has to travel all the way through the device.  Finally, the -P*I term models the active cooling (the point of this whole thing).  These are all divided by the combination of the thermal conductivity of the load-peltier junction and the peltier’s internal thermal conductivity.

The upshot of this, is that we can model the performance of our system built around a given peltier junction given load, heatsink performance, and ambient temperature.

p

Now, let’s talk about P.  We can derive P entirely from information commonly found in peltier junction datasheets.  There really isn’t much more to say about this, just plug in the values…

The module I'm working with

The module I’m working with

Now, let’s make all of this a little less abstract…  The image above is the module that I’ve salvaged.  It’s easy enough to lookup the model number and get the data sheet.

Specification table

Specification table

Using the specification table, directly from the data sheet, we can calculate P to be 14.47 (for 25°C).  For now, let’s also choose some values for the other parameters.  Let’s say we want to cool a load that is producing 10 Watts, with a rather poor heat sink that has .2 Watt per °C of conductivity (would be listed as 5 °C per Watt as resistance).

T1 heat versus amps, with simple heatsink (blue) and ambient (green).

If we graph T1 versus drive current, I, we can see that the optimal current from the cooler is 0.8 Amps (red line).  Unfortunately, if we compare it to Q1/Ch (which would happen if we just put a heatsink on the load) it’s almost 6 °C hotter than without the peltier cooler…  boo.   The laser is estimated to produce about 200 Watts (20 times more than the 10 Watt example) of heat.  The problem, ultimately, is that the hot-side heatsink matters.  A lot.

T1 heat versus amps, with simple heatsink (blue) and ambient (green).  With a better heatsink

T1 heat versus amps, with simple heatsink (blue) and ambient (green). With a better heatsink

Now, what happens if we find a much better heatsink?  They’re expensive, but you can find .1 °C per Watt heatsinks on Digi-key.  This would be 10 Watts per °C in terms of conductivity.  With the better heatsink, the cold side is down to -17 °C!  The heat sink is more than able to shunt the heat from the load and the cooler.

All that is obviously super-awesome, but what if we want to calculate what the ideal drive current is for a peltier cooler?  The Itec equation, above, will give us this information.  We still need the P and Rp terms from the data sheet, and the thermal conductivity of the peltier and the heatsink.  But, you’ll notice that thermal load and the ambient temperature are not factors in the equation.  Therefore, the ideal drive current (and, therefore maximum temperature drop) are not affected by those factors.

I hope this has been at least somewhat interesting.  Stay tuned for part two, where I investigate whether it’s really feasible (practically and economically) to move over 200 Watts with peltier elements.  Also, I’m planning some research into how to characterize the efficiency of radiators in liquid cooling setups.  If you have any insight, please leave it in the comments.  Also, I started to write a mac application to model peltier cooler systems.  I probably won’t finish it unless it seems like something people would want.  Leave messages in the comments if you would pay a few dollars for something like that.



Swift Language Quick Reference

June 16th, 2014 4 comments

Swift is the programming language that Apple introduced two weeks ago at WWDC14.  I’ve spent the last week pouring over the language guide, condensing (almost) all of the facts into a double-sided 8.511″ quick reference sheet.  I invite feedback, and hope that it’s useful to others.  I recommend at least going through the Swift tour before diving in.

Swift QuickRef

Swift QuickRef



3D Printing Talk

May 8th, 2014 1 comment

I recently gave a talk about 3D printing to the Academy of Lifelong Learning .  It went really well, other than that I had a head cold.  I thought I’d share my slides, and provide some links to supporting and bonus material.

The slides for the talk are shared using iCloud, and should work with any recent browser.  The link is RIGHT HERE.

Following are a set of relevant and interesting links about 3D printing.  Several of these topics came up in the Q&A.

Supercars:

Koenigsegg 3D printed production parts:

Koenigsegg 3D printed turbocharger (menioned in the first video):

Rockets, Jets and NASA:

University of California San Diego; Students for the Exploration and Development of Space (SEDS).

3d-printed-rocket-seds-0

NASA Marshall Space Flight Center

nasa-3d-printed-rocket-injector

Casts for broken bones:

Cortex Cast

p17tg3clnhgh11jt71jrd1tk7r3u7

Ultrasonic cast

cast_1

Prothesis:

Students use 3D printing to make a prosthetic arm.

pinkprosthetic_standalone

Dad builds son artificial hand on 3D printer.

Fashion:

Leaders of the 3D printing revolution:

Kinematics clothing:

Kinematics from Nervous System on Vimeo.

More information about Kinematics


There are many, many more examples of the usage of 3D printing.  Leave examples that you’ve found, or think are interesting in the comments!



BladeRF first impressions

March 19th, 2014 2 comments

BladeRFI recently got a pair of the Nuand BladeRF SDR transceivers, and I’ve got about a days worth of experience with them.  Of course, first thing’s first, I had to print the BladeRF Coaster by Piranha32.  This is especially so because there are a few large tantalum-looking capacitors on the bottom.  Before I had this printed, I used some small machine screws with bolts and made a quick set of standoffs.  The package came with a nice blue USB3 cable and a pair of SMA jumpers; I assume these would go to their transverter, which I don’t have, but they’re nice to have anyway.  There aren’t any instructions in the box, but for a product like this the assumption is that the user knows what they’re getting and how to use it.  This is a reasonable assumption, and I had no problem finding all the relevant documentation.

I’m an ardent mac user, and this sometimes poses a problem while using specialized hardware and applications.  It wasn’t until the last few months that the recent versions of GNURadio worked through MacPorts.  Luckily it does now, as does all the BladeRF software.  Going from nothing to a working software environment took minutes.  One thing that you have to make sure and do it download the most recent FPGA code, as you’ll have to re-load it every time you boot the BladeRF.

All software defined radios have an Achilles’ heel.  If the DC offset of the I and Q baseband signals isn’t minimized a constant “tone” at zero Hz will be up-converted to whatever frequency the final spectrum is.  Also, if the relative magnitude and phase of I and Q aren’t matched (and precisely 90 degrees) there will be a image of the desired signal mirrored across the up-converter frequency.  The BladeRF wiki has a short article that shows how to measure the correction factors to use to minimize these effects.  This article documents my attempt of deriving the correction factors for one of the two boards.

To start, I tuned the board to 450MHz.  Then, I decided that a 100KHz sine would be appropriate as a baseband tone.  What happens is that, in software, the 100KHz tone is generated, then it is up-converted to 450.1MHz.  The spectrum below is the result of that test without any corrections applied.  The spur resulting from the DC error is about 25dB down from the desired carrier, and the image is closer to 35dB down.  It’s not really that great.

blade uncal

Playing around with the values according to the instructions, I was able to improve these results quite a bit.  The DC error is now 58dB down from the carrier (ignore the marker table) and the image is almost 63dB down.  This is pretty respectable.  Now, there is another troubling question.  What’s up with the spikes in the phase noise?

cal

I asked on the #bladerf room on freenode, and they agree that it’s not normal.  The spikes are exactly 7.8 KHz apart, so I would start looking for things that happen at that frequency.  I wish I had measured how distant the largest one was from the carrier and zero.  That could have been good to know.

phase noise

Oh, wait, I did :).  The main tone is 63KHz away from the main carrier and 37KHz away from zero.  There was some speculation that it could be artifacts from the quantization of the software-generated sine wave or that the tuning algorithm could be at fault.  For fun, I ran the same test without generating any sine wave at all, so all you’re seeing is a large zero tone from a constant DC offset.  I do think that the quantization explanation makes sense because that would manifest as phase noise, and the spikes are centered about the modulated tone, rather than the zero-spur.

constThe same artifacts should still appear there if there was any kind of a problem with the power supplies of the board, for example.  It seems very clean, and I’m happy with the phase noise performance of the board.  You’re probably seeing the phase noise of the rigol in this plot rather than the BladeRF.

In all, so far, I’m very happy this these.  I’m very excited about their potential.

Skyworks LNA

January 15th, 2014 7 comments

I originally starting working on this device about the same time as the Sky65116 power amplifier.  The idea was that I should put a PA on the transmitter, and a low-noise amplifier (LNA) on the receiver.  In this post, I’ll discuss the why and how of LNAs, as well as the construction and evaluation of the Sky65047 400MHz to 3GHz LNA board shown below.  I’ve had these boards sitting on the bench for quite some time, and I finally got all the random-value passives that I needed gathered and the equipment necessary to measure it.

Finished LNA

Finished LNA

Low noise amplifier — why?

The goal of any receiver is to increase the strength of a desired signal from the antenna to a useful level.  Often, the point is driving a speaker.  Any receiver is simply an amplifier if we ignore selectivity, and some receivers do this to an extent.

I’ll discuss AM radio as an example because there’s a more direct connection between the input radio power level and the audio power level.  Let’s assume that the station we’re listening to is producing -70dBm of power at your antenna.  It’s irrelevant for the discussion, but for the purposes of illustration, and assuming a 50 Ohm antenna system, that means that the peak-peak voltage is less than 200 uV, or .0002 volts!  Then, let’s assume that we want 1 watt out of a speaker, or 30dBm, meaning that the receiver needs 100 dB of total system gain.

While I’m sure there are amplifiers that are capable of this much gain, it’s unlikely that it’s going to be appropriate for this application.  It is much more common to have a chain of amplification.  Even though I said I was ignoring selectivity, we still want to amplify only the desired signal.  It is the goal of our amplification chain, therefore, to preferentially amplify the signal and not the noise.  The ability to do this is quantified as the Noise Figure or Noise Factor (NF; these are equivalent, but noise figure is in dB) of a device.

The total noise figure of a receiver is dominated by the first amplifier in the chain.  This is the reason that we develop specialized now-noise amplifiers.  If you spend the time, energy and money on a LNA it will pay off by lowering the noise figure of the entire receiver.  On the other hand, if you take a crappy amp and put it in front of a good receiver, you’re likely to reduce its performance.  This is formalized by Friis’ equation:

friis

F4+1 should read F4-1 Thanks to Texane for spotting the error!

The F terms are the noise figure of the subscripted amplifier stage, and the G term is the gain of the stage.  You can see the the noise figure of any given stage is divided by the product of the gain of every prior stage.  Therefore, a good LNA has low noise, and high gain.  A simpler way to express this relationship, especially if you’re considering adding an LNA to an existing receiver is this other version:

friis2

With this version, if you have the LNA specification for the receiver you’re working with, you can see if your proposed addition is worthwhile.  I had hoped to talk about specific numbers and bring up the MRF49XA receiver that I wrote about here and here, and a few of my commercial ham transceivers, but they only seem to specify sensitivity.  I’ve seen someone off-handedly convert sensitivity to noise figure, but I can’t find the equation anywhere.  If anyone knows how to do this, let me know.  The point remains that you should never put an amplifier in front of a receiver unless its noise figure is better than the receiver.  You should be able to measure the success of your experiment by comparing the SNR before and after the addition.  If it deteriorates, then the additional amplifier is increasing the noise more than the signal of interest.

Low noise amplifier — how?

I’m not going to explain how to make a low noise amplifier, at least not at any substantial level, because I don’t know.  I’m not actually an electrical engineer, and I’m certainly not designing silicon.  If I want an LNA, I’m going to digi-key like every other mortal.  However, I will discuss how I selected this chip, designed the PCB and evaluated its performance.

I begin any project like this in basically the same way: I go to Digi-key and start parametrically searching.  In this case I’m looking for a 400MHz amplifier, so I selected all the devices that were in stock, in small quantities, that cover the frequency I want.  That left me with on 13 pages of results!  Ok, next, I decide that I’m only interested in amplifiers with a noise figure less than 1dB.  Good, now we’re down to 15 results.  I can actually think about these choices now.  If I’m being honest, I sort by price next.  If I wanted to do the best job, I’d sort by gain.  Sorting by gain, the top two choices are $12 and $20 each, with gain values of 24 and 22 dB respectively.  In contrast, the one I picked is $0.56 and 15.7 dB of gain.  I like my way better.  :)  I should say that if you need the best LNA, it don’t matter how much it costs, and in this case, you’re probably not shopping at digi-key.

Of course, before I hit “buy,” I read the data sheet.  First and foremost, I’m looking for a relatively simply evaluation circuit.  I’m the RF engineering equivalent of a script kiddie, and I’m not ashamed to admit it.  It’s a bonus if they provide matching circuits or component values for my frequency.  Luckily, the Sky65047 has both.  There is some weirdness, however, with the 450MHz version in the data sheet and application note.

915 MHz evaluation circuit

915 MHz evaluation circuit

There is a gotcha lurking in that data sheet, though.  The specifications presented on digi-key aren’t for 400 MHz.  The NF at that frequency is 1.2; a bit worse than I had hoped, but the gain increases to 20 dB.  Normally, the fact that this is a DFN (Dual, Flat No-Lead) package with very fine-pitch leads would mean that I would just skip over it.  I’ve developed the skills to work with these packages lately, and I’ve had good results, so it wasn’t a deal breaker.  A side-benefit is that it goes up to 3 GHz.  I’ve been thinking about building a HRPT (High-resoultion picture taking, for weather satellites) receiver, which is right-around 1700MHz.  There is a matching circuit for both 450MHz and 1700MHz in an app note, so I went for it.

Basic general schematic

Basic general schematic

The next step in the process was designing a PCB.  The topology used for each of the evaluation circuits is slightly different, so I tried my best to design a board that would work with all of them.  I think I mostly succeeded, at least for 400 and 1700 MHz.

Breakout board design

Breakout board design

There are only a few point I’d like to make about the PCB.  First, the most important thing about RF design is the minimization of parasitics.  It’s not shown in the above image, but I like to keep the solder mask off of the RF portion of the board.  It might be a bit ridiculous in this application, but the idea is that it would change the permitivity, and therefore, the calculations for the characteristic impedance.  It’s ridiculous in this case because those traces are way too short to be striplines, and with traces this short, the impedance doesn’t really matter.  Also, notice that I have the ground vias practically on top of the SMD pads.  These are to minimize the length and inductance of current return path.  There are no breaks in the ground plane under the RF section of the circuit; the only trace on the bottom layer only crosses a DC trace, and is very short.  Finally:  tons of vias!

Construction and evaluation

It seems with RF projects that you get the great pleasure of ordering a stupid number of weird-ass values of capacitors and inductors.  It took quite a while to collect all the pieces that I needed, I only did so about a week ago.  I was impatient and started soldering some parts onto the boards months ago, and forgot what I was doing in the mean time.  This becomes obvious later.

450MHz version

450MHz version

Something strange is happening in this example circuit.  The input matching network is completely non-sensical.  First of all, L1 is specified to have 4.3pF. Nope.  Second, C3 is shown as an inductor and has 30nH.  Hmmm, also no.  I emailed Skyworks to ask for clarification, and they never got back to me.  I had to just guess for what these are really supposed to be.  I started by assuming that L1 is actually an inductor of 4.3nH (pH inductors can’t really be bought), and that C3 is a capacitor of 30nF.  Below is the same board as in the image is from the head of the post, built with the assumptions I just mentioned.  Play spot the changes! :)

Assembled amplifier

First attempt

Noise figure

Now that we have a circuit, it’s time to determine whether it’s performing to expectation.  Because the noise figure is this amplifiers reason for being, lets first discuss the concepts of measuring it.  There are three primary methods used to perform this measurement, which are summarized nicely by this Maxim application note:

  • Noise figure analyzer such as the Agilent N8973A.  The good news is that this method is the simplest and best for measuring very low noise figures; the bad news is that it’s almost $40,000.
  • The gain method:  This method is the easiest to perform with more commonly available equipment.  The downside is that it’s very difficult to measure small noise figures.  This will be discussed in great detail later.
  • The Y-Factor method: Requires an excess noise ratio (ENR) source in conjunction with a spectrum analyzer.  This is much more affordable than a noise figure analyzer, but these still go for around $1000 on ebay.  There are some ~$300 ones, but they are of unknown quality.

You should know that I’m an insufferable cheapskate, so the noise figure analyzer and Y-factor method are non-starters.  Because we’re stuck with the gain method, but what kind of conclusions can we draw given the equipment on hand?

The definition of noise factor is the ratio of total output noise power divided by the output noise that is contributed by the input assuming a perfect noise-free amplifier.  We can measure the total output noise power within limits, and we can make assumptions about the input noise because we control it.

We can use a 50 Ohm terminator at room temperature for our noise source.  The noise power can be derived from theory and should be equal to -174dBm.  A perfect amplifier would amplify this noise without adding any of its own, and the noise power would increase linearly with gain.  This means that to get noise figure (NF) all we have to do is a little accounting: NF = P + 174 – G, where P is the output noise power, and G is the gain; all of these quantities are in dBm.

Measuring the noise figure

Measuring the noise figure

The gain method equation can also tell us what the minimum gain and noise figure we can measure on a spectrum analyzer when it is limited by its noise floor.  Working the problem backward, let’s say that my analyzer has a displayed average noise level (DANL) of -154 dBm at 434 MHz with 10 Hz RBW and 3 Hz VBW.  At that power level, the noise figure calculation would be NF = -154 + 174 – G = 20 – G.  This means that a perfect amplifier (NF = 0) with 20dB of gain wouldn’t change the apparent noise level of the analyzer at all.  It also means that we aren’t capable of measuring the noise figure of any amplifier where NF < 20.  Unfortunately, that also means that I should only see 1.2dB of difference in noise for this amplifier.  This is reasonably close to what I observed.  In the above image, the pink trace is with the amplifier connected and the yellow trace is with the spectrum analyzer input terminated.  There’s technically a little more than the 1.2 dB of additional noise, but you can see that the variation in the noise floor is more than that, so there’s basically zero confidence in the measurement.  At least I know that it isn’t a complete disaster, because that would show up.  Also, note that, for now, I’m making assumptions about the gain using the data sheet values.

Gain

Remember that the noise figure calculations depend on knowing the gain value for the amplifier.  I had used the data-sheet values of 20dB in the above example.  When it came to actually measuring the gain, things got weird.  There is where my subtle lies come apart.  When I recorded this video I had forgotten about the assumptions I made in the construction section.  Remember that I said this project sat on the shelf for a while?  While writing up this post I rediscovered those problems.  Now things make are starting to make a lot more sense.  My conclusions in the video aren’t really accurate.  I was right in that there was a matching problem in the circuit.  I was able to later discover that the “ruler effect” only affected in the input section.

At least now I know that one of the assumptions I made in the construction section was demonstrably false.  I started with C3, and replaced it with a 30 nH inductor.  This completely eliminated the ruler effect, and improved the gain from around 12 up to 17 dB.

Gain after C3 fix

Gain after C3 fix

Not content to assume that this is the best possible performance; I also tried replacing “L1″ with a capacitor.  I figured that it might be a capacitor because 4.3 pH isn’t really an inductor value, you can’t even buy them that small at digi-key. I had a 4.7 pF cap handy, so I tried it to see what happens.  Gain improved again from around 17 to almost 20 dB, and the shape of the trace in low frequencies improved.

Performance after changing L1

Performance after changing L1

Unfortunately, the current draw never really changed from the ~7.5mA that I was seeing in the video.  I figured that it would be prudent to re-measure the noise figure with the now higher gain.

Second attempt at measuring noise figure using the gain method

Second attempt at measuring noise figure using the gain method

Now, the results from the gain method are clearer, though still not that meaningful.  At this point, it’s just shy of 5dB difference.  The math would indicate that the NF is around 4.59 dB, but confidence in this number is still very low.  If it were true, it isn’t even close to data sheet performance.

Input return loss

The last quantity I’d like to measure is input return loss.  This is, quite simply, the amount of signal applied to the input that is absorbed by the amplifier.  As this number gets larger, it means that less signal is reflected back toward the source, and that’s a good thing.

Measuring input return loss

Measuring input return loss

A common way to perform this measurement is through a directional coupler (DC).  I’ll discuss this more in a later post, but briefly, a DC has three or four ports.  A three-port DC has an input, coupled, and output port, a four-port DC has coupled ports for forward and reverse coupled ports.  A perfect DC places some of the power from the input and none of the power from the output onto the forward coupled port.  If you hook it up to the spectrum analyzer “backward,” you can sample the energy reflected by the device under test (DUT).

Really cheesy schematic for reflection bridge

Really cheesy schematic for reflection bridge

I apologize for the crudity of the above diagram, but I just wanted to show how you’d hook-up a directional coupler to measure input return loss (or reflections).  I’m not so familiar with the schematic diagram for a directional coupler, but I assume that the arrows indicate the direction of coupling between the ports.  This is a four-port DC, so it’s a little different than what I have.  In the above example the tracking generator of the spectrum analyzer is represented by the AC power source.  The majority of the forward power through the coupler is passed directly through to the DUT, and a small fraction is absorbed by the 50 Ohm load.  The power reflected by the DUT is mostly returned to the tracking generator, but a fraction of it is sent to the spectrum analyzer input.  Ideally, none of the forward power ends up on the return coupled port.  This measure is called either isolation or directivity.

Input return loss

Input return loss

In the above plot, the magenta line is the returned power when the DUT is an open connection, and represents the maximum returned power (100 percent reflection or 0 dB input return loss).  The yellow line is the return loss from a 50 ohm terminator, and shows the directivity of my DC.  This is what a perfect termination would look like.  The teal trace is the reflected power from the LNA.  You would subtract the teal trace from the magenta to find the input return loss.

In our case, the best performance is at 382 MHz, with 16 dBm and worst (in this plot) is at 334 MHz with about 10 dB input return loss.  This is near enough to the data sheet specifications (14 dB) for my needs.

Conclusion

So, I’m really shocked that this ended up being so freaking long.  I feel like I had a lot of ground to cover, and to do it any justice I had to take my time.  If you’re still reading at this point, I’m humbled.   I sincerely hope it was worth it.  If you have any questions, please don’t hesitate to comment.  I try really hard to contribute meaningfully through the comments.



Tags: