I recently had a duh moment. I was trying to repair a broken fan motor and I had determined that the immediate problem was that a thermal fuse used to protect the stator windings from overheating was broken. I ordered a few new thermal fuses, soldered one in and carefully insulated it electrically using heat shrink tubing.
When I tried to power up the fan, I was surprised to find that it was as dead as before. Some quick troubleshooting revealed that the new fuse was broken. Since the motor had not even made the tiniest jerk when I plugged it in, I assumed the fuse must strangely enough have been dead on arrival and I removed it from the motor.
This is what the fuse looked like when I had removed it:
Dead thermal fuse in the remains of heat shrink tubing
Fortunately, I had more fuses, so I proceeded to solder another one into the circuit. Wise from my previous experience, I verified that it was working before the operation and I also measured it after I had soldered and heat shrunk it into the motor circuit. To my surprise it was suddenly broken! And I had not even powered the motor up!
Motor with a dangling dead thermal fuse in (black) heat shrink tubing. (The red thing is just an insulated crimp joint.)
This is when the duh moment occurred.
Thermal fuses blow in an unresettable fashion when they reach a certain temperature, in my case around 120 °C. This is the whole point of the component. And I had failed to consider this when I happily soldered the thing in, just as if it were a resistor or some other normal component. There is obviously a big risk – not to say certainty – that both during soldering and while shrinking the tubes, the fuse gets heated to higher temperatures than it can stand.
So how do we get around this problem? I did not have any thermal fuses with long leads that would insulate them during soldering, but with some care it is in fact possible to solder a thermal fuse. Here are the tricks I used in my third attempt:
Do not shorten the leads of the fuse. Leave them as long as they are.
Put several alligator clips on the lead between the body of the fuse and the tip where you apply solder. This is to lead away heat so that it does not reach the body (see picture below).
Solder for as short a duration of time as possible. Preferably less than a second at a time to prevent heating of larger parts of the lead. But be careful to not get a cold solder joint despite this. It’s a delicate balance.
Do not shrink the tubes. Let them just sit there loosely.
Below are some pictures from the process.
Alligator clips used to divert heat from the solder joint.More alligator clips used to divert heat from the solder joint.Thermal fuse soldered to motor and enclosed in unshrunk tubes. Still not broken.Thermal fuse stuck into the stator to do its job sensing the temperature.
Using these tricks, my third attempt was successful and the fan is now back in working condition.
It cost me two thermal fuses, but I think I have got the lesson about what not to do to this (for me at least) somewhat unusual component.
I have previously written two blog posts about problems I had with Arduino Nanos I bought from Banggood and where the problem turned out to be caused by a pirated FT232RL USB-to-serial port chip. FTDI (the company behind the original FT232RL chips) seems to have tried to make life hard for users of the counterfeit chips by putting measures in their newest drivers that will prevent them from working properly (although older versions of the drivers might work fine).
I have not bought any new Nanos recently, but Mark commented on one of the previous blog posts that Arduino Nano clones that he recently bought from Banggood look different and also work fine with the newest drivers from FTDI. Apparently, a completely different chip is used that does not try to look like a chip from FTDI.
Here are photos of the board taken by Mark:
Top side of Mark’s NanoBottom side of Mark’s NanoCloseup of the CH340G chip
The photos on Banggoods online store seem to be of the same product, so apparently they have updated their pictures as well.
The chip used here is a CH340 (or CH340G?) from a company called “WCH Nanjing QinHeng Electronics“. I had never heard of this company before, but there are indications on their home page that they have been around since 2007 and they have a handful of other products as well.
Anyway, it seems like someone have now designed an Arduino Nano clone that has a significantly different design than the ones I bought and probably without chips that claim to be something other than what they really are. I guess this is a step in the right direction. But using the Arduino name for the modified clone is still at least questionable.
We are about to move to a house where most of the floors are making creaking noises when you walk over them. The floors are made of 22 mm thick wooden boards and below them there is an underfloor hydronic heating system with hot water pipes embedded in heat spreading sheets of aluminum as shown below.
Floor cross section with hydronic heating.
One of the possible solutions to the creaking floor problem is to use screws to tie down the boards into the underlying wooden beams. There are few problems however. One is to locate the beams, but a more important issue is to make sure that we do not drill or screw into one of the water pipes. Doing so would obviously have catastrophic consequences. So how can one be sure to stay clear of the water pipes? We will borrow an IR camera and try to see how the pipes are routed, but I am not so sure this will clearly show all the pipes everywhere since the pipes might not be in good contact with the floor boards everywhere.
Another idea is to take advantage of the heat spreading sheets of aluminum placed between the beams. The pipes are sure to be straight and positioned a safe distance away from the beams everywhere where aluminum sheets are present. Close to the walls however the sheet metal will end to give the pipes space to curve around to reach the next pocket between the beams. It seems quite important to detect where the aluminum ends close to the walls so that we know where the danger zone is. Below is an example sketch of what the pipe layout might look like in a few rooms.
Example hot water pipe layout.
Hidden metal can be detected by a metal detector, but I do not have one of those. Buying one is obviously an alternative, but would it perhaps be possible to build one without too much effort?
I pondered this for a day or two. One principle to use would be to measure the inductance and/or loss of a coil. Probably there should be a noticeable change when metal interferes with the magnetic field. Another method would be to sense the coupling between two coils, which should also be affected by nearby metal. But could I quickly and easily build a circuit to do this? After all, a commercial metal detector might not be all that expensive.
A relatively simple and common way of detecting a change in inductance would be to build an oscillator where the coil forms part of the tank circuit of the oscillator and then detecting the frequency change somehow. This is certainly doable, but I came up with another idea that seemed quicker to implement with available hardware, namely to use my little vector network analyzer, the VNWA!
So I wound a wide and flat coil using two cut-off disposable plastic cups as the coil former. Then I put a 390 pF capacitor in series with the coil and placed the series LC-circuit as a shunt across the VNWA test board connected for a through (S21) measurement. Pictures of the coil and the connection to the test board are shown below.
Sensor coil with series capacitor.VNWA test board with through connection (strip along the center) and shunting connection to the sense coil.
Thus, at the frequency where the LC-tank is resonant, it will be quite successful at shunting the transmission line and thus reducing how much signal power gets through to the receiving port of the VNWA. I.e. the transmission parameter S21 will have a notch at the resonant frequency. When the coil comes close to metal, one can expect the inductance as well as the loss to change. A change in inductance will lead to a change in notch frequency while increased loss will show up as a less deep notch.
I did not know what parameter of the coil would be most sensitive to nearby metal, but using the VNWA it is easy to observe several parameters at once over a range of frequencies. I also did not know precisely at what frequency the tank circuit would be resonant, but it is very easy to find out using the VNWA. Another thing that is convenient with the setup is that performing a thru calibration does not require any tedious SMA connector screwing/unscrewing. Just unplug the cable to the sense coil and do the calibration. This is particularly nice when iteratively optimizing sweep parameters like start and stop frequencies, number of frequency points per sweep and dwell time at each frequency.
So did it work?
The resonance frequency without nearby metal turned out to be about 113 kHz, so since the capacitance is 390 pF, the inductance is apparently 5.1 mH. When the coil is 30 mm above a sheet of aluminum, the frequency changes to 115 kHz. If it is just 20 mm above aluminum, the frequency goes up further to 117.5 kHz. The notch in S21 is about 3 dB deep and 2 kHz wide, so it is very easy to detect the change in notch frequency. Below is a plot showing S21 when the coil is 30 mm above a 50 mm wide gap in the aluminum sheets (Mem1 with a notch frequency of 113.2 kHz) and another trace showing S21 when the coil is 30 mm above an aluminum sheet (S21 with a notch at 115.3 kHz).
S21 curves showing a notch at 113.2 kHz when the coil is 30 mm above a 50 mm wide gap and 115.3 kHz when the coil is 30 mm above aluminum.
Below are some pictures of the test setup.
Coil placed 30 mm above a gap in the aluminum.Coil placed 30 mm above a the aluminum.
It turns out that the amount of frequency change (inductance change) is strongly dependent on the distance to the metal. If the distance is decreased to 20 mm, the frequency goes up to 117.6 kHz when over the metal, while it is almost unaffected when over the gap.
Frequency change when the coil is 20 mm above the aluminum sheets.
If the distance is increased to 46 mm, the frequency change is small, but still very much detectable, from 113.0 kHz to 113.8 kHz.
How small gaps can be detected?
Setup to test detection of small gaps.
I expect there to be about 10 cm or so of gap between the metal sheets, but it can be interesting to know if the setup also can detect much smaller gaps. So I tested this and found that a 10 mm gap at 30 mm distance from the coil results in a frequency of 114.1 kHz, which is well separated from the 115.3 kHz we see when the coil is directly over the metal. So even this small gap is easy to detect.
Detecting a 10 mm gap in the aluminum sheets at 30 mm distance.
Since the notch is relatively strong and easy to detect using the VNWA, the sweep time can be short, which is good when quick feedback is desired while moving the detector coil across the floor. For all measurements shown above, I used a sweep of 101 points with a dwell time on each point of 3.33 ms, resulting in a sweep time of 0.34 s.
I wrote earlier about the different coil parameters that would potentially change with nearby metal. In the end it turned out that the frequency of the notch in S21 of the shunting tank circuit was the most convenient parameter to use, which means that it is the change in inductance of the coil that is primarily detected. I tried a couple of other parameters as well using the math capability of the VNWA, but nothing worked better than the S21 notch frequency. Below are plots of S21, the phase of S21, the magnitude of the shunting impedance and the real part of the shunting impedance for the cases where the coil is over a 50 mm slot and when it is directly over the metal.
Several parameters plotted when the coil is 30 mm above a 50 mm gap.Several parameters plotted when the coil is 30 mm above aluminum.
As can be seen, the shunting impedance has a notch that is also easy to detect and the phase of S21 has a distinct transition at the notch. The location of all of these features along the frequency axis are directly determined by the coil inductance.
The real part of the shunting impedance (the ESR of the coil, the black curve above) is not affected very much at all and seems to be pretty useless in the detection of metal.
Some false starts and optimizations
It took an hour or two to build the first incarnation of this metal detector, but it was not quite as good as the version I have described above. Without thinking much I wound the first coil on a 50 mm diameter cardboard tube without taking any measures to make sure the winding was as close as possible to the end of the tube. Then I put a 1.5 nF capacitor in parallel across it and connected it as a shunt to the test board. Several things were suboptimal in this configuration.
Problem number 1: Using a parallel tank circuit means that the impedance is at maximum at the resonant frequency. This further means that the least amount of attenuation in S21 will occur at the resonant frequency, so S21 should have a peak here. However, with the component values selected, the attenuation around the peak will be pretty minimal and so the peak will be very small. Calculating the shunting impedance from S21 brings out the peak more clearly. This worked, but the peak was very noisy and I had to use a relatively slow sweep to detect it clearly. It would have been better to put the parallel tank in series with the VNWA signal instead of shunting it as a peak in impedance would then have resulted in a significant notch in S21 that would have been easier to see. The other option is to use a series LC tank and let that shunt the signal, which is obviously the solution I later selected.
Problem number 2: Reducing the distance between the coil and the metal strongly increases the sensitivity. So it is a good idea to try to keep the coil as close to the floor as possible. Having the coil spread out over maybe 15 mm of tube and with a distance of 5 mm from the end of the tube to the nearest coil windings is rather wasteful. A better coil design would have increased the sensitivity and this was addressed in the second design.
Problem number 3: A larger diameter of the coil gives longer range. The second coil design (depicted above) therefore has a diameter of 75 mm instead of 50 mm.
There is still room for improvement in the coil design, but it seems to already be more than good enough for my purposes, so I will probably leave it the way it is. After all, this was intended as a quick hack and not as a full on product development effort. In fact, building the first and second version of the coils and testing them took about two hours per night during two nights, while producing this blog post about it all took more time than that…