Hackaday Prize Entry: Automatic Digital Microscope

Ziehl-Neelsen Sputum Smear Microscopy (ZN) is one of most common methods for diagnosing Tuberculosis. On the equipment side, it requires not much more than an optical microscope, although it still needs a trained professional to look through the glass, identify and count the number of bacteria in a sample. To provide reliable and effective Tuberculosis diagnostic to regions, where both equipment and trained personnel is in short supply, [Rodrigo Loza] and [khalilnallar] are developing an automated digital microscope based on computer vision and machine learning, their entry for the Hackaday Prize.

automated_microscope_detection_1They started out gathering images of Tuberculosis bacteria from the internet and experimented with color threshold algorithms to detect dyed bacteria, as well as algorithms for counting individual and clusters of bacteria. This process alone can, according to the team, take a trained professional 30 minutes or more. A graphical interface highlights identified bacteria and reads the bacteria count.

[Rodrigo Loza] and [khalilnallar] are testing their device at the Dr. Roberto Galindo Teran hospital in Cobija, Bolivia. However, getting access to a lab environment is one thing, and being given access to a steady supply of fresh M. Tuberculosis samples is another. Unable to obtain samples, which they need to test their algorithms on live subjects, they turned to another front of their project: The hardware. In several iterations, they developed a low-cost, 3D-printable kit, which transforms a laboratory-grade optical microscope into an embedded CNC-controlled microscopy platform. Their kit comprises three stepper-motor-based axis for the X, Y and Z direction, as well as a webcam mount. An Intel Edison and a custom, Arduino compatible shield control the system to achieve features such as homing procedures, autofocus and bacteria detection.

The team is currently in the process of refining their bacteria detection pipeline, exploring the feasibility of semi-automated detection methods, machine learning and neural networks for classification of bacteria within the hardware constraints. The video below shows their latest update on the Z-axis of their microscope.

Continue reading “Hackaday Prize Entry: Automatic Digital Microscope”

Hacklet 110 – Optical Microscopy Projects

Humans have always wanted to make small things bigger. To see that which is unseen with the naked eye. The inventor of the original microscope happened sometime in the 1600’s, though the inventor is still contested. Some say it was Cornelis Drebbel, while others say Hans Lippershey. Galileo Galilei’s compound microscope is probably the most well-known ancient magnifier. Regardless of who created the device, hackers, makers, engineers, and scientists have used microscopes to study mysteries of biology, geology, electronics, and just about anything else you can imagine.

This is a fitting topic for this week’s Hacklet at is aligns well with the Citizen Scientist challenge round of the Hackaday Prize which began on Monday. Making quality microscopes more widely available is one of many great starting ideas for an entry. Let’s take a look at some of the best microscopy projects on Hackaday.io!

scope1We start with [J. Kha] and Armed Microscope. [J. Kha] was one of the backers of the original uArm over at Kickstarter. He also does quite a bit of work with electronics. After fighting with a cheap USB microscope, he realized he had the perfect platform to control it. Microscopes usually are stationary, with the object being viewed moved on a stage. [J. Kha] turned things upside down by mounting the microscope on his uArm. An Arduino Yun controls the system. The Yun also allows him to stream the microscope’s video over the internet using the mjpg-streamer library. [J. Kha] did have some power issues at first, but he’s got his regulators all sorted out now.

scope2Next we have [andyhull] with Adding a light touch to a “classic” microscope. A lucky dumpster find netted [Andy] a pile of old broken microscopes. From this he was able to build a working classic stereo scope. This was a Gillet & Sibert stereo compound scope. Like most microscopes of its time, the old GS used standard incandescent or halogen lights for illumination. The old bulbs were long gone, and would have been a pain to replace. [Andy] switched his scope over to LED illumination. He ended up using a commercially available LED “bulb” designed to replace type 1157 automotive tail light bulbs. This type of LED is designed to run on 12 volt power which simplifies the wiring. The small LED flashlight in a custom mount also provides a bit of help for opaque subjects.

scope3Next up is [Andre Maia Chagas] with Flypi – cheap microscope/experimental setup. Flypi is [Andre’s] entry in the 2106 Hackaday Prize. Flypi is more than just a microscope, it’s a 3D printed data collection and image analysis device for hackers and scientists alike. A Raspberry Pi 2 or 3 controls the show. Images come in through Pi Camera with an M12 lens. The Pi runs some open source Python code allowing it to acquire and analyze images. It also has an Arduino as a co-processor to handle anything a particular experiment may need – like RGB LEDs, heaters, manipulators, you name it. Andre sees Flypi as having uses in everything from fluorescence imaging to optogenetics and thermogenetics.

scope5Finally we have [Jarred Heinrich] with Stagmo: Microscope Stage Automator. Positioning samples under high magnification requires a steady hand. Trying to image them makes things even harder. To help with this, microscopes have stages. Fine lead screws manually controlled by knobs allow the user to precisely position any subject. Automated stages are available as well, but they can get quite expensive. [Jarred] recognized that the microscope stage is an X-Y platform like any CNC, laser, or 3D printer. He used an Arduino and a motor shield to control a couple of stepper motors. The motors are coupled to the stage knobs with rubber belts. While the mounting system looks a little wobbly, but it got the job done, and didn’t require any modifications to the microscope itself.

Optical microscopes are just one type of scope you’ll find on Hackaday.io. There are also atomic force microscopes, scanning electron microscopes, and more! I’ll cover those on a future Hacklet. If you want to see more awesome optical microscopy projects, check out our new optical microscope projects list! If I missed your project, don’t be shy, just drop me a message on Hackaday.io. That’s it for this week’s Hacklet. As always, see you next week. Same hack time, same hack channel, bringing you the best of Hackaday.io!

One Hacker’s Small Tabletop Photo Studio

We love good pictures. You know, being worth a thousand words and all. So, after our article on taking good reference photos, we were pleased to see a reader, [Steve], sharing his photography set-up.

Taking good technical photos is a whole separate art from other fields of photography like portraiture.  For example, [Steve] mentions that he uses “bullseye” composition, or, putting the thing right in the middle. The standard philosophy on this method is that it’s bad and you are bad. For technical photos, it’s perfect.

[Steve] also has some unique toys in his arsenal. Like a toy macro lens from a subscription chemistry kit. He also showed off his foldscope. Sadly, they appear to no longer be for sale, but we sometimes get by with a loupe held in front of the lens. He also uses things standard in our shop. Such as a gridded cutting mat as a backdrop and a cheap three dollar tripod with spring actuated jaws to hold his phone steady.

In the end, [Steve] mostly shows that a little thought goes a long way to producing a photo that doesn’t just show, but communicates an idea in a better way than just words can manage.


Machines That Build Other Machines

When the RepRap project was founded in 2005, it promised something spectacular: a machine that could build copies of itself. RepRaps were supposed to be somewhere between a grey goo and a device that could lift billions of people out of poverty by giving them self-sufficiency and the tools to make their lives better.

While the RepRap project was hugely successful in creating an open source ecosystem around 3D printers, a decade of development hasn’t produced a machine that can truly build itself. Either way, it’s usually easier and cheaper to buy a 3D printer than to build your own.

[castvee8]’s entry into the 2016 Hackaday Prize does just what the RepRap project promised ten years ago. It’s all about building machines with the ability to reproduce, creating an ecosystem of machines to build household goods. The best part? You can 3D print most of the machines. It’s the RepRap project, but for mills, lathes, microscopes, and routers. It’s an entire shop produced entirely in a 3D printer.

The idea of creating a machine shop from the most basic building materials has been around for a while. At the turn of the last century, concrete lathes and mills bootstrapped industrial economies. Decades later, [David J. Gingery] created a series of books on building a machine shop starting with a charcoal foundry. The idea of building a shop using scrap and the most minimal tools is very old, but this idea hasn’t been updated to the era where anyone can buy a 3D printer for a few hundred dollars.

So far, [castvee8] has a few homemade machine tools on the workbench, including a lathe, a tiny mill easily capable of fabricating a few circuit boards, and a little drill press. They’re all machines that can be used to make other useful items, and all allow anyone to create the devices they need.

The HackadayPrize2016 is Sponsored by:

Building an Atomic Force Microscope on the Cheap!

LEGO2NANO, are building an open hardware AFM (Atomic Force Microscope).

AFMs are a kind of probe microscope. Unlike an optical microscope, a probe is used to “feel” the topology of a surface. An atomic force microscope uses a flexible cantilever with a nanometer scale tip on the end. As the tip scans across the surface it will be deflected by its interaction with the surface. A laser spot is usually reflected off the back of the cantilever, and captured by a photodiode array. The angle of the reflected beam, and therefore which photodiodes are excited lets you know how much the cantilever was deflected by the surface.

One of the challenges of building an AFM is developing an actuator that can move with nanoscale precision. We recently reported on [Dan Berard]s awesome capacitor actuator, and have previously reported on his STM build which uses a piezo buzzer. LEGO2NANO are experimenting with a number of different configurations, including using Piezo buzzers, but in a different configuration to [Dan]s system.

The LEGO2NANO project runs as a yearly summer school to encourage high school students to take part in the ambitious task of building an AFM for a few hundred dollars (commercial instruments cost about 100,000USD). While the project isn’t yet complete, whatever the outcome the students have clearly learned a lot, and gained an exciting insight into this cutting edge microscopy technique.

Hackaday Prize Entry: Online Bone Marrow Cytometry Aid

Simple blood tests can lead a doctor toward a diagnosis of blood cancers, like leukemia, lymphoma and myeloma, but to really see what’s going on, he or she needs to go to the source of the problem: the bone marrow. Examining maturing blood cells from the marrow with a microscope is an important step in staging the disease and developing a plan for treatment, but it’s a tedious and error-prone process that requires a doctor to classify and tally a dozen or so different cells based on their size, shape and features. Automated systems like flow cytometry and image analysis software can help, but in an austere environment, a doctor might not have access to these. Luckily, there’s now an on-line app to assist with bone marrow cytometry.

Thanks to [Eduardo Zola], a doctor can concentrate on classifying cells without looking up from the microscope, and without dictating to an assistant. Keys are assigned to the different cell morphologies, and a running total of each cell type is kept. With practice, the doctor should be able to master the keying for the various cells; we suspect the generation of physicians that grew up with the WASD keying common in PC-based gaming might have a significant advantage over the older docs when it comes to learning such an app.

[Eduardo]’s app seems like a simple way to improve on an important medical procedure, and an enabling technology where access to modern instrumentation is limited. To that end, one area for improvement might be a standalone app that can run on a laptop without internet access, or perhaps even a version that runs on a smart phone. But even as it is, it’s a great entry for the 2015 Hackaday Prize.

The 2015 Hackaday Prize is sponsored by:

Microscope Camera For Zeroing CNC Machines

After what we’re sure is several dozen screw-ups or at the very least a lot of wasted hours, [Chris] has gotten around to building a very precise microscope camera mount for zeroing out his CNC machine.

If you need to mill a few bits out of a sheet of metal or plastic, it’s important to know exactly where you’re cutting. A CNC machine can take care of the relative positioning, but if you already have half your holes drilled, you also need absolute positioning. This means placing the work piece exactly where you want to cut, or failing that, zeroing the machine to a predefined point on the piece.

[Chris] is accomplishing this with a pen-shaped USB microscope. With a 3D printed mount and a few magnets, this camera can clip right on to the machine, and with the camera interface in Mach3, it’s pretty easy to zero out the mill to within a thousandth of an inch.

There’s a video demo of the camera in action below, but there’s a lot more CNC mods on [Chris]’ website. There’s custom 3D printed vacuum nozzles, and a lot of work on a small desktop Grizzly mill.

Continue reading “Microscope Camera For Zeroing CNC Machines”