Tag Archives: power supply

Temperature Controlled Fan

20160409_FanController_020

I’m currently mainly working on my new anemometer design but once in a while I get distracted. For example when my Keysight E3645A lab power supply was making so much noise that I could hardly concentrate. That’s when the idea of this fan controller was born.

20160403_FanController_012

Of course, the best temperature controlled fan in the world doesn’t help if you really need the cooling the fan is providing. But very often a small fraction of the cooling would do just fine most of the time. In my case the supply does control the speed of the fan. But it doesn’t seem to measure the temperature at all but seems to calculate the necessary cooling in a worst-case condition. An for a supply that may be rack-mounted together with lots of other heat dissipating gear the worst-case might be quite demanding. But my supply just sits on a shelf at, say, 22 degrees ambiant. And most of the time I’m hardly pulling any current. When working with microcontroller designs it’s rare for me to pull more than a few tens of milliamps. So little cooling is needed most of the time. But the E3645A (this one here does a better job) ran its fan at crazy speeds while the case still had this cold metallic feel to it.  So we can definitely do better.

20160314_FanController_017

So the first step was to open the supply and to see what kind of fan it uses and how it is controlled. After beaking some seals and opening the case I found a 60x60x25mm 12V fan of Chinese origin. I also found out that the supply uses linear control. So there’s no PWM or anything but the supply voltage just varies in (I think) four steps from 7.4 to 12 volts. Most surprisingly, this voltage is not ground-referenced but symmetric around ground, i.e. plus/minus 6 volts.

20160314_FanController_014

I was pleased to see that the fan connects to the main board by means of a standard two-pin 100mil header. So I could just plug anything in between the board and the fan.

20160313_FanController_005

That’s exactly what my first idea was. Stick with the original fan and just put a PWM controller in between. I’ve just recently made some LED dimmers and the technology needed here seemed to be very similar. So Rev A of my fan controller was born.

20160313_FanController_003

It’s simple: A linear 5V regulator, a PIC16F18325 microcontroller, an LMT86 temperature sensor and a N-channel mosfet. The PIC chosen here runs at up to 32MHz on an internal oscillator, has an internal voltage reference (of 1.024, 2.048 or 4.096V), six PWM modules and plenty of other nice features while comming in a small 14-pin package. So all I need to do is to measure the temperature, calculate the desired fan speed and set the PWM duty cycle accordingly.

20160313_FanController_008

My first surprise came when I first wanted to program the PIC. My trusted Mikroelectronika MikroC for PIC compiler doesn’t know that chip. And neither does my MikroProg programmer. So after a little bit of research I ordered a PICkit3 and downloaded the MPLAB IDE. As a nice side effect I can now also compile code for and program the fancier PICs like the DSPics and PIC32s. I might do that before long.

20160313_FanController_001

So I did the necessary programming (and debugging) and attached a small fan. It all worked but I had to chose a quite low PWM frequency in order to make the fan spin at lower duty cycles. And probably as a result of the low PWM frequency the motion of the fan didn’t look or sound very smooth.

20160313_FanController_006

With the larger fan from the supply things only got worse. I had to lower the PWM frequency even more into the tens of Hz range so it would spin at all. And even like this I couldn’t get it to run at low duty cycles. Of course, the low frequency caused nasty vibrations so I gave up on this approach. I read online that other people successfully use PWM on their fans but at least this model wasn’t happy to be PWM-dimmed. Does anybody know more about this? Was this an option in the old days before brushless motors were the norm? Is it that brushless motors aren’t unsuitable for this kind of control alltogether or does it depend on the specific model? Please use the comments section below if you can shead some light on this.

20160403_FanController_002

But I don’t give up easily so after a bit of research I ordered a four-wire fan conforming to the so-called Intel spec. Besides ground and +12V they have two control lines. A PWM line that lets you control the fan speed by means of a (25kHz nominally) PWM singal. And a so-called TACH singal that allows you to read the current fan speed. The PWM line has internal pull-ups to (depending on the fan) 3.3 or 5 volts so you just need to pull it low. The TACH signal needs an external pull-up resistor and gets pulled low by the fan twice per revolution. So you’re getting a digital signal with a frequency of twice the fan speed.

20160403_FanController_009

I ordered a EBM Papst 622/2 HHP which is the right size and somewhat more powerful than the original fan. The new board has a somewhat odd shape so I can use one of the fan’s mounting screws to mount the board as well. Note that all the copper has been removed around the mounting hole. The fan is attached to a heat sink which is grounded while our board runs on a split suply. So ground as our board sees it is not actually ground but a negative voltage so we have to be careful.

20160403_FanController_012

The new Rev B design runs on 3.3 volts in order to be compatible with any fan independent of the fan’s internal logic voltage. I’ve also used a different temperature sensor – a classic LM35.

20160409_FanController_018

Like the Rev A there is an LED to visually indicate what’s going on. There are also three pins on the microcontroller that are intended to be used as debug pins so I put some vias there to make it easy to connect a scope probe.

fancontrol_tach

Above you get an idea of what the TACH signal looks like. It’s a quite low frequency singal since there are only two pulses per rotation. So the measured 104Hz shown on the screenshot correspond to 3120 RPM.

fancontrol_37_degrees

Having a TACH signal to measure and three debug outputs to worry about made the software development somewhat more involved but it was well worth it. I’ve used the debug pins as follows:

  • Actual (i.e. mesured) fan speed. 100% corresponds to 10000RPM
  • Target fan speed. 100% corresponds to 10000RPM
  • Measured temperature. 100% corresponds to 100 degrees centigrade

So from the duty cycle measured by a scope you can easily read the speeds and temperature.

fancontrol_50_degrees

Of course this is only possible since there are some unused PWM modules left. But as I said, this PIC has 6 of them and only two are needed to measure the fan speed and another to control the fan.

fancontrol_27_degrees

The transfer function from temperature to fan speed can be freely defined in software. In the screenshots above the fan was running at 1500RPM up to a temperature of 30 degrees. Above that the speed would rise linearly until reaching its maximum of 9000RPM at a temperature of 55 degrees.

20160409_FanController_023

One could easily implement a PID control if one was so inclined but the slowly chaning nature of the temperature in such a setting makes this largely unnecessary so at least for now only the proportional part is taken into consideration when calculating the PWM frequency.

20160409_FanController_026

As you can see, the little board is nicely held in place by one of the fan mouning screws. By the way, the LED blinks roughtly once per second and its duty cycle corresponds to the target fan speed relative to the maximum fan speed of 9000RPM. So if the LED is on one-third of the time the target fan speed is one-third of the maximum speed or 3000RPM.

20160409_FanController_027

Unfortunately for my application, the supply senses the current consumed by the fan and shuts down if not enough current flows. This is probably a good idea and prevents the supply from possible damage if the fan is unplugged for example.

20160409_FanController_022

I found that it is possible to run the fan at a lower speed without the supply complaining but with fan speeds below about 4000RPM the there were conditions causing an error condition. So I ended up connecting a 1W 150ohms resistor in parallel to keep the supply happy even with the fan running at only 1500RPM.

20160409_FanController_025

I believe that my settings are very much on the safe side. At a a temperature of around 50 degrees measured inside the case the airflow matches the one of the original fan at max speed. But needless to say this kind of fiddling voids the warranty and is always done a one’s own risk. The reward is a supply that is now hardly audible and much more pleasant to use.

20160409_FanController_021

The zip file contains the eagle files, PDFs and software of both revisions.

Keysight E36103A Lab Power Supply Review

20160310_KeysightE36103__011I don’t usually do reviews but I just got a Keysight E36103A Lab Power Supply today and since it’s a newly released model there’s not much independent information out there so far. At least when I ordered mine 7 weeks ago I was unable to find a single proper review. So I thought I’ll share my first impressions.

20160310_KeysightE36103__047

Talking of independence: I bought mine through regular retail channels and I am not in any way affiliated with Agilent/Keysight. As mentioned, I just had it for a few hours now so it’s not a thorough review but rather a my first impressions for now. I guess most of you can read a data sheet yourself so I’ll focus on other stuff here.

20160310_KeysightE36103__020

Display

This is what impresses me most about this supply is its display. It is not large but has a very nice contrast and is very readable from just about any angle. I’ve taken some photos trying to show this. Just click on the thumbnails to enlarge them.

20160310_KeysightE36103__009 20160310_KeysightE36103__008 20160310_KeysightE36103__007 20160310_KeysightE36103__006 20160310_KeysightE36103__012  20160310_KeysightE36103__010

The display is even easy to read from far above or below. I have mine sitting on a shelf above so I really appreciate that. Again some examples:

20160310_KeysightE36103__017 20160310_KeysightE36103__016 20160310_KeysightE36103__015 20160310_KeysightE36103__014 20160310_KeysightE36103__013

What I also like is that now I can see both the set AND actual values for voltage and current at the SAME time. This is something I miss in the E3645A.

Fan Noise

This is a big issue for me but it’s difficult if not impossible to get any useful information from the datasheet. I can’t do sound pressure measurements or anything like that but here’s my impressions. Of course this thing has a fan. A fairly small fan so the fan noise is rather high-pitched compared to other equipment. The fan comes on as soon as the supply is powered on but runs very slow as long as the output is off. It’s still audible but not loud at all. That’s important to me since I  have the supply on with its output off for quite a large proportion of the time. I turn the output on when I need it but don’t want to wait for the startup of the supply, recall the last settings and everything. My Keysight E3645A is a nightmare in that respect. It sounds like a airplane about to take off even with the output off. [2016-04-09: I’ve finally done something about it, see here] Yes, the fan of the E3645A can also vary its speed but its really loud even at the lowest speed and gets worse from there.

20160310_KeysightE36103__018

As the E3645A, the fan speed seems to depend on output current rather than temperature. When you turn the output on, the fan immediately speeds up quite a bit. When you then pull a fair amout of current the fan speeds up even more. But overall, fan noise is fairly well controlled. I prefer the E36103A’s fan noise at the highest speed to that of the E 3645A’s at its lowest speed setting. I think its not only quieter but I also find it less annoying despite the higher pitch.

20160310_KeysightE36103__019

But nevertheless, there is a fan and it is clearly audible, especially with the output on. Unfortunately, large heat sinks have gone out of style it seems.

Programming and Readback Accuracy

20160310_KeysightE36103__026

To me, readback accuracy is even more important than programming accuracy. I don’t care so much if my DUT is running at 3.3 or 3.32 volts but I like to know reliably and precisely what the voltage and current are. Especially when I’m calculating the efficiency of some switching regulator like my MPPT solar charger. I don’t want to set up 4 DMMs for that (and I don’t have 4). So I want reliable readings from the supply.

20160310_KeysightE36103__025

The datasheet states a readback accuracy of 0.05%+5mV and 0.05%+1mA, respectively. So the voltage readback accuracy is similar to the E3645A (0.05%+2counts) but current readback is much improved (vs. 0.15%+5mA).

Similarly the E36103A features better programming accuracy: 0.05%+7mV (vs. 0.05%+10mV) and especially 0.05%+1mA (vs. 0.2%+10mA).

I should note that the comparison for voltage is not quite fair since the E3645A has a much higher maximum output voltage of 35V and 60V compared to the 20V of the E36103A.

20160310_KeysightE36103__024

I have quickly hooked up a pair of DMMs to the supply and have found the readings of the DMMs to correspond very well to those of the supply as you can see on the photos.

Small Current Readback Accuracy

This supply has the nice feature of being able to measure very small currents quite precisely. That’s really nice when working with microcontrollers and the like that hardly consume any power when in sleep mode or running at a low clock speed.

I’ve done some tests with the supply connected to a 1% 1 megaohm resistor and an Agilent U1253A DMM that features a similar low current range. I have disconnected the voltage DMM just to be sure it doesn’t affect the measurement.

Since the resistance is 1MOhm we can expect 1uA of current per Volt. So at the maximum output voltage we’ll only draw 20uA. That’s really not much given the specified 0.25%+40uA readback accuracy (up to a maximum of 8mA).

With nothing connected to the output I have observed measurements in the range of 0 to 25uA which is well within spec. When looking at the difference in measured current before and after connecting the 1MOhms resistor, the results are reasonably close to the actual values.

Here are some photos that illustrate that point:

@10V

20160310_KeysightE36103__028 20160310_KeysightE36103__029

@20V

20160310_KeysightE36103__030 20160310_KeysightE36103__031

@3V

20160310_KeysightE36103__03520160310_KeysightE36103__036

All in all I found the small current feature to be very usable (and well within spec). But unlike with currents in the mA to A range, a DMM like the Agilent U1253A performs much better as you can see from the photos.

20160310_KeysightE36103__032

Package Content

20160310_KeysightE36103__002

I didn’t check what exactly is suppoed to be in the box but found everything I expected but also nothing more.

20160310_KeysightE36103__004

Besides the supply itself and a power cord there is a certificate of calibration, a CD with some software as well as some warranty papers.

20160310_KeysightE36103__005

Size

This is, of course a physically small supply and the datasheet will tell you precisely how large it is. I basically expected it to be half the size of the E3645A (which it technically is) but was surprised how small it was when I took it out of the box.

20160310_KeysightE36103__048

It doesn’t really show on the photos but it looks even smaller than half the size. I guess that’s because of the rubber padding around the E3645A which the E36103A doesn’t have.

20160310_KeysightE36103__046

Connectivity

Ethernet and USB connectivity is one of the big selling points for this series of power supplies. I find it surprising how long Agilent got away with RS232 and GPIB. I often control my scope over BenchVue and I’m looking forward to do the same with this supply. I’m also planning to send commands from C# programs in order to do some calibration and things like that.

20160310_KeysightE36103__044

So far I haven’t tried any of that yet but I’ll definitely share my experience once I got a chance.

20160310_KeysightE36103__045

Another thing I really like is the sense terminals on the front rather than on the back. I found I don’t use them on the E3645A since it’s just too much of a hassle to attach sense leads to some screw terminal located at the back of the supply.

User Interface

20160310_KeysightE36103__043

I haven’t even glanced at the user manual but have found everything to be quite intuitive.

The Lock/Unlock feature is nice to prevent you from changing your output voltage/current by accident. A short press of the Lock/Unlock button and the thing is locked. It then takes an a bit longer (maybe half a second or so) press to unlock it again. I like it.

20160310_KeysightE36103__042

All the (few) menues are straight forward and easy to find/use.

Concluding Remarks

Again, I’ve only had my hands on this thing for a few hours but so far I’m very happy with what I saw and I’m looking forward to using the E36103A as my main lab supply going forward.  It was an impulse buy really. I saw it on sale online for 823 Swiss Francs (USD 835 at the time of writing)  including shipping and taxes and everything and just ordered it from my cell phone on my way to work one day 😉

If you have specific questions please just leave a comment below and I will try to answer it.

USB Boost Converter

_MG_1042
Finished 5V to 12V USB boost converter

I frequently need a low-power supply to run a microcontroller system. Typically, one uses a lab power for such purposes. But at least on the desk where I do the programming I don’t have one. Since these systems typically consume little current it would be handy to be able to power them from USB. Most of my devices have on-board regulators so the voltage is rather uncritical. For 3.3 volt devices, the 5V from USB is just right. But others have a 5V regulator so they need a higher supply voltage. And even others might even need 12 volts.

_MG_1035
Fully assembled PCB

So I decided to build a small low-power boost converter with a USB plug on its input. The output voltage is set by a pair of resistors. So once built the output voltage is fix but my idea is to build several of them anyway. So some will produce 12V while others will produce 7.5V. The latter is intended to power all those systems with on-board 5V regulators. Of course, you could use a trimmer or pot if you wanted a variable voltage version. However, the feedback loop requires a capacitor for stability and its value also depends on output voltage. You might well find a value that results in stable operation over a say 6 – 12V range, but I haven’t tried that.

_MG_1015
Bottom side

I had a look for a suitable integrated switcher IC and found the Texas Instruments LMR62014. It comes in a small SOT23-5 package. It switches at a high frequency of 1.6MHz which will keep the other components small, too. It switches up to 1.4 amps. It’s easy to use. And even afordable, around 1.50 a piece. The datasheet is very helpful when it comes to PCB layout. It includes a two-layer sample layout that works even with hobbyist-sized components (0805, 1206 for the input and output capacitors).

20141115_173315
Not a bad heat sink

Generally, layout is important with switch-mode DC-DC converters. Their operation requires switching square-wave power signals (as opposed to just logical-level signals where little current flows). And that requires careful layout in order to minimize stray inductance, mainly. Things are more forgiving when you work with relatively slow (say 100kHz) switchers but get much more demanding when switching at higher frequencies. There has been a steady trend to ever-higher frequencies and 1.6MHz is fairly high even by 2015 standards. So I was very happy to have a nice layout example to start with.

_MG_1014
Top side

As you can see from the photo above, the thing is small, only 26 x 14mm. Also note how the layout makes the components magically fit together without any long traces and few vias.

20141115_173232
Home brew constant current dummy load in action

So far, I’ve built two units, one running at 12V, the other at 7.5V. Theoretically, one should be able to pull 580mA and 930mA from them, respectively. Of course, these are theoretical figures assuming no losses. Also, the 1.4A rating on the IC is likely the current limit at the top of the switching cycle (the datasheet will tell you or course but I don’t have the PDF open right now), not an average. And thermal considerations might also put limits on continuous currents. More on that later. And don’t expect to be able to pull 1.4A from a random USB port (which would violate the USB specifications anyway). But given my use-case for these things I’m entirely happy if I can pull a 100mA or so. And that should work comfortably.

20141116_144615
Switcher IC: 70 degrees @ 200mA
20141116_144627
Diode: 58 degrees @ 200mA
20141116_144553
Coil: 50 degrees @ 200mA

I’ve pushed both versions to their respective limits on the bench, using a stiff 5V supply and my home-brew constant current dummy load (link). With case temperatures approaching 100 degrees centigrade I was able to pull around 250mA of continuous current from the 12V version. The ICs include thermal limiting so you don’t need to worry too much about damaging them when performing this kind of tests. As you can see on the photos, I did these tests with the naked PCBs sitting in a vise which probabely made a not-so-bad heatsink for the board as a whole.

20141116_144738
Output voltage folds back when the switcher gets too hot

I’ve encountered slight stability problems with the 12V version (but not with the 7.5V one). There is some oscillation at currents above 200mA or so. Changing the value of the compensation capacitor changed the frequency and amplitude but I haven’t managed to get rid of it entirely. But anyway, I won’t run them at 200mA so I haven’t put much more effort into this.

_MG_1045
Close up of the final product

The finished units have a USB wire on the input and a arduino-compatible plug on the output. To protect against short-circuits I’ve put them in a piece of shrinking hose which is a bit of a themal nightmare of course. There is also a voltage drop over the USB cable which means the input voltage seen by the converter is below 5V even with a perfectly stiff USB port. Which in turn means more work for our converter, making things worse.

_MG_1040
Shrinking hose doesn’t help in keeping it cool

I have frequently used the 7.5V version to power my Ultrasonic Anemometer which pulls around 60mA. That’s the kind of application that I had in mind for this little device and it works well for that. It hardly gets warm at all and provides reliable power on my desk without the need for a lab power supply.

Attached the Eagle files as well as a PDF of the schematic and layout: USB_BoostConverter

Variable Voltage Power Supply using a LM317

_MG_0929

A classic afternoon project. I was in need of a variable voltage and didn’t have a proper lab power supply available. But I did have a solid 12 volts from an old computer PSU. So I built myself this little thing.

_MG_0930

It’s really nothing more than a LM317 in a TO220 package with a pot, two capacitors and banana jacks. It measures about 65x55mm and has rubber feet so it sits nicely on the bench. All the parts I found laying around here. The little heat sink can handle 5 to 10 watts without getting overly hot.

_MG_0931

Over a short period of time you can burn quite a bit more so you can draw up to 1.5 Amps (the LM317’s internal current limit) from anywhere between 1.25 and 10 volts when connecting it to a 12V supply.

_MG_0932