Minimal MQTT: Building A Broker

In this short series, we’re going to get you set up with a completely DIY home automation system using MQTT. Why? Because it’s just about the easiest thing under the sun, and it’s something that many of you out there will be able to do with material on-hand: a Raspberry Pi as a server and an ESP8266 node as a sensor client. Expanding out to something more complicated is left as an exercise to the motivated reader, or can be simply left to mission creep.

We’ll do this in four baby steps. Each one should take you only fifteen minutes and is completely self-contained. There’s a bunch more that you can learn and explore, but we’re going to get you a taste of the power with the absolute minimal hassle.

In this installment, we’re going to build a broker on a Raspberry Pi, which is the hub of your MQTT network. Next time, we’ll get an ESP8266 up and running and start logging some data. After that, we’ll do some back-end scripting in Python to make the data speak, and in the last installment, we’ll explore some of the useful frills and fancy bits. Let’s get started!

Continue reading “Minimal MQTT: Building A Broker”

Which Wireless Tech Is Right For You?

It seems these days all the electronics projects are wireless in some form. Whether you choose WiFi, Bluetooth Classic, Bluetooth Low Energy, ZigBee, Z-Wave, Thread, NFC, RFID, Cell, IR, or even semaphore or carrier pigeon depends a lot on the constraints of your project. There are a lot of variables to consider, so here is a guide to help you navigate the choices and come to a conclusion about which to use in your project.

We can really quickly reduce options down to the appropriate tech with just a few questions.

Continue reading “Which Wireless Tech Is Right For You?”

Analog To Digital Converter (ADC): A True Understanding

Back in the day where the microprocessor was our standard building block, we tended to concentrate on computation and processing of data and not so much on I/O. Simply put there were a lot of things we had to get working just so we could then read the state of an I/O port or a counter.

Nowadays the microcontroller has taken care of most of the system level needs with the luxury of built in RAM memory and the ability to upload our code. That leaves us able to concentrate on the major role of a microcontroller: to interpret something about the environment, make decisions, and often output the result to energize a motor, LED, or some other twiddly bits.

Often the usefulness of a small microcontroller project depends on being able to interpret external signals in the form of voltage or less often, current. For example the output of a photocell, or a temperature sensor may use an analog voltage to indicate brightness or the temperature. Enter the Analog to Digital Converter (ADC) with the ability to convert an external signal to a processor readable value.

Continue reading “Analog To Digital Converter (ADC): A True Understanding”

Carbon Monoxide: Hunting A Silent Killer

Walt and Molly Weber had just finished several long weeks of work. He was an FBI agent on an important case. She had a management job at Houghton Mifflin. On a sunny Friday evening in February of 1995, the two embarked on a much needed weekend skiing getaway. They drove five hours to the Sierra Mountains in California’s Mammoth Lakes ski area. This was a last-minute trip, so most of the nicer hotels were booked. The tired couple checked in at a lower cost motel at around 11:30pm on Friday night. They quickly settled in and went to bed, planning for an early start with a 7am wakeup call Saturday morning.

When the front desk called on Saturday, no one answered the phone. The desk manager figured they had gotten an early start and were already on the slopes. Sunday was the same. It wasn’t until a maid went to check on the room that the couple were found to be still in bed, unresponsive.

Continue reading “Carbon Monoxide: Hunting A Silent Killer”

Teeny Tiny Very Small – Atomic Resolution And The Home Hobbyist

Atoms are small. Really small. You just won’t believe how minusculely microscopically mindbogglingly small they are. I mean you may think it’s a short way down the road to the chemist’s, but that’s just peanuts to atoms.

Atoms really are small. The atomic radius of a carbon atom is on the order of 0.1 nanometers, that’s 0.0000001 millimeters. It’s hard to grasp how fantastically small this is compared to objects we generally encounter, but as a starting point I’d recommend looking at the “Powers of Ten” video found below whose ability to convey the concept has been unrivaled since it was published in 1977.

The term nanometer might be most familiar from the semiconductor industry, and its seemingly unstoppable march to smaller feature sizes. Feature sizes currently hover somewhere around the 10 nanometer mark. So while these multi-billion dollar facilities can achieve 10nm precision it’s somewhat surprising that sub-nanometer feature size positioning, and fabrication techniques are available at relatively low cost to the hacker hobbyist.

In this article we’re going to review some of the amazing work demonstrated by hobbyists in the area of the very very small through use of cutting edge, but low cost techniques.

Continue reading “Teeny Tiny Very Small – Atomic Resolution And The Home Hobbyist”

Don’t Understand The Periodic Table? It’s Just A Quantum Truth Table

In the wee hours of the late 17th century, Isaac Newton could be found locked up in his laboratory prodding the secrets of nature. Giant plumes of green smoke poured from cauldrons of all shapes and sizes, while others hissed  and spat new and mysterious chemical concoctions, like miniature volcanoes erupting with knowledge from the unknown. Under the eerie glow of twinkling candle light, Newton would go on to write over a million words on the subject of alchemy. He had to do so in secret because the practice was frowned upon at that time.  In fact, it is now known that alchemy was the ‘science’ in which he was chiefly interested in. His fascination with turning lead into gold via the elusive philosopher’s stone is now evident. He had even turned down a professorship at Cambridge and instead opted for England’s Director of Mint, where he oversaw his nation’s gold repository.

Not much was known about the fundamental structure of matter in Newton’s time. The first version of the periodic table would not come along for more than a hundred and forty years after his death. With the modern atomic structure not surfacing for another 30 years after that. Today, we know that we can’t turn lead into gold without setting the world on fire. Alchemy is recognized as a pseudoscience, and we opt for modern chemistry to describe the interactions between the elements. Everyone walking out of high school knows what atoms and the periodic table are. They know what the sub-atomic particles and their associated electric charges are. In this article, we’re going to push beyond the basics. We’re going to look at atomic structure from a quantum mechanical view, which will give you a new understanding of why the periodic table looks the way it does. In fact, you can construct the entire periodic table using nothing but the quantum numbers.

Continue reading “Don’t Understand The Periodic Table? It’s Just A Quantum Truth Table”

Steal This Ham Radio (Technology)

Although I see a lot of wireless projects, I’m always surprised at the lack of diversity in the radio portions of them. I’m a ham radio operator (WD5GNR; I was licensed in 1977) and hams use a variety of radio techniques. If you think hams just use Morse code and voice communications, you are thinking of your grandfather’s ham radio. Modern hams have gone digital and communicate via satellites, video, and many different digital techniques that could easily have applicability to different wireless projects.

Of course, Morse code may have been one of the first digital modes. But hams have used teletype, FAX, and other digital modes for years. Now with PCs and soundcards in common use, hams have been on the forefront of devising sophisticated digital radio techniques.

Continue reading “Steal This Ham Radio (Technology)”