A Lightweight Smart Home Server

Working towards automating a few things in a home often seems simple on the surface, but it’s easy for these projects to snowball into dozens of sensors and various servos, switches, and cameras strewn about one’s living space. The same sort of feature creep sneaks into some of the more popular self-hosted home server platforms as well, with things like openHAB requiring so much computing power that they barely function on something like a Raspberry Pi. [Paulo] thought there should be a more lightweight way of tackling a project like this, and set about building his own smart home server with help from some interesting software.

The project is based around the Dirigera hub from Ikea, partially because [Paulo] is planning to use other smart home devices from Ikea as he can easily find them where he is, and also because these devices tend to use Zigbee, a non-proprietary communications standard. This means that if he ever wants to swap out the hub for another one in the future, it won’t be difficult to do. From here the major hurdle is that using the default software from these devices is fairly limiting, so [Paulo] reached for a Raspbee 2 Zigbee gateway for use with a Raspberry Pi and an extremely lightweight and customizable web server called Mako to make this happen. Using Lua as the high-level language to tie everything together he was able to easily deploy the server to control the Ikea hub and devices and automate them in any way he sees fit.

While it is true that software like openHAB and others already exists to do virtually any home automation task that could be imagined, if you’re looking to do something with a bare minimum of computing power something like [Paulo]’s solution is likely going to be the fastest and most reliable method of getting a few things automated around the home. If you’re looking for something completely open source and built from the ground up, though, we have seen a few alternative smart home solutions like this one which don’t rely on any proprietary hardware or software, but do take a little bit more effort on the user’s part.

Detail of a circuit sculpture in the shape of a lighthouse

Op Amp Contest: This Lighthouse Sculpture Flickers In The Rhythm Of Chaos

Op amps are typically used to build signal processing circuits like amplifiers, integrators and oscillators. Their functionality can be described by mathematical formulas that have a single, well-defined solution. However, not every circuit is so well-behaved, as Leon Chua famously showed in the early 1980s: if you make a circuit with three reactive elements and a non-linear component, the resulting oscillation will be chaotic. Every cycle of the output will be slightly different from its predecessors, and the circuit might flip back and forth between different frequencies.

A circuit sculpture in the shape of a lighthouseA light modulated with a chaotic signal will appear to flicker like a candleflame, which is the effect [MaBe42] was looking for when he built a lighthouse-shaped circuit sculpture. Its five differently-colored LEDs are driven by a circuit known as Sprott’s chaotic jerk circuit. A “jerk”, in this context, is the third-order derivative of a variable with respect to time – accordingly, the circuit uses three RC integrators to implement its differential equation, along with a diode to provide nonlinearity.

The lighthouse has three chaotic oscillators, one in each of its legs. Their outputs are used to drive simple pulse-width modulators that power the LEDs in the top of the tower. [MaBe42] used the classic LM358 op amp for most of the circuits, along with 1N4148 diodes where possible and 1N4004s where needed – not for their higher power rating, but for their stronger leads. As is common in circuit sculptures, the electronic components are also part of the tower’s structure, and it needs to be quite sturdy to support its 46 cm height.

[MaBe42] used 3D printed jigs to help in assembling the various segments, testing each circuit before integrating it into the overall structure. The end result is a beautiful ornament for any electronics lab: a wireframe structure with free-hanging electronic components and randomly flickering lights on top. Want to learn more about circuit sculpture? Check out this great talk from Remoticon 2020.

Continue reading “Op Amp Contest: This Lighthouse Sculpture Flickers In The Rhythm Of Chaos”

Know Audio: Distortion Part One

If you follow audiophile reviewers, you’ll know that their stock-in trade is a very fancy way of saying absolutely nothing of quantifiable substance about the subject while sounding knowledgeable about imagined differences between devices that are all of superlative quality anyway. If you follow us, we’ll tell you that the only reviews that matter are real-world measurements of audio performance, and blind listening tests. We don’t have to tell you how to listen to music, but perhaps it’s time in our Know Audio series to look at how audio performance is measured.

Before reaching for the bench, it’s first necessary to ask just what we are measuring. What are the properties which matter in an audio chain, or in other words, just what is it that makes an audio device good?

Continue reading “Know Audio: Distortion Part One”

Souped-Up Reflective Sensor Uses Itself For Wireless Programming

Proximity sensors are common enough in automation projects that we hardly give them a second thought — pick something with specs that match the job and move on. But they can be fussy to get adjusted just right, a job made more difficult if they’re located in some out-of-the-way corner.

But where lies a challenge, there’s also an opportunity, as [Ido Gendel] shows us with this remote-controlled proximity sensor. The story behind this clever little hack starts with an off-the-shelf sensor, the kind with an IR LED and a phototransistor pointed in the same direction that gives a digital output when the light bouncing back into the phototransistor exceeds a certain threshold. It was setting the threshold that gave [Ido]’s client trouble, so [Ido] decided to build a programmable drop-in replacement to make the job easier.

The first try at this used an OBP732 reflective transmitter and an ATtiny202 microcontroller and had three pads on the PCB for programming. This still required physical contact for programming, though, so [Ido] had the idea to use the sensor for wireless IR programming. The microcontroller on version two was switched to an ATtiny212, and a couple of components were added to control the power of the LED so the sensor could do double duty. A programmer using the same sensor and a USB-to-UART adapter completes the system, and allows the sensor threshold to be set just by shining the programmer in its general direction from up to 25 cm away.

We think that getting multiple uses from a single sensor is pretty clever, so hats off for this one. It’s not the first time we’ve featured one of [Ido]’s projects, but it’s been quite a while — this one-clock-cycle-a-day Shabbat clock was the most recent, but you can clearly see the roots of the sensor project in this mouse pointer data encoder that goes all the way back to 2015.

Radio Apocalypse: Hardening AM Radio Against Disasters

If you’ve been car shopping lately, or even if you’ve just been paying attention to the news, you’ll probably be at least somewhat familiar with the kerfuffle over AM radio. The idea is that in these days of podcasts and streaming music, plain-old amplitude modulated radio is becoming increasingly irrelevant as a medium of mass communication, to the point that automakers are dropping support for it from their infotainment systems.

The threat of federal legislation seems to have tapped the brakes on the anti-AM bandwagon, at least for now. One can debate the pros and cons, but the most interesting tidbit to fall out of this whole thing is one of the strongest arguments for keeping the ability to receive AM in cars: emergency communications. It turns out that about 75 stations, most of them in the AM band, cover about 90% of the US population. This makes AM such a vital tool during times of emergency that the federal government has embarked on a serious program to ensure its survivability in the face of disaster.

Continue reading “Radio Apocalypse: Hardening AM Radio Against Disasters”

That Handheld 386SX Gets A Teardown

A few weeks ago our community was abuzz with the news of a couple of new portable computers available through AliExpress. Their special feature was that they are brand new 2023-produced retrocomputers, one with an 8088, and the other with a 386SX. Curious to know more? [Yeo Kheng Meng] has one of the 386 machines, and he’s taken it apart for our viewing pleasure.

What he found is a well-designed machine that does exactly what it claims, and which runs Windows 95 from a CF card. It’s slow because it’s an embedded version of the 386 variant with a 16-bit bus originally brought to market as a chip that could work with 16-bit 286-era chipsets. But the designer has done a good job of melding old and new parts to extract the most from this vintage chip, and has included some decidedly modern features unheard of in the 386 era such as a CH375B USB mass storage interface.

If we had this device we’d ditch ’95 and run DOS for speed with Windows 3.1 where needed. Back in the day with eight megabytes of RAM it would have been considered a powerhouse before users had even considered its form factor, so there’s an interesting exercise for someone to get a vintage Linux build running on it.

One way to look at it is as a novelty machine with a rather high price tag, but he makes the point that considering the hardware design work that’s gone into it, the 200+ dollar price isn’t so bad. With luck we’ll get to experience one hands-on in due course, and can make up our own minds. Our original coverage is here.

Want Lower Power? Add More Cores!

[Jacob Beningo] over at Embedded.com recently posted his thoughts on how to do a low-power microcontroller design. On the surface, some of his advice seems a little counter-intuitive. Even he admits, “…I’m suggesting adding more cores! I must be crazy!” There are a few tips, but the part he’s talking about is that you can save power by using CPUs with multiple cores and optimizing for speed.

This seems strange since you think of additional cores and speed to consume more power. But the idea is that the faster you get your work done, the faster you can go to sleep. We’ve seen that in our own projects — faster work means more napping, and that’s good for power consumption.

Of course, it isn’t just that simple. Multiple cores don’t help you if you don’t use them. The overarching goal is to get done quickly so you can get back to sleep. You know, kind of like work. The other advice in the post is generally good, too. Measure your power consumption, respond to events, and — maybe slightly surprising — with modern CPUs, variations within the CPU family, according to [Jacob], isn’t very significant. Instead, he reports that the big changes are switching to the least-capable processor family.

Naturally, Hackaday readers are no strangers to low-power design. If you get your power consumption low enough, you can consider a low-tech battery or even a potato.