Posts with «ps2» label

This Old Mouse Keeps Track of Filament Usage

Keeping track of your 3D-printer filament use can be both eye-opening and depressing. Knowing exactly how much material goes into a project can help you make build-versus-buy decisions, but it can also prove gut-wrenching when you see how much you just spent on that failed print. Stock filament counters aren’t always very accurate, but you can roll your own filament counter from an old mouse.

[Bin Sun]’s build is based around an old ball-type PS/2 mouse, the kind with the nice optical encoders. Mice of this vintage are getting harder to come by these days, but chances are you’ve got one lying around in a junk bin or can scrounge one up from a thrift store. Stripped down to its guts and held in place by a 3D-printed bracket, the roller that used to sense ball rotation bears on the filament on its way to the extruder. An Arduino keeps track of the pulses and totalizes the amount of filament used; the counter handily subtracts from the totals when the filament is retracted.

Simple, useful, and cheap — the very definition of a hack. And even if you don’t have a 3D-printer to keep track of, harvesting encoders from old mice is a nice trick to file away for a rainy day. Or you might prefer to just build your own encoders for your next project.

Filed under: 3d Printer hacks, Android Hacks

Minions Turn Your Keyboard into a Bluetooth Keyboard

Evil geniuses usually have the help of some anonymous henchmen or other accomplices, but for the rest of us these resources are usually out of reach. [Evan], on the other hand, is on his way to a helpful army of minions that will do his bidding: he recently built a USB-powered minion that turns a regular PS/2 mouse and keyboard into a Bluetooth mouse and keyboard.

[Evan] found his minion at a McDonald’s and took out essentially everything inside of it, using the minion as a case for all of the interesting bits. First he scavenged a PS/2 port from an old motherboard. An Arduino Nano is wired to an HC-05 Bluetooth chip to translate the signals from the PS/2 peripherals into Bluetooth. The HC-05 chip is a cheaper alternative to most other Bluetooth chips at around $3 vs. $40 for more traditional ones. The programming here is worth mentioning: [Evan] wrote a non-interrupt based and non-blocking PS/2 library for the Arduino that he open sourced which is the real jewel of this project.

Once all the wiring and programming is done [Evan] can turn essentially any old keyboard and mouse into something that’ll work on any modern device. He also put an NFC tag into the minion’s head so that all he has to do to connect the keyboard and mouse is to swipe his tablet or phone past the minion.

If you’re looking for an interesting case for your next project, this McDonald’s Minion toy seems to be pretty popular. PS/2 keyboards are apparently still everywhere, too, despite their obsolescence due to USB. But there are lots of other ways to get more use out of those, too.

Filed under: Arduino Hacks
Hack a Day 14 Apr 16:01

Controlling your webcam with an old Guitar Hero pedal

Hackaday reader [Tom Price] often uses Skype to communicate with family near and far, but he was getting tired of adjusting his webcam each time his kids moved out of frame. While the solution he came up with isn’t fully automated, it is hands-free, which is good enough for his purposes.

[Tom] was looking around for an electronic foot pedal of some sort when he came across a wireless 3rd party Guitar Hero peripheral that happened to fit the bill. Using an Arduino library created by [Bill Porter], he was quickly able to get the toy to communicate with an Arduino-flashed Atmega8, but things kind of fell flat when it came time to relay signals back to his computer. Using another Atmega8 along with the PS2X library, he was able to emulate the Guitar Hero controller that his foot pedal was looking for.

With the pedal portion of his project wrapped up, he focused on his webcam. [Tom] mounted the camera on a small servo, which he then wired up to the receiving end of his foot pedal rig. As you can see in the video below, he can now pan his camera across the room with a tap of his foot, rather than leaning in and manually adjusting it.

Filed under: arduino hacks, news, playstation hacks

Turning A Cheap Optical Mouse Into A Robot Odometer

John Graham-Cumming (JGC), author of The Geek Atlas, wrote in to let us know about a fun conversion he did with a cheap optical mouse:

For a small robot project I’m working on I needed a way to measure the robot’s progress across the floor. There are various possibilities, such as: use stepper motors (expensive and am recycling some old continuous run servos), add an encoder to the wheels (would need to go buy some parts for that), or use the optical sensor for a mouse.

I had a really old PS/2 optical mouse lying around which contains an MCS-12085 optical sensor that has a rather simple serial interface suitable for connection to a microcontroller. Inside there are two separate areas of components. On the right in the picture above is the PS/2 interface chips and four nice extras that I desoldered for later use (three microswitches and a quadrature encoder)…

This is a great example of repurposing something that might otherwise go to a landfill; and to top it off, JGC has posted some code you can use as an Arduino interface to the optical mouse sensor. Read all about his conversion at his blog.

The Geek Atlas
128 Places Where Science and Technology Come Alive
The history of science is all around us, if you know where to look. With this unique traveler’s guide, you’ll learn about 128 destinations around the world where discoveries in science, mathematics, or technology occurred or is happening now. Travel to Munich to see the world’s largest science museum, watch Foucault’s pendulum swinging in Paris, ponder a descendant of Newton’s apple tree at Trinity College, Cambridge, and more.
Filed under: Arduino, Mods
MAKE » Arduino 15 Sep 23:00