Tuesday, 29 March 2016

Beware of cheap Kelvin clip LCR meter test leads

When I first got my Elektor LCR meter I didn't have any four wire test leads for it so I made up a pair from the ends of an old VGA monitor cable and some miniature crocodile clips.


These worked well enough for measuring normal components but they are not true Kelvin leads because the wires meet at the crocodile clips, not at the device under test. The steel clips add about 3mΩ and 200nH. True Kelvin clips insulate the two jaws from each other and one wire goes to each jaw. They also have non-ferrous jaws, so are less inductive and more conductive.

I found some suitable clips at RS for £9 and was going to buy a pair of those and make up my own leads until I found I could buy them ready made on eBay for only £6.70 from Hong Kong, bargain! So I purchased a set : -


N.B. they had red and black sleeving when I bought them. This picture is after I fixed them!

When I tried them out I found that the readings were very inconsistent and the open circuit capacitance increased when the wires were moved close to each other. That made me think the wires were not screened cable so I opened one of the BNC connectors to check.



What I found was the cable is actually screened, in fact it has both a copper braid screen and an inner aluminium foil screen like digital TV coax. However the screen is not connected to to the BNC outer contact, it is cropped back to the insulation. It was the same in all four BNC plugs so I had to remake all those connections.

Then I found that the screens were shorted to the inner core at the clip end! I had to cut off the red and black sleeving and completely disassemble the clips.



It is as if the person making them didn't understand the concept of screened cable and just used it like normal single conductor wire. Much easier and faster to assemble that way of course.

So I had to remake all four of those connections as well, stripping back the screen and covering it with heat shrink sleeving.


Another problem is the insulation tape that prevents the jaws being shorted together by the spring that holds them closed is not tough enough and was already starting to fail. 


To fix this I added some heat shrink sleeving to the spring.


I then hot glued the wires in place as there isn't much strain relief and replaced the outer sleeving with 19mm heat shrink. That is why mine ended up grey instead of red and black.

They now work well but remaking all eight ends was a lot of time and materials. The seller was apologetic and gave me a refund but I wonder how many other ones like this are out there. I also ordered Kelvin tweezers for surface mount devices and a 4 terminal test fixture from China, so it will be interesting to see if they are built properly.  

Monday, 28 March 2016

Elektor 500ppm LCR meter case tips

I recently bought a 500ppm LCR meter from Elektor because I didn't have anything for measuring inductors or the ESR (equivalent series resistance) of capacitors, both of which are important for modern electronics, particularly switch mode regulators that have become ubiquitous.

It is also more accurate than any of my multimeters and has wider measurement ranges. For example it can measure resistance from 0.1mΩ to 1GΩ and capacitance between 0.1pF and 0.1F. This means I can now measure parasitics like contact resistance, stray capacitance and lead inductance. The principal reasons it can do this while my multimeters can't is because it uses a four wire Kelvin connection to the device under test, and as well as measuring voltage and current, it also measures the phase between them.


It took over a month to be delivered and the case arrived two weeks later. The meter's arrival coincided with the arrival some ridiculously cheap switch mode buck and boost regulators from China. None of them worked properly (no surprise there) so it was pressed into service straight away, without its case. It worked well but when I got the case there were a few snags assembling it and then it then didn't work properly.

The case comes pre-drilled and labelled from Elektor and is about three times the price of the generic version available from RS and Farnell. I expected it to include all the fasteners for that price but it only came with the screws that hold the case together.

To mount the LCD PCB I needed four M3 x 16mm countersink screws, nuts and washers and four 7mm M3 spacers.  Luckily I already had suitable screws and I used eight 6 BA x 1/8" spacers as the LCD is actually 6.4mm only thick. If I hadn't had those I would have printed some custom plastic ones.

I found the LED was too short to reach the hole for it in the front panel, so I re-soldered it as high as I could to improve its appearance. I also chamfered the back of the hole for it with a countersink to guide it in.

The next issue I had was the ribbon cable was way too long with nowhere to store the excess.


I shortened the cable and re-attached the IDC plug on the other side.


It is not good practice to re-use IDC connectors but I didn't have a 14 way one to hand.

The long cable did allow me to test it without the case though, which would have been more difficult with the short one.

The main PCB just slides into guides built into the case extrusion. I did have some problems with getting the LED to go into its hole so I chamfered that on the inside as well.


The body of the LED protruded a bit too far to allow the board to go all the way in so I re-melted the solder and pushed it back as far is the PCB holes allowed. That was just enough to allow a perfect fit.

The case must be earthed via a screw hole on the PCB but the the hole in the case was missing as well as the fasteners. I marked the hole position using a 3mm spot drill though the PCB and then drilled it to 3.3mm and countersunk it. This is necessary because the head comes out under the ABS end bezel. I used another M3 x 16 CS screw with a 5mm brass spacer, a shake proof washer and a nut.


When fitting the right hand end cap I noticed the USB connector shorted to the surrounding metalwork. That is not good because the USB shield is connected to digital ground but the case is analogue ground. I added some clearance by filing two sides of the hole.


After assembling the case I found it no longer worked properly in LCD mode. The open circuit trim always failed with "trim failed due to line perturbations". It still worked when used via its PC program where the LCD display is not used. So it seems the LCD PCB is too noisy to be mounted close to the analogue front end.

I concluded I needed to place a metal screen over the LCD PCB but there isn't a lot of room inside the case. My first thought was to add a sheet of single sided blank PCB material mounted on spacers with the same screws that hold the PCB. That would have involved cutting it to size, marking and drilling four holes, either manually or by setting it up on one of my routers. Being too lazy for that I decided to 3D print an insulating cover for the PCB and cover it in aluminium adhesive tape.

Here is my OpenScad design :-



And here it is covered in aluminium tape and fitted :-


I trimmed the long wires from the LCD display to reduce the clearance needed from the back of the PCB to 1.5mm. I also bent the test pins on the main board to reduce their height. I replaced the plain washers and nylocs shown earlier with shake proof washers and plain nuts. The washers dig into the aluminium to hopefully make a good connection through the oxide.

With the screen fitted the meter works again in LCD mode although the short circuit trim fails occasionally. When powered from my PC or running stand alone from a USB adaptor the readings jump around a lot. When powered from my linear bench PSU it is much more stable. This isn't surprising as PCs tend to have a lot of ground noise, particularly laptops with external power supplies. My desktop PC (3D printed case of course) is micro ATX powered from a remote 12V PSU so will have similar ground noise to a laptop.


I don't think powering such a sensitive piece of equipment from a USB switch mode PSU makes a lot of sense unless it has exceptional output filtering and a clean ground. It only takes 180mA so an old fashioned mains transformer and linear regulator could be used.

Summary

Extra Parts required

  • 5 off M3 x 16mm countersink screws.
  • 5 off M3 plain nuts.
  • 5 off M3 shake-proof washers. 
  • 4 off M3 x 7mm or 6.4mm spacers.
  • 1 off M3 x 5mm spacer.
  • Metal screening for the LCD PCB.

Tweaks

  • Drill and countersink the earth screw hole.
  • Expand the hole for the USB connector to give clearance all the way round.
  • Chamfer the inside of both LED holes.
  • Reposition both LEDs slightly.
  • Shorten the ribbon cable.
  • Crop the LCD pins.
  • Fit an earthed metal or foil screen over the LCD PCB.
With these tweaks the LCR meter works very well. It gives much more stable readings in stand alone mode powered from a linear PSU.
On reflection I think the design should have included a metal screening can over the analogue front end. It could then be housed in a cheap plastic case. I could have 3D printed one saving myself about £45 but it would not have looked as nice as the anodised aluminium one.

Saturday, 6 February 2016

Cool maps

The aim of making the instrument described in the last post was to be able to quantify the cooling effectiveness of various fan and duct combinations by sampling the airflow at a grid of positions around the nozzle.

I attached the denuded bulb to the terminals such that it was pointing vertically upwards. I then placed the Coolometer on the bed with the bulb filament aligned with the nozzle at the centre of the bed (0,0).


I originally planned to clamp it somehow but instead I just placed it on some anti-slip matting and set the Y acceleration to a very low value.

My printers are controlled by Raspberry Pis so it was straightforward to attached the Coolometer to the second USB port. I control both it and the printer with the following Python script that runs on the RPi.

I made the Coolometer command acknowledgement ok, the same as Marlin, so I could use the same do_command() function to talk to both of them by passing the serial port.

The script scans in X and Y taking a cooling reading at each grid point. It generates a file called fanmap.dat that consists of a list of XY coordinates with a cooling reading in milliwatts. The file format can be read by gnuplot to draw graphs. This is the first time I have used gnuplot. I normally draw graphs with spreadsheet programs but this is a lot more powerful and very easy to use.

This simple gnuplot script: -

produces 3D plots like this: -


The 3D view looks cool and is good for interactive examination because you can rotate it with the mouse. A better view for a static picture is from above, which can be obtained by set view map. These are referred to as heat maps in gnuplot parlance but by reversing the palette they become cool maps!


Here is the script I used: -
It labels the colour key with the minimum, maximum and average cooling values in mW. Gnuplot is fantastically powerful and flexible but it took me a while to achieve the exact view I wanted.

Each reading is averaged over 100 samples in about two seconds, so it takes about an hour to do a scan of 80 by 90mm in two mm increments.

This is the first plot I made and was done on my Huxley90 because that machine is next to my desk. It is fortunate I did this first as I was expecting some difference in airflow from front to back but was surprised to see a big difference side to side. Had I scanned the Mendel90 duct first I would have attributed that to its asymmetry, but the Huxley90 duct is left right symmetrical. Here it is in the same orientation as the 3D graph: -


The only explanation that I could think of to cause this imbalance is the anti-clockwise rotation of the fan.

To test this hypothesis I mounted the fan upside down so it was spinning clockwise, but then it was sucking rather than blowing of course. The cooling effect was much less, as expected, but was now stronger on the right than the left.

Another experiment I did was to watch smoke from a joss stick going through a naked fan. I had to run the fan very slowly to be able to see smoke coming out the other side. The smoke going in was a tightly twisting vortex looking like a micro tornado. Coming out it was rotating more slowly with a  bigger diameter.

So I think that because the air-stream is rotating anti-clockwise it likes to exit the duct on the left hand side where it is travelling downwards and less so on the right hand side where it is travelling upwards. The effect seems more marked with the small 40mm fan I used for the Huxley90. This is possibly because the depth to width ratio of that duct is bigger, so the flow is more free to rotate.

Moving on to the fan duct and fan supplied with the Mendel90 Dibond kits this is the plot I got: -



As you can see the overall cooling effect is better, as to be expected with the bigger 60mm fan. There is a less pronounced left right difference but there is an odd cold lump front right. I thought this might be something to do with the jet from the cold end cooling hole at the back or perhaps the hot end affecting airflow. I removed the hot end and blocked the hole and neither made any significant difference.

My hypothesis is that the air rushes around each side of the circular part of the duct in opposite directions and collides at the front and then spills out. I.e. the air has significant momentum, so it prefers going around the outside of the duct loop to exiting the slot in the bottom. When it hits the air coming from the opposite side it has no choice but to exit. The lump is displaced to the right because the left stream is more powerful.

Odd that the ring of maximum cooling is smaller diameter when the output part of the duct is identical to the Huxley one.

The next thing I tried was the same duct with a GELID Solutions Silent 6 fan suggested by +Neil Darlow.


This claims to have "Optimized Fan Blades" and "High Airflow and High Static Pressure" as well as "Silent Operation" and "Long Lifetime". Here is a comparison of the things I could measure compared to the original fan: -


Current Power Speed Noise
Silent 6 @ 12V 0.103 A 1.2 W 3060 RPM 47.5 dB
Original @ 12V 0.209 A 2.5 W 3600 RPM 53.5 dB
Original @ 9V 0.136 A 1.2 W 3060 RPM 48.3 dB

I measured the noise at 15cm rather than the normal 1m because my sound meter only goes down to 40dB. The fan was running in the duct and placed on a block of foam so the table did not act a sound board.

I used the tacho signal on the yellow wire to get the speed. It produces a square wave with two cycles per revolution. I found that the supplied fan had no output on the yellow wire and after I disassembled it I found the components for it: a PNP transistor and a resistor were not fitted. In fact the only electronic part is a hall effect chip with complementary outputs. That feeds a two phase motor with two pairs of coils in series. I added the missing components to make the measurement. Interestingly the transistor is driven from one of the coils so it works even when the fan is not powered as long as it is spinning fast enough to generate enough voltage to turn the transistor on.

The data shows what I expected: that most of the noise reduction comes from the reduced speed. If the original fan is driven from 9V it rotates at the same speed as the Gelid one and takes about the same power. It is slightly noisier, which I put down to the fact the Gelid has a smoother leading edge on its blades. They also have more curve to them giving it a steeper pitch, so it can potentially move more air at the same speed.

This is the cool map from it: -

Compared with the original fan it does produce a slightly higher peak and average cooling effect with 6dB less noise, so it does do what it says on the tin. However it has the unexpected effect of changing the air distribution significantly.

I tried running the original fan with 50% PWM. All that did was reduce the airflow, it didn't change the distribution significantly.

So it seems that subtle changes to the shape of the fan blades greatly affect the airflow pattern at the exit of the duct. Who would have guessed that?

Next up is the version of the fan duct to suit the E3D V6 hot end that proved so challenging for slicers. This has to slope downwards to fit underneath the E3D's fan assembly. It is also a bigger diameter to clear the bigger heater block assembly.


Not too surprising to me by now this has a massive and unpredictable effect: -

I have no real explanation for why this seems to have a quarter of the circle missing. Looking at the plot one would think there is a blockage or a hole in the duct but that isn't the case. I think it is a consequence of two streams of air hitting each other head on. If you think about it that would create a chaotic result.

There are a lot of alternative Mendel90 fan duct designs on Thingiverse so I decided to test a few of those.

This is a 40mm duct by sivar2311: -


Less cooling than my 40mm Huxley90 version and very uneven.

This is an alternative 60mm duct for the E3D hot end by +Daniel Bull that has the fan mounted vertically :-



Compared to my original design this gives a higher average cooling but a lower peak. It too has a quarter of the loop missing and the air that should come out there seems to shoot off forward instead. Mounting the fan vertically seems to give a bit more flow, presumably because the air doesn't have to turn a corner, but it seems to be less even, possibly due to the rotation having a bigger effect.

After I designed Mendl90 I learned that radial blowers are more suited to pushing air down a small duct. Axial fans are fine for pushing large volumes of air down a large duct but radial fans generate a higher pressure so are better suited to making smaller jets.

This a duct for a 50mm radial blower by kiefer :-



I got the blower from RobotDigg but it seems to be slightly different to the one pictured and has three wires, not two.


 It rotates at 7200 RPM, takes 250mA and produces 56 dB at 15cm. So it is a lot more powerful than the original fan but more compact with the air coming out of a much smaller aperture.

It gives significantly more cooling and there aren't any gaps in the ring. It does seem to suffer from the air coming from both sides and colliding problem at the front. That seems to result in a high pressure jet spilling inwards and a lower pressure stream spilling outwards at the front.

 

Conclusion

When I designed the Mendel90 duct my aim was to achieve even cooling of the part without cooling the nozzle. The default duct with the original fan seems to give the most even cooling but I now think that is a complete fluke. Small changes such as the height of the duct, or the shape of the fan blades has a dramatic effect. This leads me to think that the airflow with an axial fan is chaotic due to the presence of vortices arising from its rotation.

A radial blower seems to be the way to go as it produces more cooling and the air coming out of it isn't rotating. I would mount the blower with its aperture pointing forwards to avoid the air needing to turn a right angle. Rather than have the air flowing around the circle in both directions I will try a p shape where the air goes around in one direction and then meets itself travelling in the same direction. I think this will create a vortex airflow that emerges more evenly around the circle.  I expect the shape of the junction might be critical. As far as possible I will try to keep the cross section constant to avoid Bernoulli effects.

So in all I managed to use three new tools (fritzing, CodeBender and gnuplot) and discovered a few facts about fans and airflow, so I learned a lot doing this project.

Fluid dynamics is obviously a massive subject and I learned this morning that it isn't a solved problem mathematically, there is a $1M prize outstanding. As ever, the closer you look at things the more complicated they get.