Hacking The ZH03B Laser Particle Sensor

Laser particle detectors are a high-tech way for quantifying whats floating around in the air. With a fan, a laser, and a sensitive photodetector, they can measure smoke and other particulates in real-time. Surprisingly, they are also fairly cheap, going for less than $20 USD on some import sites. They just need a bit of encouragement to do our bidding.

[Dave Thompson] picked up a ZH03B recently and wanted to get it working with his favorite sensor platform, Mycodo. With a sprinkling of hardware and software, he was able to get these cheap laser particle sensors working on his Raspberry Pi, and his work was ultimately incorporated upstream into Mycodo. Truly living the open source dream.

The ZH03B has PWM and UART output modes, but [Dave] focused his attention on UART. With the addition of a CP2102 USB-UART adapter, he was able to connect it to his Pi and Mac, but still needed to figure out what it was saying. He eventually came up with some Python code that lets you use the sensor both as part of a larger network or service like Mycodo and as a stand-alone device.

His basic Python script (currently only tested on Linux and OS X), loops continuously and gives a running output of the PM1, PM2.5, and PM10 measurements. These correspond to particles with a diameter of 1, 2.5, and 10 micrometers respectively. If you want to plug the sensor into another service, the Python library is a bit more mature and lets you do things like turn off the ZH03B’s fan to save power.

These sensors are getting cheap enough that you can build distributed networks of them, a big breakthrough for crowd-sourced environmental monitoring; especially with hackers writing open source code to support them.

Raspberry Pi as 433 MHz to MQTT Gateway

Many low-cost wireless temperature and humidity sensors use a 433 MHz transmitter to send data back to their base stations. This is a great choice for the manufacturer of said devices because it’s simple and the radios are cheap, but it does limit what we as the consumer can do with it a bit. Generally speaking, you won’t be reading data from these sensors on your computer unless you’ve got an SDR device and some experience with GNU Radio and reading the Nexus protocol.

But [Aquaticus] has developed a very comprehensive piece of software that should make integrating these type of sensors into your home automation system much easier, as long as you’ve got a spare Raspberry Pi lying around. Called nexus433, it uses a cheap 433 MHz receiver connected to the Pi’s GPIO pins to receive data from environmental sensors using the popular Nexus communication protocol. A few known compatible sensors are listed in the project documentation, one of which can be had for as little as $5 USD shipped.

In addition to publishing the temperature, humidity, and battery level values from the sensors to MQTT, it even tracks connection quality for each individual sensor and when they go on and offline. To be sure, this is no simple hack. In nexus433, [Aquaticus] has created a mature Linux service with enough flexibility that you shouldn’t have any problems working it into your automation setup, whether it’s Home Assistant or something you’ve put together yourself.

We’ve seen a number of home automation hacks using these ubiquitous 433 MHz radios,  from controlling them with an ESP8266 to hacking a popular TP-LINK router into a low-cost home automation hub.

Simple ESP8266 Weather Station using Blynk

Today’s hacker finds themself in a very interesting moment in time. The availability of powerful microcontrollers and standardized sensor modules is such that assembling the hardware for something like an Internet-connected environmental monitor is about as complex as building with LEGO. Hardware has become elementary in many cases, leaving software as the weak link. It’s easy to build the sensor node to collect the data, but how do you display it in a useful and appealing way?

This simple indoor temperature and humidity sensor put together by [Shyam Ravi] shows one possible solution to the problem using Blynk. In the video after the break, he first walks you through wiring the demonstration hardware, and then moves on to creating the Blynk interface. While it might not be the ideal solution for all applications, it does show you how quickly you can go from a handful of components on the bench to displaying useful data.

In addition to the NodeMCU board, [Shyam] adds a DHT11 sensor and SSD1306 OLED display. He’s provided a wiring diagram in the repository along with the Arduino code for the ESP8266, but the hardware side of this demonstration really isn’t that important. You could omit the OLED or switch over to something like a BME280 sensor if you wanted to. The real trick is in the software.

For readers who haven’t played with it before, Blynk is a service that allows you to create GUIs to interact with microcontrollers from anywhere in the world. The code provided by [Shyam] reads the humidity and temperature data from the DHT11 sensor, and “writes” it to the Blynk service. From within the application, you can then visualize that data in a number of ways using the simple drag-and-drop interface.

We’ve seen Blynk and ESP8266 used to control everything from mood lighting to clearance-rack robotic toys. It’s a powerful combination, and something to keep in mind next time you need to knock something together in short order.

Continue reading “Simple ESP8266 Weather Station using Blynk”

Smart Citizen Opens Eyes and Ears in Barcelona

More often than not, our coverage of projects here at Hackaday tends to be one-off sort of thing. We find something interesting, write it up for our beloved readers, and keep it moving. There’s an unending world of hacks and creations out there, and not a lot of time to cover them all. Still, it’s nice when we occasionally see a project we’ve previously covered “out in the wild” so to speak. A reminder that, while a project’s time on the Hackaday front page might be fleeting, their journey is far from finished.

A perfect example can be found in a recent article posted by the BBC about the battle with noise in Barcelona’s Plaza del Sol. The Plaza is a popular meeting place for tourists and residents alike, with loud parties continuing into the middle of the night, those with homes overlooking the Plaza were struggling to sleep. But to get any changes made, they needed a way to prove to the city council that the noise was beyond reasonable levels.

Enter the Smart Citizen, an open source Arduino-compatible sensor platform developed by Fab Lab Barcelona. We originally covered the Smart Citizen board back in 2013, right after it ran a successful funding campaign on Kickstarter. Armed with the data collected by Smart Citizen sensors deployed around the Plaza, the council has enacted measures to try to quiet things down before midnight.

Today people tend to approach crowdfunded projects with a healthy dose of apprehension, so it’s nice to see validation that they aren’t all flash in the pan ideas. Some of them really do end up making a positive impact, years after the campaign ends.

Of course, we can’t talk about distributed environmental monitoring without mentioning the fantastic work of [Radu Motisan], who’s made it his mission to put advanced sensors in the hands of citizen scientists.

[Thanks to muA for the tip.]

Shah Selbe: Science in the World’s Wildest Places

When we think of building research hardware, lab coats and pristine workbenches come to mind. Shah Selbe used to do something kind of like that when he was engineering satellite propulsion systems. But after putting twelve of them into space, he ditched the office gig and took his gear to some of the wildest places on earth. He’s an explorer and fellow with the National Geographic Society, and at the Hackaday Superconference he shared his experiences building research hardware that gathers data in incredibly remote places.

Shah makes a really good point about two very different trends in our world over the past several decades. While we’ve had unparalleled technological growth, we’ve also seen horrifying wildlife trends to the point that some scientists believe we’re currently in a sixth mass extinction event. But to know that for sure, and look for ways to prevent and reverse it, we need reliable data. This is a fascinating problem because the world is huge, and we simply can’t monitor everything.

Continue reading “Shah Selbe: Science in the World’s Wildest Places”

ESP8266 Home Monitor Is Stylishly Simplistic

It’s often said that “Less is More”, and we think that the chic ESP8266 environmental monitor posted by Thingiverse user [bkpsu] definitely fits the bill. Dubbed “Kube”, the device is a 3D printed white cube with an OLED display in the center, which [bkpsu] says was designed specifically for the approval of his wife. Weirdly, she didn’t like the look of bare PCBs on the wall.

Multiple Kubes allow for whole-house monitoring.

Inside, things are a little more complex. The Kube uses the NodeMCU development board, and a custom breakout that [bkpsu] designed to interface with the display and sensors. For temperature and humidity monitoring, the Kube is using the ever-popular DHT22, and [bkpsu] mentions that he has future plans for things like motion sensors and direct control of RGB LED strips. All the data collected by the Kube is piped into openHAB via MQTT.

On the very detailed Thingiverse page, [bkpsu] gives background information on his design goals for the project, tips for printing out a high-quality case, a parts list with Amazon links, and pinout information for getting it all wired up. The PCB is even available on OSH Park for those who want a Kube of their own.

Even with all the stick home monitoring and automation products on the market today, many hackers simply can’t bring themselves to buying a turn-key commercial product. But we think with the results hackers have been getting rolling their own solutions, they just might be on to something.

Hackaday Prize Entry: A Portable Environmental Monitor

There are a lot of environmental monitors in the running for this year’s Hackaday Prize. Whether they’re soil moisture sensors for gardens or ultraviolet sensors for the beach, the entrants for The Hackaday Prize seem to grasp the inevitable truth that you need information about the environment before doing anything about the environment.

But what about sharing that information? Wouldn’t it be handy if there were an online repository where you could look up environmental conditions of any location on the planet? That’s where [radu.motisan]’s Portable Environmental Monitor comes in. It’s a small, pocketable device that measures just about everything and uploads that data to the Internet.

This project is a continuation of [radu]’s entry for The Hackaday Prize last year, the Global Radiation Monitoring Network. This was more than just a Geiger tube connected to the Internet; [radu] has a global network of Geiger counters displaying counts per minute on a nifty live map.

[radu]’s latest project expands on the capabilities of the Global Radiation Monitoring Network with more sensors and portability. Inside the Environmental Monitor are enough sensors to look at Alpha, Beta and Gamma radiation, dust and toxic gas, and other types of pollution. With the addition of an ESP8266 WiFi module, this portable device can upload sensor readings to the Internet, greatly expanding [radu]’s uRADMonitor network.

The 2015 Hackaday Prize is sponsored by: