Translate

Thursday 26 November 2015

Can't comment on my own blog!

Well, it turns out there's been a nasty bug on the site for a while, which means leaving comments, or replies to comments hasn't been working for many users (me included). It's beyond me ... it used to work, but I think I've sussed it now (or at least a work-a-round), thanks to http://makingamark.blogspot.co.uk/2012/09/do-you-have-problem-leaving-comments-on-Blogger-blogs.html.

It seems this problem has been around a long while. Fix it please google....

Until that happens, please enjoy the full-frame work-a-round.

Saturday 14 November 2015

Arduino 1.6 IDE issues.

Just downloaded Arduino 1.6 to find some of libraries, notably TIME don't compile properly, and throw errors. I used the library manager to update them, and it's still bad.

The trick here is to delete the offending library from your ..../arduino/libraries directory and re-load it using the library manager.

Hopefully this will stop any further issues...


Sunday 1 November 2015

A tale of two Bush TV22's.

Now, a few years back, I restored a 1951 Bush TV22 for my friend Colin.



I made a video at the time...


The Bush TV22 is a very common set, even now. They seem to crop up at regular intervals on eBay. It's a 9" TRF set, and had various modifications and different designs during it's long production run.

Now this set was used regularly until last year, when Colin rang to say it was acting up a bit, and could I take a look... sure.

And so it arrived. Poor line linearity and decreasing width as the set warmed up, over a period of 30 mins or so. Not good symptoms for a vintage television, as it's usually signs that the line output transformer is on it's way out, and good secondhand transformers are difficult to find, and new ones unobtainable.

That proved to be the cause with this set. Thankfully the Bush transformer is quite simple, and there's a marvelous chap called Ed, who can rewind the things. It's unusual to find a duff high voltage EHT winding in the Bush set, which is a blessing, as rewinding this part is not possible, So it's the primary and lower voltage secondaries that fail. Off to Ed it goes....

... Within a few days it returns, nicely rewound, and I reinstall it into the set .... the line stage warms up, and whistles strongly (a good sign). There's no glow from the EHT rectifier valve, and no EHT. I check the line stage from one end to the other. Nothing amiss... ???

I remove the transformer again, and perform a "ring" test. This is a basic test to ensure the transformer has no shorted turns. If it was the overwind, there's a few options open to me to create some EHT to drive the final anode of the CRT without using the overwind.

The ring test involves connecting the transformer to the square wave calibrator on your oscilloscope, at the end which is usually fed from the anode of the line output valve, and connecting the scope probe to the eht wiinding.

The ring test allows the transformer to oscillate. The more oscillations, the better the transformer.


That all looks great...











A duff transformer looks like this.. See the "ringing" stops well before the next cycle...










A few emails swap between myself and Ed. It appears the transformer for this set was very unusual in it's construction, and one Ed had seen before. Some of the windings appeared to have been wound "out of phase" with usual convention. Could this be the cause of the issue? I experimented by removing the EHT overwind, and slotting it back onto the transformer upside down. It worked after a fashion, but the EHT was still very low. Ed asked me to return the transformer to him for further investigation.



A few days elapsed, and the second rewind arrived back. Whilst the transformer was now functioning, the EHT was still low at around 4KV (it should be ~7.5KV), and there was terrible line fold-over which I couldn't get rid of...






To take the above picture, I needed more than the available 4KV, so I had previously purchased this little device from eBay...

Described as a DC 3V to 7KV 7000V Boost Step-up Power Module High-voltage Converter Generator, a useful addition to the armory of test gear. I wouldn't recommend shorting it out like the picture! Anyway, this provided some EHT to show the picture above.

Then lady luck smiled on me... and this set arrived as a gift. Apparently found on a tip! There's a small crack to the bakelite case, but it's almost invisible. I don't actually own one of these sets, so it was most welcome.


 Naked, and filthy!
 Line output stage cover removed ... and dusty!
 First things first, and hook up the Leader CRT-910A tube analyser to see if it's worth pursuing. If the CRT is bad, it won't be worth doing anything with.
The needle slowly swings into action ... and rises.... and rises ... 95%! I find this hard to believe, perhaps the analyser has developed a fault.... but checks on another tube show it's telling the truth!






So, I hatch a plan. Do a quick restore on the gifted set, in an attempt to prove the line output transformer. If it's OK, swap the transformer over to prove that the rewound transformer still has issues, or not, as the case may be ....

Now this model was later, and has a different receiver (or RF deck) than the one we are repairing, which is a pity, as I was just hoping to fix the top chassis, which contains the power supply, line and frame stages, and just swap out the working receiver from Colin's set... not to be.







So, our tube (CRT) is good, so first, remove the mains smoothing capacitor, and give it a few hours on the ole' Dreadnaught capacitor reformer... 















It takes a while, but comes up well...











Next up is to re-cap the frame stage. This is located on tag-strip on one side of the chassis. It's essential to do this before applying power, to avoid damaging the frame blocking oscillator transformer (Ed rewinds these too!)









Then to re-cap the underside of the main chassis. Anything with wax insulation will be faulty (if not now, within hours of first use) and electrically leaky, so they are evicted on sight. There are two located under the tag-strip, which needs careful removal.





 Whilst I'm doing this, I notice the line output transformer is different in appearance to the original in Colin's set. Thankfully this is simply a later revision, and the two are electrically identical.



A nicely dated capacitor shows the set was made late 1952.








Tag-strip with line output components re-capped. (There's one on the sound transformer to change yet! Can you spot it?)

















Then onto the receiver or RF deck...




 Half-way there!











And, once finished, on with some mains!



 EHT rises, and eventually settles on ~8KV
And, after some alignment issues with the front end of the RF Deck... pictures :)

Pictures were taken in a mirror...




The set isn't finished by a long-way, as there's much rubber insulated wiring that has degraded and become brittle, but it's proved a point.





 So the known good transformer is removed from the set, and an adaptor bracket is made, so we can mount it into Colin's set, as the two transformers are cosmetically different.

And Colin's set produces a good picture!









I check the resistances on all the windings, and between the windings on both transformers. They are identical... I measure the inductances on all the windings, both transformers measure the same. I have another word with Ed, and he asks me to send him both the known good transformer and the re-wound one. Ed finds the only difference between the transformers is the inter-winding capacitance. After a few test windings, Ed succeeds in making two transformers that measure identically.... and, sure enough I fit the freshly re-wound transformer back into Colin's set, and, with bated breath, switch on!

Results!

 Back in it's cabinet, and undergoing a soak test for a few hours!









Big thanks to Ed for his incredible diagnostic and re-winding skills, and thanks to Colin, for donating this lovely 20" Sony Widescreen..



Apparently there's a 16" too ... that would be nice ;)







Friday 23 October 2015

Radford SC2 Control unit & pre-amplifier.

Remember the nice Radford STA15 I did a couple of months ago? (You can check it out here) Well, this is it's matching control unit & pre-amp.


The four ECC83s (12AX7), all check out well within limits, and still nicely matched after years of service. Those main smoothing caps also still performing well, and needed very little in the way of reforming.
Very little wrong with this , except it was full of those Wima caps that tend to short circuit without warning. They'll have to go. There's also a few 50uF 6V electrolytics that are also in poor shape. Noisy switches and pots are taken care of with a little cleaning.






 It's owner was saying that the recording output lacked bass. Indeed, mainly due to one cathode bypass being open circuit, and the other reading 7uF of it's original 50uF. Note the brown discolouring round the end cap. Let's get to work....














Replacement caps...












... and finally re-united and playing nicely together once more.

Tuesday 20 October 2015

Weller soldering iron add-on.

Now I'm a great fan of the Weller TCP "Magnastat" iron; robust, simple, great parts availability. Yes, there are better irons out there, but these are usually available secondhand for peanuts.

They are available in various wattages, and I have two, both 50W, one with a nice fat screwdriver type tip, for valve stuff and tagstrip etc, and a slender one, for more delicate work.

The tip has a temperature rating stamped on it's base. This contains a special magnet, which loses it's magnetism at a certain temperature (known as Curie temperature). This magnetism is used to operate a magnetic switch (like a reed switch, but a little more robust) to switch the element on and off, which heats the tip.

As bench space is limited, I only use one power supply, and got sick and tired of pulling one iron plug out of the power supply, and plugging the other in when I wanted to switch between irons. What was needed was a switch box....

... then I got a bit geeky (well, there's a surprise!). Let's have an led on the box, to show when the iron is heating. Useful to know if the iron is up to temperature, or if a fault has occurred (occasionally the switch or element fail , see here ) , so I devised a simple circuit to put an LED on when the iron is drawing current.



Simple. When the iron is drawing current, there is a small voltage dropped across R1, which causes the op-amp IC1A to attempt to drive it's output to rail. Now the current flowing in R1 is obviously AC, so the output is a 50Hz (or 60Hz, depending on your mains) waveform, but it's enough to light a red LED. The power supply for the op-amp is a crude supply derived from the 24VAC from the weller PSU. It's half-wave rectified by D1, and D3 and R2 Clamp the voltage peaks to 5.1V. It's smoothed by C1.

It's crude, horrible but works!

Monday 19 October 2015

Car subwoofer filter.

This is a bit of a random one, left over from the start of the year, but I thought I'd put it up anyway.

I got a new car earlier in the year (well, new to me!). It has a very nice radio in it, and the speakers aren't bad. It has DAB, USB , Bluetooth, and, after a long while looking for the slot, no CD! It also lacks a line output or remote line to switch on my after market sub-woofer and amplifier, but it does have an unused speaker output, so I knocked up this:



Now the issue is, the output from most head units is bridge-tied load, to get a bit more power out. This leaves the speaker lines floating at half supply (6V) to chassis. Never ground a speaker wire!

This is OK though, as we can use this to trigger our remote line.

One side of our speaker is connected via R10, to the gate of a small FET (Q1), this, in turn switches on Q2, which supplies 12V to our remote line, to trigger our amplifier on.

IC1A gives us a low-current half-rail power supply, we can use to reference our audio to, as we can only "swing" our audio above the chassis 0V, rather than swinging both ways, as we don't have a negative supply rail.

The speaker is also connected to a pad, formed by R4 and R9, which lowers the audio voltage to something more suitable to drive our amplifier. IC1B is simply a unity gain non-inverting buffer amplifier, and this feeds an adjustable low-pass filter, formed by the dual-gang pot R14, R15, C7, C8 and C9 around IC1C. R15 is an output level adjust, and finally IC1D is the output amplifier, with a gain of 2 to make up for the loss in the filter. R19 is there just to limit current. C10 blocks the DC content of the output (remember it's swinging around 6V, rather than chassis) and R20 references the audio back to the chassis.

S1 is used to switch the phase if the sub makes the mid-bass sound incorrect. R11 is a 10 ohm load resistor. Some head unit amplifiers may not like being run unloaded, so it's there to give some load. You might not need it, and it will certainly do no harm to the head unit if it's not there. Add it if you need to, but make sure it's well rated to dissipate the required power.

Thursday 15 October 2015

Vintage test gear - Heathkit Harmonic Distortion Analyzer IM-5258

A quick description of the Heathkit Harmonic Distortion Analyzer (Analyser!)

Great bit of vintage 70's 80's test gear.

I've tried a couple of times in my life to build a THD analyser, before I gave in and just bought one... I think I'd be OK today, but I have a reliable instrument, so it saves me the grief!

It takes the input signal, a sine wave, and buffers it, matches it for voltage with it's own internal oscillator, then notches out the input signal. What then remains is the harmonic distortion and noise. Simple to say, a little more complex to put into practice.

The Q-factor of the notch filter must be high enough so it doesn't notch out the 2nd harmonic (or 3rd, 4th, 5th etc) , which at audio frequencies can be difficult to achieve. The resultant output needs to be measured with a high bandwidth AC RMS meter, sensitive to microvolts, which can also be a tall order!

It's also tricky to keep the whole thing from oscillating.

Thankfully, I picked up this:




It's all discrete, not an op-amp in sight, and just works! It's also auto-tuning, but you still need to set the range and adjust the notch, so I'm not sure how "auto" it really is!

So, when we're designing an oscillator or amplifier, we can check how much distortion it really is producing, and where in the frequency spectrum it is! Useful stuff....

Here's a quick video of the thing in action...




Saturday 10 October 2015

Arduino Mains Monitor with SIM900A GSM messaging.

Picture the scene... You're away on holiday, sunning yourself in Spain (or if you're Spanish, enjoying the damp weather in the UK !) ... and thousands of miles away, some spurious minor electrical niggle in your house causes the RCD circuit breaker to open. You return 10 days later to find the contents of your freezer oozing their way across the kitchen floor. Not nice... You reset the breaker, and the power comes back on, showing no faults.

It happens from time to time in my house. I've tested each circuit, and every appliance to try and find the cause of the random tripping. The fault is not visible on any of my insulation readings, but, nevertheless it does happen. Sometimes not for years.... frustrating!

So what can we do about it? Fix the fault would be the easiest thing to do, but it's eluding me. How about monitoring the mains, and sending me a message, so if it does trip, I can reset the power without issue? Good plan...

Now the disclaimer:

WARNING. Do NOT try this at home. This project deals with mains voltages. A shock from the mains will hurt and can easily be fatal. Work safely. Use an RCD. Disconnect from the mains before making any adjustments. 
RESPECT IT'S AUTHORITY

I will not, under any circumstances, accept any liability if you decide to re-create this project for yourself.


Now that's got that out of the way...

So, we have a plan. Measure the mains voltage (and why not frequency at the same time?), and act conditionally on it's failure. We also need to get it to send us a message. We're going to need some form of uninterruptable power supply, so when the mains does go off, our micro will still be running, and we've got power enough to send the message. Here's the circuit:


I'll go through it step by step...

Power comes in via a fuse to two transformers. TR1, is a mains to 15V transformer, and is used as our power supply. It feeds a bridge rectifier, B1 and C1 and C2 are used to smooth and decouple the resultant DC. The DC is fed via D2 to a 7805 regulator, which provides the 5V for the Arduino and the SIM900  module. So that's fairly straightforward. The 7805 in this instance is a 2A part, as the SIM900A does require a fair amount of current to function.

(You could, and it would be safer to do so, build this unit using two wall warts, one, with, say at 15VDC, 3A output to replace TR1 & B1, and a second, with AC output in place of TR2. That way, all the tricky and potentially dangerous stuff with the mains is eliminated)

The rectified DC from B1 is also fed to two LM317 voltage regulators in series. The first, IC1, is configured as a 100mA constant current source, this is then used to feed the second regulator, IC2, which is configured as a conventional voltage regulator, in this case, R3 is adjusted to provide around 14V. This forms a 100mA constant current charger, with maximum voltage of 14V, which we can use to charge G1, which is an old 12V NiMH battery I happened to have kicking about. It's got plenty of capacity left, so will do nicely as our back up battery. S3 is a battery diconnect switch. Useful for resetting. (Why didn't I use an LM200, as it is capable of both current and voltage regulation in one package, instead of two LM317's? Because I didn't have one!)

So, when the mains is present, our battery is being charged. In the event of mains failure, D2 will stop conducting, and the supply will be seamlessly taken over by the battery, supplying current to the 7805 via D1. D3 prevents current flowing back into the charging circuit. The battery voltage is also sampled at the mid-point of the potential divider, R11 and R12, and fed to the Arduino A1 pin. T2, between the reference pin of IC2 and ground, is used to switch off the charging circuit momentarily, so we can measure the battery voltage, and not just the output of the charger. It's controlled by the Arduino A2 pin, configured as a digital output.

OK, so that's power and back up power sorted, so what about measuring the mains? TR2 is a small (3VA) 18V mains transformer. This feeds another bridge rectifier, B2, and a small smoothing network, formed by C7. The voltage developed across C7 is fed to a potential divider formed by R5 and R4, and the resultant voltage fed to Arduino A0. This voltage will be directly proportional to the mains input voltage on the primary of T2.... or will it? Whilst I was experimenting, I noticed the measurement wasn't linear. Adding a bit of loading, in the form of R15 to the secondary helped matters no end, although it was accurate enough over the range required for this to be left out, if required.

Also coupled to the secondary is our frequency measuring network. The AC is fed via coupling capacitor C8 to the base of a BC547, T1. This provides a 5 volt 50 Hz signal to the input of IC4A (a Schmitt trigger hex interter), this will square our pulses up. The output of IC4a is fed via a low pass filter, formed by R8 and C9 to the input of IC4B, the output of which is connected to the Arduino pin D8. We'll use this to measure the frequency of the mains. Tie all of the unused inputs of IC4 to ground.

On to the micro side of things...

The LCD is wired to the Arduino in the time-honoured fashion, except for the cathode of the backlight, which isn't connected straight to ground, but to the collector of T3. This allows us to control the backlight, using A4 of the Arduino configured as a digital output. There's a momentary switch coupled to A3, which is used as a "push to transmit" function, and a toggle switch, S2, connected to pin A5, which is used to stop the SIM900 sending messages. R9 is the LCD's contrast control.

The SIMR pin on the SIM900 module is connected to the Arduino's hardware serial Tx pin, and the SIMT pin is connected to the Rx pin.

The software.....

We're going to need something to measure our frequency. I did initially use PulseIn , but it's not that accurate, so I switched to using the most excellent FreqMeasure library, available from https://www.pjrc.com/teensy/td_libs_FreqMeasure.html . Now this has a drawback. It uses Int 1, and this is in conflict with the software serial library, which is why the SIM900 is connected to the hardware serial port of the Arduino. The issue here is the hardware port is also where the inbuilt USB interface sends/receives data, so you'll need to disconnect the SIM900 from the arduino whilst uploading the sketch, or doing any serial debugging. You can use SoftwareSerial during development, but be prepared for some unusual responses from FreqMeasure!

Ok, so the sketch.

There's a rake of variables set at the start. The variables to watch are the mains tolerances, these will need to be set for your local mains (They're currently set for UK mains spec.)

  float MainsMinV = 216.2; // This sets the lower limit for the mains voltage. Change this to suit your local voltage limit
  float MainsMaxV= 253; // Maximum voltage limit
  float BatteryMin=11.2; // Battery low limit
  float MainsMinF=49.5; // Minimum allowable mains frequency limit, change to suit local power
  float MainsMaxF=50.5; // Maximum allowable mains frequency limit.

You will also need to change line 260 :
      Serial.println("AT + CMGS = \"+44xxxxxxxxxx\"");// recipient's mobile number, in international format
If your mains is not ~240v, you will also need to change the scaling factor in the software , line 286, so the voltage reads correctly. Currently the mains voltage is scaled so 250V is equal to 5V at our micro. If, say, you're on 120V mains, and want the voltage to top out at , say 130V, then the scaling will be 130/5 = 26. It's currently set to 51, so 5V on our analogue port reads as 255V :
  ACVoltage = (sensorValue * (5.0 / 1023.0))*51;

Adjust R4 to get the mains calibration correct.

So, here's the complete sketch:


If you're using a SIM900A module outside of Asia, you may run into difficulties, as I did. There's some brief notes I made here : http://andydoz.blogspot.co.uk/2015/10/sim900-and-sim900a-module-signal.html and a link to a website which contains detailed instructions on sorting out the firmware to make the unit work.
Here's some pictures of my unit:



BTW. Sainsbury's is my service provider!









Electrical Safety is paramount. Here is the incoming mains earth (ground) securely tied to the chassis of my metal case.