loading

ADNS 2620 Mouse Sensor and Lens?

MAIN QUESTION: What is a good simple way to hack together my own tiny lens that can go over a mouse sensor chip to allow it to focus about 10-20 cm away?

I bought a bunch of these mouse sensors https://www.sparkfun.com/products/12907 (which are basically tiny cameras) right before I came down to panama I was hoping they could solve an ant-traffic monitoring problem I will be working on for the next few months. I basically need a really cheap device that I can point at part of a tree, and have it tell me whether or not an ant is walking by. Here’s a bigger description of the problem (with pictures!) http://andy.dorkfort.com/andy/digitalnatural/2014/05/30/intro-to-arboreal-ant-sensor-main-project-summer-2014/ (Main Pic http://andy.dorkfort.com/andy/digitalnatural/wp-content/uploads/sites/2/2014/05/img_5388c64dc9c86.png)

Anyway through some quick hacking (still don't have a resonator for it until next week), i managed to get the thing working.

So after lots of messing around, i got the first steps to it working going on! Based off this: http://tim.cexx.org/?p=613

I modded an arduino sketch and a processing sketch to read the image, and display the image in processing: https://github.com/quitmeyer/AntSensorPrototype/tree/master/OpticalMouse%20Sensing

Go into the examples folder and look for ADNScamera for the arduino, and the readmouseimage sketch for the corresponding one.

Things are STILL way hacky. The guy from http://tim.cexx.org/?p=613 has a nice pinlayout and schematic, but I didn’t have an oscillator, so I just put at jumper wire between the osc in and out. I’m sure this is bad, but it actually functions and responds! I also don’t have a lens for it.