PiSpy, The Camera Setup Designed To Make Biological Observations Better

Back in grad school, we biology students were talking shop at lunch one day. We “lab rats” were talking about the tools of the trade, which for most of us included things like gel electrophoresis, restriction endonucleases, and polymerase chain reaction. Not to be left out, a fellow who studied fire ants chimed in that his main tool was a lawn chair, which he set up by a Dumpster in a convenience store parking lot to watch a fire ant colony. Such is the glamor of field biology.

Ants on the march. Tough luck for the crickets, though.

What our colleague [Mike] wouldn’t have given for something like PiSpy, the automated observation tool for organismal biology by [Greg Pask] of Middlebury College, et al. As discussed in the preprint abstract, an automated imaging platform can be key to accurate observations of some organisms, whose behavior might be influenced by the presence of a human observer, or even a grad student in a lawn chair. Plus, PiSpy offers all the usual benefits of automation — it doesn’t get tired, it doesn’t need to take bathroom breaks, and it can even work around the clock. PiSpy is based on commonly available components, like laser-cut plywood and a Raspberry Pi and camera, so it has the added advantage of being cheap and easy to produce — or at least it will be when the Pi supply picks back up again. PiSpy takes advantage of the Pi’s GPIO pins to enable triggering based on external events, or controlling peripherals like lights or servos.

While built for biological research, there are probably dozens of uses for something like PiSpy. It could be handy for monitoring mechanical testing setups, or perhaps for capturing UI changes during embedded device development. Or you could just use it to watch birds at a feeder. The source is all open-sourced, so whatever you make of PiSpy is up to you — even if it’s not for watching fire ants.

When Hacking And Biosensing Collide

[Prof. Edwin Hwu] of the Technical University of Denmark wrote in with a call for contributions to special edition of the open-access scientific journal Biosensors. Along the way, he linked in videos from three talks that he’s given on hacking consumer electronics gear for biosensing and nano-scale printing. Many of them focus on clever uses of the read-write head from a Blu-ray disc unit (but that’s not all!) and there are many good hacks here.

For instance, this video on using the optical pickup for the optics in an atomic force microscope (AFM) is bonkers. An AFM resolves features on the sub-micrometer level by putting a very sharp, very tiny probe on the end of a vibrating arm and scanning it over the surface in question. Deflections in the arm are measured by reflecting light off of it and measuring their variation, and that’s exactly what these optical pickups are designed to do. In addition to phenomenal resolution, [Dr. Hwu’s] AFM can be made on a shoestring budget!

Speaking of AFMs, check out his version that’s based on simple piezo discs in this video, but don’t neglect the rest of the hacks either. This one is a talk aimed at introducing scientists to consumer electronics hacking, so you’ll absolutely find yourself nodding your heads during the first few minutes. But then he documents turning a DVD player into a micro-strobe for high speed microfluidics microscopy using a wireless “spy camera” pen. And finally, [Dr. Hwu’s] lab has also done some really interesting work into nano-scale 3D printing, documented in this video, again using the humble Blu-ray drive, both for exposing the photopolymer and for spin-coating the disc with medium. Very clever!

If you’re doing any biosensing science hacking, be sure to let [Dr. Hwu] know. Or just tear into that Blu-ray drive that’s collecting dust in your closet.

Continue reading “When Hacking And Biosensing Collide”

Microfluidics For Biohacking Hack Chat

Join us on Wednesday, July 7 at noon Pacific for the Microfluidics for Biohacking Hack Chat with Krishna Sanka!

“Microfluidics” sounds like a weird and wonderful field, but one that doesn’t touch regular life too much. But consider that each time you fire up an ink-jet printer, you’re putting microfluidics to work, as nanoliter-sized droplets of ink are spewed across space to impact your paper at exactly the right spot.

Ink-jets may be mundane, but the principles behind them are anything but. Microfluidic mechanisms have found their way into all sorts of products and processes, with perhaps the most interesting uses being leveraged to explore and exploit the microscopic realms of life. Microfluidics can be used to recreate some of the nanoscale biochemical reactions that go on in cells, and offer not only new ways to observe the biological world, but often to manipulate it. Microfluidics devices range from “DNA chips” that can rapidly screen drug candidates against thousands of targets, to devices that can rapidly screen clinical samples for exposure to toxins or pathogens.

There are a host of applications of microfluidics in biohacking, and Krishna Sanka is actively working to integrate the two fields. As an engineering graduate student, his focus is open-source, DIY microfluidics that can help biohackers up their game, and he’ll stop by the Hack Chat to run us through the basics. Come with your questions about how — and why — to build your own microfluidics devices, and find out how modern biohackers are learning to “go with the flow.”

join-hack-chatOur Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, July 7 at 12:00 PM Pacific time. If time zones have you tied up, we have a handy time zone converter.

[Featured image: Cooksey/NIST]

Webcam Heart Rate Monitor Brings Photoplethysmography To Your PC

It seems like within the last ten years, every other gadget to be released has some sort of heart rate monitoring capability. Most modern smartwatches can report your BPMs, and we’ve even seen some headphones with the same ability hitting the market. Most of these devices use an optical measurement method in which skin is illuminated (usually by an LED) and a sensor records changes in skin color and light absorption. This method is called Photoplethysmography (PPG), and has even been implemented (in a simple form) in smartphone apps in which the data is generated by video of your finger covering the phone camera.

The basic theory of operation here has its roots in an experiment you probably undertook as a child. Did you ever hold a flashlight up to your hand to see the light, filtered red by your blood, shine through? That’s exactly what’s happening here. One key detail that is hard to perceive when a flashlight is illuminating your entire hand, however, is that deoxygenated blood is darker in color than oxygenated blood. By observing the frequency of the light-dark color change, we can back out the heart rate.

This is exactly how [Andy Kong] approached two methods of measuring heart rate from a webcam.

Method 1: The Cover-Up

The first detection scheme [Andy] tried is what he refers to as the “phone flashlight trick”. Essentially, you cover the webcam lens entirely with your finger. Ambient light shines through your skin and produces a video stream that looks like a dark red rectangle. Though it may be imperceptible to us, the color changes ever-so-slightly as your heart beats. An FFT of the raw data gives us a heart rate that’s surprisingly accurate. [Andy] even has a live demo up that you can try for yourself (just remember to clean the smudges off your webcam afterwards).

Method 2: Remote Sensing

Now things are getting a bit more advanced. What if you don’t want to clean your webcam after each time you measure your heart rate? Well thankfully there’s a remote sensing option as well.

For this method, [Andy] is actually using OpenCV to measure the cyclical swelling and shrinking of blood vessels in your skin by measuring the color change in your face. It’s absolutely mind-blowing that this works, considering the resolution of a standard webcam. He found the most success by focusing on fleshy patches of skin right below the eyes, though he says others recommend taking a look at the forehead.

Every now and then we see something that works even though it really seems like it shouldn’t. How is a webcam sensitive enough to measure these minute changes in facial color? Why isn’t the signal uselessly noisy? This project is in good company with other neat heart rate measurement tricks we’ve seen. It’s amazing that this works at all, and even more incredible that it works so well.

How To Grow (Almost) Anything

An off-shoot of the infamous “How to Make (Almost) Anything” course at the Massachusetts Institute of Technology, “How to Grow (Almost) Anything” tackles the core concepts behind designing with biology – prototyping biomolecules, engineering biological computers, and 3D printing biomaterials. The material touches elements of synthetic biology, ethics of biotechnology, protein design, microfluidic fabrication, microbiome sequencing, CRISPR, and gene cloning.

In a similar fashion to the original HTMAA course, HTGAA works by introducing a new concept each week that builds up to a final project. Students learn about designing DNA experiments, using synthesized oligonucleotide primers to amplify a PCR product, testing the impact of genes on the production of lycopene in E coli., protein analysis and folding, isolating a microbiome colony from human skin and confining bacteria to image, printing 3D structures that contain living engineered bacteria, and using expansion microscopy (ExM) to visualize a mouse brain slice. The final projects run the gamut from creating a biocomputer in a cream to isolating yeast from bees.

Growing out from an initiative to create large communities around biotechnology research, the course requires minimal prior exposure to biology. By working directly with hands-on applications to biodesign concepts, students are able to direct apply their knowledge of theoretical biology concepts to real-world applications, making it an ideal springboard for bio-inspired DIY projects. Even though the syllabus isn’t fully available online, there’s a treasure trove of past projects to browse through for your next big inspiration.

A DNA-Based Computer Calculates Square Roots Up To 900

While DNA-based computing may not be taking over silicon quite so soon, there is progress in the works. In a paper published by Small, researchers from the University of Rochester demonstrate a molecular computing system capable of calculating square roots of integers up to 900. The computer is built from synthetic biochemical logic gates using hybridization, a process where two strands of DNA join to form double-stranded DNA, and strand displacement reactions.

DNA-based circuits have already been shown to implement complex logic functions, but most existing circuits prior to the recent paper were unable to calculate square root operations. This required 4-bit binary numbers – the new prototype implements a 10-bit square root logic circuit, operating up to the decimal integer 900.

The computer uses 32 strands of DNA for storing and processing information. The process uses three modules, starting off with encoding a number on the DNA. Each combination is attached to a florescent marker, which changes signal during hybridization in the second module. The process for calculating the square root controls the signals, with the results deducted from the final color according to a threshold set in the third module.

We’re beginning to see the end of Moore’s Law approaching, with companies like Intel and AMD struggling to shrink transistors 10 nm wide. Nevertheless, with DNA molecules still about 10 time smaller than the best transistors today and DNA computing systems continuing to gain in sophistication, biochemical circuits could potentially be holding solutions to increasing the speed of computing beyond silicon computing.

Using Glow-in-the-Dark Fish Gut Bacteria To Make Art

In New Orleans, a Loyola University professor has been creating original art out of glow-in-the-dark fish gut bacteria, enough to fill 1000 Petri dishes. Her first major foray into art was biomorphic abstractions, inspired by Impressionist painters, with her current work reflecting much of the abstraction of the earlier style.

The bacteria comes from the Pacific Rock Fish and glows a vibrant electric-blue. It is typically kept in a freezer and has a texture and color similar to water when it’s being used. The luminescence only lasts for 24 hours, presenting timing challenges when preparing artwork for a photoshoot, as artist [Hunter Cole] often does. With a Q-tip, [Cole] paints roses, lilies, and insects onto the Petri dishes and arranges them for surreal photography shoots. In addition to painting shapes in agar, she uses a light painting technique by filling clear water bottles with the bacteria for long-exposure shots.

[Cole] is planning on presenting her work at an art exhibit in New Orleans, along with showcasing a performance piece featuring models clad in chandelier-like costumes glowing with bioluminescent bacteria in petri dishes.