Search This Blog

Friday, 26 May 2017

Ermine Moth



I notice that there are a few places along my route to work where the hedge is festooned with what looks like spiders web.
A closer look reveals that the culprit is not a spider, but lots of caterpillars.
This last happened in May 2011 (I still have the photos I took then!), and a bit of research then revealed that these are ermine moth caterpillars, and their host plant, is the spindle tree.
On the Wikipedia page there is a picture of the moth, but I have never knowingly seen one of the adults.  https://en.wikipedia.org/wiki/Yponomeuta_cagnagella








The plant has been completely stripped of leaves, but in 2011 the bare twigs sprouted new leaves after the caterpillars had gone. It can't do the spindle tree much good, but it does seem to recover. So I hope it will do so again this year. I notice that the parts of the hedge which are affected are all close to telegraph poles - not sure if that is coincidence.

Since I travel this route almost every day, I think I would have noticed if there had been similar tents in the hedge between 2011 and 2017, but I don't recall seeing any. So that raises the question is this a regular event occurring every six years? or is it just the climatic conditions have been ideal for the caterpillars? At the moment ... we just don't know ...
73
Hugh M0WYE










Wednesday, 3 May 2017

Bass Pedalboard Microswitches

A bit more on the bass pedalboard project.
I tried some different switches ...

I found the smallest ones were the best. They are the quietest in operation.
They are arranged in pairs. The idea is to try and use velocity sensing - the harder the pedal is played the less time between the switch closures. That's the theory ....











In practice I found it quite hard to match the pedals, as the exact point at which the contacts close depend on the spacing of the pedal and positioning of the switch. my woodwork may not be good enough for this!
 Here's a very slow pedal press, at 130mS long gap between the two switches closing.
 Here's the fastest I could do by really stomping on it ... about 1mS. But here you can start to see the "switch-bounce". I will filter that out, but it may be hard to separate the "bounce" from the "stomp" at these short times.
Here's a medium sort of pedal press at about 15mS. There is a distinct logaraithmicness to the range of times I was getting. it will be a bit of a challenge to get the software to measure these times with out delaying the note-on command appreciably.







73
Hugh M0WYE

Emergency Light Power Consumption

I was given a couple of emergency lights which were being taken out of service because the batteries had deteriorated.

Emergency Light

I wondered about installing one above the stairs in my home, as it would be a useful safety feature in the event of a power cut. But how much power does one of these things use?





Manufacturer's Label - Spel
The "ratings plate" gave no indication. The 8 Watts referred to is the power of the fluorescent lamp - but that only runs when the mains power is off. There is no indication of how much power is used from the mains to charge the batteries.



Plug-in Power Meter
I decided to measure it using one of those plug-in mains power meters. And was alarmed to see a figure of 40 Watts displayed. Now later I realised that there was a very small decimal point in between the digits and the actual level is more like 3.5 or 4.0 Watts! But even that is still a significant amount of power when the device is on 24 hours a day, 7 days a week. It works out at 35 kilowatt hours each year - or a few pounds-worth of electricity.


Some of my colleagues suggested that the charge circuit would probably shut off once the batteries were charged, so then the consumption would drop. I took a look inside the case, but the circuit looked suspiciously simple - so how does it work?
 There is a mains transformer, and a watty resistor (R1). There is another, smaller transformer and some components that probably form a invertor circuit to light the fluorescent lamp. But there is very little in the way of logic circuitry - and the relay RL1 is conspicuous by it's absence!
Circuit Board
So after a few hours of work with a magnifying glass, and a resistance meter I worked out the circuit is as shown below.

Circuit Diagram
The mains comes into the mains transformer and passes through a bridge rectifier. The supply at this point measures about 10.3 Volts. The charge circuit is really simple: There is a 50 ohm wire-wound resistor which limits the current into the 3.6 Volt battery. There is a red LED across the 50 ohm resistor, which lights up to indicate that there is Voltage being dropped across the resistor, and hence current flowing into the battery. With 3.6V across the battery, there is 6.7 Volts across the resistor - using ohms law, the charge current works out to be about 134mA. With fully charged NiCds the battery Voltage will rise a little, but the charge current is unlikely to be less than 120mA. So the charge circuit consumes about 1.3 Watts all the time - even when the batteries are fully charged. 

The rest of the circuit uses very little power because TR2 is switched off during charging. The zener diode, ZD1, measures about 7.5 Volts, so with a 10.3 Volt supply, the base of TR1 has about 2.5V on it and will therefore conduct from collector to emitter - that, in turn, pulls the base of TR2 low and switches it off.

When the mains supply goes off, no current flows back into the transformer because of the bridge rectifier, but the supply Voltage drops to 3.6V, and this is much less than the zener Voltage so TR1 turns off, TR2 turns on, and the power oscillator, formed around the two BCU81 transistors and a rather complicated little transformer, springs into life.

So I worked out that the charge circuit uses about 1.3 Watts, and yet the measured power consumption was 3.5 Watts. How so? The rest of the power must be wasted in the mains transformer, which does get quite warm to the touch after it has been on for a while. Indeed the whole metal case of the lamp feels warm - which also suggests that there is some wasted power. Many buildings have a considerable number of these emergency lights. 
Battery Labelling
I would like to think that more modern designs with LED lights would use less power, but the figure is seldom quoted in advertising or in catalogues. If the charge circuit were made to shut off when the batteries were charged, then other battery technologies could be used, such as NiMh or Lithium Ion - Nickel Cadmium cells are one of the few types which can be continuously charged in this way.

73
Hugh M0WYE



Monday, 23 January 2017

Bass Pedalboard

Playing the guitar a little bit, I have often looked enviously at the pedal-boards fitted to pipe and electric organs which allow the musician to add bass notes to the music, while keeping the hands free for twiddly bits. Why not do the same for guitar?

Years ago Maplin used to sell electric organ parts, including a pedal-board, which is sadly no longer available. I suppose one could buy a junk instrument and repurpose the pedals, but rather than base the design on 13 note octave, it might be best to work around the musical intervals. A simple three-chord song would use chords rising from the tonic, the fourth and the fifth. Add the relative minor on the 6th, a minor third and so on, and you could play the root notes of all the common chords with about eight pedals.

A simple mechanical arrangement is what is needed for home construction, I’m using the springiness of the plywood pedal as a natural spring, which makes the mechanics much simpler. The switches are released when the pedal is pressed down which makes it more robust, because the pressure of the foot doesn’t bear on the switch mechanism.

The electronics is really simple. A PIC microcontroller looks at the pedal switches and sends appropriate MIDI signals out on the serial port to play a synth, or digital piano. There are a pair of switches on each pedal so that I can make it velocity sensitive – that way I can play louder notes if I stamp harder.

 So here is a picture of the two pedal "prototype" I constructed to try out the mechanics of the switch. The circuit board is a prototyping board I bought from CPC, but more of that in a later post.
I have tried three types of switches. The ones shown are too “clicky” and make a lot of mechanical noise when attached to a wooden board. I have settled on some sub-miniature ones which are much smaller, and more demanding in terms of mounting, but are much quieter.








Hugh M0WYE

Wednesday, 27 July 2016

Snubbing the Nordfrost Freezer

We have a small chest freezer in the house. A Nordfrost one. We have had it many years, and it has been ok, but it has required a new thermostat as the contacts on the old one burned out. And every time the compressor shuts off, it interferes with the TV, causing a momentary jerk in the motion, or pixelation, or a slight glitch in the sound.

When an inductive load is switched off, the energy stored in the magnetic field (in this case in the windings of the motor) tries to keep the current flowing, developing a big voltage across the switch contacts and causing an arc. The arc is like a spark-gap transmitter and generates radio interference. The solution, it seemed to me, was to fit a "snubber circuit" which is a capacitor in series with a resistor wired across the thermostat contacts. The energy which would have caused the spark now flows into the capacitor and is dissipated in the resistor.


I measured the inductance of the compressor - 43mH. I also measured the current drawn by the motor - 0.66 Amps. Then I calculated the energy stored in the inductance, which is "a half L I squared", or 0.5*L *I^2. There is a similar equation, "a half C V squared", (0.5C*V^2) for the energy stored in a capacitor, and I reasoned that I needed a capacitor to store about the same energy as was in the inductor. It worked out at 315nF. I had a couple of 220nF capacitors in the junk box. Importantly they were X2 rated capacitors (see the marking in the photo below) which are suitable for connecting directly across the mains.
These X2 metalised film capacitors are "self healing" - if the dielectric starts to break down the internal spark evaporates the metal on the plastic film and the area of broken-down dielectric is isolated. Some types of capacitor can fail with a big bang and a puff of smoke when the dielectric fails.

When I looked on the internet there was a lot of stuff about designing snubbers for MOSFET circuits, and Switchmode powersupply circuits. They all said that the time constant of the C and the R needed to be about 10% of the "on time". Not sure how that relates to a thermostat, but the mains frequency is 50Hz, and so each cycle is 0.02 Sec. The time constant of my 220nF cap with a 10k resistor is about 0.002 Sec so I plumped for a 10k resistor. The time constant is calculated by multiplying the C by the R. And it is the time taken for the capacitor to discharge to about 30% of it's starting Voltage when discharging through the resistor. It probably doesn't matter much as long as there is some resistance to dissipate the energy.

When the motor is not running the snubber will have quite a lot of Voltage across it - most of the mains Voltage. A 220nF capacitor will pass quite a few milliamps at 240V. It is possible to work it out with phasor diagrams and power-factors and things, but I simply connected the circuit across the mains and measured the Voltage across the resistor - which was about 135V. Since power = V squared over R, that is about 1.8 Watts being dissipated in the resistor. In fact it will be less, because the motor is in series. At first I paralleled up 10 x 100k metal film resistors, but that is quite a fat bundle. I found it was better to series 10 x 1k resistors and cover them with heatshrinkable tubing. Each resistor is good for about 0.6W, so in theory my chain should be ok dissipating 6W, but it is good to have some margin of safety. The long thin arrangement dissipates the heat better. I put five on each leg of the capacitor.
So I had an arrangement like this:

The Nordfrost thermostat is mounted in a plastic box in the front of the cabinet, so it is quite easy to get at - there is also a fair amount of room inside the box to accommodate extra components. I used some of the "piggy-back" type 1/4" push-on connectors to connect the snubber circuit. Since these just crimp on to the wires there was no soldering to do. Here's a picture with the cover removed - there is rather a tangle of wires, but nothing is danger of shorting to anything else so it is ok!
So I installed the snubber this evening, and we have been watching TV. Here's the interesting thing. The interference when the freezer turns off has completely gone ... but ... there is sometimes a bit of picture disturbance when it turns ON !  Not sure what is going on there. I wonder if it is something to do with the PTC starter circuit on the compressor - which is an extra winding on the motor that is connected at switch on, but is disconnected by a "Positive Temperature Coefficient" resistor once the motor is running ... I need to think about this.

The other slight downside to the snubber circuit is an increase in power consumption - the result of having a small current flowing in the resistor when the motor is off - I guess it is about a Watt of electricity wasted during the off period of the freezer.

Perhaps an in-line RF filter might help with the TV interference.
At least the snubber should extend the life of the thermostat contacts.

73
Hugh




Monday, 13 June 2016

Simulating the FIlter in the Microphone

Having measured the values of the filter components in the Retevis Speaker-Mic, I thought it would be interesting to simulate the circuit and find out roughly what the cut-off frequency was.
I use the free simulation software from Linear Technology, called LTSpice. http://www.linear.com/solutions/ltspice
Here is the circuit ...
At this stage I used 50 Ohms for the input and output impedances, and got this nice curve:
The cut-off is surprisingly low at around 5Mhz but the attenuation at 433MHz is (in theory) 120dB.

However ... the input impedance is the input impedance of the audio input of the radio, modified by the long curly lead and jack plugs. The output impedance should match the input impedance of the electret condensor capsule. Both of these are unknown, and only really measurable with complicated test gear. But I know the capsule measures about 2000 ohms with a Digital Volt Meter, so I did another simulation using that impedance.



I also extended the lowest frequency down to 100 Hz to see what was happening in the audio range. It is very different. However the flat response up to 100kHz will still pass all the audio frequencies ok, and the filter still appears to offer significant attenuation in the UHF region.

The dashed line, by the way, is the phase response, using the scale on the right hand side. The solid line is the amplitude response using the decibel scale at left.

It would appear that the designers of the filter may have simply designed a 50 ohm impedance filter and hoped it would do the job.

Another thing I noticed when measuring the inductors on the board was how low the Q factor was. The meter said 0.031, with a series resistance of 0.186 ohms. It made me wonder whether the inductors were of the conventional kind, or whether they were the special EMI absorbing sort, like these from Wurth Electronics WE-CBF SMD EMI Suppression Ferrite Bead
I think these tend to be deliberately lossy to absorb the RF energy, while at the same time having a low d.c. resistance. There are no markings on the parts fitted on the board, so it is difficult to tell what they are. One would normally expect the Q factor of a surface mount inductor to be, say 30 - 40.

Still not sure what to put in my hands-free set-up!
73
Hugh



Saturday, 11 June 2016

Microphone and Speaker Connections for TYT MD380

Just over a week ago I bought a new radio, a TYT MD-380 DMR handheld. A new repeater, GB7AS has just opened, about 6 miles from here, and I am keen to access it because it has very good coverage in this area. Indeed, with the links to other repeaters in Kent it should provide opportunities to work many of the amateurs in the the Folkestone area that have been in the shadow of the North Downs for me here.

There is plenty of information about DMR on the Internet already ... although, later, I may blog a bit about using the programming software. I need to get to grips with it myself, first!  One of the things I wanted to do was to make a hands-free set up for the car so that I can take it mobile. However the manual contains no pin-out information for the microphone and speaker, and I couldn't find much about the subject on the web. The situation is complicated by the fact that the same sockets are used for a USB programming cable. So I thought I would write a bit about that here.

I decided to buy an inexpensive speaker mic for the radio, and use that to find out what the connections are. So I bought one of these: http://www.ebay.co.uk/itm/121920693163
It is a Retevis 2 Pin PTT Speaker Mic for TYT MD380 (and other radios).

Picture of it plugged into the radio at left.

The microphone is surprisingly small, but quite comfortable to use. The sound is even more thin and tinny than that from the radio, which already has a sharp and penetrating quality.

In the photo at left, just where my little finger is and where the cable enters the microphone body, is a socket to plug in an earphone. You can see this more clearly in the photograph of the circuit board below.

There is a useful clip on the back which partially obstructs the top screw, you need a well-fitting screwdriver to avoid slipping out of this.

The PTT button has a nice feel to it with a tactile click to let you know the contacts have closed.

After plugging in the speaker mic and checking that it basically seemed to work, I set about removing the screws from the back.

There are a further three screws to hold the circuit board to the moulding, and you need to be careful not to loose the little rubber pad which goes between the PTT lever and the button on the board.



Quite a nice PCB inside, with rather more components than I expected.

Tracing out the circuit, I can see that the surface mount capacitors and inductors are for filtering. Now this is interesting, because I have always taken the approach that you want to prevent RF from entering the microphone socket of the radio, but here the filter seems to be preventing RF from entering the Microphone capsule. Since all electret condesor mic capsules contain a little pre-amplifier (usually just a FET transistor), RF voltages picked up on the microphone cable could potentially demodulate in the microphone. The situation is made worse by the fact that the microphone is likely to be used in very close proximity to the aerial. I have traced out the circuit, but not yet measured all the values. The measurement of the L's and C's requires their removal from the board as the other components affect the reading on the meter.

The connections are helpfully marked on the PCB, so all that was required was a continuity test to find which part of the jack plug was connected to which wire in the microphone. The unused (tip of the 3.5mm plug and ring of the 2.5mm plug) are presumably for the USB programming connection.

I note, from the specifications in the radio handbook, that the audio output is 1W into 16 Ohms. I measured the d.c. resistance of the speaker to be 10 Ohms - suggesting probably IS a 16 Ohm part (The d.c. resistance of a speaker usually measures a little lower than the a.c. impedance, as the latter includes the inductive reactance of the voice coil).

At this stage, I am not sure whether to include the filter circuit in my hands-free set-up. In the car, the antenna is further away from the microphone, so the fields should be much less. I may just put some small capacitors across the mic and see how well it works.

The other question I need to mull over is whether to get hold of a 16 ohm loudspeaker, or to try using the 3 ohm speaker that I am currently using in the car. If a 16 ohm speaker is not available, I guess I could build myself a little audio amplifier - but that adds extra complexity and would need a 12V feed from an accessory socket in the car.

So that is the story so far. I hope my look at the audio connections might help you make useful accessories of your own.

73
Hugh M0WYE

Update 13/6/2016: I measured the component values in the filter circuit and added them to the circuit. Also corrected a slight mistake where the PTT button connects to ground.