You have an old PC with a nonstandard RGB video out and you need to bring it to a modern PAL TV set. That’s the problem [svofski] had, so he decided to use an Altera-based DE1 board to do the conversion. Normally, you’d expect reading an RGB video signal would take an analog to digital converter, which is not typically present on an FPGA. Instead of adding an external device, [svofski] used a trick to hijack the FPGA’s LVDS receivers and use them as comparators.
Support libraries, good application notes, and worked examples from a manufacturer can really help speed us on our way in making cool stuff with new parts. Espressif Systems has been doing a good job with their ESP8266 product (of course, it doesn’t hurt that the thing makes a sub-$5 IOT device a reality). Only recently, though, have they started publishing completed, complex application examples. This demo, a networked MP3 webradio player, just popped up in Github, written by the man better known to us as Sprite_tm. We can’t wait to see more.
The MP3 decoder itself is a port of the MAD MP3 library, adapted for smaller amounts of SRAM and ported to the ESP8266. With a couple external parts, you can make an internet-connected device that you can point to any Icecast MP3 stream, for instance, and it’ll decode and play the resulting audio.
What external parts, you ask? First is something to do the digital-to-analog conversion. The application, as written, is build for an ES9023 DAC, but basically anything that speaks I2S should be workable with only a little bit of datasheet-poking and head-scratching. Of course, you could get rid of the nice-sounding DAC chip and output 5-bit PWM directly from the ESP8266, but aside from being a nice quick demo, it’s going to sound like crap.
The other suggested external IC is an SPI RAM chip to allow for buffering of the incoming MP3 file. WiFi — and TCP networks in general — being what they are, you’re going to want to buffer the MP3 files to prevent glitching. As with the dedicated DAC, you could get away without it (and there are defines in the “playerconfig.h” file to do so) but you’ll probably regret it.
In sum, an ESP8266 chip, a cheap I2S DAC, and some external RAM and you’ve got a webradio player. OK, maybe we’d also add an amplifier chip, power supply, and a speaker. Hmmm…. and a display? Or leave it all configurable over WiFi? Point is, it’s a great worked code example, and a neat DIY device to show your friends.
The downsides? So far, only the mono version of the libMAD decoder / synth has been ported over to ESP8266. The github link is begging for a pull request, the unported code is just sitting there, and we think that someone should take up the task.
In our search for other code examples for the ESP8266, we stumbled on three repositories that appear to be official Espressif repositories on Github: espressif, EspressifSystems, and EspressifApp (for mobile apps that connect to the ESP8266). The official “Low Power Voltage Measurement” example looks like a great place to start, and it uses the current version of the SDK and toolchain.
You couldn’t possibly want more resources for getting started with your ESP8266 project. Oh wait, you want Arduino IDE support?
Thanks [Sprite_tm] for the tip.
The theme of this year’s Hackaday Prize is. ‘build something that matters.’ A noble goal, but there’s also a second prize – the Best Product prize – that is giving $100k to one lucky team who can appeal to people with open jaws and wallets. It’s a fabulous prize that also includes a six month residency at the Hackaday Design Lab, but right now there aren’t many contenders for this part of The Hackaday Prize.
[drewrisinger]’s DrDAC USB Audio DAC is one of those project that’s in the running for the Best Product prize. He’s solving the problem of terrible low-quality built-in soundcards that seem to be everywhere. Yes, it’s a simple idea, but the execution is great.
The electronics for DrDAC are pretty much what you would expect for a DIY audio sound card; A PCM2706 takes USB audio and sends it out over I2S. A PCM1794 converts the I2S to analog audio, and an OPA2836 amplifies it and sends everything out through a 1/8″ jack or a pair of RCA plugs.
[drewrisinger] started DrDAC as a school project, and after receiving the PCBs, he noticed a problem. MultiSim’s footprint for a TQFP-32 package was too small, meaning the IC simply wouldn’t fit on the board. It was too late in the semester to order a new board, meaning some sort of rework needed to happen. [drew] fixed this problem by soldering jumper wires between the pads to the leads of the chip. Yes, it looks crazy, but apparently it works. You can check out a video of that whole process below.
The 2015 Hackaday Prize is sponsored by:
[Charlie] was killing some time hacking on some cheap FPGA dev boards he bought from eBay. Initially, he intended to use them to create HDMI ports for a different project before new inspiration hit him. Instead, he added an HDMI port to Neo Geo MVS games. The Neo Geo MVS was a 90’s arcade machine that played gems like the Metal Slug and Samurai Showdown series. [Charlie] has a special knack for mods, being featured on Hackaday before for implementing Zork on hardware and making a mini supergun PCB. What’s especially nice about his newest mod is that the HDMI outputs both audio and video.
[Charlie] obtained the best possible video and audio signal by tapping the digital inputs to the Neo Geo’s DACs (digital-to-analog converter). The FPGA was then used to convert the signals to HDMI, maintaining a digital signal path from video generation to display. While this sounds simple enough, there was a lot that had to be done. The JAMMA video standard’s lower resolution was incompatible with the various resolutions offered by the HDMI protocol. [Charlie] solved this problem by implementing scan doubling using the RAM on the Cyclone II dev board. He then had to downsample the audio to 32kHz (from 55.6kHz) in order to meet the HDMI specs. Getting the sound over HDMI required adding data islands to the signal, a feat [Charlie] admits was a frustrating one.
When he tested the HDMI with his monitor, it was out of spec but still worked. His TV, on the other hand, refused to play it at all. This was due to the Neo Geo outputting 59.1 fps – not the standard 60 fps. Using the FPGA, [Charlie] overclocked the NeoGeo by approximately 1% and used the 27Mhz pixel clock to change the FPGA output to a 720 x 480p signal.
For those that love the scan lines of yore, they can be enabled with the push of a button. [Charlie] notes that there are some slight differences in the shadow effects of some graphics, but he has done his best to minimize them. He also admits that the FPGA code contributes only 100 microseconds of delay compared to analog output, which is fast enough for even the most hardcore gamers.
Check out the video after the break to see how the Neo Geo looks in HDMI along with a side-by-side comparison to a CRT TV.
The biggest and best audiophile projects are usually huge tube amps, monstrous speaker cab builds, or something else equally impressive. It doesn’t always have to be that way, though, as [lowderd] demonstrates with a tiny DIY USB DAC build that turns a USB port into a headphone output.
In the Bad Old Days™ putting a DAC on a USB bus would require some rather fancy hardware and a good amount of skill. These days, you can just buy a single chip USB stereo DAC that still has very good specs. [lowderd] used the TI PCM2707 USB DAC, a chip that identifies as a USB Audio Class 1.0 device, so no drivers are needed for it to work in either Windows or OS X.
The circuit fits on a tiny PCB with a USB port on one side, a headphone jack on the other, and the chip and all related components in between. There are some pins on the chip that allow for volume, play/pause. and skip, but these pins were left unconnected for sake of simplicity.
The board was fabbed up at OSH Park, and the second revision of the case laser cut out of bamboo and acrylic by Ponoko. It’s a great looking little box, and something that fits right inside [lowderd]’s headphone case.
[Andy] had the idea of turning a mixing desk into a MIDI controller. At first glance, this idea seems extremely practical – mixers are a great way to get a lot of dials and faders in a cheap, compact, and robust enclosure. Exactly how you turn a mixer into a MIDI device is what’s important. This build might not be the most efficient, but it does have the best name ever: digital to analog to digital to analog to digital conversion.
The process starts by generating a sine wave on an Arduino with some direct digital synthesis. A 480 Hz square wave is generated on an ATTiny85. Both of these signals are then fed into a 74LS08 AND gate. According to the schematic [Andy] posted, these signals are going into two different gates, with the other input of the gate pulled high. The output of the gate is then sent through a pair of resistors and combined to the ‘audio out’ signal. [Andy] says this is ‘spine-crawling’ for people who do this professionally. If anyone knows what this part of the circuit actually does, please leave a note in the comments.
The signal from the AND gates is then fed into the mixer and sent out to the analog input of another Arduino. This Arduino converts the audio coming out of the mixer to frequencies using a Fast Hartley Transform. With a binary representation of what’s happening inside the mixer, [Andy] has something that can be converted into MIDI.
[Andy] put up a demo of this circuit working. He’s connected the MIDI out to Abelton and can modify MIDI parameters using an audio mixer. Video of that below if you’re still trying to wrap your head around this one.
In this installment of Scope Noob I’m working with Direct Digital Synthesis using a microcontroller. I was pleasantly surprised by some of the quirks which I discovered during this process. Most notably, I had a chance to look at errant triggers solved by using holdoff and a few timing peculiarities introduced by my use of the microcontroller. Here’s a video synopsis but I’ll cover everything in-depth after the break.