Translate

Sunday 5 February 2017

Arduino PPM monitoring and switching.

I got involved with the local hospital radio station back in 2000, as station engineer. Been there ever since.

Now the station's studio used to be in a rather damp basement of a building built in about 1860. The hospital have decided to sell the building, so the station was evicted. They found us some nice new accommodation in a nice new building, and built us a super studio. All we had to do was move the kit and get it back on the air.


 The old studio used an undocumented "TX bay" rack to route the signals from 2 separate control studios and one presenter booth to the broadcast output. One studio would be live, and one for rehearsal/production.

Now we had one studio, so a lot of the switching could be eliminated. We would still need a rehearsal solution though.

This is the old TX bay, now minus it's switching and compressors etc... It was designed and built in the early 80's by person or persons unknown. It had a propensity to blow logic and transistor arrays up with the slightest hint of a rumble of thunder within a 100 mile radius! I shan't really miss it!



So, the desk was moved, and a nice new rack donated to house all the broadcast gear!

After a long day, the thing is back on the air!
















I built up a new headphone distribution amplifier, using 5 Class-D PM8403 amplifiers, wired for mono. A note here, the PAM8403 does not allow you to tie the -ve speaker outputs together for stereo headphone operation! The station is mono anyway, so it doesn't matter!










Completed headphone distribution amplifier.









Looking all quite nice and professional...


 


... but there's no method of switching the studio into rehearsal mode, and the PPM monitoring (allowing the operator to set her or his levels before going live) was lashed up using an old box donated by my good friend Piers at Raycom.

So... we need a small box, that will allow the following...

PPM level display from the monitor output from the mixing desk.
Switching to allow the desk output to be disconnected from the transmitter feed, and switch in the output from the 24 hour play out computer, to allow rehearsal mode.
Drive the "MIC LIVE" red lights.

So... after a bit of head scratching ....



Now the studio uses professional level, balanced audio (mostly). The output from the 24 hour playout system isn't. This is fed into the box, and it's turned into a balanced signal by IC5, and IC6A. There's a bit of amplification there too, to take the level up match the rest of the studio. This signal is fed back out to it's own fader on the desk, to allow for a seamless transition between live and rehearse.
In rehearsal mode, this signal is also fed straight out to the transmitter feed.
The live/ rehearsal switching is carried out by the microcontroller, controlling relay K1
In "live" mode, the signal from the desk is routed straight from the desk to the transmitter feed.

The monitor signal is also sent to the box, and is unbalanced by IC6B, and fed to the analogue input of our microcontroller. R29 and R31 are used to give the signal a 2.5V off-set.

The "mic live" signal (18V active low) is connected from the desk, via an opto-coupler, to the micro, where it's inverted in the code, and used to control the Mic live output FET Q2.

You will notice there are two, quite separate power supplies. One supplies +/-15V for the audio stuff, and the other an unregulated +15V and a regulated 5V for the micro and switching duties. The grounds are only commoned at one location.

There's a couple of LEDs to indicate the rehearsal status, and for peak (overload) warning. A 20x4 LCD provides the same information, as well as Mic live status and the level monitoring...

Now the level display. I wanted something smooth, not just using whole character blocks...
So I've defined a bunch of single pixel wide special characters, which are written to the display on the fly.

I also wanted a slower responding "peak" display. This is implemented in a similar manner.

(When I refer to the Pin's here, it's the physical pin on the ATMEGA328 IC itself, NOT arduino pin numbers.)

The audio is sampled (in the void getSample) from the ADC 0 pin, 48 times. This provides the required 5mS delay to stop the meter flickering around wildly. The maximum value is taken, and centered around 512 (our 2.5V offset) and then converted into a log scale.
The bar graph level is then plotted.

If the peak level is exceeded, it's updated and plotted too. It decays 0.1dB every loop cycle. It's limited to -54.19 dB to prevent a divide by zero error!

The mic live signal is read in via pin 14 and inverted, and then output on pin 12, which causes the output FET Q2 to switch the LED lamps on.

The Live/Rehearsal switch is read, and used to start a timer, which provides debounce, and plots a bar graph to give the user some feedback that switching is about to occur. The switching is carried out at pin 16, which switches T1, and the relay.

The Mic live lamps themselves, are a 3W LED, and a simple LM317T constant current source set to about 500mA.

 Construction was on three boards, the display has the digital and switching board "piggybacked", the analogue stuff is kept separate, and the two power supplies are on the third board.

All the interconnecting signal and power supply connections are twisted where possible.














Mic-live lamps are simple....












... but effective, and much more energy efficient than the old 60 watt incandescent lamps!











I'm rather pleased with the look of the thing.

It was built up into a second hand case, which I put in the dishwasher and re-painted :)








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


There, the patients at two hospitals can enjoy some relaxing music and requests once more!

Here's the code:

Friday 3 February 2017

Harman Kardon PM660

Hamstall called by. I've got this 'arman Kardon, can you give it the once-over?



Yeah, why not.

It a nice early 80's integrated amplifier. Spec recons on about 80 watts per channel into 8 Ohms. No spec is given for power into 4 ohms. It's a completely discrete design. Not an op-amp in sight.



Nicely laid out...











A good-sized transformer and rectifiers... and plenty of smoothing caps.










10,000 uF , and there's 4 of 'em....













... and that "Sony" on//off switch .... (it all looks a bit Sony to be honest)











Super phono pre-amp, MC and MM....












... fitting with a smattering of ELNA "for audio" capacitors, so you know where your money went....











... and four position, front panel adjustable, capacitance loading for your odd-ball cartridge....


















Underneath reveals, well, not a lot really. 4 pairs of Toshiba 2SB775/2SD845 output transistors. Cleverly mounted through holes in the PCB, straight onto those gargantuan heatsinks....































Speaker wiring takes a bit of a long route home....











... and through some rather flimsy looking speaker select switches. I don't think I'd want to be switching speakers whilst playing....

























Two tape loops, two phono inputs (with short circuit plugs if you're not using one to keep the noise out), an aux and a tuner input....









So ... set the bias up (a blissfully easy procedure, thanks to a great service manual), a clean up of the pots and switches, all the caps look in great condition, and testing the ESR of a good few proves this to be the case.

The tuner indicator lamp is open-circuit...

Diminutive little lamp, so we'll replace it with a warm-white wide-angle LED...










The holder had to be drilled out slightly to enable the slightly fatter legs of the LED to pass through, and a 10K currently limiting resistor is fitted, to run the LED at a low ~1mA.









Not a bad colour match....

It plays effortlessly. I've no idea on it's output power as it easily over-ranges my audio wattmeter at 50 watts, with no sign of distress.

The phono stage is a delight. Nice and quiet.

Tone controls have a lot more range than is probably required...

There... another repair done...

Thursday 2 February 2017

Linn Axis (of evil) repair

Belated happy new year readers!

Been a really busy January, and I've not had much time in the workshop. I've completely moved a radio station for a charity, and it's been stressful! (more on that in a forthcoming post)

Anyway, Jon rang. A fine cycling chap from Bristol. Got an Linn Axis that won't run....

Can you take a look?

Yeah, why not...


It duly arrives sans platter and stylus.

I plug it in , and sure enough the motor just stutters... which is pretty usual for one of these.

The motor drive board will be faulty. Now there's much BS on the interwebs that these boards aren't repairable as "the programmable parts are no longer available" .... which is rubbish, as there aren't any.... someone's probably just trying to flog you an upgrade ... and Linn ownership is all about upgrades , right?

It's just a bunch of logic, and some op-amps...

This board is quite an early one, as it's got a ribbon cable to the speed/on/off switch which is soldered straight into the board...


So. Remove the sub platter and belt. Clean up the inevitable oil spill from the bearing. Now move the turntable to the edge of the bench, and remove the three large suspension screws holding the top plate to the rubber suspension mounts. If you're doing this with the arm attached, remove the cable strain relief first. Lift up the front edge of the top plate a bit and have a peep underneath. If your switch is attached by a coloured ribbon cable, then you'll need to pop the switch out, and slide it back inside. If it's a copper coloured flexi, (like Jon's below) just disconnect it from the motor drive board. Lift the top plate clear and put it out of reach of the cat.


Now remove the 6 small screws indicated by the red arrows, and the mains lead from the terminal block on the bottom right.

With a bit of jiggling, you should now be able to extract the board. You may need to squash one of the suspension mounts a bit to extract it.






Now change every last damn electrolytic on the board, even the high voltage ones.

Here's the shopping list:
2 x 33uF 350V axial
2 x 47uF 250V axial
2x 220uF 16V axial
7x 22uF 50V radial.





Now a word of warning.... this board is "live" when it's connected. So use an isolation transformer when doing any fault finding on it. With a bit of luck, you should now have a running board.. however, I have seen turntables with D2 & D3 open circuit, BR1 short circuit. A real head scratcher was one which intermittently blew fuses, which was one of the BUX85F output transistors!

Now if you switch the motor on without a platter and belt on, it will spin up, and then stall a few seconds later. This is usual. Once the platter is on, it should work fine.

.... of course Jon's wasn't going to be so easy, and also needed an LM324 quad op-amp replaced to finally restore operation....

I've seen forum posts saying just change the small caps....... change 'em all. These had been in there since 1989 and were shot away!











Once it's all happy, put the top plate back on, do up the suspension screws (not too tight) and replace the strain-relief on the tone arm wires and check the speed (you really need the top platter on when doing this)

Speed is adjusted using an INSULATED screw driver through two holes on the underside. They have bungs in them, you'll need to just pop those out, and replace them once happy.


Now Jon ... where's your stylus?

UPDATE March 2019! ...

Colin's just popped round with another Axis with a common problem after recapping .... motor spins backwards or not at all or just sits there vibrating. Usual causes are the two HEF4013 flip-flops hanging a line up. Change 'em both. They're just by the switch cable, and are U1 and U2.

Other frequent flyers are the two watty 15K resistors, R2 & R3. With these faulty, there won't be 35V across C5.

Have fun all!



Thursday 15 December 2016

It's an Arduino Christmas!

It's that time of the year again... and the workshop was bereft of Christmas decorations...

So something was quickly conjured up.

My colleagues, Laura and William, fashioned a cardboard christmas tree. Ryan wired up 6 LED's and some current limiting resistors up to the 6 "Analog in" ports on an Arduino board, and I wrote the world's shortest sketch...


void setup() {
DDRC = 0B00111111;
}
void loop() {
PORTC = int(random(63));
delay (10);
}

How's that?

Minimalist!

Monday 5 December 2016

The Mini 1275GT gets paint!

After a year of languishing in the garage again, I finally managed to find somewhere to paint it!

The story so far is here, here, and here.

Now, my friend Matt is building a drag racing car, and a while back I volunteered to do the electrical bits for him. I was happy to help. The car is insane. It's a Vauxhall Chevette, fitted with a 7.5 litre Chevrolet Big block motor !!!!

Rather you than me Matt!




Anyway, Matt very kindly offered the use of his painting skills and garage to paint the Mini.

So, I set to preparing the car in my garage...

First thing was to sort the awful bulkhead ...














... wet flatting the panels...





























































Julian lends a hand sorting out the repaired rear quarter...














Outside to blow all the dust off...










... and on the trailer to Matt's!








In double-quick time, Matt has painted the car in etch-primer...




































and then 2 coats of a white primer base coat, which is rubbed down with scotchbrite...





















Matt prepares the Jade green paint. It's the car's original colour....



















Matt expertly applies the first coat....





















































































































It was about this point that I started to feel a bit emotional... I blame it on the paint fumes ;)












After two coats, Matt is feeling rather proud of his great work, and justifiably so.

After allowing the paint to harden overnight, it's back on the trailer....









.... and home again... 












Now the paint must be wet flatted with very fine wet and dry paper, and polished up. I'm going to let the paint harden off for a few weeks....

Huge thanks go to my great friends, Matt and Julian, without whom I'd never be able to realise this dream....