Marching on, but not to Plymouth this time!

By 1st March 2017Presidents Log

OR HOW A DEAD TURKEY ALLOWED US TO TAKE A FURTHER STEP FORWARD, AND HOW ANOTHER PROJECT FINALLY CAME INTO FOCUS

As I write this, it’s still only February, but next month is just a couple of days away, so we’re close enough to be Marching!. In the past I’ve tended to do a blog from Plymouth around this time of year, but unfortunately the Advanced Imaging Course that usually takes place there each April didn’t get funded this time, whereas there are lots of things to talk about back here at Cairn and the farm, so I decided to put fingers (and toes?) to keyboard now instead.

First off, we welcome Ellie to our oasis of continuing calm in this increasingly mad world. She is marketing assistant to James, with particular responsibility for further development of our website, so my immediate thought was to take advantage of these increased resources before anyone else overloaded her with rubbish of their own. However, this blog may actually have some useful function, as it allows us to give you a preview of what is going on here, rather than having to wait for the formal product announcements once things are finally ready to go. The readers of this and my other blogs are therefore in a relatively privileged position here. We hope that both of you will take full advantage of it!

As for things that are ready go, we’re intending to send out a newsletter to the world in a few weeks’ time, so (apart from some nice developments concerning the Optospin filter wheel), they’re not going to get much of a lookin here. But that of course depends on there still being a world by then, as it’s daily becoming more bizarre, and such things can no longer be taken for granted. It seems to me that reality is following satire, and since I’ve done a couple of satires on the Brexit fiasco in recent months, about our farm seceding from the UK so that we can stay in the EU as Cairnland, I’m beginning to wonder if I’m somehow personally responsible for any of this. I’m particularly concerned about the behaviour of my alter ego as President of that fledgling nation in the second of those two blogs, where there were ominous signs of a growing megalomania. That behaviour was inspired by that of the President of the country just north of South Korea, but who since I wrote that has launched several more missiles and bumped off his own brother. And now it’s being trumped by the behaviour of the new President of a country a few thousand miles to our west! If only I hadn’t included all that “fake news” about cannibalism in those blogs! So, just in case there is some sort of psychic link here, I suggest you stay well clear of anyone wielding a knife and fork until further notice. You just can’t be too careful nowadays.

While we’re on the subject, Cairn is not a political organisation, but the sort of things we stand for, in respect of international cooperation and collaboration, not to mention an enlightened view of the world, which is ultimately what science is all about, are clearly under serious threat. We don’t feel we can stand idly by. As to what that means for the Company, apart from taking steps to reinforce our international trading position, we’re not yet sure, but we’re already taking action at a personal level. Jez, James and myself have all joined the Liberal Democrats in recent days, as they are the only one of our major political parties who dare to oppose Brexit. Although they got hammered at the last General Election, they have been quietly making significant gains at local bye-elections since then, including a recent victory here in Faversham, so all may not yet be lost.

But in case the swivel-eyed zealots do manage to make our parliamentary lemmings all jump off the edge of a cliff (and they are currently doing very well), we must of course have contingency plans for being able to continue the development of our EU business in case we lose access to the Single Market or even the Customs Union. Such plans are indeed laid. That makes me worried again about psychic links though, as Jez and I agreed what to do while barely even talking about it. Of course we can’t say too much until these plans are formally in place, but I think we can say now that they involve Germany, and will be developed hand-in-hand with our existing distributor relationships there. The idea of course is that our EU sales, whether via distributors or direct to customers, would be from a part of Cairn that is already within the EU, so that all the potential tariff and customs issues would be sorted out within Cairn rather than by them. As part of these plans, I’m speeding up my learning of German, which includes watching quite a lot of their TV at the moment. To people asking if I’m crazy to do that, I just question their sanity if they’re spending any significant time watching ITV or Sky. If they don’t get the joke, I know that they do! And it’s a great way of learning the conversational language of course. I have now thoroughly mastered such useful everyday phrases as “ich begruesse Sie zur Tagesschau” and “fragen Sie Ihren Arzt oder Apotheker”, to name but two! A final sad thought here though. This is all very well and good, BUT it demonstrates the damage that Brexit could do even if it is stopped. A year ago we would never dreamed of setting up anything outside of the UK, but once one starts thinking about such things, it becomes increasingly attractive to do them anyway. That means we’ll investing outside the UK – you know it doesn’t make sense!

This brings me nicely to what is intended to be the main subject of this blog. I think that from any reasonable perspective, both Brexit and what is currently going on in the USA represent dragons that need to be slain – and slain quickly. The link here is that I have finally slain a couple of personal dragons in recent days, although I certainly took my time about it, as they both started fighting me in the last century! But now at last they are thoroughly dead, which means that one of our products has been substantially improved, and another is finally coming into existence.

The first dragon turned out to have been killed by a Thanksgiving turkey, which is all the more remarkable because the turkey itself was already dead by then. I was so looking forward to that US visit last November, to what I thought would be a temporary escape to a land of continuing sanity after the horrors of Brexit, except that they had just had that vote of their own. However the full horror of what it would mean hadn’t sunk in by then, so that Thanksgiving didn’t feel any different from the previous ones to which I’d managed to wangle an invitation. I spent a nice few days in the home of some of my Ionoptix friends, where I had time to think about a few things as well as eating lots of turkey. And what I spent most of my time thinking about was….

Mounted OptoSpin

Our nifty two wheeled configuration between a camera and microscope

The Optospin! Over the years I’ve put in more work on this product than I dare to think about, as I’ve already described in another blog. My dream has been to have a filter wheel that could not only rapidly step from one position to another, but could also spin continuously over a wide range of speeds. The point here is that all that starting and stopping involved with stepping is going to be a source of vibration, which is not good news for the microscopy applications that form our main market for this. We’ve therefore put in a lot of software development work to support the continuous spinning mode, which as well as getting around the vibration problem, allows you to change filter positions in times a short as a millisecond or so – try doing that by stepping!

But as everyone discovers sooner or later, we live in an ungrateful world. Here we have the ideal solution to the problem, and yet people still want to step the darned thing – and step it very often! The Optospin can actually step very quickly, taking just 30 milliseconds to go between adjacent filter positions, or a worst case of 50 milliseconds between any pair of filter positions (of up to which there can be 10 in our nifty two-wheel configuration), which we believe for 25mm diameter filters makes it at least as fast as the competition. The tradeoff for our design approach though is – or should I say WAS – that to step more quickly, you have to put in and then take back out a lot more electromechanical energy, which makes it correspondingly harder to bring the wheel precisely to its target position and make it stay there. In practice there is likely to be a bit of overshoot or undershoot, but if the filter is fully in the light path then that is of no practical consequence.

However, the wheel may also be moving somewhat as it tries to settle towards “ideal” position, and these position and speed errors, although both small, may also take some small fraction of a second to go away. That can have cumulative effects on the subsequent steps if they occur too quickly, which in the past limited the stepping frequency to perhaps just three or four per second. The physics of all this says, somewhat perversely, that we might have been able to step more often if we hadn’t made the stepping times so short! So how do we make the steps short and often?

This all depends on the accuracy of the wheel’s position-sensing system. The position is read by optical sensors looking at indentations around the edge of the wheel, to give an angular resolution of 1 part in 168, equivalent to 28 per filter position. That’s pretty good, but to lick this problem we need better, and here is where the dead turkey came to the rescue. By it providing me the time and place to think, I realised that we can do better, because the target position for each filter actually corresponds to a transition point for one of the optical sensors, so this point is therefore defined much more precisely than to just 1 part in 168. However, we also need an accurate speed estimate in order to work out how to bring the wheel to a precise halt at that target position. The trick here was to let the wheel move slightly past that target position and then come back, and the time difference between those events gave us the speed information we needed to solve the problem.

OptoSpin

OptoSpin

I’d realised that the situation here could be improved somehow, but this possible solution just seemed too neat for words. Christmas was going to get in the way of trying it, but I’d hoped to spend some time between then and the New Year to have a crack at it. Not so! Perhaps the most feared event for any computer programmer is that of the “software upgrade”, which is shorthand for something that used to work perfectly well, but now no longer works at all. That’s what hit me, and the nature of the problem was such that it took several days to work out what it was, by which time that “development slot” had been lost. Aarrgghh!!! Then there was January, with all the post-Christmas backlog that entails, so it was February before I could have another go.

By then I was thinking it probably wouldn’t work after all, and indeed my first attempts certainly supported that view. Just occasionally though, the new software did seem to get things right, and as I investigated further, it turned out that these flukes corresponded with it working properly. This sort of “real time programming” is actually fun if you have the time for it, but very frustrating if you don’t, so for me there’s always been a love-hate relationship with it. The challenge is that you can’t “freeze time” to see what the wheel is doing as you single-step through the code, so in practice the code has to be monitored “on the fly” as the wheel does its thing in real time. Very annoying when things don’t work, but very satisfying when they do!

As they eventually did here. The stepping performance is now spookily good, as the code that does this takes only a few milliseconds to run, and it all occurs while the wheel is effectively at its target position. This allows the wheel to be at its target position for perhaps just 30 milliseconds, and maybe even less, so 10-15 steps per second are now easily achievable. It would still be more sensible to spin the thing continuously to achieve that sort of performance, but as we say, the “customer is always right” (and do we have some “right customers” as we mutter to to ourselves from time to time!). This will all be formally announced in the newsletter, but we’d first like to offer it as a free upgrade to our existing customers, because nobody needs to miss out here! So if you are one, you can expect to hear from us shortly if you haven’t already. THIS upgrade should be a GENUINE one! It seems to very nicely fix the one potential shortcoming of our design approach, so our filter wheel “dragon” now finally seems to have met its maker.

Now for that second dragon, which has plagued us ever since 1999. Was it really that long ago? Yes, that autumn was when Andrew, James and I went to a “focus on fluorescence” meeting in Delft, where we heard about some to us very fascinating work from the group of Dr. Tom Jovin, using digital micromirror devices (DMDs) for confocal microscopy. Instead of scanning illuminated pinholes across the sample, you could use completely arbitrary patterns Particularly interesting to us was the concept of not just conventional confocal detection, but of simultaneously sending the rejected light to a second detector. We had just been thinking about such things ourselves in a crude sort of way, as we had conceptually realised that this light may also carry some potentially useful information, but when we heard about that group’s work we felt that the concept was all nicely sewn up, so we thought no more about it.

Cairn Focal

Cairn Focal

However, the expected commercial development didn’t appear, so when the Jovin group were kind enough to buy some of our products a few years later, we asked w,hat had become of that work? Well, it seemed that the DMDs had a lot of technical problems, so they were now interested in using liquid crystal technology instead. To be fair to all concerned, there was significant development of that technology going on at the time, so although the devices then available still had some technical shortcomings, there did seem to be a prospect of improvement as time went on. At the time though, the main issue was how to separate the confocal and rejected (in their terminology, conjugate and nonconjugate) optical pathways, which the DMDs did very easily. We realised we could help with that one, so before long we had a formal collaboration to jointly develop a liquid-crystal-based confocal microscope.

Unfortunately the hoped-for technology improvements didn’t materialise, and although we developed a rather interesting instrument, its performance in respect of throughput efficiency and on/off contrast simply wasn’t good enough for a commercial product. We all have 20:20 hindsight, and in retrospect we should perhaps have switched back to DMDs once the liquid crystal problems became clearer, and with no prospect of them being fixed anytime soon. However, design projects tend to have a momentum of their own, and even more so when they are collaborations, so very sadly, this one eventually hit the buffers instead.

Goodness, that happened ten years ago now! At least we got out alive, but we’d put in a lot of work with nothing to show for it, so of course we had to concentrate on other design activities for a while, in order to fill the gap left by the failure of this one. But as time went on, I found myself having a further cautious look at things, thanks to the sterling efforts of students Olivier Faivre, Bo Fu and Pim van den Berg over the next few years. Oops, did I say “sterling”? These people all sound as if they are FOREIGN, so we could have the Brexitpo hammering on our doors if that gets out, although

DMD Chip

DMD Chip

we are pleased to report that they are all now in safe laboratories elsewhere. Olivier managed to do some nice work with the liquid crystal prototype as part of his PhD in spite of its shortcomings, Bo had a further try to improve the liquid crystal performance, and then Pim did some nice comparative work between the liquid crystals and DMDs.

By now we were sufficiently disenchanted that we were throwing only minimal resources at the problem, so for the DMD work we just went out and bought the cheapest possible overhead projector, and which we justified only because we reckoned we could put it back together afterwards (which we did). All we needed to do here was to satisfy ourselves that DMDs weren’t really up to the task either, so that we could declare the entire concept dead and buried. Given that mindset, Pim’s findings that the DMDs weren’t that bad after all – in fact they looked rather good – was perhaps not entirely welcome! Darn it, the project was on again….

For confocal microscopy, DMDs have two potential shortcomings. First, their periodic structure makes them behave like diffraction gratings, which makes the “reflected” beams spread out over a wider range of angles than they would from a pure single mirror, but it turned out that this effect was not as great as we had feared, and in practice looked pretty manageable. You just need to use somewhat wider-aperture optics for the beam pathway from the DMD to the camera. The second problem is potentially nastier though, as the light reflection angle from a DMD is centred on 24 degrees. That’s no problem for a projector, as you just illuminate the DMD at an angle of 24 degrees, so that the reflection comes straight out. For confocal detection though, the light comes straight back in, so to get a confocal image you need to have optics that gives good image quality when accepting light at that 24 degree angle.

Cairn Barn

Cairn R & D barn

Choices for doing that are limited. The earlier DMD work used an interesting mirror-based system known as an Offner Relay, which can do the job but the light arrives at the camera at that same 24 degree angle, which is going to cause all sorts of problems there, especially if it has microlenses. However, we now know a bit more optics than we did in 1999, so were able to come up with a much better solution that produces conventional on-axis images, even though it is also mirror-based. The only problem is that the optical pathway is quite a long one, but it can be made much more compact by including a couple of “fold mirrors”. However, in our prototype I had overlooked something there in respect of the 24 degree angle in the light path (just whisper “fold mirrors” in my ear whenever I sound too full of myself) which was resulting in tilted images, so we had to reconfigure the layout to cure that effect.

Which we now have done. The revised prototype is just now on its way to Ashley Cadby’s lab in Sheffield, and a second unit will shortly be in the hands of Felix Evers in Heidelberg. They should both be well placed to do interesting things with them. Just as with the improved stepping performance of the Optospin, the performance of these units also feels kind of spooky, so at last that second dragon has also been slain. Life is feeling rather strange at the moment….

Twin LED

Twin LED

So, after all these years, we do at last have a viable product! Who would have thought it? An important purpose of this blog is to help spread the word in a relatively informal way, in the hope of finding a few more people who would like to put it to good use at this early stage of its hopefully promising commercial future. We plan to make our money just on the hardware, so we hope to encourage an “open-source” type of software development among its users. We’d like to get a few more units out there in the coming months, so if this sort of approach to getting the product to the market appeals to you, please let us know! We hope it could be a useful workhorse for doing things that nobody has thought about yet.

So what else has been going on here? Much of that I’ll leave to the forthcoming newsletter, but in addition to the dragonslaying I’ve been doing a fair amount of further development work relating to LED and laser illumination in recent months, at least some of which will hopefully make it to that newsletter. However, most of it will be about other projects, of which there are a fair number!

Finally for now, the new building is coming along nicely, especially as Andrew has taken over from me for organising the fitting-out stage. Admittedly the schedule has drifted a bit, but that’s because we’re hiring contractors on a “come when you can” rather than a “we’ll pay whatever it takes to get the job done yesterday” basis. As well as reducing the expenditure, it also spreads it out over a longer period, so we’ve been able to fit the place out to a somewhat higher standard than perhaps we would have done otherwise. And we’re probably just a month or two away from beginning to move people in there now, although to be fair we were saying exactly the same thing at Christmas. But the great thing is that it’s all been paid for as we’ve gone along, so we’re not having to worry about servicing a big debt in the face of the dreaded Brexit, and the only megalomaniac President we really need to fear is the one who is writing all this…..

Interior of Cairn Barn

Interior of Cairn barn

 

STOP PRESS!  We’ve just heard that our US patent application for the optical configuration of our DMD-based confocal microscope, which we call the “Cairnfocal” ,has been successful.  The outcome of our EU application is currently awaited, but the US success clearly augurs well for that one too.  So that dragon is now deader than ever, whereas the product itself seems to be coming alive at last!