That wasn’t in the (LMC555) datasheet :(

So I was making an one-off circuit to drive some things from an RPi and I needed a level shifter. Turns out that a CMOS 555 (on paper) looks like a pretty good bet if you need an ad-hoc solution with mild performance requirements. The TI LMC555 runs all the way down to 3V or so, and can source 100mA from the output. Being CMOS, the output goes more or less to the rails.

So far so good. The way to set it up is to power it off the high side, wire it in Schmitt trigger configuration (pin 6 to pin 2), and set the control voltage at 2/3 of the lower level. And that works just fine.

One problem, it seems that despite being specced to run off 3V, the current sourcing capability drops drastically under about 6V, to the point where at 5V it will only source about 12mA! That’s something of a pity because I needed those 100mA, or more than 12 at any rate, and annoyingly it doesn’t appear to be mentioned anywhere in the datasheet.

😦

On the other hand, I’m glad I bought those jellybeans a while back. I replaced the 555 with a high side PNP switch (a now discontinued BC638 in a small TO92 from one of those Maplin grab bags)  who’s base is driven from a chunky STP55 (a giant TO220) since the latter switches adequate current at only 1V. The 2N7000 is kind of marginal for getting the high base current required to get a low saturated Vce when driven from  3.3V.

So, mission accomplished, but I’m still annoyed about the serious derating. I’ll make a graph when I figure out how to get my scope to act as a data logger.

EDIT: That was way easier than I thought. You can save traces via rather awkward interface to a USB stick in the front panel. So, I set up a 555 to output high into a 10 Ohm load and cranked the supply voltage by hand, measuring the supply and drop across the load. And here’s the result:

The LMC555 hist 100mA at 12V compared to 3 for the LM555

Graph of output pin current into a 10 Ohm load against supply voltage

Well, turns out the LMC555 has a rather high output resistance. The bipolar LM555 on the other hand is a bit of a beast and will give tons of current if you don’t mind the quite high (over a volt) drop at the output.

Jellybeans

I’m low on parts and it’s time to restock. I’m after jellybean prototyping parts—generic ones without any surprising properties. The criteria are they are (a) reasonably cheap (b) available from RS, (c) through hole, (d) available in sensible quantities.

MOSFETS

High power

STMicroelectronics STP55NF06L. Excellent logic level (50A at 3V, over 1A at 2V, something down to 1V), 55A/60V. (about 20p)

Low power

On Semi 2N7000. Logicish level, (50mA at 3V, not much below that), 200mA, 7p.

No outstanding low switching voltage small MOSFETS seem to exist as jellybean parts.

OP-AMPS

OK so everyone says the 741 is too old school and there are opamps better across the board. They’re also 24p which while cheap is actually more expensive than rather better amps. And there are way cheaper ones too.

Super generic

Taiwan Semiconductor TS358CD, 1MHz mostly because it’s 6p. Worse than the 741 in most ways, but 6p! For 2! That’s 3p each! Also, single supply down to 3V. Stretching the definition of jellybean a bit, since it’s so low end, but they’re still going to be fine for basic stuff and if they’re rubbish, well I didn’t lose much. Also did I mention they’re 6p?

Standard voltage

Texas Instruments TIL081, 3MHz, normal voltage range, FET input (33p). A drop-in replacement for a 741, slightly pricier, but better in every single spec. Similar to the LF411 recommended by H&H, not quite as good apparently, but about a tenth of the price.

RRIO, low voltage

Microchip MCP6002-I/P, 1MHz,   1.8V, 100uA single supply, FET? input (1pA) (20p)

Fastish

Microchip MCP6291, 10MHz, 2.4V single supply,  1mA, RRIO, probably FET input (50pA) (35p).

Voltage Regulators

3.3v for things like bluetooth chips and other MCUs. 5V for obvious things and the 317 for everything else.

STMicroelectronics L78L33ACZ, 100mA (14p)

STMicroelectronics L7805CV-DG, 1.5A (9p)

Texas Instruments LM317KTC, 1.5A (15p)

555s

I’ve never tried any of these particular variety of 555s before, but how bad can they be, eh? 🙂 Also yes, I know that an arduino/MCU can do a better job of a timer, but 555s do a bunch of stuff plus there’s always the “what weird things can I do with a 555” game.

Texas Instruments LMC555CN/NOPB, CMOS, 3MHz (74p, kinda expensive for a jellybean, CMOS and fast!)

Texas Instruments NE555P (22p – that’s more like it! Bog standard 555)

 

louder, Louder, LOUDER! (or: more dead bugging)

Sometimes someone makes a chip to do just what you want.

I’ve recently been needing to generate beeps from a BLE113 module (it’s a CC2541) which runs off a CR2032 coin cell at a nominal 3V, but more like 2 to 2.5 in practice. The speaker of choice is a surface mount piezo sounder which are small (9mm square) and unlike the discs don’t require mounting on a sounding board to get sound out. I’ve not idea if those Murata ones are the best, but it’s a respectable brand and those are the first I found that seemed to meet the spec.

They’re not especially loud, only 65dB at 1.5V pk-pk. The microcontroller I’m using has 4 useful channels on timer 1 for this application, and of course the outputs are totem pole outputs. So, driving it with two PWM channels in opposition is driving it with an H bridge which gives the full 2-3V pk-pk swing (depending on the battery voltage).

That makes it little louder, but not an awful lot. The datasheet says that the sounders can be driven at up to 12V pk-pk without damage. The datasheet however merely notes that it is “probable” that increasing the voltage will increase the volume, which is a bit unhelpful, though it has a graph for one (not the one I want) showing an increase with voltage exactly as you’d expect.The question then is how to generate a higher voltage for the buzzer. I had lots of ideas:

    Boost / switched capacitor converter and another H bridge (impractical–too many components)A miniature transformer (none quite small enough or with the right turns ratio)A miniature autotransformer (closer, but still the same problem)Something cunning with an inductor—some sort of ad-hoc boost thing which generates spikes rather than a square wave. Idea not really fully formed.

None of them are really any good. They’re either require impractically large number of components, components that either don’t exist (or I can’t find) or are vague and ill formed and I don’t have the parts to test the idea and anyway I’d probably end up busting up the chip with voltage spikes.

Fortunately it appears that someone thought of this already. It turns out the PAM8904 already does exactly this. It’s a switched capacitor converter with an H bridge, that takes a digital signal in, precisely for the application of driving piezo sounders from low power microcontrollers. Which is nice.

Except I’m not very trusting, and I’ve no idea if it’s worth the effort. I don’t want to order a circuit board and then fiddle around hand soldering QFNs (I’ve seen it done, I’d rather use a stencil) for a one off test. Like so many chips, it’s QFN only now. So the obvious thing to do is to buy one and deadbug it.

I figured I’d try the nice fine hookup wire I’ve got. The colours make it a bit easier to follow which wire is which. Next time, I’d try the same soldering job with enamelled wire. It’s harder to strip and tin, but the insulation doesn’t get in the way. The key to getting the soldering to work in the end was to tape down the wires with masking tape (3M blue tape) as I went along. Even with that it’s two steps forward, one back as you accidentally desolder wires when trying to attach new ones. Here it is!

IMG_20160728_180707IMG_20160728_185724.

(OK, not as good as this, or this, or this—hey that socket is a really nice idea!)

Spot the schoolboy error? I remembered to check continuity between neighbouring pins, but I forgot to pot it or otherwise protect the wires and so some of them fell off when I tried to change the boost voltage selection. And then another 4 wires fell off when I was taking it out. The connection area is tiny and the solder work is frankly not that good, so the joints are amazingly fragile. It’s what I should have done first time, doubly so because the bits of stiff wire for the breadboard really get in the way.

IMG_20160729_134402IMG_20160729_135338

Well, it seems to operate correctly, but I think I’d do it differently next time. A chip socket or veroboard with .1″ header soldered in is a much better choice than flying wires. Potting makes it as robust, but you have to pot it before you know it works.

It’s always a bit hard to tell volume because ears have a logarithmic response and at 4kHz the sound is quite directional. Nonetheless it’s noticeably louder. Yay 🙂

 

 

Good job, TI, I half mean that

I was a little surprised today when trying to debug a board when one of the output voltages was 4.8 V. The main reason for the surprise is that the power supply is specced at 3.3V. And I didn’t make the supply, Texas Instruments did. In fact it’s one of these.

IMG_20160711_182949

Checking the manual reveals that TI do indeed claim that it’s supposed to output 3.3V. Time to find the regulator! There’s no continuity between USB power and the output so it’s not a short. Poking around on likely looking chips quickly reveals that the regulator is OUCH THAT SUCKER IS BOILING HOT! this one:

IMG_20160711_180224.jpg

And has the markings in very small “PHUI”. I got a far as googling “PHUI v” before it autocompleted to “PHUI voltage regulator”, so I guessed I was on the right track :). Not very further down the track the TI TPS730 datasheet crops up showing it’s a TPS73033, which is a 3.3V LDO regulator rated to 200mA. And did I mention it’s baking? It seems to be fried in a rather unfortunate mode (and just for good measure, the NR pin which ought to be at 1.22V is at 0.14). Also, it turns out that the entire circuit diagram was in the manual, so there was no need for that bit of minor sleuthing.

So why good job TI? Well, the other, much more important chips, such as the micro controller I’m programming are rated to 3.9V absolute maximum and it didn’t die with 4.8V across it. I’m pretty pleased about that, because I can imagine going round a cycle frying many chips before finding out the power supply was defective. :shudder: :(.

Well anyway, it’s fried and I can’t use it. I mean technically I’ve successfully programmed the chip and not fried anything as far as I know, but there’s another as yet untested chip on the board rated to only 4.8V absolute maximum. I can’t trust it, so I can’t use it and so as far as I care it’s broken.

And that means I’m free! This guy has a great philosophy which is that if something is broken then there’s no risk of breaking it so you may as well try to fix it. Fortunately, I have some old boards which I’m not currently using which have ST Microelectronics L78L33 SO-8 voltage regulators on them. They’re not LDO so getting 3.3V from 5V is a bit dubious and actually is not quite within spec, but whatever, both my chip and the one in the programmer (a CC2511) work all the way down to 2V, so I reckon that is won’t matter. Also, it’s only rated for 100mA, not 200mA like the original, but both the chips are low power wireless ones so I doubt the current will go too high even when it’s programming. And besides that won’t be for long.

Time to dead bug it! And pot it in hot melt!

IMG_20160711_182349IMG_20160711_182651

And it works! 😎

The LED perhaps to the surprise of no one is dimmer than before and the output voltage is 3.2V which is in fact well within spec for the 7833.

 

Comb filters

I’m currently making some sensitive analog electronics. It’s going to be used in relatively uncontrolled environments and so bits of mains hum sometimes creeps in. The mains is only approximately sinusoidal and so as well as the fundamental at 50Hz, there’s also significant energy in the harmonics at 100Hz, 150Hz and etc.

Digital filters provide a nice way to remove this with a comb filter, so called since it has a comb of equally spaced notches in frequency, so one filter will remove all the harmonics. The basic filter looks like this:

y[t] = x[y] - x[t-k]

Intuitively if you have a frequency component which is exactly k samples long, then the first and second part of the equation will be perfectly in phase since they’re one complete cycle apart and so by subtracting them, that component is removed. The same reasoning applies if there are two, three or more complete cycles in the k steps, so all those components get removed too.

That also applies if there are exactly 0 cycles too, so this filter removes DC.

If you don’t want to remove DC, you can replace the – with a +. The same logic applies, but to integer + half number of cycles instead of full cycles, so that they’re perfectly out of phase.

The derivation of the frequency response is fairly straightforward. Taking Z transforms gives.

H(z) = \frac{Y(z)}{X(z)} = 1 + z^{-k}

Substituting z = e^{j\Omega} and computing the magnitude |H(z)| gives:

\begin{matrix} |H(z)| & = & \sqrt{(1 + e^{j\Omega k})(1 + e^{-j\Omega k})} \\ & = & \sqrt{2 - 2 \cos \Omega k}\hfill \end{matrix}

This gives nulls at a normalised frequency of \Omega k = 0, 2\pi, 4\pi, .... The actual frequency is given by \Omega = 2 \pi f T where T is the sample period, and that gives a fundamental frequency of \frac{1}{kT}. Just to keep it concrete, I’m going to use a sample frequency of 900Hz, and a lag of k=18 giving a filter at 50Hz. Change it to k=15 for a 60Hz filter.

The result is here:

comb-1

Note, just for fun and verification, as well as the theoretical filter response, I’ve plotted the power spectrum of the time domain filter applied to a signal. To make it look nice, the signal needs to be somewhat spectrally flat, so I made a flat spectrum (with a little added noise in the magnitude) and uniform random phase and took the inverse FFT to get the signal.

And back to the filter. While it works, it’s not really very good. The notch is narrow and it affects almost all of the signal, whether near to the notch or not. The problem is that it’s a first order filter. Want to bet that chucking in some higher order terms makes a better filter? How about:

y[t] = x[y] - \frac{1}{2}x[t-k] - \frac{1}{2}x[t-2k]

And the results are:

comb-2

Well that’s promising :). We’ve got sharper notches and a flatter response in the passband (juuust about). So, what’s really going on? If we take a filter like:

H(z) = a z + bz^{-1} + cz^{-2} + dz^{-3}

and crunch through the magnitude of the response, we get:

|H| = \sqrt{\alpha + \beta \cos \Omega + \gamma \cos 2\Omega + \delta \cos 3\Omega}
where:
\begin{matrix} \alpha & = a^2 &+ & b^2 &+& c^2 &+ &d^2 \\ \beta & = ab &+ & bc &+ & cd \\ \gamma & = ac &+ & bd \\ \delta & = ad \end{matrix}

(the general case follows the obvious pattern above). The result is the square root of a Fourier series (in frequency space). In order to get a filter to do just what we want, all we have to do is figure out what we want, square it, compute it’s Fourier series and, er… figure out how to invert the system of polynomial equations above… do that and by the end we ought to have a custom filter.

Trouble is, that’s rather hard :(.

Fortunately this is yet another case where Downhill Simplex saves a huge amount of work.

Aside: I love this algorithm: it has saved me a huge amount of work over the years! It’s a derivative free, unconstrained optimizer. It won’t win any prizes for speed, it’s sensitive to parameter scales and it can quite easily get stuck off a minimum, but in a lot of cases, you can just chuck in a function and let it rip, without messing around with derivatives. It’s fminunc in Octave (or MATLAB), and DownhillSimplex in TooN.

In order to turn it into an optimization problem, we first design the filter in frequency space, then make an error function where the error is the deviation of some sort between the response with a given set of weights and the designed filter. The optimizer then adjusts the weight to minimize the error.

The obvious formulation is simply least squares. However, we can get more flexible very easily. We can rate some areas as more important than others if we like (for example if performance within the notch is more important than in the passband), and we can use the absolute deviation to some power. As the power gets large, the algorithm will tend to minimize the worst case deviation. Note however that Downhill Simplex starts to peter out in its ability to optimize once powers get too large (around 8 or so). The code is pretty straightforward (only tested in Octave):


%The filter is designed by providing a target function on [0, pi).
%Since the filter has only cosines, this is reflected around 0, then
%repeated ad-nauseum
omega=[0:0.01:pi];

%Let the target function start at zero, then step up to 1, but with the
%step being a fragment of some function to make things smoother. Sharper transistions
%lead to larger Gibbs overshoots
%
%Note notches with a slow start (e.g. raised cosine, start > 0) require high order terms
%as features the width of the start region are required, and that's narrow. Ones that ramp
%linearly are very easy as it's very easy to force the functio to be 0 at 0.
width = 0.3;
start = 0.1;
target = ones(size(omega));
ind = find( (omega < width + start) & (omega > start));
target(ind) = .5 - .5 * cos((omega(ind)-start) / width * pi);    %Raised cosine section
%target(ind) = (omega(ind)-start) / width;                         %Straight line
target(find(omega<=start))=0;

% Set the relative importance for different regions. This allows you to trade
% accurace in one region off against another. In this case heavily weight the zero
% part of the the function (i.e. the notch)
importance = ones(size(omega));
importance(find(omega<=start))=10000000;

%Set the number of terms (this is 1 + the order)
n = 40;

% These are the absolute value of the transfer function for
% a filter with the Z transform of:
%       ___
%       \        -i k
% H(z) = >   w  z
%       /__   i
%        i
%
% with a lag of k.

func = @(x, weights)  (abs(exp(j*x'*[0:length(weights)-1]) * weights'))';
phase = @(x, weights)  (arg(exp(j*x'*[0:length(weights)-1]) * weights'))';

%Starting parameters.
%
%Note, I'm interested in designing filters which have the coefficient of
%z positive and all powers have negative coefficients. This is required for
%filters which have f(0) = 0, and importantly, doubles the frequency of a given
%lag, meaning you double the lag size for the same frequency. This gives more
%flexibility with a low sample rate at the penalty of filtering out DC.
%
%So, choose some starting weights that (emperically) do very roughkly the
%right thing, and scale them so the initial function is about the same scale
%as the target function.
weights = [1 -1./ 2.^[1:n-1] ];   %Decay of weights
weights(2:end) = -weights(2:end) / sum(weights(2:end)); %Notch at zero
weights = weights / max(func(omega, weights)') * max(target); % Scale

%Choose an error function which minimizes the sum of some function of the
%absolute deviation, but weighted by the relative importance.
err = @(w) sum((abs((func(omega, w) - target)) .^6).*importance );

%Do the optimization.
wnew = fminunc(err, weights);

We can now get fancy and design custom high order filters. For example we can widen the notch so it has a notch region, but still has steep sides, and require that the filter has good rejection within the notch region and try to reduce the overall worst case deviation. This would help if the inteference is amplitude modulated (i.e. gets better and worse as the person moves), which would cause spreading of the frequencies.

For example here’s a 39th order, 50 Hz comb filter with a widened notch, just because we can. The first graph shows how well the optimized filter matches the design I’ve given it:

comb-3

And here’s what it looks like over the spectrum:

comb-4

Note the 50dB rejection in the entire notch region, the steep transition and the flat passband.

Just for completeness, the weights are (starting at a lag of 0):


  6.9255e-01
 -5.0611e-01
 -3.1259e-01
 -1.6371e-01
 -5.5549e-02
  1.7559e-02
  6.3697e-02
  8.7947e-02
  9.3523e-02
  8.6793e-02
  7.2796e-02
  5.3985e-02
  3.2915e-02
  1.2862e-02
 -4.8328e-03
 -1.9165e-02
 -2.9259e-02
 -3.4763e-02
 -3.6499e-02
 -3.4953e-02
 -3.0909e-02
 -2.5026e-02
 -1.8267e-02
 -1.1082e-02
 -4.1618e-03
  1.9620e-03
  6.5590e-03
  9.8330e-03
  1.1730e-02
  1.2231e-02
  1.1802e-02
  1.1500e-02
  1.0308e-02
  7.8142e-03
  5.8288e-03
  4.6363e-03
  1.8351e-03
 -8.7649e-04
 -3.1003e-03
 -1.8157e-02

They’re still quite large, showing that 39th order isn’t quite enough for the shape we’ve specified, depending on your level of obsessiveness over flatness and available computing power, but the graphs show it’s not bad.

Of course just because we’re filtering in the digital domain and can have filters with vast orders doesn’t mean that’s not overkill. And being essentially a Fourier domain process, all the usual caveats apply, such as sharp edges giving Gibbs overshoots and (with few exceptions—such as sharp notches), small features require very high order filters.

Nonetheless it works, and I it’s useful tool!

As usual: https://github.com/edrosten/filter_design

“100 μF” Capacitors

I have recently been designing and building circuits with very small (1206 and 0805) 100 μF capacitors. I got into a discussion about whether these are really up to spec or if they’re much, much lower. The reason for the discussion is graphs like this:

Changin in capacitance with voltage.

Schematic representation of change in capacitance with applied voltage. ( GFDL, Elcap, Jens Both (Frank Murmann at de.wikipedia https://commons.wikimedia.org/wiki/File:Delta-Cap-versus-Spannung-english.svg)

Actual data (from Murata, via Maxim) seems to be even less flattering for capacitors:


The problem is largest with the high value, small size capacitors as they’re restricted to the highest possible permittivity ceramics regardless of poor specifications in other areas.

So how bad is it really?

First, on to the test equipment. Here’s a picture of my trusty old capacitance meter measuring a nice, uncontroversial, high quality 47 μF metal can aluminium electrolytic capacitor, while also hooked up to my ‘scope.

IMG_20151124_144705

The meter specifies a maximum bias of 2.8V, but few details on whether this will b reached. It seems the bias is between about 0.6 and 2.4V with a mean of about 1.5.

And here are the values I get from the nominally 100 μF capacitors:

  • Samsung 1210, X5R, 6.3V, 20%: 72 μF
  • Murata 1206, X5R, 4V, 20%: 73 μF
  • Murata 0805, X5R, 4V 20%: 60 μF
  • Some random SMD ali electrolytic: 105 μF

The results are not all that great. As a saving grace, the capacitors are to buffer out the very high internal resistance of the CR2032 coin cell, and you need the most capacitance when the voltage of the cell is lowest, which is what you get. Nonetheless even at the lowest operable voltage (1.8V), the capacitors are still quite substantially below the nominal rating.

Still, they’re not as bad as I thought they might be from (1/5th of the value!) the Murata data. However the graphs look quite steep, so at the nominal cell voltage (3V), the capacitance might be more like 1/3rd of the rated value. Interestingly that would make the density almost exactly match the top end 0805 4 V, 33 μF tantalum capacitors.

I think for my application, it’s a net win (just about) for ceramics.

 

 

Hacking the “Double type 12000” vacuum pickup tool

A while back, I bought a vacuum pickup tool as such things promise to make SMD work easier than with tweezers. The pickup tool is circular which makes it easier to rotate in your fingers and it picks up from the top, so you can’t accidentally dip it in some of the solder paste making it sticky.

I bought one of the ubiquitous “Double type 12000” pickup tools off ebay. They’re cheap (£20 including shipping), and much like the 852D+ rework stations, they seem to come in a variety of brands which have nothing different except the label. If you like yellow, get the “VAC” brand one, but if you prefer pink, get the “Cosmo” brand one.

They comes with two suction ports, two pickup wands and a selection of tips and rubber suction cups.The wands are connected via transparent hosing which looks like that aquarium hose, but is rather thinner walled and much more flexible.

Double Type 12000 vacuum pickup tool

A slightly out of focus and badly lit picture of the tool in question.

I tried to use it it and… it sucks (sorry!) but isn’t very good. There’s a small hole on the pickup tool: cover it with a finger and you can pick up things. Uncover it and they drop off. There Are two problems with that. Firstly, I found it completely unintuitive, since the operation is “backwards”. I dare say you could get used to it with sufficient use. Secondly moving your finger disturbs the position slightly, so just as you release, the position goes bad, which is the worst time for it. As a result, I found it unusable and went back to tweezers.

HACK TIME!

Apparently the good ones operate off foot pedals, so it’s time to add foot pedal control to it. So, I got a foot switch and a couple of cheap solenoid valves and a T adapter off ebay. One claimed a working pressure of 0.02 to 0.8MPa, which seems a bit too high for this pump, the other had no specs. But they were only a couple of quid, so I figured, what the hell?

Aside: every time I buy some of these random goods from China off ebay I’m astonished that it’s worth someone’s time to manufacture a valve/footpedal, sell a single item, package it up and send it half way around the world for £2, when the manufacturer, vendor, ebay, creditcard processor and post office all need their cut in order to turn a profit. The efficiency of the system is mind boggling.

The idea is to connect the solenoid valve to the hose such that opening the valve exposes it to the atmosphere, killing the partial vacuum inside. So, I connected it all up (minus the foot pedal which is yet to arrive)…

Valve connected to the tool

Valve connected to the tool. Yep, the hose is bodged into that port with tape.

Oddly enough it kinda-sorta works. By powering off and on the solenoid, I can pick up/drop quite large things. However I can only pick up small things, I can’t drop them again. This implies the internal resistance of the valve is very high so that it lowers the pressure a bit, but not enough. Time to delve in and figure out why. Firstly the valves in question:

Tow very cheap valves

The two valves.

These valves are really very similar. The solenoid are almost identical, but not quite (one’s 12V, the other 24V as it happens), and the connection from the solenoid to the valve body have the same form factor, so they’re interchangeable.

IMG_20151112_193247 IMG_20151112_193303Guts of the valve

The valve itself is a simple,  cunning design. It has an internal rubber diaphragm with a rigid plastic backing that serves the dual purpose of acting as the switching component as well as sealing the two halves of the valve body together. The core of the solenoid is inside, the sealed part. One of the two valves has an additional spring (shown) holding the diaphragm down weakly, in addition to the spring weakly pushing the solenoid core out. Note the arrangement of the valve internals: the fluid enters from the right and exists from the left. There are also two very small holes in the diaphragm. The top of the solenoid core is squishy plastic and when off, the core seals the middle hole by pushing against it.

Now imagine there’s pressurised fluid coming from the right. This leaks into the top half of the valve and pressurises it. The outflow is at low pressure, so this pushes the diaphragm down, sealing the valve. Now the solenoid opens. This opens the middle hole and the fluid in the top chamber leaks into the outflow. The two holes are very small, so there will be a substantial pressure drop across them, meaning the top chamber now has half the pressure of the input fluid. Looking at the arrangement of the chambers in the bottom of the valve, this means that the high pressure fluid coming in will push the diaphragm up, allowing fluid to go from the entry to the exit.

This is a very cunning arrangement is essentially an amplifier because the solenoid is a bit weak on its own to do much. It also explains the behaviour seen above. The valve needs substantial pressure to operate. Not only that, it must always drop a fair bit of pressure across the body too, which means it also needs substantial flow rate. The pickup too has neither, but the leakage which happens when the valve is open lowers the pressure enough to drop large parts but not small ones.

The solution is to rebuild the valve to turn it into a needle valve which can operate at very low pressures and flow rates.

Rebuilding the valve

Rebuilding the valve.

First, I drilled out the central hole to about 2mm diameter to increase the air flow rate. I then put a 3mm shaft (back end of a drill bit) and filled the top with molten polycaprolacetone (low temperature thermoplastic). The 3mm shaft keeps the hole open, but it’s necessary to wet it with slightly soapy water (soap aids the wetting) so stop the plastic from sticking strongly to metal. I then removed the shaft and flared the opening of the hole. Flaring is important since the core can move side to side by around a millimetre and so it needs to be guided into the hole. I then pushed the solenoid core in gently, so that the top section of the hole matches the profile of the core perfectly. Removing the core, you can just see the lip on which it will rest inside the hole:

Rebuilt valve body

Rebuilt valve body. I initially used a pencil to try to flare the opening. The red stuff is the paint that the plastic pulled off the pencil.

It’s also necessary to then drill out the second hole so there’s somewhere for the air to go once it enters the top chamber. The result works extremely well. The solenoid valve can now e used to pick up/put down very large and very small parts without altering the speed of the pump. This indicates the air flow rate when open and sealing when closed are both very good.

The end result is it works pretty well. Once my foot switch arrives, it will be complete and usable.

Edit: Well, that blows!

While playing with, I observes something very interesting. When the valve is open the pickup tip actually blows air out of it! My complete speculation is that while the pump is sucking (it’s oscillatory), little air gets drawn in due to the high resistance. However, a lot of air gets pulled in the valve tube. This air has momentum, so when the internal valve on the pump closes and it stops sucking, then moving air has to go somewhere, and out of the end of the tip is the only option.

It’s very gentle (not enough to disturb SMD work), but it is an amazing effect, and probably will help the tool drop very light things even if they’re slightly sticky.

 

Edit 2: My foot pedal isn’t here yet 😦

Well, my foot switch still hasn’t arrived and I’ve done every part of the project I can without soldering up my circuit boards.

Foot switch hack.

The solution is one absolutely appalling hack. I made a foot switch out of a sponge with a hole cut out of it, some old circuit boards with a Prym 13mm snap button stud soldered to one, wires, and of course duct tape. It works fine since the 24V solenoid only draws 200mA at its rated voltage.

It’s horrible and looks like something I might have made in junior school. It does work and once compressed to the right depth is remarkable easy to control.

 

Edit 3: I tried it and it’s fantastic!

The new foot switch controlled pickup tool is a complete game changer compared to using tweezers. I had to solder a board full of closely packed 0402s and 0.5mm pitch DFNs. I couldn’t imagine doing it with tweezers.

Actually I can, and I’m REALLY glad I have this tool now.