Monthly Archive for May, 2010

New results on worm detection by hacked optical mouse

For more information about this project check the recent posts on this blog.

I just updated the pd-patch and the serial communication with the arduino. it now allows the frame-grabbing of the full 18x18 pixels from the mouse sensor, adns2610, with a reasonable framerate of 8fps. see download link below.

in addition i used the hacked optical mouse to detect the motion of nematodes, anguila aceti, and got some really clear results, both in the quality of the image and a substantial change in the SQL value. due to some grabbing issues when recording the screen the values are a bit delayed in the image above.

Download new code
worm on mouse 2 pd v1.1
worm_on_mouse2pd_v1.1

update for adns5020_datasheet, 15x15 pixel, 7 bit

Motility detection of microorganisms using a hacked optical mouse

Just done further experiments with the hacked optical mouse sensor, in this case a Avago ADNS2610, from a cheap wired logitec optical mouse. So i managed to connect the optical sensor to the arduino and send all the data, including the image from the 18x18pixel sensor, through a serial connection to puredata (pd). The sensor is a real high-end device, it calculates the optical flow, thus gets out motion and the speed of the mouse, it detects focus by a SQL-value, which is proportional to the number of features the sensor detects on a surface. and other values such as maximum and average pixel and shutter speed can be read from the registers.

The frame rate of the transmitted image is sadly relatively low, cos the ADNS chip is not meant to present this info at higher speed. still its reasonable, when reading all 18x18 pixel a framerate of roughly 5 fps is feasible, if you only dump the first couple of lines you can increase it to higher framerates.

After building a patch to visualize all these data from pd, i started experimenting with placing microorganisms on top of the sensor, keeping the optics intact, but replacing the LED with an RBG, so i can control illumination.

I got some really amazing results, it seems i can detect single cell microorganisms using just the mouse sensor and an arduino. see the movie below. while the sensor only detects motion if the whole image is shifted, it seems that when a microorganism (Blepharisma Japonicum) passes the field of view, there is a substantial change in the SQL-value.

further i will try to do some simple image processing on the arduino directly, such as simple background substraction.

Download Code
The code for the arduino and puredata can be found here (work in progress):

worm_on_mouse2pd

* The arduino code, uses two libraries: pitches.h and SimpleMessageSystem.h. the first is just used to play a nice little welcome melody, the second is only needed to communicate back from pd to change the dumpWidth of the frame. copy them to your libraries folder.

* The pd patch uses two externals, "convert" to communicate with SimpleMessageSystem" (again only from pd to arduino not vice-versa) and a second one, "pd_fire_grad" to apply a look-up-table (LUT) to the pixels for better visualization.

More hacks on the BioNano-Mouse

I continued on the hack of the optical mouse, first i installed an RGB-LED to be able to choose the color of the illumination. The using the blue LED i tried to detect fluorescence using a fluorescein solution. I got some signals, but still need to test the amount of reflected light and fluorescence. got some filters laying around somewhere... i could easily detect the loss of fluorescence, when following a tiny little drop that dried out, see image below.

Furthermore I improved the code to read out the registers for the frame-grabbing. it seems there is a limit to at what speed i can dump all the pixels of the frame. But still i could improve it by reducing some of the delays down to 1 µsec. It lookes much smoother now, but haven't checked the worm yet.

Also i hacked another chip, the Avago 2610, very similar, 18x18 pixel array, And looking at the datasheet I should be able to get a lot more data out, such as, maximum and average pixel intensity, shutter speed, info about focused image etc.

Hackability of an Optical Mouse to use as NanoBio Sensing Tool

I am currently investigating to use the sensor of an optical mouse for various applications in microfluidics, nanosensing or motion detection of microorganisms. first results look really promising.
Thanks to some instructions and protocolls found on these sites: "How to connect an optical mouse to an arduino" by Martijn The and "Optical Mouse Cam" using an arduino and connect it to your PC, by Bidouille.org. And thanks to Gaudi for inspiring me for some worm-on-a-mouse hacking. Also there is some great documentation in the Avago Datasheets.

The video shows a screen-capture of how i recorder the motion of a nematode using a hacked cheap optical mouse, 16x16 pixel.

at the moment, the students at FHNW, Life science Technologies, are looking how to use the optical mouse sensor to detect flow speeds in microfluidics channels. more info can be found on my micro/nano lecture's wiki.

So first things to do: replace LED with some RGB or UV for fluorescence detection, code a more decent data visualization, add a speaker...

From the Datasheet
Notes:
The ADNS-2610 is designed for optimal performance when used with the HLMP-ED80-xx000 (red LED 639 nm). For use with other LED colors (i.e., blue, green), please consult factory. When using alternate LEDs, there may also be performance degradation and additional eye safety considerations.

New Animals and hacked PS3 Eye microscope

Easy modification of a Playstation 3 Eye, high-speed camera, optimized for low-lighting and motion detection. Thanks to Alejo Duque for coming up with the idea and prototyping the setup.

Step 1 - Open it up, f**k warrany
Use a small screw driver and open up the case of the PS3eye. The screws are hidden under the small black caps, which can be snapped out easily. Twist open the casing and then unscrew the pcb from the rest of the case.

Step 2 - Remove the optics
Unscrew the small screws which hold the optical parts. Remove it completely and inspect it. The bottom part, obviously has a threaded interior, but sadly the top, optical part is usually glued into it. try scratching off the glue. otherwise carefulle cut through the bottom piece until you can snatch it open and remove the top, optics.

Step 3 - inversion of the optics and positioning
The easiest way to tranform the PS3eye into a microscope is by just flipping upside down the optics. Remount the bottom part back onto the pcb and just tape back the optics upside down on top of it. For different magnifications you can also readjust the position/distance of the optics to the chip. the included switch in the optics to choose 2 different field of views (FOV) turns out to be really useful for microscopy applications.

Step 4 - build a stable setup for inverted light microscopy
tba