Minimal MQTT: Networked Nodes

Last time on Minimal MQTT, we used a Raspberry Pi to set up an MQTT broker — the central hub of a home data network. Now it’s time to add some sensor and display nodes and get this thing running. So pull out your ESP-8266 module of choice, and let’s get going.

DSCF8443For hardware, we’re using a WeMos D1 Mini because they’re really cute, and absolutely dirt cheap, but basically any ESP module will do. For instance, you can do the same on the simplest ESP-01 module if you’ve got your own USB-serial adapter and are willing to jumper some pins to get it into bootloader mode. If you insist on a deluxe development board that bears the Jolly Wrencher, we know some people.

NodeMCU: Getting the Firmware

We’re using the NodeMCU firmware because it’s quick and easy to get running. But you’re not stuck with NodeMCU if you want to go it alone: MQTT has broad support. [TuanPM] ported over an MQTT library to the native ESP8266 SDK and of course there’s espduino, a port for an Arduino-plus-ESP combo. He also ported the MQTT module to NodeMCU that we’ll be using today. Thanks, [TuanPM]!

Continue reading “Minimal MQTT: Networked Nodes”

Beyond WD-40: Lubes For The Home Shop

If your shop is anything like mine, you’ve got a large selection of colorful cans claiming to contain the best and absolutely only lubricant you’ll ever need. I’ve been sucked in by the marketing more times than I care to admit, hoping that the next product will really set itself apart from the others and magically unstick all the stuck stuff in my mechanical life. It never happens, though, and in the end I generally find myself reaching for the familiar blue and yellow can of WD-40 for just about every job.

Continue reading “Beyond WD-40: Lubes For The Home Shop”

Working With Mains Voltage: The Electrifying Conclusion!

This is the second in a two-part series looking at safety when experimenting with mains-voltage electronic equipment, including the voltages you might find derived from a mains supply but not extending to multi-kilovolt EHT except in passing. In the first part we looked at the safety aspects of your bench, protecting yourself from the mains supply, ensuring your tools and instruments are adequate for the voltages in hand, and finally with your mental approach to a piece of high-voltage equipment.

The mental part is the hard part, because that involves knowing a lot about the inner life of the mains-voltage design. So in this second article on mains voltages, we’ll look into where the higher voltages live inside consumer electronics.

Continue reading “Working With Mains Voltage: The Electrifying Conclusion!”

Path To Craftsmanship: Safety, Cleanliness, And Documentation As Habits

When I started boxing classes I was told, at my level, I could do just as much good for my form by doing core exercises such as crunches, running, push-ups, and pull-ups for a month as I could by doing the class. I consder habits like safety, cleanliness, and documentation to be habits that influence the quality of hacks much the same way. They’re not really related, and the work can get done without them, but their implementation alone improves the quality of everything you do at the workbench.

The best mechanic I’ve ever met had a well-organized shop. All of his employees wore nitrile gloves when they worked on engines to protect their hands from the chemicals inside. They used ear protection and safety glasses. His rates were low, and the car was always repaired fast. I never had to go back for the same repair twice. He knew exactly what repairs were done, and even kept the parts removed from my vehicle to show me if I desired. I got some of the most fantastic explanations of why parts failed from him. Two blocks down the street was a shop which was unorganized and had double rates. The employees were always sitting on the waiting chairs in the lounge. It took one trip there to never return.

Continue reading “Path To Craftsmanship: Safety, Cleanliness, And Documentation As Habits”

Open Robots With Open Roberta

Kids, and Hackaday editors, love robots! The Open Roberta project (OR) takes advantage of this to teach kids about programming. And while the main focus is building a robot programming language that works for teaching grade-school and high-school kids, it’s also a part of a large open source robotics ecosystem that brings a lot more to the table than you might think. We talked with some folks at Google, one of the projects’ sponsors, about where the project is and where it’s going.

csm_Roberta_9e1215fc57Building a robot can be very simple — assembling pre-configured parts or building something small, quick, and cute — or it can be an endeavour that takes years of sweat and tears. Either way, the skills involved in building the ‘bot aren’t necessarily the same as those it takes to program the firmware that drives it, and then eventually the higher-level software that makes it functional and easy to drive.

OR, as an educational project, makes it very, very easy for kids to start off programming robots, but it’s expandable as the user gets more experienced. And since everything is open source, it’s part of a whole ecosystem that makes it even more valuable. We think it’s worth a look (along with something significantly more complex like ROS) if you’re playing around with robotics.

System Architecture

openRoberta.dotOpen Roberta is the user-facing middleware in a chain of software and firmware bits that make a robot work in a classroom environment. For the students, everything runs inside a browser. OR provides a webserver, robot programming interface and language, and then converts the output of the students’ programs to something that can be used with the robots’ firmware. The robots that are used in classrooms are mostly based on the Lego Mindstorms EV3 platform because it’s easy to put something together in short order. (But if you don’t have an EV3, don’t despair and read on!)

The emphasis is on ease of entry for the students and the teachers supervising the class. Everything runs in a browser, so there’s nothing to install on the client side. The students connect to a server that directs the robots, communicating with the robots’ own operating system, and uploading the students’ programs.

Continue reading “Open Robots With Open Roberta”

Looking Mains Voltage In The Eye And Surviving

It is often a surprise to see how other people react to mains electricity when they encounter it in a piece of equipment. As engineers who have dealt with it both personally and professionally for many years it is easy to forget that not everyone has had that experience. On one hand we wince at those who dive in with no fear of the consequences, on the other we are constantly surprised at the number of people who treat any item with more than a few volts in it as though it was contaminated with radioactive anthrax and are scared to even think about opening it up.

We recently had a chat among the Hackaday writers about how we could approach this subject. The easy way out is to be all Elf-and-Safety and join the radioactive anthrax crowd. But the conclusion we came to was that this site is a resource for hackers and makers. Some of you are going to lift the lid on boxes containing significant voltages no matter what, so we thought we’d help you do it safely rather than just listen for the distant screams.

So here follows the first in a series on how to approach electronic devices containing high voltages, and live to tell the tale. By “high voltages” we mean anything up to mains voltages, and those directly derived from them such as the few hundred volts rectified DC you’ll find in a switch-mode PSU. For multi-kilovolt EHT you’ll have to wait for another article, because that is an entire subject in itself. We’ll mention these higher voltages in passing, but their detail is best left for a Hackaday colleague with more pertinent experience.

Continue reading “Looking Mains Voltage In The Eye And Surviving”

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”