Tiny Microcontroller Uses Real-Time Operating System

Most of the computers we interact with on a day-to-day basis use an operating system designed for flexibility. While these are great tools for getting work done or scrolling your favorite sites, they have a weakness when it comes to interacting quickly with a real-world environment. For these kinds of low-latency, high-reliability systems you may want to turn to something like freeRTOS which is optimized for this kind of application and which [Parikshit Pagare] has used to build his home automation system.

This build is based around an ESP32 for which freeRTOS, designed specifically for embedded systems, is uniquely suited. There are several channels built in capable of monitoring temperature, functioning as a smoke alarm, and sensing whether someone is at the front door. All of these are reported to a small OLED screen but are also updated on an Android app as well, which happens nearly instantaneously thanks to the real-time operating system. There are a number of user-controllable switches as well that are capable of turning lights or fans on and off.

For a home automation system, it’s one of the most low-cost and fully-featured we’ve seen and if you’re still having trouble coming across a Raspberry Pi as they sort out supply issues, something like this might make an excellent substitute at a fraction of the price. If you’re looking to expand even beyond this build, one of the gold standards for ESP32-based automation design is this build from [Marcus] which not only demonstrates how to build a system like this but goes into great detail on the ESPHome environment.

Continue reading “Tiny Microcontroller Uses Real-Time Operating System”

Random Numbers From A Smoke Detector

The quest for truly random numbers is something to which scientists and engineers have devoted a lot of time and effort. The trick is to find an unpredictable source of naturally occurring noise that can be sampled, so they have looked towards noisy gas discharge tubes or semiconductor junctions, and radioactive decay. Noisy electrical circuits have appeared in these pages before as random number generators, but we’d be forgiven for thinking that radioactive decay might involve something a little less run-of-the-mill. In fact we all probably have just such a device in our houses, in the form of the ionisation chamber that’s part of most household smoke detectors. [Lukas Koch] has built a project that shows us just how this can be done.

A smoke detector of this type uses a metal shell to house a tiny sample of radioactive americium that emits alpha particles into the space between two electrodes. These ionise the air in that space, and the detectable effect on the space between the two electrodes is increased when ionised gasses from smoke are present. However it can also quite happily detect the ionisation from individual alpha particles, which means that it’s perfect as a source of random noise. A sensitive current amplifier requires significant shielding to avoid the device merely becoming a source of mains hum, and to that end he’s achieved a working breadboard prototype.

This is still a work in progress and though it has as yet no schematic he promises us that it will arrive in due course. It’s a project that’s definitely worth watching, because despite getting more up-close and personal than most of us have with radioactive components, it’s one we’re genuinely interested to see come to fruition.

Of course, we’ve seen smoke detectors in more detail before here at Hackaday.

Plasma Discharges Show You Where The Radiation Is

Depending on the context of the situation, the staccato clicks or chirps of a Geiger counter can be either comforting or alarming. But each pip is only an abstraction, an aural indication of when a particle or ray of ionizing radiation passed through a detector. Knowing where that happened might be important, too, under the right circumstances.

While this plasma radiation detector is designed more as a demonstration, it does a pretty good job at localizing where ionization events are happening. Designed and built by [Jay Bowles], the detector is actually pretty simple. Since [Jay] is the type of fellow with plenty of spare high-voltage power supplies lying around, he took a 6 kV flyback supply from an old build and used it here. The detector consists of a steel disk underneath a network of fine wires. Perched atop a frame of acrylic and powered by a 9 V battery, the circuit puts high-voltage across the plate and the wires. After a substantial amount of tweaking, [Jay] got it adjusted so that passing alpha particles from a sample of americium-241 left an ionization trail between the conductors, leading to a miniature lightning bolt.

In the video below, the detector sounds very similar to a Geiger counter, but with the added benefit of a built-in light show. We like the way it looks and works, although we’d perhaps advise a little more caution to anyone disassembling a smoke detector. Especially if you’re taking apart Soviet-era smoke alarms — you might get more than you bargained for.

Continue reading “Plasma Discharges Show You Where The Radiation Is”

Put A Smoke Detector To Some Use

While we’re certainly not denying that smoke detectors are useful, there’s a certain kind of tragedy to the fact that most of them will never realize their true purpose of detecting smoke, and alerting us to a dangerous fire. On the other hand, [Ben] really unlocks the potential hidden deep in every smoke detector with his latest project which uses the smoke-detecting parts of a smoke detector to turn on the exhaust fan over his stove.

The project didn’t start with the noble aim of realizing the hidden and underutilized quiescent nature of a smoke alarm, though. He wanted his range exhaust fan to turn on automatically when it was needed during his (and his family’s) cooking activities. The particular range has four speeds so he wired up four relays to each of the switches in the range and programmed a Particle Photon to turn them on based on readings from an MQ-2 gas-detecting sensor.

The sensor didn’t work as well as he had hoped. It was overly sensitive to some gasses like LPG which would turn the range on full blast any time he used his cooking spray. Meanwhile, it would drift and not work properly during normal cooking. He tried disabling it and using only a temperature sensor, which didn’t work well either. Finally, he got the idea to tear apart a smoke detector and use its sensor’s analog output to inform the microcontroller of the current need for an exhaust fan. Now that that’s done, [Ben] might want to add some additional safety features to his stovetop too.

Building A Smarter Smoke Alarm With The ESP8266

The modern hacker wields a number of tools that operate on the principle of heating things up to extremely high temperatures, so a smoke alarm is really a must-have piece of equipment. But in an era where it seems everything is getting smarter, some might wonder if even our safety gear could benefit from joining the Internet of Things. Interested in taking a crack at improving the classic smoke alarm, [Vivek Gupta] grabbed a NodeMCU and started writing some code.

Now before you jump down to the comments and start smashing that keyboard, let’s make our position on this abundantly clear. Do not try to build your own smoke alarm. Seriously. It takes a special kind of fool to trust their home and potentially their life to a $5 development board and some Arduino source code they copied and pasted from the Internet. That said, as a purely academic exercise it’s certainly worth examining how modern Internet-enabled microcontrollers can be used to add useful features to even the most mundane of household devices.

In this case, [Vivek] is experimenting with the idea of a smoke alarm that can be silenced through your home automation system in the event of a false alarm. He’s using Google Assistant and IFTTT, but the code could be adapted to whatever method you’re using internally to get all your gadgets on the same virtual page. On the hardware side of things, the test system is simply a NodeMCU connected to a buzzer and a MQ2 gas sensor.

So how does it work? If the detector goes off while [Vivek] is cooking, he can tell Google Assistant that he’s cooking and it’s a false alarm. That silences the buzzer, but not before the system responds with a message questioning his skills in the kitchen. It’s a simple quality of life improvement and it’s certainly not hard to imagine how the idea could be expanded upon to notify you of a possible situation even when you’re out of the home.

We’ve seen how a series of small problems can cascade into a life-threatening situation. If you’re going to perform similar experiments, make sure you’ve got a “dumb” smoke alarm as a backup.

Continue reading “Building A Smarter Smoke Alarm With The ESP8266”

Soviet Era Smoke Detector Torn Down, Revealing Plutonium

It’s widely known that a smoke detector is a good ionizing radiation source, as they contain a small amount of americium-241, a side product of nuclear reactors. But what about other sources? [Carl Willis] got hold of an old Soviet era smoke detector and decided to tear it down and see what was inside. This, as he found out, isn’t something you should do lightly, as the one he used ended up containing an interesting mix of radioactive materials, including small amounts of plutonium-239, uranium-237, neptunium-237 and a selection of others. In true hacker fashion, he detected these with a gamma ray spectroscope he has in his spare bedroom, shielded from other sources with lead bricks and copper and tin sheets. Continue reading “Soviet Era Smoke Detector Torn Down, Revealing Plutonium”

Retrofitting Smoke Alarms With Bluetooth

Everybody should have a few smoke alarms in their house, and everyone should go check the battery in their smoke alarm right now. That said, there are a few downsides to the traditional smoke alarm. They only work where you can hear them, and this problem has been solved over and over again by security companies and Internet of Things things.

Instead of investing in smart smoke alarms, [Johan] decided to build his own IoT smoke alarm. It’s dead simple, costs less than whatever wonder gizmo you can buy at a home improvement store, and reuses your old smoke alarm. In short, it’s everything you need to build an Internet-connected smoke alarm.

Smoke alarms, or at least ionization-based alarms with a tiny amount of radioactive americium, are very simple devices. Inside the alarm, there’s a metal can – an ionization chamber – with two metal plates. When smoke enters this chamber, a few transistors sound the alarm. If you’ve ever taken one apart, you can probably rebuild the circuit from memory.

Because these alarms are so simple, it’s possible to hack in some extra electronics into a design that hasn’t changed in fifty years. For [Johan]’s project, he’s doing just that, tapping into one of the leads on the ionization chamber, measuring the current through the buzzer, and adding a microcontroller with Bluetooth connectivity.

For the microcontroller and wireless solution, [Johan] has settled on TI’s CC2650 LaunchPad. It’s low power, relatively cheap, allows for over the air updates, and has a 12-bit ADC. Once this tiny module is complete, it can be deadbugged into a smoke alarm with relative ease. Any old phone can be used as a bridge between the alarm network and the Internet.

The idea of connecting a smoke alarm to the Internet is nothing new. Security companies have been doing this for years, and there are dozens of these devices available at Lowes or Home Depot. The idea of retrofitting smarts into a smoke alarm is new to us, and makes a lot of sense: smoke detectors are reliable, cheap, and simple. Why not reuse what’s easy and build out from there?