[CNLohr], ESP8266, USB…

“Round up the usual suspects…”

[CNLohr] just can’t get enough of the ESP8266 these days — now he’s working on getting a version of V-USB software low-speed USB device emulation working on the thing. (GitHub link here, video also embedded below.) That’s not likely to be an afternoon project, and we should warn you that it’s still a project in progress, but he’s made some in-progress material available, and if you’re interested either in USB or the way the mind of [CNLohr] works, it’s worth a watch.

In this video, he leans heavily on the logic analyzer. He’s not a USB expert, and couldn’t find the right resources online to implement a USB driver, so he taught himself by looking at the signals coming across as he wiggled a mouse on his desk. Using the ever-popular Wireshark helped him out a lot with this task as well. Then it was time to dig into Xtensa assembly language, because timing was critical.

Speaking of timing, one of the first things that he did was write some profiling routines so that he could figure out how long everything was taking. And did we mention that [CNLohr] didn’t know Xtensa assembly? So he wrote routines in C, compiled them using the Xtensa GCC compiler, and backed out the assembly. The end result is a mix of the two: assembly when speed counts, and C when it’s more comfortable.

Continue reading “[CNLohr], ESP8266, USB…”

Hackaday Prize Entry: A WiFi Swiss Army Knife

WiFi is all around us, but if you want to work with this ubiquitous networking protocol, you’ll need to pull out a laptop or smartphone like a caveman. [Daniel] has a better idea. It’ s a simple, compact tool for cracking WiFi passwords or sending deauth packets to everyone at the local Starbucks. It’s an ESP Swiss Army Knife, and a great entry for the Hackaday Prize.

As you would expect, this WiFI Swiss Army Knife is powered by the ESP8266 and features a tiny OLED display and a bunch of buttons for the UI. With this, [Daniel] is able to perform a deauth attack on a network, kicking anyone off the network, provided this device already has the MAC address of the victim.

This tiny wireless tool also has an SD card, making it possible to collect authentication frames for later decryption on a device that actually has the power to crack a network. With a LiPo charge controller and a sufficiently large battery, this tiny device could be left in the corner of an office collecting authentication packets for days until it’s later retrieved, opening up the network to anyone with a sufficiently fast computer. It’s a great build and very useful, making this a great entry for The Hackaday Prize.

Hackaday Prize Entry: Smart USB Hub And IoT Power Meter

[Aleksejs Mirnijs] needed a tool to accurately measure the power consumption of his Raspberry Pi and Arduino projects, which is an important parameter for dimensioning adequate power supplies and battery packs. Since most SBC projects require a USB hub anyway, he designed a smart, WiFi-enabled 4-port USB hub that is also a power meter – his entry for this year’s Hackaday Prize.

[Aleksejs’s] design is based on the FE1.1s 4-port USB 2.0 hub controller, with two additional ports for charging. Each port features an LT6106 current sensor and a power MOSFET to individually switch devices on and off as required. An Atmega32L monitors the bus voltage and current draw, switches the ports and talks to an ESP8266 module for WiFi connectivity. The supercharged hub also features a display, which lets you read the measured current and power consumption at a glance.

Unlike most cheap hubs out there, [Aleksejs’s] hub has a properly designed power path. If an external power supply is present, an onboard buck converter actively regulates the bus voltage while a power path controller safely disconnects the host’s power line. Although the first prototype is are already up and running, this project is still under heavy development. We’re curious to see the announced updates, which include a 2.2″ touchscreen and a 3D-printable enclosure.

Your Laundry Is Done!

Have you ever put a load of dirty clothing in the washing machine and set the cycle running, only to forget all about it and discover a mouldering congealed mass in the machine a few days later? [Xose Pérez] has more than once, and to stop it happening again he’s got a project that monitors the machine in his basement and notifies him when his wash is done.

At the centre of his washing machine monitor is an ITead Sonoff IoT mains on-off switch. This device contains a 10A mains relay, an ESP8266 chip to control it, and a small mains switch-mode power supply. The Sonoff doesn’t use the ESP’s ADC pins, so he’s broken one of them out on a lead to a current transformer which captures the power level being consumed by the washing machine. The Sonoff is one of those IoT devices that relies on a proprietary cloud service and doesn’t have its own API, so [Xose] has created his own firmware for it incorporating an ESP port of an Arduino current sensing library. To round off the project and because he could, he’s added an ambient humidity sensor to the device.

The resulting boxed-up unit returns minute-by-minute current readings for the entire wash cycle. To spot when the cycle has finished, he waits for a moment when it has been using no power for more than five minutes, at which point his Node-RED system sends him a notification via Pushover.

This project is a very neatly executed hack on an extremely cheap piece of hardware whose capabilities would ordinarily be somewhat curtailed due to its proprietary interface. Surprisingly it’s not the first laundry monitor we’ve seen here at Hackaday, we’ve had this apartment laundry monitor using an accelerometer and a Raspberry Pi, and a notifier for a finicky dryer that insisted on stopping mid-cycle.

ESP8266 MicroPython Contest Gives You The Excuse You Need

As if the prospect of having everyone’s favorite scripting language ported over weren’t enough to get you to install MicroPython on a spare ESP8266, there is now a contest for that. Over on Hackaday.io the MicroPython on ESP8266 contest is under way and you’ve only got until the end of August to submit your creation.

The prizes? First place gets an OpenMV camera board because [Radomir], who’s running the contest, has an extra one. OK, it’s not as lush as the corporate-sponsored goody-bag that we’ve got running in the Hackaday Prize, but there’s no reason that you can’t enter both. And if anyone wants to throw some more goodies into the pot, I’m sure they’d be welcome.

The rules are simple: use an ESP8266 or ESP8285 with MicroPython and post the project up on Hackaday.io. Bonus points are given for creating new libraries or hardware drivers. Basically, this just gives you an extra reason to get in there and play around. How cool is that?

If you need a start-up on MicroPython on the ESP8266, the official tutorial is great. We wrote up a first-look review of running MicroPython on the WeMos D1 hardware, but were plagued with (re-)flashing difficulties, so we’re going to have to give it another go.

New Chip Alert: RTL8710, A Cheaper ESP8266 Competitor

Almost exactly two years ago, shocking news thundered across the electronics blogosphere. There was a new WiFi module on the block. It was called the ESP8266, a simple serial device capable of taking care of an 802.11 network and a WiFi stack, giving any project with a microcontroller access to the Internet. Earlier modules to connect microcontrollers were sufficient for the task, but nothing could beat the ESP8266 on price.

The RTL8710 dev kit
The RTL8710 dev kit

Now, there’s a new module that’s even cheaper and more powerful than the ESP8266, and just like all of our favorite parts from China, it inexplicably shows up on eBay and AliExpress before anywhere else. It’s the Realtek RTL8710, available on eBay, on AliExpress, and elsewhere around the web for about $1.50 per device. There’s also a dev kit for the device featuring breakouts, an additional microcontroller, and a few switches and buttons for about $15.

As you would expect, there is zero English-language data available about the RTL8710, everything is in Chinese. There is a forum of sorts going over this new chip, and the Google Translatrix is good enough to glean a little bit of info about the new chip.

The RTL8710 features an ARM processor clocked at 166MHz. Stock, this module is running FreeRTOS. There’s 1MB of Flash, 48k of RAM available to the user, up to 21 GPIOs, 3 I2C, 4 PWM pins, and 2 PCM. This module also comes with an FCC logo, but I can’t find anything on the FCC website about this module.

If anything, the Realtek RTL8710 isn’t meant to be a competitor to the ESP8266. While extremely popular and still very useful, the ‘next gen’ ESP32 is due to be released in a month or so, and with the exception of Bluetooth on the ESP32, this Realtek module should match its capabilities quite well. Whether anyone can get an English datasheet is another matter, but if history is any indication a few English language RTL8710 forums will pop up a few hours after this is posted.

Thanks [sabas] for sending this in

Ask Hackaday: Is The ESP8266 5V Tolerant?

The ESP8266 is the reigning WiFi wonderchip, quickly securing its reputation as the go-to platform for an entire ecosystem of wireless devices. There’s nothing that beats the ESP8266 on a capability vs. price comparison, and this tiny chip is even finding its way into commercial products. It’s also a fantastic device for the hardware tinkerer, leading to thousands of homebrew projects revolving around this tiny magical device.

In every technical document, summary, and description of the ESP8266, the ESP8266 is said to be a 3.3V part. While we’re well into the age of 3.3V logic, there are still an incredible number of boards and hardware that still operate using 5V logic. Over on the Hackaday.io stack, [Radomir] is questioning this basic assumption. He’s wondering if the ESP8266 is 5V tolerant after all. If it is, great. We don’t need level converters, and interfacing the ESP to USB TTL serial adapters becomes much easier. Yes, you’ll still need to use a regulator if the rest of your project is running at 5V, but if the pins are 5V tolerant, interfacing the ESP8266 with a variety of hardware becomes very easy.

[Radomir]’s evidence for the possibility of 5V tolerant inputs comes from a slight difference in the official datasheet from Espressif, and the datasheet translated by the community before Espressif realized how many of these chips they were going to sell.

The best evidence of 5V tolerant pins might come from real-world experience — if you can drive a pin with 5V for months on end without it failing, there might be something to this claim. It’s not definitive, though; just because a device will work with 5V input pins for a few months doesn’t mean it won’t fail in the future. So far a few people have spoken up and presented ESPs directly connected to the 5V pin of an Arduino that still work after months of service. If this is evidence of 5V tolerant design or simply luck is another matter entirely.

While the official datasheet from Espressif lists a maximum VIH of 3.3V, maximum specs rarely are true maximums — you can always push a part harder without things flying apart at the seams. Unfortunately, unless we hear something from the engineers at Espressif, we won’t know if the ESP8266 was designed to be 5V tolerant, if it can handle 5V signals reliably, or if 5V signals are a really good way to kill a chip eventually.

Lucky for us — and this brings us to the entire point of an Ask Hackaday column — a few Espressif engineers read Hackaday. They’re welcome to pseudonymously chime in below along with the rest of the peanut gallery. Failing that, the ESP8266 has been decapped; are there any die inspection wizards who can back up a claim of 5V tolerance for the GPIO? We’d also be interested in hearing any ideas for stress testing pin tolerance.