Hack an optical mouse into a camera with Arduino and Processing

Поделиться
HTML-код
  • Опубликовано: 3 июн 2010
  • 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.wordpress.com/20...
    View my other stuff:
    conorpeterson.wordpress.com
  • НаукаНаука

Комментарии • 383

  • @thechangemaker7730
    @thechangemaker7730 9 лет назад +228

    So now I understand how some 240p videos on RUclips are made.

    • @RenCode
      @RenCode 6 лет назад

      hhhhhh good one

    • @vertigo6982
      @vertigo6982 5 лет назад +2

      just picturing all those sex tapes were made with homeboy swinging a mouse around.

    • @LEFTYSMOKER
      @LEFTYSMOKER 5 лет назад

      have you never hear of 144p ?

    • @KATIVEIR0doRAP
      @KATIVEIR0doRAP 4 года назад

      @@LEFTYSMOKER Ball mouse

    • @informediatech-bruno5766
      @informediatech-bruno5766 4 года назад

      there is some 144p too

  • @markchinski5071
    @markchinski5071 5 лет назад +23

    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.

  • @MaZe741
    @MaZe741 9 лет назад +61

    Most epic 4-cable-soldering EVER

  • @hellogoodbye8264
    @hellogoodbye8264 9 лет назад +94

    The music sounded like you were having a romantic date with the mouse lol.

  • @KarlSander
    @KarlSander 11 лет назад +1

    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.

  • @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.

  • @muflatu
    @muflatu 10 лет назад +1

    Nice project.Please can You tell me what camera did use for recording?cheers

  • @georgeorwell4509
    @georgeorwell4509 Месяц назад +1

    Could it be used as as a motion sensor...say to light an led when a hot wheel car crosses the finish line?

  • @glamdrag
    @glamdrag 9 лет назад +3

    thank you for the Twin Peaks soundtrack. brings back memories :)

  • @crisg.5766
    @crisg.5766 10 лет назад

    hey, thanks for posting this! love the twin peaks sound track too!

  • @ConorPeterson
    @ConorPeterson  13 лет назад

    @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?)

  • @omsingharjit
    @omsingharjit 5 лет назад +1

    Can we use old mobile ccd or cmos camera sensor with arduino ??????

  • @XypherOrion
    @XypherOrion 11 месяцев назад

    The dramatic slowmo at 3:00 absolutely destroyed me. 🤣🤣🤣

  • @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!

  • @AviCastellanos
    @AviCastellanos 12 лет назад

    have a ? for you.I have afew wireless keyboards with no receivers could you inform me if i can use other transmitters or if i can make them into wired keyboards( just maybe the diagram of what each color represents on a usb cable) thats if i can actually be able to wire them. thanks

  • @morphman86
    @morphman86 8 лет назад +1

    The music choice and the slow motion is hilarious!
    80's love song while "mating" wires and components...

  • @joaocarlosgasparcarimo8448
    @joaocarlosgasparcarimo8448 3 года назад

    @Conor Peterson how about using it to measure laser reflection by amplifying with lenses? Is it quick enough for a lidar?

  • @priyankasingh-fi2jm
    @priyankasingh-fi2jm 9 лет назад

    how you are getting the visual output onto your computer, i check your link you had mentioned but it had moved on, ..........so can you tell me what software you used to see display

  • @valveman12
    @valveman12 10 лет назад +11

    Hey Conor great video. I like your method of wirestripping :O) I can't remember how many times I've done that myself.

  • @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.

  • @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.

  • @kgsart6422
    @kgsart6422 Год назад

    Do anyone know where I can find this mouse ? Because some of the recent mices don't work the same I guess so I just wanna have like that one if anyone knows where I can find it ?

  • @MikelGarin999
    @MikelGarin999 8 лет назад

    Not only very interesting stuff, very good music too!
    Thank you!

  • @ConorPeterson
    @ConorPeterson  10 лет назад +21

    Hi Mike, everything ok?

  • @uxxlabrute
    @uxxlabrute 8 лет назад +16

    Did you film this video using one of those ? 2010 lolz.

  • @levixdl4911
    @levixdl4911 Год назад

    After watching your video, I had a flashback into the past when I watching RUclips videos was so beneficial.

  • @3D_Printing
    @3D_Printing 7 лет назад

    How well do the detect heat??? For Infra red detection?

  • @AlberoDeiFichiSecchi
    @AlberoDeiFichiSecchi 10 лет назад +15

    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 лет назад +8

      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 года назад +1

      It Is because of the image processing right?

    • @jbalazer
      @jbalazer 3 года назад +1

      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.

  • @FDAKAbu3ABD
    @FDAKAbu3ABD 11 лет назад

    high .... I have a project that the Arduino sending vedio images ,, like 4 images per second ... and because the the camera sending stream data , I woulde love to know what's the Arduino that do the jop ...

  • @dhammabhusanabhusawal4027
    @dhammabhusanabhusawal4027 7 лет назад

    Sir, Is it possible by connecting some two points in mouse circuit or ic or camera, thereby cursor will move left right up and down, I have to make Mouse emulator, if yes than I will control mouse over Arduino. Sir Plz guide.

  • @iBlackwind
    @iBlackwind 13 лет назад

    So is it possible to write a driver for a camera module for the ipad?

  • @shiro7394
    @shiro7394 8 лет назад

    what if you another glass wont that change the range a bit??

  • @amirahabba1867
    @amirahabba1867 6 лет назад

    Pls would you help me by giving me an informatic project by arduino projects have relation to pc and the maintenance of pc

  • @bassamry
    @bassamry 11 лет назад

    so this method works with every optical mouse with any sensor inside or is there a certain type to do the job?thanks.

  • @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.

  • @Yrgen2
    @Yrgen2 7 лет назад

    Thanks Conor! I learned what i needed to know

  • @sureshnair408
    @sureshnair408 7 лет назад

    Why when we stop moving mouse...the serial monitors show x=0 and y=0, it suppose have reading right ?

  • @priyadarshianu
    @priyadarshianu 11 лет назад

    Hi. i m trying to use optical mouse with arduino for receiving mouse's motion(i know this is the normal function that every mouse does, except that m trying this with arduino). the prob is that my mouse uses some 14 pin IC, the datasheet of which i can't trace(may b it's chinese). So i want to use the D+ and D- of usb port of mouse for getting the change in location. can u provide me some link where arduino is used this way. or rather how can I (using 1 serial port of Uno) get the job done.

  • @ilioscio
    @ilioscio 7 лет назад

    Immediately subbed for twin peaks theme.

  • @lucasjosel4802
    @lucasjosel4802 Год назад

    Qual livro vc indica de hacker para hardware firmware?

  • @kakhao
    @kakhao 11 лет назад

    have you tried the same with a newer PAN101?

  • @hardizzer1891
    @hardizzer1891 7 лет назад +2

    Can you show us the circuit and the code please ?

  • @marlinlab
    @marlinlab 7 лет назад

    Dear sir,
    Thanks for sharing.
    Barcode scanner from line camera is possible? For spectrometer...
    Thanks for your answer.

  • @MarkHallAlan
    @MarkHallAlan 8 лет назад

    Would you provide a link to the code? I'm not seeing it on the old or new site. Thanks for the video.

  • @DeezMistaReez
    @DeezMistaReez 10 лет назад +6

    Conor, can you use this same concept for recycling old cellphone cameras?

  • @mickbanks68
    @mickbanks68 11 лет назад

    could this be used to control the flow of filament extruded at the hot end of a 3D printer..

  • @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

  • @hovernerdy5318
    @hovernerdy5318 8 лет назад +5

    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 года назад +1

      gyro would work better + soo much suppoet will be there from fellow enthusiasts

  • @lazer1743
    @lazer1743 12 лет назад

    use it as a cheap biometric reader for finger prints?

  • @aront6465
    @aront6465 4 года назад +1

    Still useful in 2020 Thanx!!

  • @nws15
    @nws15 14 лет назад

    hi
    wat if i dun have arduino?
    can i use USB cable to connect mouse to computer instead of connecting to arduino by using matlab programming?

  • @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

  • @fatih3194
    @fatih3194 7 лет назад +2

    hi can you hack a mouse chip by adding a potentiometer to it for changing mouse cursor position ? i mean like when u turn porentiometer to left the cursor of pc will go left

    • @riteshpatel1460
      @riteshpatel1460 7 лет назад +2

      Fatih Saruhan use old mouse which contain rotary encoder

  • @rerere284
    @rerere284 7 лет назад

    Are you going to update the description to fix the link?

  • @adrianfilipi8036
    @adrianfilipi8036 10 лет назад

    Nice. Love the Twin Peaks homage.

  • @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).

  • @michaeluna
    @michaeluna 11 лет назад

    This is hilarious that you used that music. Well done.

  • @miniwarrior7
    @miniwarrior7 11 лет назад

    Could we turn this into a arduino line follower? or the like

  • @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!

  • @bluebearedblood
    @bluebearedblood 11 лет назад

    Than would I be able to get a cheap webcam and turn it into a high quality mouse if i reverse this process?

  • @lazlowpanaflex1
    @lazlowpanaflex1 9 лет назад

    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.

  • @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

  • @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.

  • @caravansecuritykemp7486
    @caravansecuritykemp7486 7 лет назад

    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.

  • @cjellwood
    @cjellwood 13 лет назад

    how did you make soldering into a movie moment?

  • @samieb4712
    @samieb4712 8 лет назад +9

    "I'm done with this"
    Great video

  • @semphony100
    @semphony100 9 лет назад +5

    can this be used as a line tracking sensor for a robot

  • @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.)

  • @mashhudhasan9091
    @mashhudhasan9091 7 лет назад

    It's a really gd vid.but the thing that i wanna know,u used a software to see the surface image snapped by the sensor.what's the name of that software?Thanks in advance :)

  • @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

  • @jamesbandam1854
    @jamesbandam1854 8 лет назад

    JUST LIKE A PATIENT IN EMERGENCY ROOM WHILE SOLDERING THE WIRE LOL,,,KEEP UP THE GOOD WORK

  • @luismateo8214
    @luismateo8214 8 лет назад

    Hey Guy Could You Do that, a camera of phone use like mouse air? please answer my question.

  • @tusharlath1383
    @tusharlath1383 9 лет назад

    Cant understand after soldring what he ha done plz give me answer??

  • @Ashish-sp4hw
    @Ashish-sp4hw 5 лет назад

    Great stuff.Where can get more references about this?

  • @freshnelly
    @freshnelly 10 лет назад

    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  13 лет назад

    @HazakyProductions Theme from twin peaks.

  • @dileepjoshi8045
    @dileepjoshi8045 9 лет назад

    Great Hack!
    Like the honest comments....and using my own preferred method of skinning wire insulation!!!
    Keep up the good work.

  • @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.

  • @djdavies83
    @djdavies83 13 лет назад

    How about using a lens from a disposable camera and using the mouse as a barcode scanner?

  • @TheNoopsy
    @TheNoopsy 11 лет назад

    tell me the name of the song please

  • @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

  • @dleinsteiner7234
    @dleinsteiner7234 9 лет назад +1

    Can you use this to make an optical counter that can count say, rpm of a spinning object? I have placed a white thumb tack on a black edged 3/4" spinning disk and would like determine how fast it is spinning. I could have the disk spin a laser light crossing the lens each revolution. Any ideas how to create an optical counter?

    • @Huzaliproductions
      @Huzaliproductions 9 лет назад +1

      Open an old mouse for that there is a infrared sensor and a spinning wheel wich you can use for this counting

  • @fabiuh991
    @fabiuh991 13 лет назад

    is it possible to do the same but with a nokia 5610 camera?

  • @nelbrad
    @nelbrad 10 лет назад

    Conor, cool vid. What kind of vice is that you're using? Where did you get it?

    • @ConorPeterson
      @ConorPeterson  10 лет назад

      It's a Portable Vacuum Base 360 Degree Swivel Vise from my local big box home improvement store.

  • @pratiklondhe5167
    @pratiklondhe5167 2 года назад

    where i can find the code? for arduino

  • @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

  • @shaileshsingh1717
    @shaileshsingh1717 6 лет назад +1

    dude, u nailed it bro👌👌

  • @luoarnamsk
    @luoarnamsk 3 года назад

    Love the twin peaks sound track :D

  • @kataya5005
    @kataya5005 8 лет назад

    i think you can use that as a linear encoder that can move on both the x-y axis

  • @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.

  • @gargru
    @gargru 13 лет назад

    Shiii ... whats the music playin while soldering? I remember this song from when i was a little kid. I need the name of that! :

  • @TheOfficialALIMINATORPlays
    @TheOfficialALIMINATORPlays 10 лет назад

    what white wire is that? Conor Peterson

  • @MikeTalksAbout
    @MikeTalksAbout 12 лет назад

    the twin peaks song made this awesome!

  • @KiLLeRxxBuNNy
    @KiLLeRxxBuNNy 12 лет назад

    what course did you get in college?

  • @WynterKA
    @WynterKA 9 лет назад

    Awesome hack... Music made me cry!

  • @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.

  • @oohvahvu
    @oohvahvu 12 лет назад

    Great video, the music choice was hilarious.
    You'd never get a job editing build montages for the A-Team :-)
    In fact there's a remix idea!

  • @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.

  • @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.

  • @S-Tach
    @S-Tach 5 лет назад

    Great work... i want to try this....