ESP8266-Powered Receipt Printer Puts RESTful API On Dead Trees

Taking his digital information into the real-world, [Davide Gironi] has built his own note transcriber from a point-of-sale receipt printer and an ESP8266.

You’ve seen these receipt printers at the order window of restaurants. A server puts in an order from any of the machines throughout the restaurant and a paper summary spits out for the chef line to start in on (and even cuts itself off from the roll).  Why shouldn’t we have this convenience in our own lives?

The printer communicates using a variant of the Epson Standard Code for Printers, for which [Davide] has written a library and thankfully shared the code. Adding an ESP8266 using a couple voltage regulators and some passive components makes this wireless, except for power. It has all the fun bells and whistles to set up the WiFi credentials and once running, just push the button on the base and it’ll spit out your data.

But wait, where is that data coming from? The web-based settings page lets you configure a URI to the RESTful source of your choosing. (XKCD has one, don’t they?) It also lets you configure header, footer, error messages, and of course your company hacker logo.

One of our favorite receipt-printer moments was when Hackaday editor of yore [Eliot Phillips] brought a selfie receipt printer to Supercon. We couldn’t find any pictures of that one, so we’ll leave you with the excellent hack [Sam Zeloof] pulled off by cramming one of these into a Polaroid camera.

Continue reading “ESP8266-Powered Receipt Printer Puts RESTful API On Dead Trees”

Roomba Gets Alexa Support With An ESP8266 Stowaway

The modern home is filled with plenty of “smart” devices, but unfortunately, they don’t always speak the same language. The coffee maker and the TV might both be able to talk to your phone through their respective apps, but that doesn’t necessarily mean the two appliances can work together to better coordinate your morning routine. Which is a shame, since if more of these devices could communicate with each other, we’d be a lot closer to living that Jetsons life we were promised.

Luckily, as hardware hackers we can help get our devices better acquainted with one another. A recent post by [MyHomeThings] shows how the ESP8266 can bridge the gap between a Roomba and Amazon’s Alexa assistant. This not only allows you to cheaply and easily add voice control to the robotic vacuum, but makes it compatible with the Amazon’s popular home automation framework. This makes it possible to chain devices together into complex conditional routines, such as turning off the lights and activating the vacuum at a certain time each night.

The hack depends on the so-called Roomba Open Interface, a seven pin Mini-DIN connector that can be accessed by partially disassembling the bot. This connector provides power from the Roomba’s onboard batteries as well as a two-way serial communications bus to the controller.

By connecting a MP1584EN DC-DC converter and ESP8266 to this connector, it’s possible to send commands directly to the hardware. Add a little glue code to combine this capability with a library that emulates a Belkin Wemo device, and now Alexa is able to stop and start the robot at will.

We’ve seen this sort of trick used a few times before to add backdoor Alexa support to various gadgets, and it’s always interesting to see what kind of unusual hardware folks are looking to make an integral part of their smart home.

Hands-On: The RISC-V ESP32-C3 Will Be Your New ESP8266

We just got our hands on some engineering pre-samples of the ESP32-C3 chip and modules, and there’s a lot to like about this chip. The question is what should you compare this to; is it more an ESP32 or an ESP8266? The new “C3” variant has a single 160 MHz RISC-V core that out-performs the ESP8266, and at the same time includes most of the peripheral set of an ESP32. While RAM often ends up scarce on an ESP8266 with around 40 kB or so, the ESP32-C3 sports 400 kB of RAM, and manages to keep it all running while burning less power. Like the ESP32, it has Bluetooth LE 5.0 in addition to WiFi.

Espressif’s website says multiple times that it’s going to be “cost-effective”, which is secret code for cheap. Rumors are that there will be eight-pin ESP-O1 modules hitting the streets priced as low as $1. We usually require more pins, but if medium-sized ESP32-C3 modules are priced near the ESP8266-12-style modules, we can’t see any reason to buy the latter; for us it will literally be an ESP8266 killer.

On the other hand, it lacks the dual cores of the ESP32, and simply doesn’t have as many GPIO pins. If you’re a die-hard ESP32 abuser, you’ll doubtless find some features missing, like the ultra-low-power coprocessor or the DACs. But it does share a lot of the ESP32 standouts: the LEDC (PWM) peripheral and the unique parallel I2S come to mind. Moreover, it shares the ESP-IDF framework with the ESP32, so despite running on an entirely different CPU architecture, a lot of code will run without change on both chips just by tweaking the build environment with a one-liner.

One of these things is not like the other

If you were confused by the chip’s name, like we were, a week or so playing with the new chip will make it all clear. The ESP32-C3 is a lot more like a reduced version of the ESP32 than it is like an improvement over the ESP8266, even though it’s probably destined to play the latter role in our projects. If you count in the new ESP32-S3 that brings in USB, the ESP32 family is bigger than just one chip. Although it does seem odd to lump the RISC-V and Tensilica CPUs together, at the end of the day it’s the peripherals more than the CPUs that differentiate microcontrollers, and on that front the C3 is firmly in the ESP32 family.

Our takeaway: the ESP32-C3 is going to replace the ESP8266 in our projects, but it won’t replace the ESP32 which simply has more of everything when we need it. The shared codebase and peripheral architecture makes it easier to switch between the two when we don’t need the full-blown ESP32. In that spirit, we welcome the newcomer to the family.

But naturally, we’ve got a lot more to say about it. Specifically, we were interested in exactly what the RISC-V core brought to the table, and ran the module through power and speed comparisons with the ESP32 and ESP8266 — and it beats them both by a small margin in our benchmarks. We’ve also become a lot closer friends with the ESP-IDF SDK that all of the ESP32 family chips use, and love how far it has come in the last year or so. It’s not as newbie-friendly as ESP-Arduino, for sure, but it’s a ton more powerful, and we’re totally happy to leave the ESP8266 SDK behind us.

Continue reading “Hands-On: The RISC-V ESP32-C3 Will Be Your New ESP8266”

Old Gas Meter Gets Smart With The ESP8266

Measuring the usage of domestic utilities such as water, gas or electricity usually boils down to measuring a repetitive pulse signal with respect to time. To make things easy, most modern utility meters have a pulsed LED output, which can be used to monitor the consumption by using an external optical sensor. But what do you do if your meter isn’t so cooperative?

That’s exactly what [Francesco] had to figure out while developing the non-invasive gas tracking system he calls ESPmeter. His meter might not have an LED, but it did have a magnet attached to the counter disk which activated an internal hall sensor. With some hacking, he was able to attach an external Hall-effect sensor to pick up this magnet and use the signal to monitor his daily gas consumption.


A big stumbling block in such projects is the issue of powering the device for an extended period, and remembering when it’s time to change the batteries. With the clever use of commonly available parts, he was able to reduce power consumption allowing three AA batteries to last about a year between changes. For one thing, he uses an ATtiny13 to actually read the sensor values. The chip doesn’t run continuously, its watchdog is set at 1 Hz, ensuring that the device is woken up often enough so that it has time to power up the sensor and detect the presence of the magnet. Battery voltage is also measured via a voltage divider connected to the chip’s ADC pin.

At regular intervals throughout the day, the ESP8266 polls the ATtiny13 to pull the stored sensor pulses and voltage measurement. Then at midnight, the ESP transmits all the collected data to a remote server. Overall, this whole scheme allows [Francesco] to reliably gather his gas consumption data while not having to worry about batteries until he gets the low voltage notification. Since the data visualization requirements are pretty basic, he is keeping things simple by using Plotly to display his time series data.

If you are unfortunate enough to have an even older meter which doesn’t use optical or magnetic rotation sensing, you can use a disassembled mouse to keep track of the Gas Meter.

ESP8266 Socket Is A Snap-Fit, Breadboard-Friendly Wonder

It all started with wanting to program an ESP-12 variant of an ESP8266 module without involving any solder. Displeased with all the socket offerings on Thingiverse, [tweeto] set out to design their own breadboard-friendly snap-fit socket.

This certainly looks like a handy solution. All you have to do is print the thing, add all the wires, and stick your ESP in there. Even that wire is easy to find; [tweeto] used 0.8 mm paper clips which are sturdy, conductive, and haunting the darkest corners of every desk drawer. They’re also a little bit on the thick side, so [tweeto] plans to test out 0.6mm copper wire in the future.

The challenge with this type of print is to design something that will stand up to repeated breadboardings without losing legs or falling apart. [tweeto]’s elegant solution is a tiny groove for each wire in the bottom of the socket — it keeps the wire in place by countering the play caused by inserting it into and removing it from a breadboard. See how [tweeto] bends the paper clips in the short video after the break.

There’s more than one way to use 3D printing to your circuit-building advantage, even in permanent circuits — just take a look at this PCB-free Arduboy.

Continue reading “ESP8266 Socket Is A Snap-Fit, Breadboard-Friendly Wonder”

Automating Your Car With A Spare Fob And An ESP8266

Despite the name, home automation doesn’t have to be limited to only the devices within your home. Bringing your car into the mix can open up some very interesting possibilities, such as automatically getting it warmed up in the morning if the outside air temperature drops below a certain point. The only problem is, not everyone is willing to start hacking their ride’s wiring to do it.

Which is exactly why [Matt Frost] went the non-invasive route. By wiring up an ESP8266 to a cheap aftermarket key fob for his Chevrolet Suburban, he’s now able to wirelessly control the door locks and start the engine without having to make any modifications to the vehicle. He was lucky that the Chevy allowed him to program his own fob, but even if you have to spend the money on getting a new remote from the dealer, it’s sure to be cheaper than the repair bill should you cook something under the dash with an errant splice or a misplaced line of code.

The hardware for this project is about as simple as it gets. The fob is powered by the 3.3 V pin on the Wemos D1 Mini, and the traces for the buttons have been hooked up to the GPIO pins. By putting both boards into a custom 3D printed enclosure, [Matt] came up with a tidy little box that he could mount in his garage and run off of a standard USB power supply.

On the software side of things [Matt] has the device emulating a smart light so it can easily be controlled by his Alexa, with a few helpful routines sprinkled in that allow him to avoid the awkward phraseology that would be required otherwise. There’s also a minimal web server running on the microcontroller that lets him trigger various actions just by hitting the appropriate URLs, which made connecting it to Home Assistant a snap. One downside of this approach is that there’s no acknowledgement from the vehicle that the command was actually received, but you can always send a command multiple times to be sure.

This isn’t the first time we’ve seen an ESP8266 used to “push” buttons on a remote. If you’ve got a spare fob for your device, or can get one, it’s an excellent way to automate it on the cheap.

Espressif Leaks ESP32-C3: A WiFi SoC That’s RISC-V And Is ESP8266 Pin-Compatible

Six years on from the emergence of the Espressif ESP8266 we might believe that the focus had shifted to the newer dual-core ESP32. But here comes a twist in the form of the newly-revealed ESP32-C3. It’s a WiFi SoC that despite its ESP32 name contains a RISC-V core in place of the Tensilica core in the ESP32s we know, and uses the ESP8266 pin-out rather than that of its newer sibling. There’s relatively little information about it at the time of writing, but CNX Software have gathered together what there is including a draft datasheet whose English translation is available as a Mega download. As with other ESP32 family members, this one delivers b/g/n WiFi and Bluetooth Low-Energy (BLE) 5, where it differs is the RISC-V 32 Single-core processor with a clock speed of up to 160 MHz. There is 400 kB of SRAM and 384 kB ROM storage space built in.

While there is no official announcement yet, Espressif has been dropping hints. There’s been an OpenOCD configuration file for it in the Espressif repositories since the end of last month. And on Friday, Espressif Software Engineering Manager [Sprite_tm] answered a reddit comment, confirming the RISC-V core.

ESP-01: Kjerish, CC BY-SA 4.0, RISC-V logo: RISC-V foundation, Public domain.

Why they are releasing the part as an ESP32 rather than giving it a series number of its own remains a mystery, but it’s not hard to see why it makes commercial sense to create it in an ESP8266-compatible footprint. The arrival of competing parts in the cheap wireless SoC space such as the Bouffalo Labs BL602 we mentioned recently is likely to be eating into sales of the six-year-old chip, so an upgrade path to a more capable part with minimal new hardware design requirements could be a powerful incentive for large customers to stay with Espressif.

We’re left to guess on how exactly the rollout will proceed. We expect to see similar developer support to that they now provide for their other chips, and then ESP32-C3 powered versions of existing ESP8266 boards in short order. It’s also to be hoped that a standard RISC-V toolchain could be used instead of the device-specific ones for current Espressif offerings. What we should not expect are open-source replacements for the blobs that drive the on-board peripherals, as the new chip will share the same closed-source IP as its predecessors for them. Perhaps if the PINE64 initiative to reverse engineer blobs for the BL602 bears fruit, we might see a similar effort for this chip.