Тёмный

Hack an optical mouse into a camera with Arduino and Processing 

Conor Peterson
Подписаться 3,8 тыс.
Просмотров 896 тыс.
50% 1

Grab the frame buffer from an optical mouse with Arduino. Low blood sugar special, guest starring twin peaks theme and 1024x768 t-shirt. Code available at conorpeterson.w...
View my other stuff:
conorpeterson.w...

Опубликовано:

 

13 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 382   
@markchinski5071
@markchinski5071 5 лет назад
If only every video could be filmed this well. It'a almost always in focus, pointing at relevant components, WITH audible audio. Nice work. Even a soundtrack.
@thechangemaker7730
@thechangemaker7730 9 лет назад
So now I understand how some 240p videos on RU-vid are made.
@RenCode
@RenCode 6 лет назад
hhhhhh good one
@vertigo6982
@vertigo6982 5 лет назад
just picturing all those sex tapes were made with homeboy swinging a mouse around.
@KATIVEIR0doRAP
@KATIVEIR0doRAP 4 года назад
@@KIDPADDLE93 Ball mouse
@informediatech-bruno5766
@informediatech-bruno5766 4 года назад
there is some 144p too
@madzak9847
@madzak9847 4 года назад
Мысли читаешь ) you read my thoughts
@MaZe741
@MaZe741 10 лет назад
Most epic 4-cable-soldering EVER
@hellogoodbye8264
@hellogoodbye8264 9 лет назад
The music sounded like you were having a romantic date with the mouse lol.
@glamdrag
@glamdrag 9 лет назад
Jam Tart its from the Twin Peaks soundtrack :)
@emmanuelsheshi1553
@emmanuelsheshi1553 6 лет назад
Hahahaha.... mouse love
@MarinusMakesStuff
@MarinusMakesStuff 3 года назад
@@glamdrag Mousa Palmer
@ConorPeterson
@ConorPeterson 11 лет назад
Hi Mike, everything ok?
@sorawisdom6516
@sorawisdom6516 3 года назад
It would be cool of you did this with a modern mouse
@imonlyhers.
@imonlyhers. 2 года назад
Yes
@KarlSander
@KarlSander 11 лет назад
This is best edited hardware hack documentation video i have ever seen. Great work on that. I especially liked the romantic soldering scene. The hack itself is also pretty cool.
@hovernerdy5318
@hovernerdy5318 9 лет назад
I think this can work as an optical flow sensor for arduino for example, which helps in stabilizing an object (e.g. hovering copter). It may serve the purpose of a motion sensor as well.
@y17t90
@y17t90 2 года назад
gyro would work better + soo much suppoet will be there from fellow enthusiasts
@XypherOrion
@XypherOrion Год назад
The dramatic slowmo at 3:00 absolutely destroyed me. 🤣🤣🤣
@morphman86
@morphman86 8 лет назад
The music choice and the slow motion is hilarious! 80's love song while "mating" wires and components...
@levixdl4911
@levixdl4911 Год назад
After watching your video, I had a flashback into the past when I watching RU-vid videos was so beneficial.
@valveman12
@valveman12 10 лет назад
Hey Conor great video. I like your method of wirestripping :O) I can't remember how many times I've done that myself.
@glamdrag
@glamdrag 9 лет назад
thank you for the Twin Peaks soundtrack. brings back memories :)
@aront6465
@aront6465 4 года назад
Still useful in 2020 Thanx!!
@AlberoDeiFichiSecchi
@AlberoDeiFichiSecchi 10 лет назад
10 FPS is a hardware limit or a bottleneck caused by the Arduino/PC interface? I feel like my screen pointer tracks my hand movements much faster than at 10 Hz
@djfriiky
@djfriiky 10 лет назад
I think this is because you read the memory of the chip, while normally the chip tells the microprocessor in the mouse the movements only... He is saying something like that, just before he explains the pins.
@christianruales5519
@christianruales5519 4 года назад
It Is because of the image processing right?
@jbalazer
@jbalazer 4 года назад
The Avago data sheet for that sensor chip says it operates at 1500 frames per second. It would operate at that rate in a mouse in which the sensor chip is translating images into motion. When you want to read the images off the chip you are constrained by the speed of the sensor chip's serial interface. Reading images that way is just for diagnostic purposes.
@lazlowpanaflex1
@lazlowpanaflex1 10 лет назад
I thought something surreal was about to happen when the Twin Peaks soldering montage got going. I think it added something to the general quirky vibe of the editing and presentation.
@uxxlabrute
@uxxlabrute 8 лет назад
Did you film this video using one of those ? 2010 lolz.
@projyuaharoni
@projyuaharoni 8 лет назад
+Luc4s. :)
@ConorPeterson
@ConorPeterson 12 лет назад
You're pretty much right. One possible application I found was to use it for low-budget optical interferometry, that is, to detect minute vibrations or even temperature shifts by placing the sensor between interfering laser beams (or more like, a single laser beam interfering with itself). I had to pack up my things for an abrupt cross-country move before I could get it working reliably and never documented it, so if that's interesting to you, maybe it IS your turn.
@bogdanresume
@bogdanresume 6 лет назад
Seems a perfect candidate for experiments with machine vision. Even sewing machines use this technology for speed control. Could be applied to woodcarving, automobile detailing, package printing, even robots.
@DaryxFox
@DaryxFox 11 лет назад
Just because something has changed because of where it's used and by whom does not make it incorrect. In fact, there is no incorrect way of saying any word; only correct one(s), so long as they are understood.
@samieb4712
@samieb4712 8 лет назад
"I'm done with this" Great video
@georgeorwell4509
@georgeorwell4509 3 месяца назад
Could it be used as as a motion sensor...say to light an led when a hot wheel car crosses the finish line?
@Bizorke
@Bizorke 9 лет назад
That's a cool hack. I've been working on an embedded project that requires a colour digital camera, but upon trolling adafruit and sparkfun, there are currently no cheap camera modules (complete with frame grabbers) available for hobbyists - not that it's a hobby project, but the prototype for what I'm building has to start somewhere. I haven't considered looking into single chip colour cameras or image sensors. So, this really simplifies things :D.
@ilioscio
@ilioscio 8 лет назад
Immediately subbed for twin peaks theme.
@maiodev
@maiodev 12 лет назад
if you could detect how much to the left or right someting moves you could use it to control a motor and find a specific position. that could be really useful
@ConorPeterson
@ConorPeterson 12 лет назад
There's a USB serial driver that's part of the arduino software. Aside from that, all source code can be found at the link in the description. It's in java (for Processing) and straight C (for Arduino).
@bogujoe7856
@bogujoe7856 3 года назад
I like the slowmo of you eating isolation. I personally like the red ones better (strawberry), but pineapple is fine too!
@far-red
@far-red 7 лет назад
generally good. did get a really good understanding of how optical mouse works. no wonder it wont work on glass surfaces
@omsingharjit
@omsingharjit 5 лет назад
Can we use old mobile ccd or cmos camera sensor with arduino ??????
@linuxromania
@linuxromania 11 лет назад
ok man , got the point here, but one little advice ... don't do that anymore ,,,striping wires with the teeth ,did the same as was younger and got teeth damage . Ok , so for the project itself, that sensor has to be put on a carriage with X /Y axes to get some usage , some like a scanner or slow scan fingerprint. I do electronics since i was 6 old , and glad to see that ppl are still homebrewing .
@caravansecuritykemp7486
@caravansecuritykemp7486 8 лет назад
the tracking firmware in that mouse when refocused to infinity can give direct axis steering outputs to make a drone lock on and home in on a target...without an arduino. its a fun project to try. surprised more uses for these sensors are not posted.
@omsingharjit
@omsingharjit Год назад
I wondering if it's sensitive to Color? If yes can we use this sensor to make Arduino based optical Spectrum Analyser using Diffraction Grading.
@juistian
@juistian 9 лет назад
Love your wire strippers. I use the same kind frequently.
@Informastuce
@Informastuce 9 лет назад
+juistian case me too, before Iordered a proper one and it's worth the money
@byronskikersakov3512
@byronskikersakov3512 6 лет назад
I always used the same brand of wire strippers myself, until they flew out my mouth and hit the wall. Now I have proper wire strippers but you will never guess the brand when I tell you.
@KrisBendix
@KrisBendix 11 лет назад
I think we could use it for some apparatus that does some scanning work. May be someone needs to make some small scale production line and check if products has been made correctly.
@michaeluna
@michaeluna 11 лет назад
This is hilarious that you used that music. Well done.
@adrianfilipi8036
@adrianfilipi8036 10 лет назад
Nice. Love the Twin Peaks homage.
@warpster7656
@warpster7656 7 лет назад
This has amazing applications! I have had to come back to this video to remind myself of the idea i had. Thanks for your video!
@dominicracca7856
@dominicracca7856 9 лет назад
FIre Walk With Me is a great instrumental. Kinda funny you started soldering when it started playing, it reminded me of the opening to Twin Peaks where the machine is sharpening the saw blade! Great timing. Too bad that camera cant be used for distance.
@DeezMistaReez
@DeezMistaReez 10 лет назад
Conor, can you use this same concept for recycling old cellphone cameras?
@hugodavid2244
@hugodavid2244 4 года назад
@@jubmeca y de las grandes
@MikelGarin999
@MikelGarin999 8 лет назад
Not only very interesting stuff, very good music too! Thank you!
@ConorPeterson
@ConorPeterson 14 лет назад
To be honest, I don't know that much about developing for the ipod/ipad/iphone. But I would hazard a guess that it would be difficult to write drivers for your own custom hardware, just from what I've heard about app development for those platforms. Sorry if the video is getting anyone's hopes up, it was intended more as a dead-pan joke than anything else. :)
@emc2184
@emc2184 8 лет назад
You are NOT, - "Done with this", - you didn't try any different "Lenses", for the mouse. You may find that you can get quite a clear image using a different lens, at different focal lengths, ... drill out the original lens and try others from different devices....... It's all learning with some fun thrown in, ... it only requires "a little effort", on your part...... . .
@KatorNia
@KatorNia 6 лет назад
First of all, Conor looks more like Generation Z. Second of all, I really hope you have mistaken Millennials for Generation Z, otherwise your comment was silly. Third of all, us Millennials are the best generation ever!!1!1!
@Actinuon
@Actinuon 5 лет назад
@Joe Duke Haha, they definitely are losers, your generation raped the future to have a better life. Now they are walking into world where they are are less well off than you. Congratulations, you let greed win, and the rest of us will end up paying. But it doesn't matter, you're obviously a nut job, just look at your uploaded videos. Somebody's got some issues...
@among-us-99999
@among-us-99999 5 лет назад
@Joe Duke well, who messed up the Millenials? Was it maybe..bad parenting?
@MikeTalksAbout
@MikeTalksAbout 12 лет назад
the twin peaks song made this awesome!
@sleat
@sleat 11 лет назад
Fun Hack! I always thought the mouse imager might be handy for a surface-visible auto-hover for tiny aircraft and little helicopters. On further investigation, turns out it's very true. I can remember having this thought the first time I saw a SUN Micro Sparc optical mouse, but at the time wasn't game to waste one to prove the point. Also insert any other "deflect-the-controls-in-proportion-to-the-image-changing" application here.
@stavroshouiris
@stavroshouiris 11 лет назад
That is a cool project but if any of you want it for a rc car or anything like that you mite need something that has more fps to keep track of that your doing.
@wanaaaaaaaaable
@wanaaaaaaaaable 11 лет назад
actually this is not useless at all. doesn't sounds like failure imho :D it's just the optics of the camera - the focus range is very short and they just meant to be like that (remember they're mouse). Good job on the video!
@snocamo154
@snocamo154 12 лет назад
The modified camera might be used to read text from a flat surface (maybe) or note light on/off situations in a stealthy way.
@crisg.5766
@crisg.5766 10 лет назад
hey, thanks for posting this! love the twin peaks sound track too!
@hugoelec
@hugoelec 8 лет назад
this is great project!! you can use it as optical ruler decoding camera but need to find a micro leaner encode tape of some sort since there is no cheaper microscopic camera anyway
@susmithcs
@susmithcs 8 лет назад
+佳明鄭 hi that is a cool thought! can explain how we can do this?
@hugoelec
@hugoelec 8 лет назад
most easy one would be using black-to-white gradient as target
@susmithcs
@susmithcs 8 лет назад
+佳明鄭 i understood the setup.I meant how to interpret the signal ? how to process the image ?
@hugoelec
@hugoelec 8 лет назад
+susmith cs you just add pixels up and divide them And you got the position value No need for interrupt
@ottohonglong9058
@ottohonglong9058 6 лет назад
mouse could be used for near scale movement detection - if a person invading some debarasses is close to the door as I undestand
@tomdoff1
@tomdoff1 10 лет назад
you could use it for interpreting written text.
@tarawood-bradley2119
@tarawood-bradley2119 3 года назад
interesting video and concept, my first impression is how could I use this in my CNC, optical sensor, something to remember
@ConorPeterson
@ConorPeterson 14 лет назад
@nws15 You may be able to write a driver for certain mice to dump the image, but I doubt it could be done with matlab. The optical data is buried pretty deeply in the mouse hardware.
@jamesbandam1854
@jamesbandam1854 8 лет назад
JUST LIKE A PATIENT IN EMERGENCY ROOM WHILE SOLDERING THE WIRE LOL,,,KEEP UP THE GOOD WORK
@mj2906
@mj2906 9 лет назад
If you add another lens in front of the mouse you can have focus on different distance
@RiaRadioFMHD773
@RiaRadioFMHD773 9 лет назад
+Matt J. It was most likely an acrylic lens, but there are tiny thick glass lenses that could be used. Also, you are correct that a second lens would increase focal length.
@robergainful9794
@robergainful9794 Год назад
Me parece, vas a tener que hacer una correccion: no es pin7: 5v y pin8 GND. Sino pin6: 5v y pinn7:GND. Saludos
@freshnelly
@freshnelly 11 лет назад
I can think of a good use for this, a weatherproof switch/direction control for a robot or outdoor interface in an RF intense environment. Of course finger skin doesn't work well with red so the LED would need to be changed. Impressive! What did you use to bring up the image? I'm a PIC head, so... Oh and if you want better music for you video (yank) I can score your stuff for free/fun/advice lol
@ConorPeterson
@ConorPeterson 12 лет назад
Earlier that day I gave a presentation to a bunch of college faculty about how to format images for powerpoint. To help them remember I gave away freebies emblazoned with the most common projector resolution and then revealed my new mnemonic fashion line.
@619egghead
@619egghead 11 лет назад
maybe you could use it to scan characters for an ocr thing that a blind person can use to read a book. ( partial blind - legally blind - elderly or someone that can see but not well enough to actually be able to read.)
@jimvandamme
@jimvandamme 11 лет назад
I almost did this myself for a project where we had to sense the motion of a truck at slow speed along a road. We couldn't get the optics to work well enough. I still have the mouse. Actually I raided the IT junk box for dozens of 'em.
@moonaddict
@moonaddict 2 года назад
The main thing I intend to do is a panoramic image, ie capture all 40x40 pixels or whatever is the size in a straight line and then photoshop them together.
@muflatu
@muflatu 10 лет назад
Nice project.Please can You tell me what camera did use for recording?cheers
@tasJis
@tasJis 10 лет назад
The music... So much nostalgia...
@carl95125
@carl95125 10 лет назад
I love the music from "Twin Peaks"
@WhoWantsToKnow81
@WhoWantsToKnow81 8 лет назад
I enjoyed the Twin Peaks music reference.
@Alan-ke1ug
@Alan-ke1ug 8 лет назад
Ghought that was twin peaks
@ConorPeterson
@ConorPeterson 14 лет назад
@iBlackwind Are you asking if it's possible to write a driver for the iPad that lets it pull data from an optical mouse camera? Good god, I have no idea. Doesn't the iPad already have a perfectly good camera (that actually focuses beyond 2mm?)
@RichardKCollins
@RichardKCollins Год назад
Please add captions (English and universal translation) Seems like a good video but I cannot hear. You moved your website, but did not update your links
@zRev1983
@zRev1983 12 лет назад
1024x768... what a nostalgic resolution...
@YouTubeDoxedMyRealName
@YouTubeDoxedMyRealName 9 лет назад
Cool, seems like if you had a high speed adjustable DPI gaming mouse like a Razor or something you might actually have a pretty cool camera. I remember I used to have a dual sensor high dpi Logitech back in the day maybe I can find it...
@DownhillAllTheWay
@DownhillAllTheWay 10 лет назад
Why are you stuck with the little plastic lens, which focuses at about 1mm (the distance of the surface it normally tracks)? Surely you could use some other lens, for example from a camera, that will focus an image onto the surface of the chip? It would be very interesting to see what it makes of an actual picture.
@semphony100
@semphony100 9 лет назад
can this be used as a line tracking sensor for a robot
@suhailab3634
@suhailab3634 3 года назад
Yes
@luoarnamsk
@luoarnamsk 4 года назад
Love the twin peaks sound track :D
@michaelpayumo6848
@michaelpayumo6848 12 лет назад
anyway, i think the resolution is too low. however, if try to look at it the backside of the mouse is already a perfect platform for infrared spectroscopy.. thanks
@jpr1011
@jpr1011 10 лет назад
Suppose you printed a 2-dimensional De Bruijin sequence and used it as a mouse pad. You could use it as an absolute pointing device.
@rbaleksandar
@rbaleksandar 10 лет назад
How about building an array of those sensors (each takes a frame of a portion of the surface you want to view), using a microcontroller to synch and combine the data from all and send it to your computer (via Arduino) for a bigger image? :)
@iBlackwind
@iBlackwind 14 лет назад
Sorry for not being clear, I meant a driver for a camera module which is to be connected externally to the iPad. Currently the iPad does not have a camera:(
@canlelola
@canlelola 11 лет назад
I should point out that you have shone that it can be done. And when I can get my dirty little hands on my own Arduino (I am wiring on the shipping) I have another project to play with, thanks.
@WynterKA
@WynterKA 9 лет назад
Awesome hack... Music made me cry!
@guitarman840
@guitarman840 11 лет назад
Best soldering music ever.
@vertigo6982
@vertigo6982 5 лет назад
05:39 when you're trying to sound like a bad ass for the first time in your life...
@fartsneed9464
@fartsneed9464 7 лет назад
I couldnt tell you were a total nerd until i heard the twin peaks theme during the solder run. :P
@michaelpayumo6848
@michaelpayumo6848 12 лет назад
hi i was thinking of a DIY project with the optical mouse. i was planning to use the camera of the optical mouse to take images of a finger placed on top of it and correlating the resulting spectral information to measure say, heartbeat or even blood sugar concentration through digital image processing. i think this is possible since the infrared light can penetrate the tissue thereby images captured can be used to determine the analyte of interest
@Yrgen2
@Yrgen2 7 лет назад
Thanks Conor! I learned what i needed to know
@cyrustakem7993
@cyrustakem7993 7 лет назад
Awesome, I have some old mice i'd like to recycle and this could become a cool project to tinker with, thanks a lot
@hhocourierpcengineer
@hhocourierpcengineer 8 лет назад
That was very impressive and pretty cool thumbs up from me, might have a play with your code if its still out there! Thank you for this, it is incredably informative if you are into this stuff and if you are not!
@mickbanks68
@mickbanks68 11 лет назад
could this be used to control the flow of filament extruded at the hot end of a 3D printer..
@nbarrager
@nbarrager 5 лет назад
Fuck me running, I'm switching to a trackball! NSA has probably been watching me through my mouse for years!
@Dragon90815a
@Dragon90815a 10 лет назад
You should see if you can get a better lens made for it. better resolution
@reza.babakan
@reza.babakan 6 лет назад
Thanks, it was good one, I'm going to make, but I'll enhance lenses to get fine focus. Good idea.
@kataya5005
@kataya5005 8 лет назад
i think you can use that as a linear encoder that can move on both the x-y axis
@hardizzer1891
@hardizzer1891 7 лет назад
Can you show us the circuit and the code please ?
@shinolife63
@shinolife63 11 лет назад
As a 12 year old, i can attest to this, only been using arduino for a year and my teeth are already feeling it >_>
@ConorPeterson
@ConorPeterson 11 лет назад
@iRouRoui in the video I used a vise from home depot, but a popular tool used for this purpose is known as a "third hand" and is available at most hobbyist websites (sparkfun, jameco, etc.)
@subirbhaduri
@subirbhaduri 3 года назад
We actually built a 'seismometer' based on the mouse's surface movement detection technology :) Search for "seismousemeter" on youtube.
@Ashish-sp4hw
@Ashish-sp4hw 6 лет назад
Great stuff.Where can get more references about this?
@djdavies83
@djdavies83 13 лет назад
How about using a lens from a disposable camera and using the mouse as a barcode scanner?
@rackbites
@rackbites 2 года назад
This is extremely interesting ... one practical application that EVERYONE needs is a mouse jiggler ... no more screen timeouts on machines that you don't have permissions to adjust that. And the mouse registers with the PC as a legit USB mouse. What could you send on those pins to the Logitech chip to emulate a jiggle?
@djl02184
@djl02184 11 лет назад
One could further research diffeent lenses instead. Also, I can see it being used in line follower robots.
@MilanKarakas
@MilanKarakas 7 лет назад
On eBay exist the same camera with different lens mount, so that you can get 30x30 pixels live video (B/W).
@MilanKarakas
@MilanKarakas 7 лет назад
Posted link of example how it looks, but it ended in "likely spam" on your channel.
@keksefresser58
@keksefresser58 8 лет назад
So theoretical you could build a crude scanner by mounting it to an XY Plattform and capturing every piece
@dileepjoshi8045
@dileepjoshi8045 10 лет назад
Great Hack! Like the honest comments....and using my own preferred method of skinning wire insulation!!! Keep up the good work.
Далее
What does a computer mouse see?
9:21
Просмотров 2,6 млн
I Hacked a Mouse into a Camera!
10:04
Просмотров 177 тыс.
Mat pembersih pink untuk ibu hamil
00:21
Просмотров 1 млн
Forget the Arduino and Pi, use your old PC!
11:05
Просмотров 457 тыс.
Using a computer mouse as linear sensor
11:01
Просмотров 94 тыс.
3 AMAZING projects with old parts of a PC
14:50
Просмотров 301 тыс.
Electric Power with Only One Coil - Science Fair
11:15
Просмотров 277 тыс.
489 Megapixel DIY Digital Camera for little money.
4:46
The DSM LCD (like) you've never seen
12:44
Просмотров 474 тыс.
Detecting FAKE Chips From China 🔍
29:24
Просмотров 440 тыс.