Posts with «android hacks» label

2025 Pet Hacks Contest: Feline Facial Recognition Foils Food Filching

Cats are no respecters of personal property, as [Joe Mattioni] learned when one of his cats, [Layla] needed a special prescription diet. Kitty didn’t care for it, and since the other cat, [Foxy]’s bowl was right there– well, you see where this is going. To keep [Layla] out of [Foxy]’s food and on the vet-approved diet, [Joe] built an automatic feeding system with feline facial recognition. As you do.

The hardware consists of a heavily modified feed bowl with a motorized lid that was originally operated by motion-detection, an old Android phone running a customized TensorFlow Lite model, and hardware to bridge them together. Bowl hardware has yet to be documented on [Joe]’s project page, aside from the hint that an Arduino (what else?) was involved, but the write up on feline facial recognition is fascinating.

See, when [Joe] started the project, there were no cat-identifying models available– but there were lots of human facial recognition models. Since humans and cats both have faces, [Joe] decided to use the MobileFaceNet model as a starting point, and just add extra training data in the form of 5000 furry feline faces. That ran into the hurdle that you can’t train a TFLite model, which MobileFaceNet is, so [Joe] reconstructed it as a Keras model using Google CoLab. Only then could the training occur, after which the modified model was translated back to TFLite for deployment on the Android phone as part of a bowl-controller app he wrote.

No one, [Joe] included, would say that this is the easiest, fastest, or possibly even most reliable solution– a cat smart enough not to show their face might sneak in after the authorized feline has their fill, taking advantage of a safety that won’t close a bowl on a kitty’s head, for example–but that’s what undeniably makes this a hack. It sounds like [Joe] had a great learning adventure putting this together, and the fact that it kept kitty on the proper diet is really just bonus.

Want to go on a learning adventure of your own? Click this finely-crafted link for all the details about this ongoing contest.

 

Servo Claw Game Puts Your Muscles to the Test

As fun as claw games are, the jaws are always disappointingly weak, and you usually end up with bupkis. What if the jaws were completely within your  control? That’s the idea behind [Upside Down Labs]’ muscle-controlled servo claw game.

While electromyography (EMG) is great for identifying neuro-muscular abnormalities and allows for amazing prosthetic limbs to work, it can also be used for fun. As you’ll see in the video after the break, accurate block-stacking (and possible candy-grabbing) depends on teamwork and tensed muscles.

Though the user provides the muscle, the brains behind this operation is an Arduino Uno with a Muscle BioAmp shield stacked on top, which [Upside Down Labs] also created. This shield makes it ridiculously easy to connect EMG sensors and other I²C devices like screens and, well, servo claws. From there, it’s really just a matter of printing the claw, connecting it to a 9g servo, and using an accompanying kit to prepare the skin and connect the muscles to the Arduino. Be sure to check it out in tense block-stacking action after the break.

If you want to listen in on your muscles, look no further than the BioAmp EMG Pill.

Upgraded Infotainment Options on a 14 Year Old Mercedes

It used to be that upgrading a car stereo was fairly simple. There were only a few mechanical sizes and you could find kits to connect power, antennas, and speakers. Now, though, the car stereo has interfaces to steering wheel controls, speed sensors, rear-view cameras, and more. [RND_ASH] was tired of his 14-year-old system so he took an Android head unit, a tablet, and an Arduino, and made everything work as it was supposed to.

The key is to interface with the vehicle’s CAN bus which is a sort of local area network for the vehicle. Instead of having lots of wires running everywhere, today’s cars are more likely to have less wiring all shared with many devices.

[RND_ASH] has several videos describing the whole project and we expect there will be some more upcoming. You can see part one, below.

The project also reverse engineers how to display on the tiny screen in the dashboard. The code for the CAN bus interface is on GitHub. There’s also a written narrative on what he learned about the Mercedes interface in a different repository.

We’ve seen other cars get similar treatment, of course. If you want a gentle introduction to CAN hacking, we’ve done that, too.

Switch Tester Servo-Slaps Them ’til they Fail

[James] is designing an open-source 3D printed keyboard switch, with the end goal of building a keyboard with as many printed parts as possible. Since keyswitches are meant to be pressed quite often, the DIY switches ought to be tested just as rigorously as their commercial counterparts are at the factory. Maybe even more so.

The broken spring after 13,000+ automated boings.

Rather than wear out his fingers with millions of actuations, [James] built a robot to test switches until they fail. All he has to do is plug a switch in, and the servo-driven finger slowly presses the slider down until the contacts close, which lights the LED.

The system waits 100ms for the contacts to stop any tiny vibrations before releasing the slider. That Arduino on the side tracks the contact and release points and sends them to the PC to be graphed. If the switch fails to actuate or release, the tester stops altogether.

We love that this auto-tester works just fine for commercial switches, too — the bit that holds the switch is separate and attaches with screws, so you could have one for every footprint variant. [James] recently did his first test of a printed switch and it survived an astonishing 13,907 presses before the printed coil spring snapped.

One could argue that this doubles as a servo tester. If you want a dedicated device for that, this one can test up to sixteen at a time.

Via @Microchip_Makes

Teddy Ruxpin: Navigate to 143 Main Street

In the United States, TV and radio stations have to give the opportunity of equal airtime to all candidates. In that spirit, we thought we should show you [Jayden17’s] hack that puts Google Assistant into a Teddy Ruxpin. You can see the hacked bear do its thing in the video below.

Teddy was the best-selling toy for 1985 and 1986, and is still available, so over 30 years there are a lot of these hanging around. If you never looked at how they work, the original ones were quite simple. A cassette player routed one stereo channel to a speaker and used the other channel to control servo motors to move the mouth and eyes. The cassette was eventually replaced with a digital cartridge, and newer versions of Teddy only use two motors instead of the three in the original.

[Jayden17’s] bear was an original “Worlds of Wonder” bear which means it is from the 1985-1990 time period. If you have a newer bear, you might have to work things out a little differently. These bears often have stuck motors, which can be fixed and broken cassette mechanisms. The cassette isn’t used with this project, so that’s not a problem.

The real key to the project is an Arduino that listens to the audio coming in from a smartphone or other source and drives the motors. The project just uses a cable for the phone, although we would have been tempted to put a cheap Bluetooth receiver in there. However, because of the way it is set up, you could easily do that. You could also use a Raspberry Pi or even switch to Alexa. The Arduino doesn’t know anything about the source audio.

 

Serial Connection Over Audio: Arduino Can Listen To UART

We’ve all been there: after assessing a problem and thinking about a solution, we immediately rush to pursue the first that comes to mind, only to later find that there was a vastly simpler alternative. Thankfully, developing an obscure solution, though sometimes frustrating at the time, does tend to make a good Hackaday post. This time it was [David Wehr] and AudioSerial: a simple way of outputting raw serial data over the audio port of an Android phone. Though [David] could have easily used USB OTG for this project, many microcontrollers don’t have the USB-to-TTL capabilities of his Arduino – so this wasn’t entirely in vain.

At first, it seemed like a simple task: any respectable phone’s DAC should have a sample rate of at least 44.1kHz. [David] used Oboe, a high performance C++ library for Android audio apps, to create the required waveform. The 8-bit data chunks he sent can only make up 256 unique messages, so he pre-generated them. However, the DAC tried to be clever and do some interpolation with the signal – great for audio, not so much for digital waveforms. You can see the warped signal in blue compared to what it should be in orange. To fix this, an op-amp comparator was used to clean up the signal, as well as boosting it to the required voltage.

Prefer your Arduino connections wireless? Check out this smartphone-controlled periodic table of elements, or this wireless robotic hand.

Hack a Day 31 May 09:00

Junkyard RC Conversion Looks Like Mad Max Extra

Over the years we’ve noticed that there is a subset of hackers out there who like to turn real life vehicles into remote controlled cars. These vehicles are generally destroyed in short order, either by taking ridiculous jumps, or just smashing them into stuff until there’s nothing left. In truth that’s probably what most of us would do if we had access to a full size RC car, so no complaints there.

As a rule, the donor vehicles for these conversions are usually older and cheap. That only makes sense, why spend a lot of money on a vehicle you intend on destroying? But even still, the RC conversion [William Foster] has recently completed may take the cake. We don’t know how much of the “antiquing” of his donor vehicle was intentionally done, but on the whole, the thing looks like it got dragged from the bottom of a lake somewhere. Presumably, he got a great deal on it.

The video posted to YouTube is primarily about [William] driving his creation around (sometimes from the back seat, no less), but towards the second half of the video there’s a quick rundown on the hardware used to make this pile of rust move.

A standard RC transmitter and receiver combination are used to control a pair of Arduinos mounted in the center console, which are in turn hooked up to external stepper drivers. The wheel is turned via a chain and sprocket arrangement, and the pedals are pushed with homebrew contraptions that look like they are made from lead screws intended for 3D printers.

All in all, it appears [William] has cooked up a fairly responsive control system with commodity hardware you could get on Amazon or eBay. Not sure we’d be backseat driving this thing personally, but to each their own.

We recently covered a Jeep that got a similar remote control upgrade, but these super-sized remote controlled vehicle builds are not just limited to the ground either.


Filed under: Android Hacks, car hacks

Arduino Saves Gameboy Camera

[Brian Khuu] bought a few Gameboy cameras on the Internet and found that they still had pictures on them from a previous owner. The memory in the camera has a backup battery and if that battery dies, the pictures are history. [Brian] bravely decided to extract the pictures to a PC. He knew the protocol for how the Gameboy talked to the companion pocket printer was available, so he used an Arduino and a Web browser to extract the photos. The resulting code is on GitHub if you want to save your pictures.

Although Brian didn’t have to crack the protocol, he does offer a good explanation of it. There’s even some sniffed displays. The Arduino does all the communications and fools the game into thinking it is the companion printer. However, it simply streams the data out and a Javascript decoder handles the actual decoding. In fact, in the blog post, you can enter data, click a button, and see the resulting Gameboy picture.

It works, but [Brian] did run into a few problems. For one thing, the devices don’t see to use any flow control so he had no choice but to keep up with the Gameboy. Also, there is a CRC he could not correctly decode. However, the pictures look good — well, as good as Gameboy pictures look, at least. So he did get results.

We’ve seen this done with a PC before. If you are more interested in the reverse, by the way, you can use a real Gameboy printer to print from an Arduino.

 


Filed under: Android Hacks, Nintendo Game Boy Hacks

Making a Mega LED Desk

Few things beat a sturdy, home-built desk — especially when it’s jam-packed with over 1200 WS2812 LEDs.

[nolobot] and his bother struggled with setting up and squaring-off the t-slotted, extruded aluminium frame which makes up the desk. He recommends practicing with a smaller frame for anyone else attempting a similar build. The surface of the desk has a few inches between the polycarbonate top and the 1/4″ plywood painted black serving as the substrate for the LEDs. Those LEDs come in strip form but still required several hundred solders, and wiring headaches in an attempt to make future upgrades manageable. Dozens of support bolts with adjustable feet support the desk surface throughout. These all had to be individually adjusted and can be made out if you look closely at the demo videos.

An Arduino Mega controls the LEDs with the help of the FastLED library. Custom code was necessary because one of the major issues [nolobot] faced was the power draw. 1200 LEDs at 5V draw quite a bit of current, so the LEDs were coded to peak at about 50% brightness. The matrix was split into different banks, while also limiting the 40A PSU to only 15A.

Regarding the final product, all we can say is: woah.

Not a fan of putting this much work into a piece of furniture? There are also ultra-minimalist options at your disposal.

[via /r/arduino]


Filed under: Android Hacks, led hacks
Hack a Day 02 Mar 12:01

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