Porting NES To The ESP32

There’s an elephant in the room when it comes to the Raspberry Pi Zero. The Pi Zero is an immensely popular single board computer, but out of stock issues for the first year may be due to one simple fact: you can run a Nintendo emulator on it. Instead of cool projects like clusters, CNC controllers, and Linux-based throwies, all the potential for the Pi Zero was initially wasted on rescuing the princess.

Espressif has a new chip coming out, the ESP32, and it’s a miraculous Internet of Things thing. It’s cheap, exceptionally powerful, and although we expect the stock issues to be fixed faster than the Pi Zero, there’s still a danger: if the ESP32 can emulate an NES, it may be too popular. This was the hypothetical supply issue I posited in this week’s Hackaday Links post just twenty-four hours ago.

Hackaday fellow, Hackaday Supercon speaker, Espressif employee, and generally awesome dude [Sprite_tm] just ported an NES emulator to the ESP32. It seems Espressif really knows how to sell chips: just give one of your engineers a YouTube channel.

This build began when [Sprite] walked into his office yesterday and found a new board waiting for him to test. This board features the ESP-WROOM-32 module and breaks out a few of the pins to a microSD card, an FT2232 USB/UART module, JTAG support, a bunch of GPIOs, and a 320×240 LCD on the back. [Sprite]’s job for the day was to test this board, but he reads Hackaday with a cup of coffee every morning (like any civilized hacker) and took the links post as a challenge. The result is porting an NES emulator to the ESP32.

The ESP-32-NESEMU is built on the Nofrendo emulator, and when it comes to emulation, the ESP32 is more than capable of keeping the frame rate up. According to [Sprite], the display is the bottleneck; the SPI-powered display doesn’t quite update fast enough. [Sprite] didn’t have enough time to work on the sound, either, but the source for the project is available, even if this dev board isn’t.

Right now, you can order an ESP32; mine are stuck on a container ship a few miles from the port of Long Beach. Supply is still an issue, and now [Sprite] has ensured the ESP32 will be the most popular embedded development platform in recent memory. All of this happened in the space of 24 hours. This is awesome.

Continue reading “Porting NES To The ESP32”

Software USB On The ESP8266

A while back, [cnlohr] needed a USB keyboard and mouse. His box ‘o junk didn’t hold this particular treasure, and instead of hopping on Amazon like a normal geek or venturing into the outside realm on a mid-level ‘store’ quest like a normal person, [cnlohr] decided to turn an ESP8266 into a USB keyboard and mouse. How hard could it be? The ESP doesn’t support USB, but bitbanging hasn’t stopped him before. The end result is a USB stack running on the ESP8266 WiFI module.

[cnlohr] has been working for about a month on this USB implementation for the ESP, beginning with a logic analyzer, Wireshark, Xtensa assembly, and a lot of iteration. The end result of this hardware hacking is a board based on the ESP8285 – an 8286 with integrated Flash – that fits snugly inside a USB socket.

This tiny board emulates low-speed USB (1.5 Mbps), and isn’t really fast enough for storage, serial, or any of the fancier things USB does, but it is good enough for a keyboard and mouse. Right now, [cnlohr]’s ESP USB device is hosting a webpage, and by loading this webpage on his phone, he has a virtual keyboard and mouse on a handheld touchscreen.

If you’re keeping track, [cnlohr] has now brought Ethernet and USB to a tiny microcontroller that can be bought for a few bucks through the usual online outlets. If you’d like to build your own ESP USB stick, all the files are over on the Gits.

Thanks [lageos] for the tip.

Continue reading “Software USB On The ESP8266”

Hackaday Links: August 28, 2016

E-paper looks awesome, but it’s a pain to work with. You need only look at the homebrew implementations of e-paper drivers and the mess of SMD components for proof of that. [jarek] wanted to play around with e-paper and developed this tiny little driver for a Teensy. It’s a fun toy, and the simplest possible circuit necessary to drive this particular e-paper module.

I am once again asking if anyone knows where to buy this computer case. No, not a complete system – I just want the case, folding keyboard, and monitor integrated into an mATX enclosure.

Back in 1985, a young [Matthias Wandel] built a remote control forklift out of a few windshield wiper motors, wood, and not much else. He’s rebuilt this toy recently, just to prove you can build anything with a stack of plywood and a wood gear template generator.

More Adafruit muppets they probably can’t call muppets. Yaaay. This time it’s J is for Joule. Watts that? A second.

The Raspberry Pi Project, one of our favorite projects in the Hackaday Prize that uses a Raspberry Pi, one of the most liked, viewed, and followed projects on Hackaday.io, and a technological tour de force the likes of which have not been seen since the invention of the steam engine got an update this week. [Arsenijs] and the rest of the Raspberry Pi Project team have released a version of their Raspberry Pi pinout helper. Previously, this tool was only used internally to the project, but since this pinout helper has such far-reaching utility they’ve decided to release a public version. Truly, they are kings among men.

This is possibly the coolest use of stacked plywood I’ve ever seen. It’s a spiral staircase, with each step made of 12 layers of plywood. The ‘spine’ of this staircase is a 3″ sch 40 steel pipe, with a proper foundation. The layer of ply are adhered to the pipe with construction adhesive, and each layer of ply is glued together with wood glue. No, it’s not up to code yet, but it was cheaper to build than just buying a spiral staircase.

[Brek] wrote a graphics library for the ubiquitous 128×64 monochromatic LCDs. It’s written for PICs, but damned if we can’t find a link to the library itself. Hopefully [Brek] will jump in the comments below.

Those really, really cheap ESP8266 modules only have 512kB of Flash in them. Here’s how you upgrade those modules to 4MB. You can do it without a hot air gun, and all you need is a few cheap Flash chips.

Here’s a sound card for a Raspberry Pi. No, that’s not a completely dumb idea. This sound card uses quality op-amps, 24-bit ADCs and DACs, and has MIDI. If you’re experimenting with Pure Data or any other Linux audio toy, this could be a useful addition to your Pi stack.

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.

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.

Wired Networking For The ESP8266

The ever popular ESP8266 is popping up in more and more projects. There are CNC controllers, blinkey WiFi lighting, and downright bizarre WiFi to Ethernet bridges. [Cicero] has thrown his hat into the ring with one of these Ethernet-enabled ESP8266 builds, and right now everything works, it’s simple to put together, and cheap to build.

Astute readers will notice we’ve seen something like this before. A few months ago, [cnlohr] discovered the Ethernet controller in the ESP8266. This was, by every account, the hard way of doing things. [cnlohr] was driving the Ethernet directly through the ESP’s I2S bus. [Cicero]’s project does not. It uses the cheap ENC28J60 SPI to Ethernet adapter to put the ESP on a wired network. Is one solution better than the other? That’s arguable. Is one solution much simpler than the other? Yes, [Cicero]’s work allows anyone to add Ethernet to the ESP8266 with a few resistors and a module that costs $3 from the usual online shops.

With the Ethernet stack taken from [Ulrich Radig], the SPI driver from [MetalPhreak], and an ESP8266-based web server from [Sprite_tm], [Cicero] managed to serve up web pages through both the wired and wireless connections.

Although this build is not as technically amazeballs as [cnlohr]’s work with driving Ethernet directly from the ESP, it is very easy to implement, opening up the doors to a few of the more interesting capabilities of a wired ESP. With the Ethernet unlocked, there’s a free WiFi interface to wardrive, snoop around in promiscuous mode, inject packets, bridge a bunch of ESPs in mesh mode to another network, and other network shenanigans. The ENC28J60 modules have probably already found their way into a few parts bins and junk boxes already, making [Cicero]’s work the quick start guide to wired networking on the ESP.

Thanks [PuceBaboon] for sending this one in.

The Terrible Devices Of The Internet Of Wrongs

Last week was Bsides London, and [Steve Lord] was able to give a talk about the devices that could pass for either a terrible, poorly planned, ill-conceived Internet of Things Kickstarter, or something straight out of the NSA toolkit. [Steve] built the Internet of Wrongs, devices that shouldn’t exist, but thanks to all this electronic stuff, does.

Continue reading “The Terrible Devices Of The Internet Of Wrongs”