Saturday, 19 May 2018

Synchronised Westerstrand Impulse clock driver.

A while ago, a friend, Alex, asked me how he could drive a synchronised clock he had procured.

It was a Westerstrand clock. The sort that you used to find in factories, offices and schools. It's an electo-mechanical driver, driving a conventional clock display. It doesn't posses any time keeping mechanism.

Now Westerstand are still alive, well and trading since 1906. Their website is here.

Anyway, according to some information gleaned from their website (they still make these things) the clock needs a pulse of 24 volts alternating in polarity to advance a minute. 

I quickly drew up a small circuit, with an arduino and a GPS receiver to drive Alex's clock.... he pronounced it too complicated, and removed his electro-mechnical movement and fitted a quartz clock movement .....

.... that's cheating.

I managed to procure the same clock movement in somewhat distressed condition, and managed to put it all back together.

So what about that proper driver? Good plan. I ditched the GPS receiver, as I have the GPS master clock, and added a 433 MHz receiver to receive the signals.

The clock will "free-run" after being set, using the 490Hz interrupt driven clock, as previously seen on the Arduino analogue clock.

Pulses are sent to the clock by using a small H-bridge.

Now the electronics has no method of knowing where the clock movement is, so before the synchronising signal from the GPS master clock is received, the clock needs to be set to 12 o'clock. I've added a minute and hour button to the PCB to allow the movement to be set.

The code also automatically adjusts for British summer time.

A board is designed...


... and turned into reality.

Code and eagle files can be found on my github page at

Here's a video of it in action...

Friday, 18 May 2018

More modifications to the Fellows A75 Laminator for toner transfer.

If you haven't seen the first bit of this ... click here.

Made quite a few boards with the laminator and toner transfer method recently, and results have generally ranged from acceptable to good.

There's the occasional fail, but I want to improve repeatability.

I've made some measurements of the temperature of the rollers, and it's temperature controlled at about 100 deg C, and sometimes, the board just doesn't get hot enough to melt the toner and cause it to transfer. We need to warm things up a bit....

I removed the PCB and reverse engineered enough of it to work out how the temperature control is done... IT'S IMPORTANT TO REMEMBER THIS CIRCUIT IS "LIVE" AT ALL TIMES, AS THERE'S NO TRANSFORMER. I used a mains isolation transformer whilst making measurements and working on this unit.

Mains comes in at JP1. Mains is dropped via a capacitive dropper C1 (R2 prevents the cap remaining charged up once the unit is unplugged, and removes a shock risk) R1 provides a bit of current limiting, D1 and D2 rectify the output, which is stabilised by ZD1, and C2 is used to smooth the supply. N3 is a 5 volt regulator, and C3 provides a reservoir for the 5v rail. The temp sensor looks like an ordinary 1N4148 diode.... it may well be. It's pressed up against the lower rubber roller. When it's at room temp, it's got about 4.2V across it. When it get up to temperature, there's about 2.4V across it. This is loaded by R32, and connected to the inverting input of N2 via R7, and back to ground (neural) via R8. A voltage reference is provided by the chain R9,R11,R12 and R13 (approx 2.6V) and applied to the non-inverting input, forming a comparator. Stability is provided by some feedback provided by R6. The output of the comparator is fed to the gate of a triac, T1... Now a note on D7... it connects to N1, which the manufacturer has very kindly filed the number off.... I imagine it's some sort of micro controller. It most likely provides some timing (the unit shuts the motor off after 30 mins) and some zero-crossing pulses to D7 so the circuit can phase modulate the triac. I've not illustrated this part of the circuit, as it's not relevant, and difficult as I don't know exactly what's going on inside the mystery N1. 

OK, so we need to alter the voltage reference at pin 5 of N2. I remove R9, and place a 10K pot in it's place.

I adjust the pot until the temperature stabilises at 130 deg C.

The pot's then disconnected and measured, and it's 3.6K, which is rather convenient, as that's a preferred value! R9 is replaced with a fixed 3.6K part.

Tests prove transfer is definitely more "robust". The toner seems thicker, and more difficult to remove.

We're now operating this unit way outside of it's design spec (as if it wasn't bad enough before!), so don't leave it operating unattended!!

Wednesday, 16 May 2018

Well, knock me down with a feather....

Thanks to the lovely people at Feedspot , we have an accolade!

Apparently, this humble collection of electronic musings is now amongst the top 75 electronics blogs! 64th in fact!

I am truly honoured!

I'm not sure why they've sent me that , as I'm outside of 60 .... but not by much ;)

Thursday, 10 May 2018

The big hifi preamplifier project - The main preamplifier board.

It's been a while. This project is taking up a lot of time (and money!) ... here's the latest instalment...

So, we have our sources selected (see here) and the signal needs to be amplified.

I'd like everything to be remote controlled. I'd like a simple and subtle bass and treble controls, and balance.

I'm going to put power supply regulation on the board, so we'll need to supply the board with +/-24V of well filtered DC.

I'm going to incorporate a "side chain" with the Korg Nutube in it, and make it switchable in or out.

I'll use NE5532 op-amps, because they're cheap and cheerful, and a damn fine performer.

So... after some thoughts about remote control, I'm left with 2 options.

Motorised pots: Damned expensive, and I'll need 4 stereo ones. Mechanical mounting issues.
Digital pots: I've used these with great effect on previous commercial projects. Very cheap compared with motorised pots, and cheap compared with normal mechanical pots, considering the spec. Enter the Microchip MCP41100.  Just the job. 100K, 256 positions, simple SPI interface,linear. I'll put some resistance across the output to simulate log, and if that's not good enough we can tweak the response in the software.

OK, so our power arrives in at JP4, there's some filtration by C9,10,12 and 13 just in case any pickup has occured from the rectifier and filter unit. The +5v will be regulated externally, and has a separate ground. The +/-24V is regulated by an LM317 and LM337 respectively to +/- 17V  (I know it says +/-15V on the diagram!) Each IC has it's own 0.1uF ceramic decoupling cap. There are 3 leds to show the supplies are present. Control signals arrive at JP1 from the microcontroller board. The SPI signals are taken to each digital pot, and each digital pot's CS (active low) lines for each IC are also available. There's a bit of bunkum on the web that digital pots are only capable of working within their supply voltage, of +5V and GND. This is wrong. It's digital part, yes. The resistance output, no. It's just that, and behaves like any normal pot, so will be quite happy with our audio signal. 
Audio arrives at JP2, and is given some gain by IC2. this is fed to a buffer amp, IC1, which then returns the audio to the REC OUT socket, for recording purposes. Audio is also fed from IC2 to the tone control, formed by two digital pots (per channel) and IC10. Bass is controlled by IC3 (and IC4) and the treble by IC7 (and IC8). Maximum boost and cut is limited to about +/- 3dB, centred on 20Hz and 20KHz. Audio leaves IC10 and passes to IC11 (and IC12) which are the volume controls. I did, originally add a balance control in, and then realise this was utterly pointless, as I could have independent control over both the left and right volume controls, and do the balance in software, and not run the risk of compromising channel separation. Audio leaves the volume controls, passes K1 into the final buffer. IC13 , and out via JP5. If we want more (or less gain) we can alter the value of R59 (R60) to suit. K1 is used to switch in the Nutube valve. The Nutube cannot operate differentially, so the audio is DC isolated by C29 (and C40), and bias is applied from the 3.3V regulator (IC5) via R30 (R48). Some experimentation will be required to set the correct bias. Anode is supplied from our 17V rail, with a bit of filtering courtesy of R17 and C11/15. The audio is developed across the anode load resistor R32 (R45), and passed to a simple FET buffer Q2 (Q1). Now. I think I've dropped a whatsit here, I've passed the audio via a 100K pot R58 (R61) which is going to present a rather high impedance to the output. I'll take some measurements, and see how it performs. Sadly I didn't notice this schoolboy error before I sent the board for manufacture..  The required 1.7V for the filament is supplied from the 3.3V reg via R22/R23. As the tube is directly heated, the filament is also the cathode, so it's AC coupled to ground via C19/22 (C21/23).
Audio is also passed from the output to the meter drive circuit, buffered by IC14 (IC15), and rectified by two germainium diodes D5/6 (D7/8). This output is used to drive the output transistor T2 (T3) which drives the meter connected at JP6 (JP7). R68 (R69) is used to control the calibration of the meter. It's responce should be more PPM-like than VU (which, as every recording engineer knows, stands for "virtually useless"). It's not going to be that accurate, but will give us something to look at ;) You may need to alter the values of C57 (C58) and R82 (R83) to suit your meter. If you can't find germainium diodes, try a schottky diode. The relay for the Nutube is driven from the microcontroller board via T1. The 5v ground and audio ground are kept separate, to avoid clicks and pops when the relays switch, and to avoid noise being picked up from the uP.

Board layout.... 
Single sided board is going to be a problem. There's quite a lot going on, and I want to keep the form factor reasonably small. Double sided it is, and whilst I can do this at home using UV film resist, it's not easy to get a decent etch. I could purchase board readily prepared with UV resist, and these usually etch very well, but they are damned expensive here in the UK now. It's a shame that the spray on UV etch resist is no longer available. So, I'll get the board professionally made. I used to use a company called Olimex in Hungary, but they are at capacity with their own work now, so are not currently taking on small batches, which is a pity as pricing was good, and quality excellent. My friend Ben had some small boards made in China by The quality was great, so after a brief and helpful conversation on-line with Minnie Yu, I sent over the gerbers. Within 10 days, 5 boards arrived. Quality is at least as good as Olimex. 

When I laid the board out, I tied to keep the digital signals away or perpendicular to the analogue stuff. A friend of mine always used to say "Keep the ones and noughts out of the rig" ! 
There's an analogue ground plane each side of the board. 

A most exciting delivery from China...

Parts were ordered, and the board assembled...

One thing worth noting is the output coupling capacitors (C1,C2,C51 & C52)... I left plenty of room on the board, as I originally intended to use some poly's.. but Mr Self has written about non-linearities in some, so I though I'd try some multi-layer ceramic's... and they are TINY! This is a 2.2uF 50V example!....

I was going to carry on in this post, with control electronics and firmware, but, quite frankly, it's taking some time, and it's bloated into a project in it's own right...  So far it consists of a Teensy 3.2 microcontroller, and a few logic gates to expand the IO, I'll show more in the next exciting episode!