Sunday 3 April 2016

Beware fake wire!

I bought some test leads with banana plugs and alligator clips for £0.99 on Ebay from Hong Kong. They were described as "Alligator Probe Test Leads Clip Pin to Banana Plug Cable for Digital Multimeter GF". I don't know what the GF means.


Very cheap and what could possibly be wrong with them? Well actually, almost everything!

The first time I used them to connect a regulator to a bench PSU they got hot and dropped several volts. Without needing to do any sums with wire gauge and current I felt the resistance must be too high, so I measured it to be about 1.4Ω for the round trip. Way too high as multimeter leads are generally about 0.2Ω.

I unscrewed a plug and found this: -


The screw bites down on the soft insulation and that presses the folded back strands against the barrel. Not the best way to make a connection as you want the screw biting down directly on the strands, or better still a ferrule.

At the clip end it was more of the same: -


The strands are trapped between metal and plastic again instead of being soldered through the hole. The crimp is there just for mechanical strain relief, not the electrical connection.

I removed all the connectors (the clips pull off really easily due to not being soldered) and measured the resistance of the wire on its own. Still 1.4Ω, too much I felt for that gauge of copper wire 2m long. The simple explanation is that it isn't copper.


The fact it sticks really well to magnets leads me to believe it is copper plated steel. That might be OK for measuring voltage but no good for measuring or carrying current. I can't see any reason for using it other than it must be cheaper.

I replaced it with 32/0.2mm copper wire half the length and got a total resistance of 20mΩ. Much more suitable for hooking up PSU test circuits but a bit less flexible than ideal for multimeter leads.

So basically I got usable connectors for £0.99, which is still probably cheaper than I could buy them for in the UK. The wire and the construction were junk.

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.


Friday 29 January 2016

Quantifying cooling

A few months ago +Neil Darlow mentioned that he had replaced his Mendel90 fan with a quiet version and it seemed to give better cooling results. This made me curious because quieter fans of the same dimensions generally spin slower and produce less airflow. So I purchased one to compare but then realised I had no better way of judging its efficacy than holding my finger in the air stream to feel the breeze. With these two fans it was too close to call.

After a bit of Googling I found that an easy way to measure localised airflow is with a hot wire anemometer. These heat a wire by passing a current through it and then measure how much the airflow cools it. The current and voltage can be used to determine both the resistance and the power dissipation using Ohm's law. The resistance can then be used to determine the temperature knowing the thermal coefficient of the metal that the wire is made from. The extra heat loss due to the airflow is proportional to the square root of the flow rate.

A popular circuit configuration is a constant temperature anemometer as described here, but note the op-amp inputs are labelled incorrectly. An op-amp is used to adjust the voltage across a Wheatstone bridge to keep it in balance. The bridge consists of three fixed resistors and the hot wire, so when it is balanced the wire has a known fixed resistance determined by the other three. Because the power is controlled to keep the resistance constant it follows that the temperature of the wire is constant. The voltage on the bridge can then be used as a measure of the heat carried away by the airflow.

Tungsten is commonly used for the hot wire, presumably because it has a reasonably high resistivity, temperature coefficient and resists oxidisation. I hatched a plan to use a small light bulb with the glass removed, mount it on the bed of a printer and move it around under the fan duct to plot a map of the airflow.


This is a small 12V 0.8W bulb. Its cold resistance is about 15Ω but more than ten times that when hot. This is why bulbs take a massive surge current for a few milliseconds when they are switched on.

I was wondering about how I was going to calibrate the airflow reading but then realised that the flow rate is not actually what I am interested in. It is the cooling effect the airflow has, which is what I am directly measuring. The result is simply the extra power needed to maintain a target temperature and is a measure how fast the bulb filament is being cooled. So rather than an anemometer I decided to call it a coolometer. Unfortunately Futurama used that name first. Rather than displaying megafonzies mine displays milliwatts!

This is the circuit that I came up with: -


R1, VR1 and the bulb filament connected across J3 form the bridge that is maintained in balance by U1, Q1 and Q2. The CA3140 is a fairly old op-amp that I have had lying around for more than 25 years but it does still seem to be available. It was notable at the time for the fact its inputs are happy at or slightly below the negative rail, so it doesn't need a negative supply, unlike a lot of early op-amps like the 741. It also has a very high input impedance but that is no benefit here. Its output can't go higher than 3V when driven from a 5V supply and although it can source 10mA it can only sink 1mA.

Q1 is a PNP emitter follower that amplifies the current that can be sunk and also acts to shift the output voltage range 0.7V higher. R3 and R2 further shift the voltage so the output swing can turn Q2 fully on or off. The side effect is they reduce the loop voltage gain but Q2's voltage gain will more than make up for that. It further boosts the current to drive the low resistance bulb and allows the bridge voltage to swing over the full supply range. If I was designing using modern components I would use one of the true rail to rail op-amps from Maxim and save a transistor.

VR2 is an offset null adjustment. I didn't think one would be needed at first because a small input offset isn't going to affect the output much in this circuit. However I soon realised that there are two stable states, one where the bridge is in balance and the other where the voltage supply to the bridge is zero. To force the circuit into the non-zero state I had to ensure there was a small but finite negative input offset.

I was a bit worried that adding more voltage gain after the op-amp might cause it to oscillate like my ULDO regulator did. However it appears to be stable with just the op-amp's internal frequency compensation. That must be because the transistors have a much higher frequency response than the op-amp, so don't add much extra phase shift within its bandwidth.

To measure the results, display them and send them to a serial port I used a MicroView. This is a tiny module combining an OLED display and an Arduino. I got four of these from the Kickstarter campaign. They are relatively expensive for what they are but I got four for the price of two because Sparkfun sent the first ones out without a bootstrap and had to replace them all. Since I have an ISP programmer it was trivial to install bootstraps into the first two.



The MicroView measures the voltage on the bridge and also the voltage across the bulb. With those measurements and knowing the value of R1 it can calculate the resistance and power dissipation of the bulb. Given the thermal coefficient of tungsten and cold resistance of the bulb it can estimate its temperature.

I didn't use the USB serial converter that goes under the MicroView because I wanted a micro USB socket rather than a full sized plug and I also wanted a lower profile, so I used one of these instead.

I removed the right angle connector and fitted pin strips down the two sides. They appear as J1 and J2 in the schematic. I also removed the 3.3/5V jumper and replaced it with a wire link to lower the profile.

Because I wanted to test the circuit on a breadboard and then move it to perfboard I decided to try out fritzing. I was impressed by its ease of use. One bugbear of mine with traditional ECAD is the separation of the schematic and layout into different programs. You have to export your schematic as a netlist and import it into the layout program. Then there are horrible things like back annotation and cross probing. I have long argued it should be a single model with two views that are kept in sync. Having written a UML CASE tool myself, which has 15 different tabbed views of the same database that are always in sync I know this isn't too difficult to do.

Fritzing has breadboard, schematic and PCB views that are all synchronised. You can add, remove and connect components in any view and it will be reflected in the others. One thing I found quirky was that nets seem to preserve the order of connection, so you have to route the PCB or breadboard in the same order as the schematic. You can get around this by making tracks double back over themselves but in my mind a net should represent connectivity without an order of connection.

You can find the fritzing project here: fritzing.org/projects/coolometer

Here is my perfboard layout: -


You can see the offset null pot was a late addition connected with flying leads on the back. I left the un-routed rats nest to represent those.

I am not a fan of the radial components being shown on their sides. It makes some sense for simple breadboard projects but I would prefer a strict plan view.

The breadboard view can show a traditional breadboard or  stripboard. The perfboard view is just a variation of the stripboard pattern, it simply replaces the strips with pads. The problem is that with perfboard you also need to put wire tracks on the back of the board as well as jumpers on the top. There is no way to represent that in fritzing 0.9.2, so I had to print it out and hand mark the underside tracks with a pen to actually be able to build it.

There are quite a lot of part libraries about that contain parts aimed at hobbyists like the MicroView. As they are contributed by different people / companies there are inconsistencies in the sizes and style of schematic symbols. For example the pots should be the same size as the other resistors and being trimmers should have a flat slider instead of an arrow. The arrow should meet the zigzag, not go through it, that would be a two terminal variable resistor. This appears to be a cross between the two. As fritzing appears to be aimed at education I think it is important for the symbols to be correct.

I do like the old school resistor symbols but they were replaced with boring boxes by standards organisations in the nineties if I remember correctly.

I failed to find a part for the CA3140, so I used a random op-amp that had a sensible looking symbol. Unfortunately the offset null pins of an OP27 didn't match the footprint of a CA3140, hence why it appears to be connected to an NC pin on the schematic. I tried to modify it to match my part but failed. Part creation is external to fritzing.

I also made a PCB layout just to try it out, I have no intention of making a PCB as this is a one off for an experiment. Auto route works but is ugly, as always, so I hand routed it as I always do.


A view with the pictorial version of the components would be nice. Note that the footprint of the pots is different to breadboard view. It actually matches the pots I used though.

Again it is very easy to use for simple designs like this. I think it is limited to two layers and I don't think it can do thermal vias. It can do copper fills. I will probably stick with KiCad for more complex designs.

Here is the built up perfboard version. Note that this picture was taken before I added the offset null pot.


Here is the underside :-


I made a 3D printed case of course, using OpenSCAD. It was a great help that there was a 3D model of the MicroView case parts available in STL format. I was able to assemble them to make an accurate 3D representation of it and also use it to cut the hole in the case lid. Once I had measured up the perfboard I was able to locate all the components that needed holes in the case by using their grid coordinates. Amazingly this was right the first time I printed it.


I used HEATFIT brass threaded inserts which I pushed in using a soldering iron with a conical bit.


Here it is assembled and running. Unfortunately the camera shutter missed the most important bits of the text, the temperature and power.


The cheap perfboard I used was a bit warped so the board is sandwiched between the top and the base, supported all around its edges top and bottom, and clamped with four screws. The screw heads are recessed into the base so that it sits flat.

When I was following instructions to install the MicroView bootstrap I discovered CodeBender. This allows you to store an Arduino project in the cloud, edit it in a web page, compile it in the cloud and download into an Arduino using a web browser plug in. It's much more convenient than installing hundreds of megabytes of Arduino IDE and the editor is much nicer. Here is the actual code: Click on the title to see a non-embedded version in its own webpage.

The MicroView doesn't have any separation between the analogue and digital power rails so I guessed the ADC readings would be quite noisy. I knew that the AVR can be made to sleep while the ADC is sampling to reduce the amount of digital noise. I scraped some code from the Arduino forum to do that. Ten bits is not a lot of resolution so I do 16 reads in quick succession and add them together to get a 16 bit result. In the presence of random noise oversampling can increase the resolution at the expense of the sample rate. Marlin firmware uses this technique for reading temperatures.

The ADC uses the 5V rail for its reference but the actual voltage at the end of a USB cable is somewhat unknown, so I measure the internal bandgap reference to calibrate the other two voltage readings.

Once the glass is removed from the bulb the voltage becomes quite unstable. I think this is because of chaotic air turbulence. I first noticed this effect when using a thermocouple to measure the temperature at the surface of a heated bed. The control loop might be somewhat unstable due to it having a high gain and bandwidth controlling a laggy heater. It may tend to over correct and overshoot. Despite this I found that averaging over 100 samples gave a stable reading.

The firmware displays the three voltages it measures (VCC, the bridge voltage and the bulb voltage) averaged over the last 100 samples. It also displays the calculated power and temperature of the bulb.

I adjust VR1 to set the temperature to 185°C to emulate freshly extruded filament. I don't think the exact temperature matters much. Making it higher increases the sensitivity but there may not be enough voltage to maintain it in a strong airflow. Also you probably don't want it glowing as it might oxidise. It takes a lot more power to reach a given temperature once the glass is removed, obviously, as you have convection cooling even in still air rather than just radiation.

Pressing the button causes it to subtract the current power level from subsequent readings. That is done in still air so that the power reading is then just the extra heat carried away by a moving airflow.

The serial protocol is minimal. If it receives z it zeros the power and replies ok. If it receives s it clears the sample buffer and replies ok. After it gets 100 samples it sends VCC, the bulb power and the bulb temperature.

As this article is long already I will show the results in another post. In the meantime here is a scan of the standard Mendel90 fan duct's cooling effect at 2mm resolution.