Measure PWM Current with a Modified Moving Average

How do you measure a signal that keeps changing?

Measure PWM Current with MMA

Pulse Width Modulation (PWM) makes it possible to dim lights, control the speed of motors, and (with the help of filters) generate analog reference voltages. When measuring the voltage or current of a PWM signal, there are unique challenges. You can use this tutorial to measure PWM current with a modified moving average (MMA).

Continue Reading »

Arduino to ESP8266, 5 reasons to switch

Move over Uno, there's a new board on my bench

Adafruit ESP8266 HUZZAH Feather

A couple of weeks ago I posted four things to know about the ESP8266 before using one. The biggest surprise from that post is people seem to think I do not like the ESP8266! This idea is not the case; the ESP8266 is awesome. I like them so much that my Adafruit Feather HUZZAH with ESP8266 has become my go-to Arduino board.

Wait what? James uses something other than Arduino? Yes, I do! I have many different boards and have used most of them for one task or another.

However, when it came to day-to-day “make something quickly” type work, I relied on my Uno. But not anymore. Here are the 5 reasons the ESP8266 is my go-to Arduino board.

Continue Reading »

MQTT Tutorial for Raspberry Pi, Arduino, and ESP8266

Send MQTT messages between 3 different platforms

mqtt tutorial

This week’s MQTT Tutorial connects a Raspberry Pi, ESP8266 (or Arduino), and a PC together. Remember last week’s post provided an overview of message brokers and MQTT. We learned that MQTT is a hub and spoke protocol for sending messages between IoT devices. Clients can subscribe or publish messages to a central server, called a broker.

Now it’s time to connect our IoT devices together!

Continue Reading »

MQTT Introduction and Tutorial Part One

Message Brokers and why your IoT device should use them.

MQTT Introduction Part One

MQTT is an easy way for Internet of Things (IoT) devices to communicate with each other. This light-weight protocol can be used with a simple 8-bit Arduino to a Raspberry Pi to a multi-core PC to Amazon Web Services. It is that versatile.

This MQTT Tutorial is broken into two parts. Part one is an MQTT Introduction. You’ll understand how publish/subscribe message brokering works. Next week, Part two will be a tutorial on using MQTT to communicate between a PC, Raspberry Pi, and ESP8266.

Continue Reading »

Four ESP8266 Gotchas and a tip for a first time users

Learn about the ESP8266 before adding to your project

introduction to esp8266

Adding WiFi to any project can be difficult. There are a few off the shelf options that make it easier. One option is the official Arduino WiFi shield. This full-featured shield uses its integrated microcontroller to handle the WiFi protocol, security, and the TCP/IP stack for you. From “plug it in and go” perspective, this is an awesome option for Arduino-based projects. Plenty of example code supports the nicely designed hardware. The main downside to some people is the price.

The more popular option these days is the ESP8266, typically advertised around $5US. They are about the size of a TO-220 packaged transistor. How do they get so small? Using a technology known as “System On a Chip”, or SOC, these tiny modules pack everything on the Arduino WiFi shield inside of a single chip! SOCs are great when space is limited. If production volumes are high enough, there can even be a cost advantage.

After spending some time with an ESP8266 I bought on eBay (which I don’t recommend..), I’ve found some things you need to know before building your ESP8266 based project.

Continue Reading »