Toy Gaming Controller Makes The Big Leagues

Some of the off-brand video game consoles and even accessories for the major brands can leave a lot to be desired. Whether it’s poor build quality or a general lack of support or updates, there are quite a few things on the market not worth anyone’s time or money. [Jonathan] was recently handed just such a peripheral, a toy game controller originally meant for a small child, but upon further inspection it turned into a surprisingly hackable platform, capable of plenty of IoT-type tasks.

The controller itself was easily disassembled, and the functional buttons within were wired to a Wemos D1 Mini instead of the originally-planned ESP32 because of some wiring irregularities and the fact that the Wemos D1 Mini having the required amount of I/O. It’s still small enough to be sealed back inside the controller as well, powered by the batteries that would have powered the original controller.

For the software, [Jonathan] is using MQTT to register button presses with everything easily accessible over Wi-Fi, also making it possible to update the software wirelessly. He was able to use it to do a few things as proof-of-concept, including playing a game in PyGame and controlling a Sonos speaker, but for now he’s using it to control an LED sculpture. With something this easily modified, though, it would be pretty straightforward to use it instead for a home automation remote control, especially since it is already set up to use MQTT.

Continue reading “Toy Gaming Controller Makes The Big Leagues”

Keeping Badgers At Bay With Tensorflow

Human-animal conflict is always a contentious issue, and finding ways to prevent damage without causing harm to the animals often requires creative solutions. [James Milward] needed a humane method to stop badgers and foxes from uprooting his garden, leading him to create the Furbinator 3000, a system that combines computer vision with audio deterrents..

[James] initially tried using scent repellents (which were ignored) and blocking access to his garden (resulting in more digging), but found some success with commercial ultrasonic audio repellent devices. However, these had to be manually turned off during the day to avoid annoying activation of the PIR motion sensors by [James] and his family, and the integrated solar panels couldn’t keep up with the load.

This presented a good opportunity to try his hand at practical machine vision. He already had a substantial number of sample images from the Ring cameras in his garden, which he turned into a functional TensorFlow Lite model with about 2.5 hours of training. He linked it with event-activated RTSP streams from his Ring cameras using the ring-mqtt library. To minimize false positives on stationary objects, he incorporated a motion filter into the processing pipeline. When it identifies a fox or badger with reasonable accuracy, it generates an MQTT event.

[James] modified the ultrasonic devices so they would react to these events using an ESP8266-based WeMos D1 Mini Pro development board and added an external 5 V power supply for sustained operation. All development was performed in a Docker container which simplified deployment on a Raspberry Pi 4.

After implementing the system, [James] woke up to the satisfying sight of his garden remaining untouched overnight, a victory that even earned him some coverage by the BBC.

Thanks for the tip [Laurent]!

A hot tub with a smartphone in front showing real-time sensor data

ESP32 Keeps Track Of Hot Tub’s Vital Signs

Like swimming pools, hot tubs need regular monitoring to ensure their water stays clean and clear. An average person might take a water quality reading once or twice a week using test strips, but such a low sampling rate obviously won’t do for a hacker. [Stephen Carey] has therefore built a hot tub monitor that checks the water quality every minute and reports it on a neat mobile dashboard.

[Stephen]’s system uses commercially available sensors that track pH levels and Oxidation-Reduction Potential (ORP), both basic measurements that indicate water quality. A second set of sensors keeps track of the temperature of the water and the outside air, which should help in finding insulation failures and keeping energy use under control.

A set of graphs showing a hot tub's pH and ORP over time, with a significant spike in both near the beginningAn ESP32 reads the sensors and sends out the data through WiFi. [Stephen] programmed the ESP32 in MicroPython, using an MQTT driver to connect it to Home Assistant. By looking at the graphs generated, you can tell when someone entered the tub from a step change in pH and ORP. It’s even possible to generate alerts when any of the values drift outside their acceptable range – we can already imagine an alarm going off when someone enters without having showered first.

The system also has a calibration mode to check the sensors against a well-defined buffer solution. As with many chemical sensors, the pH and ORP probes gradually lose their active material and need to be replaced after about a year. Good ones aren’t cheap, but [Stephen] has found pretty decent low-cost alternatives on AliExpress that should be fine for a home setup.

If you also want your tub or pool to be actively managed, you’ll need a more complex system, perhaps even one that can also dispense chemicals. If your hot tub is heated by a wood fire, however, all you need is a way to alert the person tending the fire.

Streaming Video From An ESP32

The ESP32, while first thought to be little more than a way of adding wireless capabilities to other microcontrollers, has quickly replaced many of them with its ability to be programmed as its own platform rather than simply an accessory. This also paved the way for accessories of its own, such as various sensors and even a camera. This guide goes over taking the input from the camera and streaming it out over the network to multiple browsers.

On the server side of things, the ESP32 and its attached camera are set up with MQTT, a lightweight communications protocol which uses a publish/subscribe model to send information. The ESP32 is configured to publish its images only, but not subscribe to any other nodes. On the client side, the browser runs a JavaScript program which is able to gather these images and stitch them together into a video.

This can be quite a bit of data to send out over the ESP32’s compact hardware, so there are some tips and tricks for getting more out of these little devices, including using an external antenna for better Wi-Fi signal, or omitting it entirely in favor of Ethernet. As far as getting a lot out of a tiny microcontroller, though, leveraging MQTT really helps the ESP32 go a long way. These chips have come along way since they were first introduced; they’re powerful enough to act as 8-bit gaming consoles too.

Thanks to [Surfskidude] for the tip!

Litter Box Sensor Lets You Know Exactly What The Cat’s Been Up To

In our experience, there’s rarely any question when the cat uses the litter box. At all. In the entire house. For hours. And while it may be instantly obvious to the most casual observer that it’s time to clean the thing out, that doesn’t mean there’s no value in quantifying your feline friend’s noxious vapors. For science.

Now of course, [Owen Ashurst] could have opted for one of those fancy automated litter boxes, the kind that detects when a cat has made a deposit and uses various methods to sweep it away and prepare the box for the next use, with varying degrees of success. These machines seem like great ideas, and generally work pretty well out of the box, but — well, let’s just say that a value-engineered system can only last so long under extreme conditions. So a plain old-fashioned litterbox suffices for [Owen], except with a few special modifications. A NodeMCU lives inside the modesty cover of the box, along with a PIR sensor to detect the cat’s presence, as well as an MQ135 air quality sensor to monitor for gasses. It seems an appropriate choice, since the sensor responds to ammonia and sulfides — both likely to be present after a deposit. Continue reading “Litter Box Sensor Lets You Know Exactly What The Cat’s Been Up To”

Pretty Small Robot Is Capable, Nonetheless

When science fiction authors imagined robots in the 20th century, many of them were huge imposing steel automatons. [Shane]’s designs for the Pretty Small Robot are quite contrary to that, being tiny in stature and cute in affect.

The whole robot is an exploration in nifty engineering. It uses an easy clip-together structure with fasteners and glue not required. The chassis is 3D printed, with all the components sliding into place. Two small DC gearmotors are used for differential drive, with each side of the robot having a pair of wheels wrapped in a rubber band for traction. The brains of the robot is an ESP32, providing it with both plenty of processing power and good connectivity options. Control is over WiFI via MQTT.

At this stage the robot doesn’t do a whole lot, though [Shane] has some exciting plans. He’d like to add a camera in future and let it explore a maze under human command.

If you’ve ever wanted to build a robot with an almost coin-sized foot print, this build is for you. Files are available on GitHub for those wishing to dive deeper. Video after the break.

Continue reading “Pretty Small Robot Is Capable, Nonetheless”

Hack Simple

Here at Hackaday, we definitely love to celebrate the hard hacks: the insane feats of reverse engineering, the physics-defying flights of fancy, or the abuse of cutting edge technology. But today I’d like to raise a rhetorical glass in tribute of the simple hacks. Because, to be perfectly honest, the vast majority of my hacks are simple hacks, and it’s probably the same for you too. And these often go unsung because, well, they’re simple. But that doesn’t mean that something simple can’t be helpful.

Case in point: an ESP8266 press-buttons device that we featured this week. It doesn’t do much. It’s main feature is that it connects to a home automation network over WiFi and enables you to flip three relays. Wires coming off the board are to be soldered to the not-yet-smart device in question, simply connected to each side of the button you’d like to press. In the example, a coffee machine was turned on and the “go” button pressed, automating one of the most essential kitchen rituals. While recording the podcast, I realized that I’ve built essentially this device and have it controlling our house’s heating furnace.

For the experienced hacker, there’s not much here. It’s a simple board design, the software heavily leverages ESPHome, so there’s not much work on that front either. But imagine that you lacked any of the wide-ranging skills that it takes to make such a device: PCB layout, ESP8266 software wrangling, or the nuances of designing with relays. You could just as easily build this device wrong as right. The startup costs are non-trivial.

Making a simple design like this available to the public isn’t a technical flex, and it’s not contributing to the cutting edge. But it just might be giving someone their first taste of DIY home automation, and a sweet taste of success. There’s not much easier than finding a switch and soldering on two wires, but if that’s the spark that pushes them on their path to greater hacks, that’s awesome. And even if it doesn’t, at least it’s another appliance under user control, connected to a private WiFi network rather than spying you out and phoning home to Big Toaster.

So here’s to the simple hacks!