Automate Your Life With Node-RED (Plus A Dash Of MQTT)

For years we’ve seen a trickle of really interesting home automation projects that use the Node-RED package. Each time, the hackers behind these projects have raved about Node-RED and now I’ve joined those ranks as well.

This graphic-based coding platform lets you quickly put together useful operations and graphic user interfaces (GUIs), whether you’re the freshest greenhorn or a seasoned veteran. You can use it to switch your internet-connected lights on schedule, or at the touch of a button through a web-app available to any device on your home network. You can use it as an information dashboard for the weather forecast, latest Hackaday articles, bus schedules, or all of them at once. At a glance it abstracts away the complexity of writing Javascript, while also making it simple to dive under hood and use your 1337 haxor skills to add your own code.

You can get this up and running in less than an hour and I’m going to tackle that as well as examples for playing with MQTT, setting up a web GUI, and writing to log files. To make Node-RED persistent on your network you need a server, but it’s lean enough to run from a Raspberry Pi without issue, and it’s even installed by default in BeagleBone distributions. Code for all examples in this guide can be found in the tutorial repository. Let’s dive in!

Continue reading “Automate Your Life With Node-RED (Plus A Dash Of MQTT)”

Building A Real Wooden Table Saw

A table saw is one of those tools that aren’t strictly necessary to have, but immensely helpful if you do happen to have one around. The folks at [I Build It] have made a three part series that features a homemade table saw build, so you can finally get around to adding one to your makerspace.

The build uses a real table saw arbor and is made from Baltic birch plywood and solid wood, with some plastic sheets for the trunnions and top. The blade is housed in a blade lift made out wooden panels with a pivot point and slot for the lift mechanism. Bearings allow the blade the freedom of movement, while a curved cutout allows it to stay flat against the wall of the slot while the blade lift mechanism moves.

Meanwhile a reused motor from a previous table saw is dusted, cleaned, and rewired to run in reverse. While most table saws only need two trunnions, a third is used for supporting the motor, since it has to move with the lift and tilt. Once the lift/tilt mechanism is complete, the frame for the table saw is more straightforward, with many steps involving clamping, measuring, cutting, fitting, and painting the assembly. For the final few steps, a switched is mounted outside the table saw in a small box that connected to the power supply and motor, as well as a shop vac for handling dust collection from the saw. While the enclosure isn’t a metal box, as long as the connections are secured properly the wires shouldn’t come loose.

If you want to see other examples of homemade table saws, check out this teeny tiny saw and this kid-friendly table saw build.

Continue reading “Building A Real Wooden Table Saw”

Embedding A Smart Switch In A Java Factory

When you need coffee, you don’t need any hassles standing between you and caffeination. Especially ironic hassles, like having to do more to turn on appliances inside of home automation schemes than you did without them.

[Maurice Makaay] bought a smart plug to add this beautiful drip coffee machine to his Z-Wave setup, but it isn’t all that smart. Starting the brew remotely means making sure that both the machine’s power switch and the smart plug switch are on. Some members of the household still like making their coffee the old-fashioned way, so [Maurice] came up with a smart, single switch solution to satisfy both cases.

The answer comes in the form of a Z-Wave switch that takes dual inputs and is small enough to fit inside the machine. After a lot of searching around for compatible, splash-proof parts, [Maurice] replaced the existing on/off rocker with a momentary rocker for making coffee manually. That switch labeled ‘extra heet’ used to turn the warming burner on and off. Since he never uses the burner, the switch receptacle now houses a power indicator light.

[Maurice] went about this mains appliance hack the right way — he used extra thick wires connected with lever nuts, and kept the machine’s equally beautiful spare parts and safety documentation by his side the whole time. A person could probably become a lot more comfortable with the idea of installing these by looking over [Maurice]’s pictures of the process.

You know how coffee makes everything better? Turns out ‘everything’ includes printer filament.

Drill Thrice, Solder Once

If you design printed circuit boards, then you will have also redesigned printed circuit boards. Nobody gets it right the first time, every time. Sometimes you can solder a scrap of 30gauge wire, flip a component 180°, or make a TO-92 transistor do that little pirouette thing where the legs go every-which-way. If you angered the PCB deities, you may have to access a component pad far from an edge. [Nathan Seidle], the founder of Sparkfun, finds himself in this situation, but all hope is not lost.

Our first thought is to desolder everything, then take a hot iron and tiny wires to each pad. Of course, this opens up a lot of potential for damage to the chip, cold joints, and radio interference. Accessing the pin in vivo has risks, but they are calculated. The idea is to locate the pin, then systematically drill from the backside and expose the copper. [Nate] also discovers that alcohol will make the PCB transparent so you can peer at the underside to confirm you have found your mark.

In a real, “fight fire with fire” idea, you can rework with flex PCBs or push your PCB Fu to the next level and use PCBs as your enclosure.

These Lessons Were Learned In Enclosure Design, But Go Far Beyond

[Foaly] has been hard at work making an open-source long range camera remote, and recently shared a deeply thoughtful post about how it is never too early to consider all aspects of design, lest it cost you in the end. It all started with designing an enclosure for a working prototype, and it led to redesigning the PCB from scratch. That took a lot of guts, and we recommend you make some time to click that link and read up on what he shared. You’ll either learn some valuable tips, or just enjoy nodding sagely as he confirms things you already know. It’s win-win.

Note the awkward buttons right next to the antenna connector, for example.

The project in question is Silver, and calling it a camera remote is selling it a bit short. In any case, [Foaly] had a perfectly serviceable set of prototypes and needed a small batch of enclosures. So far so normal, but in the process of designing possible solutions, [Foaly] ran into a sure-fire sign that a project is in trouble: problems cropping up everywhere, and in general everything just seeming harder than it should be. Holding the mounting-hole-free PCB securely never seemed quite right. Buttons were awkward to reach, ill-proportioned, and didn’t feel good to use. The OLED screen’s component was physically centered, but the display was off-center which looked wrong no matter how the lines of the bezel were sculpted. The PCB was a tidy rectangle, but the display ended up a bit small and enclosures always looked bulky by the time everything was accounted for. The best effort is shown here, and it just didn’t satisfy.

[Foaly] says the real problem was that he designed the electronics and did the layout while giving some thought (but not much thought) to their eventual integration into a case. This isn’t necessarily a problem for a one-off, but from a product design perspective it led to so many problems that it was better to start over, this time being mindful of how everything integrates right from the start: the layout, the components, the mechanical bits, the assembly, and the ultimate user experience. The end result is wonderful, and we’re delighted [Foaly] took the time to document his findings.

Enclosure design is a big deal and there are many different ways to go about it. For a more unique spin, be sure to check out our how-to make enclosures from the PCBs themselves. For a primer on more traditional enclosure manufacture and design, take a few minutes to familiarize yourself with injection molding.

Tidy Board Rework Uses Flex PCBs, No Wires

PCB rework for the purpose of fixing unfortunate design problems tends to involve certain things: thin wires (probably blue) to taped or glued down components, and maybe some areas of scraped-off soldermask. What are not usually involved are flexible PCBs, but [Paul Bryson] shows us exactly how flex PCBs can be used to pull off tricky rework tasks.

It all started when [Paul] had a run of expensive PCBs with a repeated error; a design mistake that occurred in several places in the board. Fixing with a bunch of flying wires leading to some glued-on components just wasn’t his idea of tidy. A more attractive fix would be to make a small PCB that could be soldered in place of several of the ICs on the board, but this idea had a few problems: the space available into which to cram a fix wasn’t always the same, and the footprints of the ICs to be replaced were too small to accommodate a PCB with castellated mounting holes as pads anyway.

It’s about then that he got a visit from the Good Idea Fairy, recalling that fab houses have recently offered “flex” PCBs at a reasonable cost. By mounting the replacement parts on a flex PCB, the board-level connection could reside on the other end of an extension. Solder one end directly to the board, and the whole flexible thing could be bent around or under on a case-by-case basis, and secured in whatever way made sense. Soldering the pads of the flex board to the pads on the PCB was a bit tricky, but easy enough to pull off reliably with a bit of practice. A bonus was that the flex PCB is transparent, so solder bridges are easy to spot. He even mocked up a solution for QFP packages that allows easy pin access.

Flex PCBs being available to hobbyists and individuals brings out fresh ideas and new twists on old ones, which is why we held a Flexible PCB Design Contest earlier this year. Repairs were definitely represented as applications, but not to the extent that [Paul] has shown. Nice work!

Journey Through The Inner Workings Of A PCB

Most electronics we deal with day to day are comprised of circuit boards. No surprise there, right? But how do they work? This might seem like a simple question but we’ve all been in the place where those weird green or black sheets are little slices of magic. [Teddy Tablante] at Branch Eduction put together a lovingly crafted walkthrough flythrough video of how PCB(A)s work that’s definitely worth your time.

[Teddy]’s video focuses on unraveling the mysteries of the PCBA by peeling back the layers of a smartphone. Starting from the full assembly he separates components from circuit board and descends from there, highlighting the manufacturing methods and purpose behind what you see.

What really stands out here is the animation; at each step [Teddy] has modeled the relevant components and rendered them on the PCBA in 3D. Instead of relying solely on hard to understand blurry X-ray images and 2D scans of PCBAs he illustrates their relationships in space, an especially important element in understanding what’s going on underneath the solder mask. Even if you think you know it all we bet there’s a pearl of knowledge to discover; this writer learned that VIA is an acronym!

If you don’t like clicking links you can find the video embedded after the break. Credit to friend of the Hackaday [Mike Harrison] for acting as the best recommendation algorithm and finding this gem.

Continue reading “Journey Through The Inner Workings Of A PCB”