Fluorescence Microscope On A Hacker’s Budget

Some of biology’s most visually striking images come from fluorescence microscopes. Their brilliant colors on black look like a neon sign from an empty highway. A brand new fluorescence microscope is beyond a hacker’s budget and even beyond some labs’, but there are ways to upgrade an entry-level scope for the cost of a few cups of coffee. [Justin Atkin] of The Thought Emporium published a scope hacking video which can also be seen below. He is becoming a reputed scope modder.

This video assumes a couple of things for the $10 price tag. The first premise is that you already have a scope, a camera adapter, and a camera capable of shooting long exposures. The second premise is that you are willing to break the seals and open the scope to make some reversible mods. Since you are reading Hackaday, maybe that is a given.

The premise is simple compared to the build, which is not rocket surgery, the light source from below illuminates the subject like a raver, and the filter removes any light that isn’t spectacular before it gets to the camera.

The material list is short but exotic. In the video, the dichroic mirror is referred to as “black magic,” and is not something we see in the wild too often. Laser pointers abound but 405 nm, aka purple, is less common than its red 650 nm brethren. While you are shopping, pick up a fluorescent orange piece of plastic to shield your eyes from errant light rays. If you have been following [Justin]’s lab equipment hacks, you may already have a laser pointer from his spectrometer project which has been reused due to the narrow band of light since ordinary purple LEDs result in a lot of light bleeding.

We are not crudely bombarding the subject with lots of white light so we come back to the camera which must be able to perform long exposures to collect enough photons. You can overdrive the laser for shorter exposures, but you will be replacing the diode before long, and it will get hot. When done with care, your entry-level scope will show you some gorgeous imagery.

19 thoughts on “Fluorescence Microscope On A Hacker’s Budget

  1. Fluorescent Microscope on a Hackers Budget

    Byron, I do not know how the comments work here, so I hope this comment is passed along to Justin. So if HackaDay has figured how to establish a channel from here to the people you are writing about, thanks.

    Justin, very nice!! Congratulations. That is a hard one.

    I suppose you have used webcams and stacking programs to replace your more expensive long exposure camera? I use html/javascript programs with getUserMedia to read the frames and average and filter them in real time. At worst you process the data after the fact. Also, I recently found that “some” of the inexpensive 4k sports cameras are plug and play as webcams, though I am still experimenting with getting better control of the frame rate, resolution and timing of the frames. You have to read carefully to be sure. Some might say it, but not be able to.

    You only need to make an array to hold the average for each pixel color, and then display it as you go. The least expensive mode right now is 1080p at 30 frames per second, or 1920x1080x30 = 62.208 megaPixels per second. And the 4k, which is 248.832 megaPixels if you could run it at 30 fps, usually comes in at half the frame rate, so 124.416 megaPixels per second. Remember that is three color layers, so three times that many bytes. I finally learned to look at the total bandwidth to understand the value of the information being gathered.

    I think you might get away with two or three frames per second, averaging ten frames for each frame update, and displaying at 30 frames per second. The averaging can be adjusted further by rescaling the display to suit human viewers. So many tiny photon counts can be mapped to brighter pixels that humans can see. Also you can try any number of false coloring schemes where you classify your pixels on three bands and not just rely on your human eye to distinguish. I have done lots of experiments with counting all three pixel values to learn what three color pixel states are visited most often.

    I have been reviewing as many of the subpixel methods as I can find. One of the fundamental elements is creating a more detailed model of what you see. If you are tracking planes in the sky, and you have closeup photos and 2D models, you can substitute the photo structural details and then use the real time data to color the appropriate pixels. For your case, the fluorescent molecules are the same molecules are they not? Then you just need to figure their individual orientations and motions. You might have to start by building models of the things you can see, collecting those types from the data, and then eventually running the classifier in real time. If you have access to xray microscopes or MRI microscopes (magnetic resonance imaging spectroscopy could help too), you might be able to tie the xray or micro MRI images to what you are seeing. I have not found multispectral xray but I think that energy dispersion is routine in the detectors now. So you would false color those for real time images, and correlated to help with subpixels real time fluorescence. I have not done all those myself, I am just passing on my best guess.

    The bandwidth of the sensor is most important. If you have a 10 sps thermometer, but run the same analog thermometer through an amplifier into a 96000 sps audio card, that is roughly 9600 readings at the same display frame rate. The averaging gives you roughly sqrt(N) improvement, so you are getting sqrt(9600) = 98 fold improvement. A 0,1 degree Celcius at 10 sps thermometer becomes a 0.001 thermometer at the same sampling rate. Each sensor has tradeoffs, but I use that as my first guess, then jump in and spend another 5 to 20 hours to refine the idea.

    Look at the camera link to the computer. If it is an older usb 2, they are going to trade off and send you something less than that. So if they advertise higher bandwidth, it is false or they are compressing. Some raw image cameras are coming out. I am at my limit to cram that into this small note. So “doing the numbers” helps. Don’t be afraid to send things back. I think the wireless ones have the potential for very high frame and data rates. Just use ALL the data, not just look at things with your eyeballs.

    Sorry I have no way to share through HackaDay, or I would attach a private note and files. It took me many months of experimenting to learn to read camera frames and use them. But it is improving a bit. I think the sports cams are going to be very useful. You might have to change the lens or go without. I wonder if you could make a version that fits the eye piece.

    Best wishes. I suggest you spend a bit of time to take your breadboard wiring and lens and light arrangements and clean them up into nice packages. If you are not using your fingers and time to adjust and keep pieces together, you can have a low cost professional tool, that you can then share with others. It just means hacking the packaging as well. A few hours figuring out a laser assembly that is stable and easy to work with will help thousands of people possibly.

    I don’t suppose the chemicals used for layers in the dichroic filters are available to you? Have you tried to make your own? Have you tried to put a difraction grating in the light path? If you add, average and scale the intensities, and display at lower frame rates, you might be able to see more, with low lighting and low photon counts from the fluorescent molecules.

    The lensless microscopes might be worth looking into. A gigaSamplePerSecond ADC on a photo detector gives you a lot of data to work from. Pairing that with other detectors can tease out data at low cost, and higher resolution than you can get therwise. So many technologies to choose from!! So little time. Sorry to be so vague.

    The sportcams can run 720p at 60 frames per second, and there are 1000 fps camera and higher coming out. If they have smaller pixels counts, but you could focus them on small areas you are interested, you can do 1000 frame samples per second to give you lots of data to play with. Much easier to move data, than to hack hardware many times.

    I wonder if you can put multiple cameras on a microscope? Maybe fiber optics like they do with those large spectrometer telescopes?

    I wonder if you could change the bias voltage in the current camera sensors to make them sensitive to a different range of voltages? The work function of the sensor is biased by that voltage, so would it shift the detector frequency response? Could you simply modulate the bias voltage frame by frame to control the photoelectric response by frequency? I will have to check that one. It would have many uses.

    Richard Collins, The Internet Foundation

      1. Leithoa,

        I was complaining about being dragged all over the web. If I go to YouTube, I am at the mercy of their messaging system, which is crude and unreliable. I do not know how HackaDay works, I just joined. What I would like to happen is – when they post an article here to highlight someone’s work – they have the sense to contact the author, and get agreement to post his work. And make arrangements to keep the author informed of what is said. Likewise, I would hope authors/designers will take an interest in discussion of their work, and join in. Is every person who reads this here, supposed to locate him, try to find his contact information, maybe register with the groups and sites he happens to be in that day, and maybe he will check that system’s messaging method? We have to give our email here. How hard would it be to CC him with our comments, and give him a link to come and reply? This is HackaDay’s setup. I think they need to take responsibilty to make it efficient and secure for everyone. Not a lot of programming. But count the time used otherwise, and the cost of the programming is tiny relative to the human time lost. Excuse me if I belabor this, but I see massive losses on the Internet because websites and chats and systems don’t take a tiny extra step to tie people together. This is NOT a YouTube discussion, it is a HackaDay discussion. Am I being too picky? I think what I am suggesting is the proper way to host a discussion and tie people together. A sure communication channel, not “go look for him and see what happens”.

        I got on NASA harshly because they were posting links in their searches, not to the materials and details mentioned, but to an endless succession of other searches. I got on Amazon for making their customers spend thirty minutes to hours to find certain things,when they could have led them in a few steps and a few minutes. It just requires a small change in thinking. To be concerned and track the time of every person. I spent twenty years studying the Internet for this sort of thing, and I have an infinite amount more to learn. But the web wasting human time is my biggest target for improvement. The simplest metric to make the fastest progress toward a system that converges to good results.

        HackaDay, if the parent company does not use it simply to enrich itself, can be a force for the formation and encouragement of topic groups covering much of our current technology. It seems heartfelt and the people intelligent and highly concerned with helping others. But there is little planning and organization to the topics chosen,and I am not sure I see how they are helping the designers, innovators, “hardware hackers”, amateur scientists, whatever – to go on to be successful in the world and bring this kind of thinking to all the problems facing society.

        The intent of HackaDay’s parent company is partly to engender new products and industries. There are good ways that catalyze change. Leaving group communication to chance and to other systems in not a good way.

        Perhaps HackaDay and its sponsors should provide space for people ot publish their work. Rather than put his work on YouTube, he could have published it, on invitation, as a HackaDay article, with introduction, with a frame for the video. you are on a HackaDay site, and tied to its messaging, monitoring, security and community. But referring to a video on another site. I suppose they could get really professional and host videos, databases, working groups, wiki pages for common knowledge and shared methods, links to resources, calls for partners. The usual cooperative working group type site.

        Thank you for your patience. I have a lot on my mind these days. I am getting older and I have to write what I am thinking in big pieces.

        Richard Collins, The Internet Foundation

        1. Hello, Richard. Maybe I can shed some light on this and let people know some of what happens behind the scenes here at HaD. Don’t worry; I won’t spoil the magic.

          A good deal of the stuff published on HaD comes from our Tip Line, which you can find at the top of the page with the SUBMIT link. There, we choose something we feel we can talk about without sounding like a bonehead, but I know I don’t always succeed. I am a human. When we write up our article, we thank the person who submitted the tip, but we can’t always get a hold of the content creator. As you pointed out, tracking someone down isn’t always easy, and if they create a lot of stuff, they may not want tons of messages flooding their inbox. Many times, the tip submission comes from the content creator, and everyone is happy.

          Since we generally write about things that excite us, we speak highly of the creators, and they appreciate the attention to their hard work. I have never had a creator contact me and demand that an article gets taken down. I hope that day never comes.

          As for CCing someone with the comments on their article, it would be rude if they did not explicitly ask for that. Speaking of which, that is an option for everyone who comments, and I have seen folks write in things like, “Love the discussion, commenting to join notifications.” If people woke up to 300 emails about a HaD article that was published at 03:00 local, they would probably not have nice things to say, and I would not blame them.

          Many of the people who appear in our articles are also our readers! Undoubtedly, someone has been browsing HaD and seen their work written up by a writer who follows them on YouTube or blog. I imagine that would be a pleasant surprise. I once found my work on the Adafruit blog months after it had been posted. I was ecstatic.

          You mentioned that HaD could provide a space for hackers and makers to publish their work. We do! It is called hackaday.io, and it is nicely integrated with hackaday.com. You can submit your finished work there with a click, and the writers get notified automagically. Contact forms are a breeze and finding an ABOUT THE AUTHOR page, or email link is easy. Not everyone submits their work through hackaday.io so it can’t all be breezy. For you aspiring makers/hackers; I can’t speak for everyone, but I am partial to writing up articles based on hackaday.io projects. Just a smidge. We also do contests with cash prizes, so if that doesn’t pique your interest, you can’t say we didn’t try.

          Justin and I talk regularly through a different forum, biohack.me, and he alerted me to his newest video so naturally I was eager to write it up and I sent him a PM when it was published. He lives in a different country than me and keeps different hours, but he comes to read all the articles written about him.

          Don’t be afraid of big text blocks. This comment has more words than the article.

          1. Brian,
            I really appreciate the explanation. I have only been listening in a few days. I did join HackaDay.IO, but did not know how the two are connected, or what to do exactly. In the last year or so, (I just turned 70), eyes are wearing out, so I sometimes miss things. There are a lot of icons and little marks I miss now. Part of my hesitation in going out to many more places is it is getting harder to see. For many years I have worked 12-18 hours a day, seven days a week. Now I can barely do 12 and I get tired.

            I am not interested in money, but I often try to help people who want it. It is way easier to make money, than to change society. Starting and growing companies is easy, but building ones that benefit society, and are sustainable is difficult.

            I have downloaded and analyzed Wikipedia several times since it began. They have a serious problem with group authorship, where editors can veto and destroy the work of others. That is build into their software by accident, not design. Similarly many group sites. Your informal networks here are actually much more robust, because if someone doesn’t like it they can just leave. And your pointing to places informs, but does not lock things down. Though I was saying what has been tried, I did not give you all proper credit for something that seems to be working.

            Today I was trying to design a better magnetic resonance magnetometer for monitoring the diurnal and external magnetic fields of the earth. It requires using and knowing the secular variations in the main field which is generated in the interior of the earth. Since seawater is a conductor, I expect there should be some magnetic effects from the changing shape of the oceans. The earth tides should produce piezomagnetic effects. Sferics from lightning, and of course, currents in the ionosphere all have an effect. Solar storms are the main reason for people to do this. But I am stuck because I do not know as much as I need to build a simple amplifier, and the amateur and DIY projects are so poorly written that it can take me months to do.

            I think that is what bothers me about HackaDay. Each individual effort is excellent, but it is almost always an individual, not a group effort. You cannot start companies with just one person. You cannot start new industries without small groups supporting and supplementing each other’s skiills. So when I see the endless progression of single efforts I get a little tired. Just as a better light source would help here, there are many things that go into a professional tool. Say you can build a fluorescent microscope on a limited budget, Is that going to give you a job to support a family?

            My point is not the collection of models, data and sensor datastreams flowing around the earth. But rather the people and communities involved. Each tiny piece of this global network has a community actively involved. But people seldom know their place in the whole. It can take a working lifetime to get a solid sense of the issues and needs of the communities, and to form a contribution. I have been trying to see if I can use the internet to change that. for the better.

            It looks like gravitational engineering is emerging as a new industry. At least there are millons of people working on facets of the technology. But the people who are going to work in that field are going to have to be found at random. When I look at these smart and conscientious people working here, I wonder what they are going to see in their lifetimes. The atomic portion is being worked out, the field generators and control systems. Most of the social and economic implications are falling into place. But I still think it will be a bit chaotic.

            I am getting tired. I started work about 14 hours ago and have not had a break yet. So I can tell this is getting fragmented and I can’t see the screen. Is there any way HackaDay could start a “fluorescent microscope” project area that people could contribute to? Let one person do the dichroic filters, someone else try to get the cameras. Several people might need to hammer on the various lens possibilities. The illumination could be modulated, patterned, geometrically structured – what is best for each subject? What are ways to process the data? How to relate that to what is needed? What are the communities who use the data from these things? What is going on in the industry? Who is already working on it? What jobs do they have? What needs have they expressed? Are high schools and other countries working on it, or would they like to? Are the things they want to see possibly better served. This sounds an awful lot like what happens in the “industry” already, but extends the community to the whole Internet.

            [“microscope” “fluorescent”] is a tiny corner of the whole, and it has 66,6 million results on google. One person might not be able to gather and understand it all, but a small group might. In looking you will see most of the relevant groups, individuals, technologies, methods, databases, models, software, groups, resources, applications, products and social impacts.

            Now I have to stop’

            Thanks for listening. I wish I could make it simpler. I wish I had a simple suggestion for HackaDay.

            Richard Collins, The Internet Foundation

  2. Cool hack. Incidentally old diodes from PS3/PS4 optics can be retrofitted.
    I did have some success recycling them even without being able to get them out intact, the trick is to use a cutter to “limpet” the broken window so diode is intact then implant the diode in a drilled piece of Veroboard with 63/37 solder or low melting point alloy so as not to stress it.
    With the older PS3 BRIR diodes there’s also a trick to get brightness back at the cost of lifetime, what you do is run a small current between R and B anodes which blows out the shorting whisker.

  3. Just a thought, for fast frame rates what about an optical mouse camera?
    Some of these have direct output so can be used in matrix mode.
    From memory the ADNS2xxx is one of these, used in travel mice.

    Re. the diode, you need to put some sort of cover slip so it isn’t exposed to air.
    For some reason I found that the window does not like being exposed as any dust that
    gets in will land on it and get superheated causing COD.
    Best done in a glovebox but I have had some success just using a piece of broken
    glass from a defunct OLED panel (cough LONG-CZ J8 /cough)

    1. I did a quick google on [optical mouse camera] and this Arduino inventor came up.

      https://www.bidouille.org/hack/mousecam

      He has a very clear description of many parts of the optical mouse. Better than I have seen before. And that was just the first one that came up. I call these “topic communities”. The “arduino” “optical mouse” community is fairly active. If they just knew how to talk to each other better, and accumulate knowledge of the whole topic, they could grow and interconnect with others. How many times have people looked at the optical mouse and said “that could be used FOR something else”, “that could be used WITH something else”.., “I know a better way”.

      I love random. It works for society, it works in the Internet. But there are times when it helps to at least be able to work in small groups, without going into pathological growth and antisocial behaviors.

      Can you lower the voltage on a laser pointer and control its intensity? The ones I got were so bright and dangerous, it is a bother. I just could not get them out of the pointer easily to see if I could add a voltage divider with a rheostat. Do they still say “rheostat”? A variable resistor. A programmable digital resistor. Even the plain resistor has fifty varieties or more. :) Can you add a heat sink to a laser? If I was patient I could bend one of the bigger ones by spreading out the fins and tapping on the ends with a hammer or chisel. Even the thermo electric coolers are cheap, but I do not know if you can cut them down to size. Not sure if that is an appropriate comment, but you were hinting at heat management problems than might be handled fairly easily.

      I am not sure I am responding to what you wrote. I know of hundreds of thousands of contexts for the word “diode”, so I guess you are talking about the laser diode. When you are talking to people who know exactly what you are doing and looking at, it is casual and we leave out words. But for working with global networks it has to be a bit more formal. You can be formal, and your mind and heart range widely. without internal conflict or ambiguity.

        1. I think you are right. Can you help him fix that?

          There is no group work area, so even if you send him a note what to do, no one else will know about it. And if he gets a good design, it might not include all the details, comments and contributors. Kind of a disincentive to get involved?

          How do you think it should be done? You have a good idea, he gave the light source short shrift and it will affect is usefulness. But he is over there and you are here.

          1. Sorry, I was writing. No, I am just an old man trying to understand this vibrant community of smart, generally much younger people. I think you all are the future, and I am just happy to see a little of it through the things you are doing. When I was young for decades I wanted to study the data coming from video cameras. But they were huge and expensive. There was no way to collect data from them, they were just analog streams. When the webcams and other cameras came out the industry got coopted by a few applications and industry choices. So there was no way to use them for scientific or mathematical projects and investigations. To determine the shape of the future of the Internet I had to try to learn and try to understand all the new technologies. They shape our everyday lives, and they fill much of people’s working lives now. So the way new products and technologies emerge is important. I choose a few groups to study more closely. This one seems to have unusual potential. I could not just look because I have to ask questions to understand. It is rare for me to talk to people like this, but I thought I would make an exception. I work at the ragged edge of not knowing all the time. I try to write what I see and feel as clearly as I can. For myself to tell me what else I need to do, and in the hope someone will here it, in the proper context, to then go out and help the world to the future, more efficiently than it is now.

            If you want an AI bot, there are massive communities on the Internet working on them. One of the odd things I have done in my life is that when I was a sophmore in college they let me take a graduate course in artificial intelligence. I read the books and heard the lectures and understood what they were doing. And realized that what they wanted to do – have computers that were as good as humans at real problems – would require computers with the memory capacity, life and real world experience, and sensory experience of real things – that humans do. I once calculated what a human senses in their life. You can give specifications well beyond what a person sees, hears, feels and does in processing the sensations of the world and make that quantitative. The reason I spend so much time on high bandwidth sensor data streams and their processing, because I think it is close, for the entire Internet and humanity, to what might go on in one child’s body and brain as they absorb and understand the world. The brute force methods are beginning to work when people give the algorithms enough real world data to cover the range of possible states of the thing they are observing. A cup with 180 grams of water had 10 Avogadro’s number of molecules. Not all the computers on earth can do that yet. But for everyday needs and use of water, we can encapsulate that in a few simple models and calibration datasets.

            I will tell you something I did not expect. When I got in my late sixties, my mind got much clearer. Everything I have seen in my life seems readily at hand. When I look at something I get nearly everything about it that I have seen in my life. If I want to see a waterfall I can choose from every one I have ever seen, or synthesize one by just wanting to look at it. It is really helpful. I don’t understand it, but it is a great joy. I expect it will disappear, and I am trying to face that everything I have learned and worked so hard to understand will just disappear in the not too far future. I get tired, and I get impatient. Yes, I am as human as you. Not a computer,not an algorithm, or a set of algorithms and 10^7 terabytes of memories. But if you had that much real data, and a bit of organization, you could make a really good imitation couldn’t you?

            Richard Collins, The Internet Foundation

Leave a Reply to ConundrumCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.