Hamster Goes On Virtual Journey

Hamsters are great pets, especially for those with limited space or other resources. They are fun playful animals that are fairly easy to keep, and are entertaining to boot. [Kim]’s hamster, [Mr. Fluffbutt], certainly fits this mold as well but [Kim] wanted something a little beyond the confines of the habitat and exercise wheel and decided to send him on a virtual journey every time he goes for a run.

The virtual hamster journey is built on an ESP32 microcontroller which monitors the revolutions of the hamster wheel via a hall effect sensor and magnet. It then extrapolates the distance the hamster has run and sends the data to a Raspberry Pi which hosts a MQTT and Node.js server. From there, it maps out an equivalent route according to a predefined GPX route and updates that information live. The hamster follows the route, in effect, every time it runs on the wheel. [Mr Fluffbutt] has made it from the Netherlands to southeastern Germany so far, well on his way to his ancestral home of Syria.

This project is a great way to add a sort of augmented reality to a pet hamster, in a similar way that we’ve seen self-driving fish tanks. Adding a Google Streetview monitor to the hamster habitat would be an interesting addition as well, but for now we’re satisfied seeing the incredible journey that [Mr Fluffbutt] has been on so far.

Linux Fu: Shell Script File Embedding

You need to package up a bunch of files, send them somewhere, and do something with them at the destination. It isn’t an uncommon scenario. The obvious answer is to create an archive — a zip or tar file, maybe — and include a shell script that you have to tell the user to run after unpacking.

That may be obvious, but it assumes a lot on the part of the remote user. They need to know how to unpack the file and they also need to know to run your magic script of commands after the unpack. However, you can easily create a shell script that contains a file — even an archive of many files — and then retrieve the file and act on it at run time. This is much simpler from the remote user’s point of view. You get one file, you execute it, and you are done.

In theory, this isn’t that hard to do, but there are a lot of details. Shell scripts are not compiled — at least, not typically — so the shell only reads what it needs to do the work. That means if your script is careful to exit, you can add as much “garbage” to the end of it as you like. The shell will never look at it, so it’s possible to store the payload there.

Continue reading “Linux Fu: Shell Script File Embedding”

Hackaday Podcast 113: Python Switching To Match, A Magnetic Dyno, A Flying Dino, And A Spinning Sequencer

Hackaday editors Mike Szczys and Elliot Williams recap a week of great hacks. You won’t want to miss the dynamometer Leo Fernekes built to measure the power output of his Sterling engine, which is also DIY. In this age of lithium-powered multirotors, it’s nice to step back and appreciate a hand-built rubberband-powered ornithopter.

We have a surprising amount to say about Python’s addition of the match statement (not be be confused with switch statements). And when it comes to electromechanical synth gear, it’s hard to beat a spinning tape-head sequencer.

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (~60 MB)

Places to follow Hackaday podcasts:

Continue reading “Hackaday Podcast 113: Python Switching To Match, A Magnetic Dyno, A Flying Dino, And A Spinning Sequencer”

Is It A Lawnmower? Is It An RPi IRC Server? It’s Both!

Although first presented to the world as an April 1st joke, [Jotun]’s IRC-enabled lawnmower began life as the result of casual bantering among folk on the Undernet IRC network. When the project worked out better than probably anyone could have expected, it was presented as the Green Future of Undernet on April 1st. Joking aside, the project actually is pretty interesting and well-executed.

At the core is a Remington RM110, a fairly basic gas-powered push lawnmower. After years of use it wasn’t running so well any more, so [Jotun] took it apart and cleaned the engine, despite never having done so before. With that grimy task completed, a subsequent remark in an Undernet channel about linking the lawnmower to Undernet led to a Raspberry Pi 4 and various other components being ordered.

The view from the driver’s seat with the server box installed.

The write-up by [Jotun] provides a pretty good overview of the project’s history: from getting the Raspberry Pi 4 working with a UPS add-on, to getting the IRC server software working and serving clients, and putting a weather- and dust-proof box together with enough filtered ventilation to ensure that the freshly mowed grass doesn’t clog up the Raspberry Pi while keeping everything cool.

As a bonus, the system tracks the wheel revolutions so that [Jotun] can keep track of the square kilometers of grass he has cut, and reports this with an IRC bot to anyone interested on Undernet, in the channel #lawnmower. The only thing that isn’t working well yet so far is the live camera feed from the lawnmower, due to the obvious vibration issues, but [Jotun] reckons that can be solved in time.

 

This Week In Security: The Facebook Leak, The YouTube Leak, And File Type Confusion

Facebook had a problem, way back in the simpler times that was 2019. Something like 533 million accounts had the cell phone number associated with the account leaked. It’s making security news this week, because that database has now been released for free in its entirety. The dataset consists of Facebook ID, cell number, name, location, birthday, bio, and email address. Facebook has pointed out that the data was not a hack or breach, but was simply scraped prior to a vulnerability being fixed in 2019.

The vulnerability was in Facebook’s contact import service, also known as the “Find Friends” feature. The short explanation is that anyone could punch a random phone number in, and get a bit of information about the FB account that claimed that number. The problem was that some interfaces to that service didn’t have appropriate rate limiting features. Combine that with Facebook’s constant urging that everyone link a cell number to their account, and the default privacy setting that lets anyone locate you by your cell number, and the data scraping was all but inevitable. The actual technique used may have been to spoof that requests were coming from the official Facebook app.

[Troy Hunt]’s Have i been pwned service has integrated this breach, and now allows searching by phone number, so go check to see if you’re one of the exposed. If you are, keep the leaked data in mind every time an email or phone call comes from someone you don’t know. Continue reading “This Week In Security: The Facebook Leak, The YouTube Leak, And File Type Confusion”

Taking A Peek Inside The Newest Echo Show 10

When Amazon released the original Echo, it was a pretty simple affair. Cylinder, some LEDs on top, done. Then they came out with the Echo Dot, which was basically the same thing, but shorter. It seemed like there was a pretty clear theme for awhile, but then at some point Amazon decided it would be a good idea to start producing Echo devices in every form factor imaginable, from wall plugs to literal sunglasses, and things got a lot more complicated. As a perfect example, take a look at this teardown of the third generation Echo Show 10 by [txyzinfo].

Granted the base still looks a bit like the Echos of old, but the family resemblance stops there. As you can probably gather from the name, the Show features a high resolution 10.1 inch LCD panel, greatly improving the number and type of advertisements Amazon is able to force on the user. In true Black Mirror fashion, there’s even a brushless motor in the base that allows the machine to rotate the display towards the user no matter how hard they try to escape.

A salvageable part if there ever was one.

The teardown is presented with no commentary; in both the video below and on the Hackaday.IO page, all you’ll find are clear and well-lit images of the device’s internals. But for those who are just interested in what the inside of one of these $250 USD gadgets looks like, that’s all you really need.

At this point, it doesn’t seem like [txyzinfo] is trying to reverse engineer the Show or figure out how it all works, and looking at the complexity of that main board, we’re not surprised. Still, it’s a marvel to look at all the hardware they packed into such a relatively small device.

If you’re looking for a more technical examination at the newer Echo devices, [Brian Dorey] did some impressive poking around on the third generation Dot in 2019 and [electronupdate] went as far as decapping a few of the chips inside the Flex. On the software side of things, check out the recent efforts to craft an open source firmware for the original Echo.

Continue reading “Taking A Peek Inside The Newest Echo Show 10”

Stepper Motors Quick And Simple

If you want a simple and easy introduction to stepper motors, check out the [IMSAI Guy]’s short video where he designs a very basic stepper motor controller and packs in a lot of quick lessons along the way. (Embedded below.)

He first goes over the fundamentals of a stepper motor in a practical, hands-on approach, and also shows us how to ring out the connections if the pinout is unknown. Next he demonstrates stepping the motor manually and then makes a simple FET driver circuit. Just when you’re expecting a small microcontroller to appear, the [IMSAI Guy] instead digs deep into his junk box and explains how to drive the motor with a 22V10 GAL (an electrically erasable PAL) and a 555 timer module. Based on a clearly-explained logic table for driving the coils, a sneaky way to introduce Karnaugh maps, he proceeds to write the output equations in WinCUPL.

Mature Readers will recall the “Happy PAL” Character

WinCUPL is the modern version of CUPL (Compiler for Universal Programmable Logic) originally written by a company called Assisted Technology, now owned by Altium. CUPL and peers like PALASM from Monolithic Memories, Inc. (MMI) and ABEL from Data I/O Corporation were basic Hardware Description Languages specifically designed for PALs, GALs, and CPLDs. PALs were small arrays of logic gates with fusible interconnections, and your design is “burned” into the fuses much like a (EE)PROM. When designing with PALs, you could clearly visualize the connections in your mind, something that has since been remedied by the advent of modern FPGAs.

Alas, he cuts out the part where the source code is compiled and the 22V10 is programmed, and jumps directly into testing the circuit on a breadboard. Spoiler alert — it does work. Zooming in close and squinting, the nifty 555 timer breadboard module that he points out is called a TP353, which you can find from your favorite online supplier.

There is a lot to learn in this tutorial, and the [IMSAI Guy] does a great job at making the subject approachable to hobbyists and novices. We also covered another of his tutorials a couple of weeks ago on image sensors. Thanks to [itsevilbert] for the tip.

Continue reading “Stepper Motors Quick And Simple”