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.

Etch-A-Selfie

Taking a selfie before the modern smartphone era was a true endeavor. Flip phones didn’t have forward-facing cameras, and if you want to go really far back to the days of film cameras, you needed to set a timer on your camera and hope, or get a physical remote shutter. You could also try and create a self portrait on an Etch a Sketch, too, but this would take a lot of time and artistic skill. Luckily in the modern world, we can bring some of this old technology into the future and add a robot to create interesting retro selfies – without needing to be an artist.

The device from [im-pro] attaches two servos to the Etch a Sketch knobs. This isn’t really a new idea in itself, but the device also includes a front-facing camera, taking advantage of particularly inexpensive ESP32 Camera modules. Combining the camera features with [Bart Dring]’s ESP32 Grbl port is a winner. Check the code in [im-pro]’s GitHub.

Once the picture is taken, the ESP32 at the heart of the build handles the image processing and then drawing the image on the Etch a Sketch. The robot needs a black and white image to draw, and an algorithm for doing it without “lifting” the drawing tool, and these tasks stretch the capabilities of such a small processor. It takes some time to work, but in the end the results speak for themselves.

The final project is definitely worth looking for, if not for the interesting ESP32-controlled robot than for the image processing algorithim implementation. The ESP32 is a truly versatile platform, though, and is useful for building almost anything.

Continue reading “Etch-A-Selfie”

Where The Work Is Really Done – Casual Profiling

Once a program has been debugged and works properly, it might be time to start optimizing it. A common way of doing this is a method called profiling – watching a program execute and counting the amount of computing time each step in the program takes. This is all well and good for most programs, but gets complicated when processes execute on more than one core. A profiler may count time spent waiting in a program for a process in another core to finish, giving meaningless results. To solve this problem, a method called casual profiling was developed.

In casual profiling, markers are placed in the code and the profiler can measure how fast the program gets to these markers. Since multiple cores are involved, and the profiler can’t speed up the rest of the program, it actually slows everything else down and measures the markers in order to simulate an increase in speed. [Daniel Morsig] took this idea and implemented it in Go, with an example used to demonstrate its effectiveness speeding up a single process by 95%, resulting in a 22% increase in the entire program. Using a regular profiler only counted a 3% increase, which was not as informative as the casual profiler’s 22% measurement.

We got this tip from [Greg Kennedy] who notes that he hasn’t seen much use of casual profiling outside of the academic world, but we agree that there is likely some usefulness to this method of keeping track of a multi-threaded program’s efficiency. If you know of any other ways of solving this problem, or have seen causal profiling in use in the wild, let us know in the comments below.

Header image: Alan Lorenzo [CC BY-SA 3.0].

Punch The World With A Raspberry Pi

Robots have certainly made the world a better place. Virtually everything from automobile assembly to food production uses a robot at some point in the process, not to mention those robots that can clean your house or make your morning coffee. But not every robot needs such a productive purpose. This one allows you to punch the world, which while not producing as much physical value as a welding robot in an assembly line might, certainly seems to have some therapeutic effects at least.

The IoT Planet Puncher comes to us from [8BitsAndAByte] who build lots of different things of equally dubious function. This one allows us to release our frustration on the world by punching it (or rather, a small model of it). A small painted sphere sits in front of a 3D-printed boxing glove mounted on a linear actuator. The linear actuator is driven by a Raspberry Pi. The Pi’s job doesn’t end there, though, as the project also uses a Pi camera to take video of the globe and serve it on a webpage through which anyone can control the punching glove.

While not immediately useful, we certainly had fun punching it a few times, and once a mysterious hand entered the shot to make adjustments to the system as well. Projects like this are good fun, and sometimes you just need to build something, even if it’s goofy, because the urge strikes you. Continue reading “Punch The World With A Raspberry Pi”

Russian EBike Goes Everywhere, Possibly Legal

Electric bikes may be taking the world by storm, but the world itself doesn’t have a single way of regulating ebikes’ use on public roads. Whether or not your ebike is legal to ride on the street or sidewalk where you live depends mostly on… where you live. If you’re lucky enough to live in a place where a bicycle is legally defined as having fewer than four wheels and capable of being powered by a human, though, this interesting bike from Russia might be the best homemade ebike we’ve ever seen. (Video embedded below the break.)

While some of the details of this build might be lost on those of us who do not know any Slavic languages, the video itself shows off the features of this electric vehicle build quite well. It has a custom built frame with two wheels up front, each with its own independent suspension, allowing it to traverse extremely rough terrain with ease even a mountain bike might not be able to achieve. It seems to be powered by a relatively simple rear hub in the single rear wheel, and can probably achieve speeds in the 20 km/h range while holding one passenger and possibly some cargo.

The impressive part of this build isn’t so much the electrification, but rather the suspension components. Anyone looking for an offroad vehicle may be able to take a bit of inspiration from this build. If you’re more interested in the drivetrain, there are plenty of other vehicles that use unique electric drivetrains to check out like this electric boat. And, if you happen to know Russian and see some other interesting details in this build that the native English speakers around here may have missed, leave them in the comments for us.

Continue reading “Russian EBike Goes Everywhere, Possibly Legal”

I Love The Smell Of ABS Plastic In The Morning

One lesson we can learn from the Vietnam War documentary Apocalypse Now is that only crazy people like terrible smells just for fun. Surely Lt. Col. Kilgore would appreciate the smell of 3D printers as well, but for those among us who are a little less insane, we might want a way to eliminate the weird (and not particularly healthy) smell of melting ABS plastic.

While a simple solution would be a large fume hood or a filter to prevent inhaling the fumes, there are more elegant solutions to this problem. [Mark]’s latest project uses an electrostatic precipitator (ESP) to remove the volatile plastic particles from the air. Essentially it is a wire with a strong voltage applied to it enclosed in a vessel of some sort. The voltage charges particles, which then travel to a collecting electrode. Commercial offerings also include an X-ray generator to help clean the air, but [Mark] found this to be prohibitively expensive.

The ESP is built into a small tube through with the air can flow, and the entire device itself is housed in the printing enclosure. The pictures show the corona discharge in the device, and [Mark] plans to test it over the next few months to determine its effectiveness. He does note, however, that the electrostatic discharge creates ozone, which has its own set of problems, so he recommends against building one on your own. Ozone at least still smells like victory.

The South American Power Outage That Plunged 48 Million Into Blackout

A massive power outage in South America last month left most of Argentina, Uruguay, and Paraguay in the dark and may also have impacted small portions of Chile and Brazil. It’s estimated that 48 million people were affected and as of this writing there has still been no official explanation of how a blackout of this magnitude occurred.

While blackouts of some form or another are virtually guaranteed on any power grid, whether it’s from weather events, accidental damage to power lines and equipment, lightning, or equipment malfunctioning, every grid will eventually see small outages from time to time. The scope of this one, however, was much larger than it should have been, but isn’t completely out of the realm of possibility for systems that are this complex.

Initial reports on June 17th cite vague, nondescript possible causes but seem to focus on transmission lines connecting population centers with the hydroelectric power plant at Yacyretá Dam on the border of Argentina and Paraguay, as well as some ongoing issues with the power grid itself. Problems with the transmission line system caused this power generation facility to become separated from the rest of the grid, which seems to have cascaded to a massive power failure. One positive note was that the power was restored in less than a day, suggesting at least that the cause of the blackout was not physical damage to the grid. (Presumably major physical damage would take longer to repair.) Officials also downplayed the possibility of cyber attack, which is in line with the short length of time that the blackout lasted as well, although not completely out of the realm of possibility.

This incident is exceptionally interesting from a technical point-of-view as well. Once we rule out physical damage and cyber attack, what remains is a complete failure of the grid’s largely automatic protective system. This automation can be a force for good, where grid outages can be restored quickly in most cases, but it can also be a weakness when the automation is poorly understood, implemented, or maintained. A closer look at some protective devices and strategies is warranted, and will give us greater insight into this problem and grid issues in general. Join me after the break for a look at some of the grid equipment that is involved in this system.

Continue reading “The South American Power Outage That Plunged 48 Million Into Blackout”