PFC Part 1: Background

I decided it was time to build a new power supply for Odin with power factor correction. (See all posts on the PFC)

Power factor what? To explain, we have to go back to the turn of the last century and the War of the Currents. Alternating current won so all of our mains supplies are AC. However, solid-state Tesla coils, like most power electronics, run off DC. Odin needs several kilowatts of power at about 750V DC.

The simplest way to achieve this is to use a voltage doubling rectifier on the 240V AC mains. I used this in my previous large solid-state Tesla coil, the OLTC2, with one small refinement. I used SCRs instead of diodes to allow soft starting and varying the output voltage.

The major drawback of this circuit is a very poor power factor, especially at reduced output voltage. It is particularly bad in a DRSSTC, as it has a huge capacitor on the DC bus for energy storage, and the rectifier charges this directly. I improved the power factor somewhat by connecting a large iron cored inductor in series with the incoming mains. This worked well enough, and you can see details of the old power supply here here and here.

Gate pulses, line voltage and line current waveforms from the old PSU running at low output voltage.

I used this same power supply topology in Mjollnir, Little Cook and Odin. There was no room inside the smaller coils for the passive PFC inductor, so I used a much smaller one, making the power factor even worse. The shortcomings really became apparent in a few shows I did with Odin. It performed really badly when running off a generator, and there were two venues with 3 phase supply that I couldn’t use.

After much thought I decided to go for the simplest possible solution: a boost PFC. These are very common in larger consumer electronics, and controller ICs and design information are readily available. It is also easy to modify for 3 phase input. Essentially you just replace the rectifier with a 3 phase one. The line currents aren’t nice sine waves any more, but the power factor is still greatly improved over a plain rectifier with the same filter capacitance.

Probably the biggest drawback for Tesla coil use is that the output voltage can only be greater than the peak value of the rectified input voltage. You are limited to a minimum of about 400V when running off 240V single phase, and 600V from a 415V 3 phase supply. This is a problem for me at least because I like to check the tuning at reduced voltage after setting the coil up at a new venue.

Eventually I persuaded myself that I could live with this and set to work designing a boost PFC.

We’re back :D

The Connerlabs blog was hacked several years ago, and I finally got round to fixing it! It’s now back and upgraded to the latest version of WordPress. Look out for more content soon! 🙂

Sculling along, singing a song

This is a long story, but it should make up for not having posted anything in almost a year. 🙂 Anyway, it started in 2010, when I headed off to Whistler Bike Park with the intention of making all the jumps on A-Line. I made it home without any life-changing injuries, but on returning to Scotland I discovered I had lost the will to ride, and all my old mountain biking buddies had bought road bikes and had children. The following year I decided to sell my collection of mountain bikes and take up rowing. After many hundreds of miles of floundering in various boats, I found myself on the Castle Semple Rowing Club’s veteran squad. I’ve mostly rowed in quads, fours and eights, but this year I’m trying to race the single scull.

Ah, the single scull. I want to write about it like a Victorian warning his readers of the evils of the penny farthing that bucketh its rider off in the street. It’s basically a long, narrow plastic tub with 2 paddles, how hard can it be? Well, it is narrower than your backside and completely unstable, and to get it up to racing speed requires at least 30 strokes per minute with a good fraction of your body weight behind each one. The oar blades have to go in at just the right depth and come out again cleanly, and you also have to keep track of where you are and steer a course backwards without looking over your shoulder too much.

If I stay calm and don’t try too hard, I have a chance. If I get nervous, the boat starts to lurch around. If I try to figure out what is going on and fix it, that just makes it worse.

All this was explained to me by Rachel our coach from a small motorboat on Castle Semple Loch, after a series of disastrous 200m and 500m pieces at what was supposed to be race pace. “I can’t fault your committment”, she said, “but you’re getting nervous and you’re overthinking it. You know what I like to do, is pick a song with the right tempo and sing it to myself. Nothing too manic though. I like the Nolans.”

Suddenly it dawned on me that sculling had become a metaphor for life itself. Hadn’t I just spent a day lurching around the office and making things worse through trying to fix them? Made an entire career out of getting nervous and overthinking things?

Well, now I’m in the mood for dancing.

Wolfson Pi Audio Card – first impressions

Ever since the Raspberry Pi came out, I’ve been experimenting with its audio capabilities. The latest audio gizmo available for it is the Wolfson Pi Audio Card, which promises 24 bit, 192kHz recording and playback, with analog and digital I/O, for a very reasonable price. So of course I ordered one straight away. 🙂

After waiting a month I finally got my hands on it. The software installation is somewhat unclear so I will document what I did here. I didn’t want to use the Wolfson official image as it was a massive 8GB download. I started with a copy of the image that I developed for PiTunes, and applied this patch to it, which adds the Wolfson kernel and the support files for the audio card. I then changed mpd.conf to use audio output device hw0,0 (it was previously 1,0 for the USB audio device) and added a call to in my .bash_login file, to set the card up for digital output.

I also removed the invocation of pikeyd from /etc/rc.local, as the keypad and encoder were not present. They can’t be used anyway, since the Wolfson audio card hogs all of the GPIO pins. It doesn’t really matter, as MPD can always be controlled remotely.

On firing this up, I was surprised to find that it worked first time! 🙂 I verified the output to be bit perfect at 24 bit, 96kHz. This is possibly the best value for money HD audio source you can get anywhere: you should be able to pick up a Raspberry Pi, a Wolfson Audio Card, a wifi dongle and a hard disk for under £100.

Reaping time and sheeping time

Dear reader, I apologise for the lack of blogging recently. Here is a double helping.

First of all, I’ve been having great fun with Reaper. Digital audio workstation software written by the charmingly named Cockos Inc. I remember trying an early version years ago and hating it, but it has come a long way. I’ve tried most of the DAWs, and I think Reaper is now my favourite, especially when you can buy a personal-use license for 60 bucks! (I bought it.) It is available for Mac and Windows, and the bundled collection of plugins isn’t half bad.

My Reaper recording setup.

To all electronics experts reading, I apologise for placing the setup so near a radiator! 🙂

So that’s reaping time, but what about the sheeping time? Well you know the old problem, when you need to edit the DNA of a cloned sheep but all you can find is an ancient gene splicing program that runs on classic Mac OS. Happens to us all.

I obtained a copy of the SheepShaver Mac emulator for Windows, and a ROM file and ready-to-use Mac OS 9 disk image from I put it all on my old Windows laptop for a test. And, it werked!

GeneJockey 2 running in Mac OS 9 on the SheepShaver emulator.