Detecting Cars With An ESP8266 Magnetometer

Having a motorized gate on your driveway is great, but only if there’s an easy way to trigger it. [Andrew] says the gate at his parent’s place could only be controlled by manually pushing a button on the panel or with a dinky remote that didn’t have nearly the range they wanted. So he decided to build his own magnetometer allowing the gate to automatically open when a car was trying to leave.

Naturally, there are commercial offerings that would solve this problem. But with a sticker price of more than $150 USD, [Andrew] was more than happy to spend a bit of time tinkering to get the job done for less than 1/10th the cost with an ESP8266 and a QMC5883X series magneto-resistive sensor. Of course, this is one of those projects that seems simple enough in your head, but ends up taking a bit of finesse to pull off in the real-world.

For one, [Andrew] had to figure out how to prevent false positives. Pretty much any object brought close enough to the sensor, including his hand, would cause it to react. He ended up coming up with a way to use a rolling average to prevent the gate from firing off just because a squirrel ran past. The built-in safeties are designed to ensure that the gate only opens when an actual car is sitting in the appropriate spot for long enough.

Speaking of, we love how [Andrew] deployed the QMC5883X sensor for this project. The small sensor board and a few moisture-absorbing packets were placed in a Sonoff IP66 waterproof enclosure, and buried under the rocks of the driveway. A standard CAT5 cable is used to tether it to the ESP8266, relay, and assorted other goodies that now live in the gate’s control box. In the future he says the cable will likely have to go into a conduit, but for now the system is working more or less how he expected.

If your estate isn’t quite palatial enough to have a motorized gate out front, we’ve seen plenty of projects that add some much-needed intelligence to the humble garage door opener which might be more your speed.

Reading The Water Meter In A Literal Sense With An ESP8266

In our info-obsessed culture, hackers are increasingly interested in ways to quantify the world around them. One popular project is to collect data about their home energy or water consumption to try and identify any trends or potential inefficiencies. For safety and potentially legal reasons, this usually has to be done in a minimally invasive way that doesn’t compromise the metering done by the utility provider. As you might expect, that often leads to some creative methods of data collection.

The latest solution comes courtesy of [Keilin Bickar], who’s using the ESP8266 and a serial TTL camera module to read the characters from the LCD of his water meter. With a 3D printed enclosure that doubles as a light source for the camera, the finished device perches on top of the water meter and sends the current reading to HomeAssistant via MQTT without any permanent wiring or mounting.

Of course, the ESP8266 is not a platform we generally see performing optical character recognition. Some clever programming was required to get the Wemos D1 Mini Lite to reliably read the numbers from the meter without having to push the task to a more computationally powerful device such as a Raspberry Pi. The process starts with a 160×120 JPEG image provided by a VC0706 camera module, which is then processed with the JPEGDecoder library. The top and bottom of the image are discarded, and the center band is isolated into blocks that correspond with the position of each digit on the display.

Within each block, the code checks an array of predetermined points to see if the corresponding pixel is black or not. In theory this allows detecting all the digits between 0 and 9, though [Keilin] says there were still the occasional false readings due to inherent instabilities in the camera and mounting. But with a few iterations to the code and the aid of a Python testing program that allowed him to validate the impact of changes to the algorithm, he was able to greatly improve the detection accuracy. He says it also helps that the nature of the data allows for some basic sanity checks;  for example the number only ever goes up, and only by a relatively small amount each time.

This method might not allow the per-second sampling required to pull off the impressive (if slightly creepy) water usage data mining we saw recently, but as long as you’re not after very high resolution data this is an elegant and creative way to pull useful data from your existing utility meter.

How The Power Gets To The Outlet

[Practical Engineering] is ready to explain how power substations get electricity to you in his latest video, which you can see below.  One of the things we always notice when talking to people either in our community or outside it is that most people have no idea how most of the modern world works.

Ask your non-technical friend to explain how a cell phone works or how a hard drive stores data and you aren’t likely to get a very good answer. However, even most of us are only focused on some particular aspect of electronics. There are a lot of people who hack on robots or radios. The AC power grid,though isn’t something a lot of people work with as a hobby. Do you know exactly what goes on in that substation you pass every day on your commute? If you don’t, you’ll learn something in the video.

Continue reading “How The Power Gets To The Outlet”

Cat Litter Tray Joins The Internet Of Things

Keeping a cat as a pet can be rewarding, but it’s always important to consider how to handle the mess – and we’re not just talking about the tea cups pushed off tables here. To handle just this task, [Igor] decided to hook his cat litter box up to the internet of things.

Monitoring the litter box brings several useful advantages. Load cells enable the weight of the litter tray to be monitored, allowing sand levels and the weight of the cats to be checked at regular intervals. Additionally, a door sensor keeps a record of comings and goings, giving an idea of how frequently the box has been used, and whether or not it may be time for cleaning. It’s all powered by an ESP32, hooked up to the Thingspeak platform. This allows for easy graphing and analysis of the data collected from the system. The electronics is then neatly installed in an attractive two-tone 3D printed enclosure with a pleasing cat motif.

It’s a great example of using some cheap off-the-shelf parts to ease the regular tasks of daily life. Building your own gear can be beneficial too, especially when Big Litter implements DRM on their hardware.

Inventor And Detective Create Range Of Snack-Hiding Devices

Anyone who has had to deal with siblings, their friends, flatmates or parents who are overly fond of snacks may know this issue: you bought some snacks for your own consumption, but before you can get to them they have vanished. Naturally, nobody knows what happened to said snacks and obviously outraged that anyone would dare to do such a dastardly thing like eating someone else’s snacks.

This is the premise behind British inventor [Colin Furze]’s new series of YouTube videos (embedded after the break). Teaming up with former Scotland Yard detective [Peter Bleksley], their goal is to find ways to hide snacks around the house where curious and peckish individuals will not find them. Though a snack-company sponsored series (Walkers) and featuring snack names that will ring no bells for anyone outside of the UK, it nevertheless shows some innovative ways to hide snacks.

The first episode shows how one can hide snacks (or something else, naturally) inside a door. The second tweaks a standing lamp to add some hidden drawers, and the third episode creates a hidden compartment behind a television. Perhaps the most intriguing part of these episodes is the way it highlights how easy it is to not just hide snacks around the house, but also devices for automation and monitoring. Just think how one could use these tricks for IoT projects and the like.

Continue reading “Inventor And Detective Create Range Of Snack-Hiding Devices”

The Danish Internet Of Hot Tubs

Every hacker camp has its own flavor, and BornHack 2019 in the Danish countryside gave us the opportunity to sample some hacker relaxation, Scandinavian style. Among the attractions was a wood-fired hot tub of gargantuan proportions, in which the tired attendee could rejuvenate themselves at 40 Celcius in the middle of the forest. A wood-fired hot tub is not the easiest of appliances to control, so to tame it [richard42graham] and a group of Danish hackerspace friends took it upon themselves to give it an internet-connected temperature sensor.

The starting point was a TMP112 temperature sensor and an ESP8266 module, which initially exposed the temperature reading via a web interface, but then collapsed under too much load. The solution was to make the raw data available via MQTT, and from that create a web interface for the event bar, Twitter and IRC bots. There was even an interface to display hot tub temperature on the ubiquitous OHMlights dotted around the camp.

It’s more normal to control a hot tub via an electric heater, but since the wood fire on this one has to be tended by a camp volunteer it made sense to use the IRC system as an alert. It will be back at BornHack 2020, so we’ll have to do our job here at Hackaday and spend a long time lounging in the hot tub in the name of journalistic research to see how well it works.

Exploring The Science Behind Dirty Air Filters

Obviously, if the air filters in your home HVAC system are dirty, you should change them. But exactly how dirty is dirty? [Tim Rightnour] had heard it said that if you didn’t change your filter every month or so, it could have a detrimental effect on the system’s energy consumption. Thinking that sounded suspiciously like a rumor Big Filter™ would spread to bump up their sales, he decided to collect his own data and see if there was any truth to it.

There’s a number of ways you could tackle a project like this, but [Tim] wanted to keep it relatively simple. A pressure sensor on either side of the filter should tell him how much it’s restricting the airflow, and recording the wattage of the ventilation fan would give him an idea on roughly how hard the system was working.

Now [Tim] could have got this all set up and ran it for a couple months to see the values gradually change…but who’s got time for all that? Instead, he recorded data while he switched between a clean filter, a mildly dirty one, and one that should have been taken out back and shot. Each one got 10 minutes in the system to make its impression on the sensors, including a run with no filter at all to serve as a baseline.

The findings were somewhat surprising. While there was a sizable drop in airflow when the dirty filter was installed, [Tim] found the difference between the clean filter and mildly soiled filter was almost negligible. This would seem to indicate that there’s little value in preemptively changing your filter. Counter-intuitively, he also found that the energy consumption of the ventilation fan actually dropped by nearly 50 watts when the dirty filter was installed. So much for a clean filter keeping your energy bill lower.

With today’s cheap sensors and virtually infinite storage space to hold the data from them, we’re seeing hackers find all kinds of interesting trends in everyday life. While we don’t think your air filters are spying on you, we can’t say the same for those fancy new water meters.