Thursday, April 19, 2018

An Arduino Metal Detector


Casting about for metal detector circuits, I came across this plan at circuitdigest.com. I have only the dimmest understanding of the circuitry, and I don't understand the Arduino sketch code at all.

I fabricated a coil and breadboarded the circuit. It does work after a fashion, but it strikes me as a peculiar, flaky device. Here's a view of what I have so far.


Never mind the presence of metal, the least disturbance of the coil is apt to set the buzzer sounding off and the LED flashing.

Placing the coil on a metal object yields a hearty buzzing and flashing for a few seconds.


If the coil is left undisturbed on the metal, the buzzing and flashing cease.

If the coil is then removed from the metal object, the result is intense buzzing and flashing for a few seconds.


Eventually, the buzzing and flashing settle down and the thing goes quiet, except for the occasional, random buzz and flash for no perceptible reason.

The device doesn't so much respond to the presence of metal as it responds to disturbance by metal either entering or leaving its field.

I'm thinking to do up a halfway proper prototype with a long shank and a handle and all, that I can take out in the backyard and probe around with, to give the circuit a fair trial. We'll see.

- - -

A Prototype -- FRIDAY, APRIL 20, 2018

Here's what I came up with for a quick-and-dirty prototype.






I took it outside for a trial, and my verdict is that the thing is useless. The device is always randomly sounding off -- a random noise generation circuit would yield about the same effect. The device is just too flaky to be of use.

Anyway, I now have a basic framework on which I can try out other approaches. There are surely better ways to go about constructing a metal detector.

# # #


# # #

Wednesday, April 18, 2018

An Arduino Temperature/Humidity Monitor


I wrote a brief post a while back about my new Arduino kit. In all the projects that accompanied the kit, I finally came across one that looks useful to me -- a temperature/humidity monitor. Here are views of that breadboarded up and working.




Next up is to get it working with an Arduino Nano, then I'll see about packaging it up into a hard-wired, enclosed unit that I can put to permanent use in the house.

It's too bad that the DHT-11 sensor's range only goes down to 0°C; I'd like to have a unit for outdoor temperature sensing as well.

- - -

Update -- WEDNESDAY, APRIL 18, 2018

I got the monitor to work with an Elegoo Arduino Nano from Amazon.


At first, I could not get the Nano to accept an upload; I'd get an error every time I tried. I fiddled and monkeyed about with the software, not really knowing what I was doing, then out of nowhere it started to work properly. Pure voodoo.

Anyway, now I can get on with designing a power supply and packaging arrangement.

# # #


# # #

Tuesday, April 17, 2018

Kuman Mega 328 Graphic Tester


I bought a Kuman multifunction component tester from Amazon recently. Here's what comes in the mail.


There's no documentation with it at all. Here are the features and specs directly from Kuman's website:

Features:
● Multifunction tester: resistor + capacitor + diode + SCR + inductance + Transistor + mos tube.
● Automatically detect NPN and PNP transistors, N-channel and P-channel MOSFET, diode (including dual diodes), transistors, resistors, capacitors, thyristors and other components.
● Automatic power off function, save unnecessary time and battery capacity , Automatic test the pin element and the display on the 12864 LCD Display.
● Accurately report capacitance, inductance and resistance. It's also able to show the layout and type of transistors/MOSFETs, forward voltage of diodes.

Specifications:
● Material: Plastic, metal
● Automatic power off
● Power Consumption Off Mode: Less than 20nA
● Capacitor Measure Range: 25pf -100000uf
● Inductance Measure Range: 0.01mh-20H
● Resistance Measure Range: 0.1ohm resolution, maximum 50M ohm
● Power: 9V battery (If longer power, you can use pack consisting of two 8.4V lithium battery)
● LCD resolution128*64
● LCD Display Color: Green,yellow
● PCB Size: 2.86x2.37x0.047inch ( L*W*T)
● Weight: 45g

Packing List:
● 1 x Transistor Tester
● 1 x Acrylic shell
● 1 x screwdriver



The PCA (printed circuit assembly) is fully assembled and ready to go; it just needs a 9V rectangular battery. Operation is simple enough -- press the blue button and a test cycle commences. You first see this.


With the test socket empty, you then get this.


Note the pin numbering alongside the 14-pin DIP ZIF socket. There are actually only three active locations, but 'pin 1' is repeated (paralleled) four times. The entire seven pin sequence is repeated (paralleled) along the lower course of pin sockets.

What attracted me to the device was the inductance measurement feature. Inductance is surely the most mysterious of all electrical phenomena, and instruments for measuring it are uncommon. I have a selection of ±10% miniature inductors, so I thought I'd put the instrument through its paces with them. Following is the list of my results in the form 'nominal/measured' for fifteen items. All values are millihenrys.

.010/.01
.015/.01
.022/.02
.033/.03
.047/.04
.100/.08
.150/.12
.220/.17
.330/.28
.470/.47
.680/.58
1.00/.94
2.20/1.7
3.30/2.7
4.70/3.6

Hmmm. The measured values are mostly 'ballpark' at best. 'Can't say that I'm impressed.

I've half a mind to return the thing, but maybe I'll hang onto to it, if only as a novelty piece of test equipment.

If and when I fully assemble the unit in its clear acrylic casing, I'll post photographs. And I'll let you know if I find the thing to be actually useful.

- - -

Update -- THURSDAY, APRIL 19, 2018

'Pleasantly surprised by the unit's performance as a bipolar transistor tester.

I'd recently acquired a box of ten transistor types from Amazon, so I thought I'd try out the tester with them.


Something went amiss with my first attempt -- the tester identified a transistor as a diode. Whatever that was all about, the problem went away and never resurfaced. From there on the tester performed flawlessly for identifying polarity and pin-out of all ten types. The tester also gives an 'hFE' gain figure, and a 'Vf' figure. (It's not entirely clear to me what 'Vf' is. Collector-Emitter forward voltage drop, I imagine.) A typical read-out looks like this.


So, I guess the thing is a keeper. I'll peel the paper off the acrylic casing segments, and assemble them.

- - -

Here's the device mounted to the casing's rear panel.


Note that I've routed the battery wiring to the inboard side of the lower left spacer. If the battery wiring is allowed to go to the outboard side of that spacer, the wiring will interfere with the fit of the left side panel.

And here's the completed instrument.


Following are a few points regarding final assembly of the casing.
  • Note the notch in the left side panel that accommodates the ZIF socket's lever when the lever is in the closed position.
  • Fit of the upper panel was imperfect; the ribbon cable for the display tends to push the rear panel outward, making it difficult to fit the rear panel's upper tab into its slot in the upper panel. I had to file the slot for the rear panels's tab a little in order for everything to go together nicely.
  • The screwdriver supplied is a Phillips No. 0. The screw heads' recesses are actually sized to take a No. 2 driver. You'll want a 5.5mm open-end wrench or nutdriver for the hex nuts. (7/32" substitutes ok for 5.5mm.)
Battery replacement entails opening up the casing completely. It remains to be seen what battery life will be like. I suspect that the display's backlight is a fairly heavy load. I may end up incorporating a power jack for an external power supply.

# # #


# # #

Saturday, April 14, 2018

A Rocking Horse


I've become a grandfather. So, I guess that a rocking horse is in order. At the rate that I work, I should have it done by about the time that my granddaughter is ready for it.

I purchased a U-BILD rocking horse plan from Lee Valley.


As is par for the course with all such DIY material, the rocking horse is allegedly 'easy' to construct; ("...appropriate for any skill level...", as Lee Valley's blurb puts it.) I've studied the plan, and I'm calling hogwash on that. The plan looks frightfully challenging to me -- fraught with perils and difficulties.[1] Had I not committed to making the thing, I'd take a pass on it and file the plan away under 'maybe, but unlikely'.

Anyway, I've embarked on the venture, and here's where I'm at so far.


I joined the head and torso with four No. 20 biscuits. The plan calls for the use of two 3/8" dowels. I find dowel joinery to be problematic at the best of times, so I opted for biscuits. That worked out fairly well.

Next up is to cut the body to shape on the bandsaw, and sand the cut edges.

- - -

And here it is done.


And this is as good a place as any for a little digression on tooling for this project. There's a lot of curve sawing and edge sanding involved. The plan would have you do the sawing with a portable sabre saw (jig saw), and I call hogwash on that -- a band saw is called for.

Band Sawing

I don't have a full-size band saw, nor do I have a great deal of band sawing experience. What I do have is one of these little 9" band saws from Canadian Tire.


As toy machinery goes, it's not a bad unit, and I've been reasonably well pleased with its performance.

The saw takes a 62" blade, and the only such blade that's locally available, either from Canadian Tire or Home Depot, is 1/4" wide, 6 tpi. 6 tpi is a pretty coarse blade that leaves a rough cut edge. You have to cut well to the waste side of a line to be sure of being able to sand away all the saw scarring without going beyond your line.

In the interest of obtaining a smoother cut, I ordered a 1/4" wide, 14 tpi blade from Amazon and tried it out. The 14 tpi blade does cut quite smoothly, but there's a downside -- the blade's teeth have very little set, so the blade is disinclined to cut curves. For straight cuts or very large radius curves it's ok, but on curves of any tightness it's inclined to bind. Amazon has a 1/8" wide, 14 tpi blade that would no doubt cut curves nicely, but a 1/8" wide band saw blade would surely be a fragile item, prone to breakage. So, I'm back to sawing with a 6 tpi blade, which at least has sufficient set that it negotiates curves easily. I just have to resign myself to doing a lot of belt sanding to remove the saw scarring from the cut edges. And that brings me to my Rigid oscillating edge belt/spindle sander.


It's quite a piece of gear, and it works as advertised. I consider it to be a 'must have' for this project. I bought 50 grit belts for it for dealing with my rough, band sawn edges. The 80 grit belt that comes with the machine produces an acceptable finished edge. 120 grit belts can be had, if one wanted even more finely sanded edges.

Anyway, there's what I consider to be essential tooling for one to tackle this rocking horse.

A Bit More Progress

Here's one front leg cut to shape and edge-sanded with a 50 grit belt.


An 80 grit edge-sanding is still to be done.

And my band saw blade dulled and broke, so a trip to Home Depot is in order to get a replacement.

To be continued.

* * *

Note:

[1] I'd love to hear from anyone who's built one of these rocking horses, who'd care to share with me how their experience of it went.

# # #


# # #

Monday, April 9, 2018

A Solar Patio Lantern Teardown


Some years ago, we acquired a bunch of solar patio lanterns, like this one.


They all eventually failed, so I thought I'd look into their construction, and see if I could revive the things. At the very least, I wanted to see how they work, and what the failure mechanism(s) is/are.

The upper cap of a lantern has all the works in it. It just twists off.



On the top of it, there's the solar cell that soaks up daylight and charges the unit's Ni-Cd (nickel-cadmium) cell, and the face of a photoresistor that triggers the lantern's circuitry to turn it on in darkness.



Underneath, remove the three screws and you have access to the unit's innards.


And there we have an AA 1.2 volt Ni-Cd cell, a white LED (light emitting diode) and a tiny PCA (printed circuit assembly) with a four-pin IC (integrated circuit) on it. That IC (type No. ANA608) is the key to the lantern's operation. A little background is in order.

LED Forward Voltage

All semiconductor diodes exhibit a slight voltage drop (VF) in their forward-biased state. All LEDs operate with forward bias in order to light. The applied voltage must exceed the VF figure in order for an LED to light. Following is a list I drew up of forward voltage drops, as displayed by the diode test function of a common digital multimeter, for a selection of diodes. The coloured LEDs are just miscellaneous ones that I had on hand. The white LED is one from a patio lantern.

1N34A Germanium Signal Diode: VF = 0.4 VDC
1N4001 Silicon Rectifier Diode: VF = 0.6 VDC
Red LED: VF = 1.78 VDC
Yellow LED: VF = 1.85 VDC
Green LED: VF = 1.86 VDC
Blue LED: VF = 2.5 VDC
White LED: VF = 2.6 VDC

So, a 1.2 V Ni-Cd cell has insufficient voltage to overcome the V of an LED and light it, yet the lantern works. A clever bit of circuitry known as a 'joule thief' is responsible for that.

The Joule Thief

See this Wikipedia entry for a brief introduction to the joule thief circuit. The four-pin IC (ANA608), in conjunction with a 220 microhenry inductor, constitute a joule thief that converts the Ni-Cd cell's 1.2 VDC output to a 3V peak-to-peak pulse train that can light the LED. Here's a view of the pulse train at the white LED's anode.


The pulse train's period is about 6 microseconds, which works out to roughly 167 kHz. The LED is actually 'flickering' at that rate, which of course is way beyond the persistence of human vision, so the LED appears to be constantly lit.

The ANA608 IC

The only data sheet I could find for the ANA608 is mostly in Chinese.

Anyway, I drew up a crude schematic of the lantern's circuitry.


So there's what makes solar patio lanterns light up.

As for reviving dead ones, good luck. Here's what I've observed about failure mechanisms from a sample of five units.
  • The Ni-Cd cells are long lasting and not prone to failure. The cell holder terminals stay remarkably free of oxidation. I suspect that battery failure, be it real or apparent, is mostly brought on by solar cell degradation/failure. Insufficient or non-existent Ni-Cd cell charging leads to lantern failure from what appears to be a bad Ni-Cd cell. It's possible to check solar cell output with a voltmeter. A good solar cell will put out about 3V under full, bright light.
  • One case of water incursion past the solar cell's edges. The water got onto the PCA and fouled its operation. When dried out, the lantern worked again. I sealed the edges of the solar cell and the photoresistor with transparent auto sealer from Canadian Tire. That worked for a while, then the photoresistor went flaky -- its dark resistance wouldn't go high enough to enable the light to switch on.
  • Broken off wiring connections. These tend to be self-inflicted when one fiddles with the innards of a lantern; the stranded wiring material used in the lanterns won't tolerate much flexing without breaking at solder joints. Some breakages will be repairable. Some will be buried in hot-melt glue and won't be repairable.
  • Several solar cell failures. The solar cells used in these things are the cheapest possible, and the solder connections to them are iffy at best. There's no repairing such failures. The solar cells are not non-destructively removable.
* * *


A Candy Tin Solar Patio Lantern

Since I had some salvageable components left over, I thought I'd see if I could construct some serviceable patio lanterns from scratch. The solar cells and photoresistors from the old lanterns couldn't be salvaged, so I ordered up replacements from Amazon.


A candy tin could serve as a weatherproof housing.


And here we are with a breadboarded lantern.


A Complication

The photoresistors from Amazon wouldn't work as direct replacements for the original photoresistors. I had to add a PNP transistor and a 2.7 kohm bias resistor per the following schematic.


I'm not sure that I understand why and how that little circuit works, but it does. I just kind of made it up.

Anyway, here's a finished candy tin patio lantern out in the dusk.


It won't win any design awards, but it works quite nicely.

* * *

Enhancements -- MONDAY, APRIL 16, 2018

There's a way to have the LED switch on and off as it should without the use of a photoresistor. If the IC's 'enable' pin, pin 2, is tied directly to the positive terminal of the solar cell, then the solar cell's output will control the LED's switching. That strikes me as a good way to go, since it eliminates a component or components that can fail.

Another enhancement is the addition of a rectifier and a filter capacitor to the output of the joule thief. A slight (very slight) gain in LED brightness is obtained from that.

Here's a revised schematic showing the installation of both of the above mentioned features.


Problems So Far
  • One of the photoresistors from Amazon failed. It developed an almost steady resistance of about 80 ohms, and so would not switch on the LED in darkness. I got the lantern going again by tying the IC's 'enable' pin directly to the solar cell's positive terminal.
  • Water Incursion. We've been awash in rain, freezing rain and ice pellets here lately. The slip-fit lids of the candy tins aren't weatherproof; they wick up water and allow it to enter the tins. I'll have to dry them out thoroughly and tape the lids' perimeters with electrical tape.
 

 # # #


# # #


Tuesday, February 27, 2018

AC Line Powered LED


From what I've seen of AC line powered LED circuits, they tend to be pretty elaborate, and they always include a rectifier diode in reverse parallel with the LED, to limit the reverse voltage that the LED will be subjected to. Then I came across this receptacle tripler in my home with an AC line powered LED in it, and thought I'd look into how the LED was incorporated. What I found was the simplest circuit imaginable.




There's no manufacturer's name on it, but embossed on the back of it is "MODEL: CT3-1V". Also embossed is the CSA (Canadian Standards Association) logo. Two M3 threading screws fasten it together, so it was easy to open for an examination of its innards. Here's a view of the interior.


And here's the schematic that I worked out for it.


Ignore the thermal fuse and the MOV for now, and note that the LED with a current limiting resistor is directly across the AC line. There's no reverse diode across the LED. Everything I've read about powering LEDs from the AC line says that you're not supposed to do it that way, but there it is and it works and it has the CSA's blessing.

So, the LED's reverse breakdown voltage must be up to the task; that's the only explanation. And looking into the matter a bit, that's what I found. If you google "led reverse voltage", you'll find some threads that  reveal that led reverse breakdown voltage is commonly well in excess of the 5V figure that most LED data sheets give.

So there you have it -- powering an LED directly from the AC line is actually a cinch. All that's needed is an appropriate value of current limiting resistor.

Notes On The Schematic
  • The MOV (Metal Oxide Varistor) provides transient ('surge') suppression. Power bars that claim 'surge suppression' all have an MOV in them. That's what their surge suppression consists of -- a single MOV.
  • The thermal fuse is there to protect against catastrophic MOV failure. A huge overvoltage surge could conceivably cause an MOV to flame out, hence the nearby thermal fuse.
# # #


# # #








Friday, January 26, 2018

Tool Review -- Weller SP25N Soldering Iron


I've been resurrecting my interest in electronics lately, and that's led me to shop around for a soldering iron suitable for kit assembly work and the like. I was looking for something affordable -- industrial quality soldering gear is pretty pricey.

At the Home Depot, I found a Weller item that looked promising. It's Weller's SP25NCN. (I think the 'CN' suffix indicates that it's the Canadian market version. The basic model number is SP25N.) Here's a view of the iron plugged in with its 'headlights' on.


(I'll reserve judgement on the efficacy of the LED lighting.)

The tool is well thought out and comfortable to use. The 25 watt heater is entirely adequate for most electronics work. (The screw-in tip, P/N MT1, has a 10-24 thread.)

Something that surprised and disappointed me, though, was the life span of the conical tip. After only a few hours of use, tip erosion was severe. It doesn't photograph all that well, but here's a view of the eroded tip.


It's as though the tip has been evaporating. That really surprised me, because I have long experience with Weller's industrial soldering tools, and I'm accustomed to Weller's soldering tips being robust, long-lasting items. I certainly wasn't expecting short tip life from a Weller product.

Anyway, I wrote to Weller about it, and they've promised to send me a replacement tip. I'll see how that one holds up. Maybe the tip that came with my SP25N was just a fluke defective one.

- - -

An Observation On Tip Configuration

I find that the conical tip shape is less than ideal for fine work. It seems to me that molten solder wants to migrate up away from the fine, conical point of the tip, which kind of defeats the purpose. A better configuration in my experience is a chisel shape, like on this ancient Ungar miniature 'tiplet', photographed next to the SP25N's tip.


The chisel-shaped tiplet tends to accumulate molten solder right where it's needed.

The Ungar firm is no longer with us. I think it was acquired by Weller, and its excellent low-end line of soldering irons and tips was discontinued. That's a shame, because Ungar's low-end product line was good, affordable gear. I still have a very few of their 1/8" screw-in tiplets, and that led me to ponder how I might put them to good use. I came up with a way to do it.

Modifying The Weller SP25N For Undersize Tips

I drilled and tapped the barrel of the SP25N to accept a 6-32 setscrew, and that gave me a soldering iron that takes the old Ungar 1/8" tips, like so.


I've certainly voided the soldering iron's warranty, and I doubt that Weller would approve, but the arrangement works nicely. One could even use a piece of 12 or 14 AWG solid copper wire as a tip.

So now I can have the use of my old Ungar tiplets, and whatever other undersize tips I might come across.

* * *

Update -- THURSDAY, FEBRUARY 8, 2018

UPS brought me two MT1 tips today, graciously provided by Weller as warranty replacements. It will be interesting to see how they hold up.

# # #


# # #