Tired of Killing Houseplants? Try Using WiFi.

Here at Hackaday, we have to admit to neglecting a few houseplants in our time. Let’s face it… a cold, hard, thinking machine can care for our green friends better than you can. Why not team up? [cabuu]’s WiFi-enabled soil moisture sensor will do the trick in case you, too, want happy plants.

This is one of those projects which would have been much more difficult even five years ago, and really shows how lucky we are to have accessible technology at our fingertips. It’s conveniently constructed from off-the-shelf electronics modules, and nestled inside a 3D-printed case. The design is attractive as well as functional, showing the status LED and allowing access to the USB charging port.

The brain is a WeMos D1 mini, while a D1 battery shield and 14500 Li-ion battery supplies power. A key point of this build is the use of a capacitive moisture sensor, which doesn’t suffer the same long-term corrosion problems that destroy cheaper resistive probes. And no project is complete without an LED, so a WS2812 shows green for good, red for dry and blue for too wet. To extend battery life, the sensor supports a sleep mode, which tests the soil periodically, and presumably disables the LED.

Of course, if you’re a habitual plant-neglector, simply having a moisture probe won’t help; those can be as easy to ignore as the plant itself. That’s where WiFi comes in. [cabuu] wrote a Blynk app to monitor the sensor on a smartphone. The app shows current moisture levels and allows you to change the wet and dry warning thresholds. When the reading exceeds these levels, the app notifies you — this feature is the one that will keep your plants around.

Continue reading “Tired of Killing Houseplants? Try Using WiFi.”

A Deep Dive Into Low Power WiFi Microcontrollers

The Internet of Things is eating everything alive, and the world wants to know: how do you make a small, battery-powered, WiFi-enabled microcontroller device? This is a surprisingly difficult problem. WiFi is not optimized for low-power operations. It’s power-hungry, and there’s a lot of overhead. That said, there are microcontrollers out there with WiFi capability, but how do they hold up to running off of a battery for days, or weeks? That’s what [TvE] is exploring in a fantastic multi-part series of posts delving into low-power WiFi microcontrollers.

The idea for these experiments is set up in the first post in the series. Basically, the goal is to measure how long the ESP8266 and ESP32 will run on a battery, using various sleep modes. Both the ESP8266 and ESP32 have deep-sleep modes, a ‘sleep’ mode where the state is preserved, a ‘CPU only’ mode that turns the RF off, and various measures for sending and receiving a packet.

The takeaway from these experiments is that a battery-powered ESP8266 can’t be used for more than a week without a seriously beefy battery or a solar panel. Run times are much longer with an open network as compared to a secured network, and that security eats up a ton of power: connecting to a secure network every now and again means your ESP might only run for a day, instead of a week.

There is another option, though: the ESP32. While the ’32 is vastly more powerful and more capable than the ESP8266, it also has a few improved features that help with power consumption. Importantly, there’s a bug in the ESP8266 where it drops into modem sleep instead of light sleep about half the time. This error was fixed in the ESP32, but all that power does come at a cost. On the whole, if you’re concerned about security, the ESP32 is slightly better, simply because it does the ‘security’ part of connecting to a WiFi network faster. This is really a remarkable amount of testing that’s gone into this write-up, so if you’re developing something battery-powered with any ESP, it’s well worth the read.

Retrotechtacular: Remembering Radio Shack P-Box Kits

If you are under a certain age, you probably associate Radio Shack with cellphones. While Radio Shack never gave us access to the variety and economy of parts we have today, they did have one thing that I wish we could get again: P-Box kits. The obvious questions are: What’s a P-Box and why do I want one? But the kit wasn’t to make a P-Box. P-Box was the kind of box the kit came in. It was like a piece of perfboard, but made of plastic, built into a plastic box. So you bought the kit — which might be a radio or a metal detector — opened the box and then built the kit using the box as the chassis.

The perfboard was pretty coarse, too, because the components were all big discrete components. There was at least one that had an IC, but that came premounted on a PC board that you treated like a big component. One of my favorites was a three-transistor regenerative shortwave receiver. In those days, you could pick up a lot of stations on shortwave and it was one of the best ways at the time to learn more about the world.

On the left, you can see a picture of the radio from the 1975 catalog. You might think $7.95 is crazy cheap, but that was at least a tank full of gas or four movie tickets in those days, and most of us didn’t have a lot of money as kids, so you probably saved your allowance for a few weeks, did chores, or delivered papers to make $8.

Continue reading “Retrotechtacular: Remembering Radio Shack P-Box Kits”

Your USB Serial Adapter Just Became a SDR

To say that the RTL-SDR project was revolutionary might be something of an understatement. Taking a cheap little USB gadget and using it as a Software Defined Radio (SDR) to explore the radio spectrum from the tens of megahertz all the way into gigahertz frequencies with the addition of nothing more than some open source tools may go down as one of the greatest hacks of the decade. But even in the era of RTL-SDR, what [Ted Yapo] has manged to pull off is still pretty incredible.

With a Python script, a length of wire attached to the TX pin, and a mastery of the electron that we mere mortals can only hope to achieve, [Ted] has demonstrated using a common USB to serial adapter as an SDR transmitter. That’s right, using the cheap little UART adapter you’ve almost certainly got sitting in your parts bin right now and his software, you can transmit in the low megahertz frequencies and even up into VHF with some trickery. The project is still very much experimental, and though this may be the first time, we’re willing to bet this isn’t the last time you’ll be hearing about it.

The basic idea is that when sending certain characters over the UART serial line, they can combine with the start and stop bits to produce a square wave burst at half the baud rate. [Ted] found that sending a string of 0x55 at 19200 baud would generate a continuous square wave at 9600 Hz, and if he turned the baud rate all the way up to 2,000,000 where these USB adapters top out, that signal was transmitted at 1 MHz, right in the middle of the AM dial.

A neat trick to be sure, but alone not terribly useful. The next step was to modulate that signal by sending different characters over UART. [Ted] explains at great length his experiments with multi-level quantization and delta-sigma schemes, and each step of the way shows the improvement of the transmitted audio signal. Ultimately he comes up with a modulation scheme that produces a impressively clean signal, all things considered.

This alone is impressive, but [Ted] isn’t done yet. He realized that this method of transmission was generating some strong frequency harmonics which extended far beyond the theoretical maximum 1 MHz frequency of his UART SDR. In his experimentation he found he was able to pick up a signal from all the way out to 151 MHz, though it was too poor to be of any practical use. Dialing back the expectations a bit, he was able to successfully control a cheap 27 MHz RC toy using the 43rd harmonic of a 631 kHz signal at a range of about 10 feet with a FT232RL adapter, which he notes produces the cleanest signals in his testing.

[Ted] is still working on making transmissions cleaner and stronger by adding filters and amplifiers, but these early accomplishments are already very promising. His work reminds us of a low frequency version of the USB to VGA adapter turned GHz SDR transmitter, and we’re very eager to see where it goes from here.

Continue reading “Your USB Serial Adapter Just Became a SDR”

Solar-Powered IoT Sensor Saves Wine Batch From Overheating

Making wine isn’t just about following a recipe, it’s a chemical process that needs to be monitored and managed for best results. The larger the batch, the more painful it is to have something go wrong. This means that the stakes are high for small vineyards such as the family one [Mare] works with, which have insufficient resources to afford high-end equipment yet have the same needs as larger winemakers. The most useful thing to monitor is the temperature profile of the fermentation process, and [Mare] created an exceptional IoT system to do that using LoRa wireless and solar power.

It’s not enough just to measure temperature of the fermenting liquid; viewing how the temperature changes over time is critical to understanding the process and spotting any trouble. [Mare] originally used a Raspberry Pi, I2C temperature sensor, and a Wi-Fi connection to a database to do the monitoring. This was a success, but it was also overkill. To improve the system, the Raspberry Pi was replaced with a LoRaDunchy board, an STM-based module of [Mare]’s own design which is pin-compatible with the Arduino Nano. It includes a battery charger, power management, and LoRa wireless communication. Adding a solar cell and lithium-polymer battery was all it took to figuratively cut the power cord.

Sensing the temperature of fermentation is done by sealing the temperature sensor into a thin aluminum tube, and lowering that into the vat. There it remains, with the LoRaDunchy board periodically waking up to read the sensor and report the tempurature over LoRa before going back to sleep, all the while sipping power from the battery which in turn gets recharged with solar power.

It’s an elegant system that has already paid off. A 500 litre vat of wine generated an alarm when the temperature rose above 24 Celsius for 10 minutes. An email alert allowed the owner to begin mixing the solution and add ice water to put the brakes on the runaway reaction. The temperature dropped and slow fermentation resumed, thanks to the twin powers of gathering the right data, then doing something meaningful with it.

Vineyards and LoRa have joined forces before, for example in the Vinduino project which aims to enable water-smart farming. If you’re unfamiliar with LoRa in general, the LoRa on the ESP32 project page contains a good primer, and if the antenna on the module shown here looks familiar to you it’s because we recently featured [Mare]’s guide on making DIY LoRa antennas from salvaged wire.

Mining Airport WiFi Data: This Sunday Is The Worst Day To Fly

This is Thanksgiving weekend in the United States; the country’s most congested travel weekend of the year. It’s common knowledge, and it’s easy to infer that this holiday weekend is one of the busiest for air travel. But can you prove it empirically? Apparently so. [Bertrand Fan] filed a Freedom of Information Act request for the WiFi traffic at San Francisco International Airport and used the access point data from the past year and a half to show which days were most congested in the airport.

FOIA actually has its own website which boils down the act as follows:

The basic function of the Freedom of Information Act is to ensure informed citizens, vital to the functioning of a democratic society.

We’re not sure if this particular data mining hack falls under that description, but it’s good to know if you want information about what government is doing, you can get it and fast! From the first request to receiving the info was just 10 days.

Ghostscript was used to turn the PDF into a CSV which was then plotted on a graph. It shows that the heaviest WiFi usage was on 11/26/17, the Sunday after Thanksgiving. As you can see, the only thing returned was data used per day for each SSID (plus dates which aren’t shown in this screenshot). But in theory the more people stuck at the airport the more data they’ll consume, so the method is reasonable.

This was all just to color a conversation he was having with his parents about the weekend’s travel. It’s a long way to go to prove a point, but we had fun joining along in the ride!

[via Lobsters]

The Linux Throwie: A Non-Spacefaring Satellite

Throwies occupy a special place in hardware culture — a coin cell battery, LED, and a magnet that can be thrown into an inaccessible place and stick there as a little beacon of colored light. Many of us will fondly remember this as a first project. Alas, time marches inevitably on, and launching cheerful lights no longer teaches me new skills. With a nod to those simpler times, I’ve been working on the unusual idea of building a fully functional server that can be left in remote places and remain functional, like a throwie (please don’t actually throw it). It’s a little kooky, yet should still deliver a few years of occasional remote access if you leave it somewhere with sunlight.

A short while ago, I described the power stages for this solar-powered, cloud accessible Linux server. It only activates on demand, so a small solar cell and modest battery are sufficient to keep the whole show running.

Where we left off, I had a solar cell that could charge a battery, and provide regulated 12 V and 5 V output. For it to be a functional device, there are three high level problems to solve:

  1. It must be possible to set up the device without direct physical access
  2. You must be able to remotely turn it on and off as needed.
  3. It needs to be accessible from the Internet.

The funny thing is, this hardware reminds me of a satellite. Of course it’s not meant to go into space, but I do plan to put it somewhere not easy to get to again, it runs off of solar power, and there’s a special subsystem (ESP8266) to tend the power, check for remote activation, and turn the main computer (Raspberry Pi 3) on and off as necessary. This sounds a lot like space race tech, right?

As I have a bit more code than usual to share with you today, I’ll discuss the most interesting parts, and provide links to the full firmware files at the end of the article.

Continue reading “The Linux Throwie: A Non-Spacefaring Satellite”