Tiny386 On An Espressif ESP32-S3

Some people may remember the joys of trying to boot Linux on an 8-bit AVR microcontroller, which was an absolute exercise in patience. In comparison [He Chunhui]’s Tiny386 emulator running on an ESP32-S3 MCU is positively zippy when it boots and runs Windows 95. The provided video (also embedded below) makes clear that while you can comfortably waddle off to prepare and pour a fresh cup of tea, it’s actually borderline usable.

The source code can be obtained via GitHub, which contains not just the basic emulated 80386 CPU written in C99, but also peripherals borrowed from TinyEMU and QEMU, along with a SeaBIOS ROM. In addition to the Windows 95 demo it’s claimed that Tiny386 should be able to run most 16/32-bit software.

Right now the ESP32-S3 version targets the JC3248W535 board, which is a roughly $30 development board featuring a built-in display with touch screen and an ESP32-S3 module. Although it has a USB-C port, it appears that this one is just for programming and not for the USB peripheral of the ESP32-S3. With the USB OTG peripheral used, one could conceivably make a small 386 system based around an ESP32-S3 that features a USB hub to plug a keyboard, mouse, etc. into.

Considering that the Tiny386 emulator is a very simple and straightforward approach to emulating an early-90s PC, some optimization might enable a pretty zippy general purpose PC for early 90s software. Quite a boost from watching Linux struggle into a command line on an AVR, indeed.

Continue reading “Tiny386 On An Espressif ESP32-S3”

A photo of the robot and the controller

A Simple $25 Robot Based On The ESP32

[Paul McCabe] wrote in to let us know about his $25 robot. This small wheeled robot is based on an ESP32 and made using cardboard and hot glue.

You drive the contraption using a Bluetooth game controller thanks to the Bluepad32 library, which boasts a long list of supported hardware. [Paul] provides a Bill of Materials (BoM), complete with current component pricing. We don’t know about you, but it struck us as funny that the microcontroller is less expensive than the battery! Ah, the times we live in. Also [Paul] assumes you already have an appropriate Bluetooth controller and doesn’t include that in the total cost.

Continue reading “A Simple $25 Robot Based On The ESP32”

ESPTimeCastVFD

ESP32 Invades Old TV Box: Forecast More Than Just Channels

Obsolete hardware is all around us, and some of it has some pretty interesting tech buried within. One such device is an old Belgacom TV Box. Instead of using the ubiquitous LCD screen, it uses a VFD display for its user interface, and [Jean] has taken control of it with the ESPTimeCastVFD project.

Inside this box is a mix of two different 7-segment displays, which he uses to show the time and date, and 12 VFD displays, which are used to show weather data. To get the display working, the box was taken apart, and there were a few different areas [Jean] had to tap into: power for the soon-to-be-embedded ESP32-WROOM-32, as well as tying into the SPI lines to control the VFD. [Jean] also needed a 3.3V to 5V level shifter, and for this he used a 74LS125N dating all the way back to 1978.

The ESPTimeCast project, which we’ve featured here before, handles a lot of the time display and weather forecast shown on the front panel. However, [Jean] did have to add support for the VFD display, as well as adding wind speed to the display—as one of his uses for this is to judge the day’s suitability for flying RC planes. Once powered up, the ESP32 hosts a WiFi access point, allowing you to connect to it and set the configuration of the device, such as location, WiFi credentials, what displays you want to see, and many more. Thank you [Jean] for sending in your hack, saving this device from a landfill by turning it into a personalized display! Be sure to check out some of our other weather displays we’ve featured!

Continue reading “ESP32 Invades Old TV Box: Forecast More Than Just Channels”

ESP32 Decodes S/PDIF Like A Boss (Or Any Regular Piece Of Hi-Fi Equipment)

S/PDIF has been around for a long time; it’s still a really great way to send streams of digital audio from device A to device B. [Nathan Ladwig] has got the ESP32 decoding SPDIF quite effectively, using an onboard peripheral outside its traditional remit.

On the ESP32, the Remote Control Transceiver (RMT) peripheral was intended for use with infrared transceivers—think TV remotes and the like. However, this peripheral is actually quite flexible, and can be used for sending and receiving a range of different signals. [Nathan] was able to get it to work with S/PDIF quite effectively. Notably, it has no defined bitrate, which allows it to work with signals of different sample rates quite easily. Instead, it uses biphase mark code to send data. With one or two transitions for each transmitted bit, it’s possible to capture the timing and determine the correct clock from the signal itself.

[Nathan] achieved this feat as part of his work to create an ESP32-based RTP streaming device. The project allows an ESP32 to work as a USB audio device or take an S/PDIF signal as input, and then transmitting that audio stream over RTP to a receiver which delivers the audio at the other end via USB audio or as an SPDIF output. It’s a nifty project that has applications for anyone that regularly finds themselves needing to get digital audio from once place to another. It can also run a simple visualizer, too, with some attached LEDs.

It’s not the first time we’ve seen S/PDIF decoded on a microcontroller; it’s quite achievable if you know what you’re doing. Meanwhile, if you’re cooking up your own digital audio hacks, we’d love to hear about it. Digitally, of course, because we don’t accept analog phone calls here at Hackaday. Video after the break.

Continue reading “ESP32 Decodes S/PDIF Like A Boss (Or Any Regular Piece Of Hi-Fi Equipment)”

Detecting Surveillance Cameras With The ESP32

These days, surveillance cameras are all around us, and they’re smarter than ever. In particular, many of them are running advanced algorithms to recognize faces and scan license plates, compiling ever-greater databases on the movements and lives of individuals. Flock You is a project that aims to, at the very least, catalogue this part of the surveillance state, by detecting these cameras out in the wild.

The system is most specifically set up to detect surveillance cameras from Flock Safety, though it’s worth noting a wide range of companies produce plate-reading cameras and associated surveillance systems these days. The device uses an ESP32 microcontroller to detect these devices, relying on the in-built wireless hardware to do the job. The project can be built on a Oui-Spy device from Colonel Panic, or just by using a standard Xiao ESP32 S3 if so desired. By looking at Wi-Fi probe requests and beacon frames, as well as Bluetooth advertisements, it’s possible for the device to pick up telltale transmissions from a range of these cameras, with various pattern-matching techniques and MAC addresses used to filter results in this regard. When the device finds a camera, it sounds a buzzer notifying the user of this fact.

Meanwhile, if you’re interested in just how prevalent plate-reading cameras really are, you might also find deflock.me interesting. It’s a map of ALPR camera locations all over the world,  and you can submit your own findings if so desired. The techniques used by in the Flock You project are based on learnings from the DeFlock project. Meanwhile, if you want to join the surveillance state on your own terms, you can always build your own license plate reader instead!

[Thanks to Eric for the tip!]

Off To The Races With ESP32 And EInk

Off to the races? Formula One races, that is. This project by [mazur8888] uses an ESP32 to keep track of the sport, and display a “live” dashboard on a 2.9″ tri-color LCD.

“Live” is in scare quotes because updates are fetched only every 30 minutes; letting the ESP32 sleep the rest of the time gives the tiny desk gadget a smaller energy footprint. Usually that’s to increase battery life, but this version of the project does not appear to be battery-powered. Here the data being fetched is about overall team rankings, upcoming races, and during a race the current occupant of the pole-position.

There’s more than just the eInk display running on the ESP32; as with many projects these days, micro-controller is being pressed into service as a web server to host a full dashboard that gives extra information as well as settings and OTA updates. The screen and dev board sit inside a conventional 3D-printed case.

Normally when talking Formula One, we’re looking into the hacks race teams make. This hack might not do anything revolutionary to track the racers, but it does show a nice use for a small e-ink module that isn’t another weather display. The project is open source under a GPL3.0 license with code and STLs available on GitHub.

Thanks to [mazur8888]. If you’ve got something on the go with an e-ink display (or anything else) send your electrophoretic hacks in to our tips line; we’d love to hear from you.

ESP32 Hosts Functional Minecraft Server

If you haven’t heard of Minecraft, well, we hope you enjoyed your rip-van-winkle nap this past decade or so. For everyone else, you probably at least know that this is a multiplayer, open world game, you may have heard that running a Minecraft server is a good job for maxing out a spare a Raspberry Pi. Which is why we’re hugely impressed that [PortalRunner] managed to squeeze an open world onto an ESP32-C3.

Of course, the trick here is that the MCU isn’t actually running the game — it’s running bareiron, [PortalRunner]’s own C-based Minecraft server implementation. Rewriting the server code in C allows it to be optimized for the ESP32’s hardware, but it also let [PortalRunner] strip his server down to the bare essentials, and tweak everything for performance. For example, instead of the multiple octaves of Perlin noise for terrain generation, with every chunk going into RAM, he’s using the x and z of the corners as seeds for the psudorandom rand() function, and interpolating between them. Instead of caves being generated by a separate algorithm, and stored in memory, in bareiron the underground is just a mirror-image of the world above. Biomes are just tiled, and sit separately from one another.

So yes, what you get from bareiron is simpler than a traditional Minecraft world — items are simplified, crafting is simplified, everything is simplified, but it’s also running on an ESP32, so you’ve got to give it a pass. With 200 ms to load each chunk, it’s playable, but the World’s Smallest Minecraft Server is a bit like a dancing bear: it’s not about how well it dances, but that it dances at all.

This isn’t the first time we’ve seen Minecraft’s server code re-written: some masochist did it in COBOL, but at least that ran on an actual computer, not a microcontroller. Speaking of low performance, you can’t play Minecraft on an SNES, but you can hide the game inside a cartridge, which is almost as good.

Thanks to [CodeAsm] for the tip. Please refer any other dancing bears spotted in the wild to our tips line.

Continue reading “ESP32 Hosts Functional Minecraft Server”