RRB - The Radio Rewind Button

Radio killed the Video-recorder Star

Similar projects worth following
The Radio Rewind Button (RRB) is a FM radio with a rewind function to catch up with the last few minutes of the show. Streaming audio services form your internet radio stations also don't have a rewind option, so I might need a line input as well.
This idea started with my wife wishing to catch a piece of talk in the radio where we missed the beginning of the story or one of her favourite songs playing that she would like to hear from the beginning right now. Putting 1+1 (idea + implementation) together, this is the perfect entry for this year's HaD price. Makes her happy and gives me an exiting and challenging project.
Details of the project will be published as they become available under open source license for everybody to enjoy, use and modify.

The idea is to have a FM receiver chip with I2S interface to get the audio data into the digital domain as quickly as possible. The FPGA implements a ring buffer inside the SDRAM memory with an I2S to line out back end. A small controller, probably Arduino is going to to control the radio station and a small display with a all necessary information as FM frequency, rewind metric and memory telemetry. Finally the main controller, a BIG red button to rewind your radio and give superior listen experience.

The concept changed somewhat, I decided to run the analog audio rom the FM reciever chip to the audio processor and use its I2S interface as the only digital link. Makes for a much cleaner data flow. 

The base platform is going to be a Digilent ARTY S7 board which provides 256MB of SDRAM already, so I don't have to do the risky SDRAM over PMOD interface. The daughter card with all audio circuit will be in a Arduino Shield formfactor for potentially later re-use. 

The design and layout is almost finished, I just have to do a full review before ordering the board. It is blue in the rendering, but the initial hardware will be purple.  

   ̶A̶s̶ ̶v̶i̶s̶i̶b̶l̶e̶ ̶i̶n̶ ̶t̶h̶e̶ ̶p̶i̶c̶t̶u̶r̶e̶,̶ ̶t̶h̶e̶ ̶b̶u̶t̶t̶o̶n̶ ̶i̶s̶ ̶t̶h̶e̶ ̶o̶n̶l̶y̶ ̶p̶a̶r̶t̶ ̶I̶ ̶h̶a̶v̶e̶ ̶s̶o̶u̶r̶c̶e̶d̶ ̶s̶o̶ ̶f̶a̶r̶. :)

 ̶I̶ ̶d̶o̶ ̶h̶a̶v̶e̶ ̶a̶ ̶N̶u̶m̶a̶t̶o̶ ̶E̶l̶b̶e̶r̶t̶ ̶V̶2̶ ̶F̶P̶G̶A̶ ̶b̶o̶a̶r̶d̶.̶ ̶T̶h̶i̶s̶ ̶i̶s̶ ̶p̶r̶o̶b̶a̶b̶l̶y̶ ̶g̶o̶i̶n̶g̶ ̶t̶o̶ ̶b̶e̶ ̶t̶h̶e̶ ̶b̶a̶s̶e̶ ̶s̶y̶s̶t̶e̶m̶,̶ ̶i̶t̶ ̶h̶a̶s̶ ̶4̶ ̶P̶M̶O̶D̶ ̶c̶o̶n̶n̶e̶c̶t̶o̶r̶s̶ ̶t̶o̶ ̶c̶o̶n̶n̶e̶c̶t̶ ̶t̶o̶ ̶a̶ ̶d̶a̶u̶g̶h̶t̶e̶r̶ ̶c̶a̶r̶d̶ ̶(̶s̶o̶ ̶n̶i̶c̶e̶ ̶t̶h̶a̶t̶ ̶n̶o̶b̶o̶d̶y̶ ̶g̶a̶v̶e̶ ̶w̶e̶i̶r̶d̶ ̶n̶a̶m̶e̶s̶ ̶t̶o̶ ̶t̶h̶i̶s̶ ̶k̶i̶n̶d̶ ̶o̶f̶ ̶b̶o̶a̶r̶d̶s̶)̶.̶ ̶T̶h̶i̶s̶ ̶g̶i̶v̶e̶s̶ ̶m̶e̶ ̶3̶2̶ ̶I̶O̶s̶ ̶a̶n̶d̶ ̶h̶o̶p̶e̶f̶u̶l̶l̶y̶ ̶e̶n̶o̶u̶g̶h̶ ̶G̶N̶D̶ ̶p̶i̶n̶s̶ ̶f̶o̶r̶ ̶a̶ ̶s̶o̶l̶i̶d̶c̶o̶n̶n̶e̶c̶t̶i̶o̶n̶.̶ ̶I̶ ̶w̶i̶l̶l̶ ̶r̶u̶n̶ ̶a̶ ̶8̶-̶b̶i̶t̶ ̶S̶D̶R̶A̶M̶ ̶i̶n̶t̶e̶r̶f̶a̶c̶e̶ ̶t̶h̶r̶o̶u̶g̶h̶ ̶t̶h̶o̶s̶e̶ ̶c̶o̶n̶n̶e̶c̶t̶o̶r̶s̶ ̶b̶u̶t̶ ̶s̶i̶g̶n̶a̶l̶ ̶i̶n̶t̶e̶g̶r̶i̶t̶y̶ ̶m̶i̶g̶h̶t̶ ̶b̶e̶ ̶a̶ ̶c̶h̶a̶l̶l̶e̶n̶g̶e̶.̶ ̶N̶o̶t̶h̶i̶n̶g̶ ̶a̶ ̶s̶o̶l̶i̶d̶ ̶t̶e̶r̶m̶i̶n̶a̶t̶i̶o̶n̶ ̶c̶a̶n̶n̶o̶t̶ ̶f̶i̶x̶.̶ ̶T̶h̶e̶ ̶2̶ ̶I̶2̶S̶ ̶i̶n̶t̶e̶r̶f̶a̶c̶e̶s̶ ̶h̶a̶v̶e̶ ̶t̶o̶ ̶g̶o̶ ̶t̶h̶r̶o̶u̶g̶h̶ ̶a̶ ̶s̶e̶c̶o̶n̶d̶a̶r̶y̶ ̶c̶o̶n̶n̶e̶c̶t̶o̶r̶ ̶w̶i̶r̶e̶d̶ ̶t̶o̶ ̶t̶h̶e̶ ̶d̶a̶u̶g̶h̶t̶e̶r̶ ̶c̶a̶r̶d̶.̶ ̶T̶h̶i̶s̶ ̶i̶s̶ ̶O̶K̶ ̶a̶s̶ ̶t̶h̶e̶y̶ ̶a̶r̶e̶ ̶m̶u̶c̶h̶ ̶s̶l̶o̶w̶e̶r̶.̶ ̶

̶I̶ ̶f̶o̶u̶n̶d̶ ̶s̶o̶m̶e̶ ̶c̶a̶n̶d̶i̶d̶a̶t̶e̶s̶ ̶f̶o̶r̶ ̶I̶C̶s̶ ̶a̶l̶r̶e̶a̶d̶y̶,̶ ̶s̶e̶e̶ ̶b̶i̶l̶l̶ ̶o̶f̶ ̶m̶a̶t̶e̶r̶i̶a̶l̶ ̶f̶o̶r̶ ̶d̶e̶t̶a̶i̶l̶s̶.̶ ̶


Schematics RRB Rev 1 (work in progress)

Adobe Portable Document Format - 160.96 kB - 04/23/2018 at 02:18


  • 1 × BIG red button Yes
  • 1 × Digilent ARTY S7 Spartan7 FPGA + SDRAM dev board
  • 1 × Silicon Labs Si4730 BROADCAST AM/FM RADIO RECEIVER with I2S OUTPUT
  • 1 × TI PCM3070 Find a different Stereo Audio Codec
  • 1 × CUI Inc. RCJ-2223 Dual RCA connector red/white stacked

View all 6 components

  • PCB something PCB

    MagicWolfi7 days ago 0 comments

    PCBs are ordered, so are the parts. Boards will be purple and this log will be the collector for assembly and bringing up the hardware. Looking forward soldering the QFN32 0.5mm pitch IC.

    Update 13. Aug: Parts are here from Digikey. Boards are in manufacturing.

    Update 14. Aug: PCBs are shipped from OSH Park. This is getting exciting (happens every time when FR4 is on the way). 

  • New base platform

    MagicWolfi07/23/2018 at 00:30 0 comments

    I just scored a DIGILENT ARTY S7 FPGA board, which is the perfect platform for the RRB project. It has a Spartan7 XC7S50 FPGA and best of all, 256MB DDR3 SDRAM on board already. So I don't have to run a SDRAM interface over PMOD connectors, which was risky from the beginning. And it has Arduino compatible (3.3V) headers. Now I can design a shield with all my crazy audio hardware. All block diagrams will be updated in the near future. Good times.

    This is the new system concept.

  • More components

    MagicWolfi04/20/2018 at 13:28 0 comments

    Just found out that the NXP UDA1380 is end of life:-(. Looks like I am back to component hunting again. Looking for a Audio line in to I2S and I2S to line out codec.

    As a replacement, the TI PCM3002 looks very promising. Simple IO but good audio characteristics. I will do some more datasheet reading, but so far it does everything I need. Analog in and out and a digital audio interface, everything controlled through a weird 3-wire interface.PCM3002 Block DiagramAnother option would be the TI PCM3070 audio codec chip, which has 3 audio input pairs. This would change the architecture quite a bit, running the FM radio audio stream analog into the PCM3070 and only have a single I2S interface for all digital audio data. Also the control interface is I2C which would help in my quest to save signal pins between the ElbertV2 and my RRB daughter card.
    PCM3070 Block DiagramDecisions, decisions.

  • Memory size and let's do the time warp again...

    MagicWolfi04/17/2018 at 01:26 0 comments

    Assuming CD quality, I have 44100 samples/sec in 16 bit. For stereo this is 176400 Bytes/sec or 10584000 Bytes/minute. The smallest SDRAM with availability and second source is 64Mbit x 8 = 67108864 Bytes. So I will have about 6 Minutes and 20 seconds (in NA units this is 6 1/3 minutes ;-) time warp rewind time. This should be more than enough to listen to the missed news and not many songs are longer than 6 minutes, unless your really like November Rain or Pink Floyd and have a radio station that plays the songs to the very end and not only half </rant>.

  • Components

    MagicWolfi04/06/2018 at 00:53 0 comments

    Heart of the prototype will be a Numato Elbert V2 FPGA board. It has a Xilinx Spartan3 XC3S50A FPGA, which is somewhat unfortunate for me as a lifelong Altera guy but they all speak VHDL.

    It should be large enough to handle a SDRAM core and 3 I2S interfaces. The board has 39 dedicated IOs and I am sure the 6 LEDs and 8 DIP switches can be re-purposed if necessary. The buttons might come in handy for a user interface, except the big red button of course, which will be there no matter what.  32 IOs are located on 4 PMOD connectors. the daughter card will connect through them and will mainly hold the SDRAM interface (~30GPIOs for a 64M x 8bit device). 64Mx8 is the smallest I could find with an 8bit data bus to save pins and available quantities. Also on the daughter card will be the FM radio and the line in and out interfaces. Separate control interfaces will go to an Arduino controller, could be as simple as an I2C interface. The prototype might connect to a PC for user IO, but the end goal is a small display showing the radio station and other useful data. The big red button was part of a Sparkfun dumpster dive shipment, waiting patiently for its opportunity to shine.

View all 5 project logs

Enjoy this project?



krisedwards wrote 08/09/2018 at 11:22 point

You could also use RDS to implement commercial skipping.

  Are you sure? yes | no

MagicWolfi wrote 08/09/2018 at 14:00 point

Interesting idea, I hate commercials. I wasn't aware that RDS has a commercials code ID. And regular radio would need to play a little slower to build up a buffer for the skipping. Yay, feature creep.

  Are you sure? yes | no

krisedwards wrote 7 days ago point

It doesn't have commercial codes, but you could watch for specific names if your doing talk radio. Just delete audio that doesn't  match the host's name.  If you're doing music radio, you could check titles against a song title db and reject anything that wasn't there..or, since most stations just run generic rds tags during commercial breaks you could reject anything when the rds hasn't changed in 5 min.  Anyway, thanks for the project

  Are you sure? yes | no

Saabman wrote 08/08/2018 at 20:32 point

everyday I get in my car to drive to work I think I want a TiVo for my radio. Watching with great interest. 

  Are you sure? yes | no

MagicWolfi wrote 08/09/2018 at 13:57 point

Thanks. That make 2 potential buyers. There might be a mass market ;)

  Are you sure? yes | no

Stuart Longland wrote 04/21/2018 at 00:16 point

Did have something like this years ago.  I had a stereo FM tuner plugged into the line-in socket of a desktop computer's sound card.  The machine was a 166MHz Pentium with 64MB RAM and a SoundBlaster 16 (ISA) sound card.

A program recorded the audio received into 1 second segments, stored as headerless raw PCM (32kHz 16-bit stereo; big-endian encoding) under files named by timestamp.  A separate cron job cleaned up old files.

A CGI script would take an offset in seconds, would compute the starting timestamp, spit out a Sun Audio header, then start concatenating files together.  After a day at uni, or whatever, I could go to http://myserver/script.cgi?offset=28800 and hear what transpired 8 hours ago.

It worked well until the disk drives failed.

  Are you sure? yes | no

MagicWolfi wrote 04/21/2018 at 01:56 point

Nice, sounds like a useful implementation. I hope you had a backup of the scripts. I am a hardware guy, so I try to do as much as possible with as little as possible programming.

  Are you sure? yes | no

Stuart Longland wrote 04/21/2018 at 02:43 point

Early uni hack scripting, backups, you kidding? ;-)

If I recall correctly, it was written in Perl… but the concept would carry over to other languages and environments.

The implementation you're looking at will chew less power and probably be faster, at the expense of not having the same storage capacity.

  Are you sure? yes | no

Mike Szczys wrote 04/03/2018 at 15:07 point

I love this idea! It would be very neat to have the playback after rewind be 5-10% too fast so that over time you catch up again.

  Are you sure? yes | no

MagicWolfi wrote 04/04/2018 at 00:45 point

Thanks Mike. The faster playback makes absolute sense. Best implementation might be to speed it up dynamically to hide the fact that it is faster than normal. Would spoil the favourite song if it is noticeable. Speech might be more forgiving. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates