icon

DIY an Audio Photo Album-Based on FireBeetle M0

1 54260 Medium

Recently I have been considering making a special gift for my family. The other day I happened to see that one of my friends bought a photo album as a present, which gives me inspiration for my handmade gift. I am gonna make something with a photo album, how about creating an interactive photo album, sounds great!

The photos in my old photo album always remind me of the past. What makes me feel moved is not only the things that change constantly as time goes by, but the precious moments fixed by the photos, behind which there are a lot of stories. Why not let the photos tell their stories by themselves?

This idea of making an audio photo album keeps lingering in my mind. Then I saw the FireBeetle M0 launched by DFRobot, I found it just ideal for my project.

projectImage

First, let me tell you why it is perfect for my audio photo album. This FireBeetle M0 main-board is based on the ATSAMD21G18 ARM Cortex M0+ high-performance 32bit processor, and comes with a digital to analog converter(DAC), which means that my audio file can be analyzed by its MCU and then played out.

There is 16MB SPI Flash integrated onboard that can be used to make a 12MB virtual U-disk for storing data. That is to say, I can directly store audio files in Flash by USB. I calculated that it can store a 5 minutes mono WAV file, which is enough to tell a few stories.

With a FireBeetle M0 board and necessary GPIOs as input, my project can be completed.

For more details about FireBeetle M0, please refer to: https://wiki.dfrobot.com/FireBeetle_Board_M0_V1.0_SKU_DFR0652

 

The actual effect of my audio photo album is as below:

 

I bought a 16-inch self-adhesive photo album with the cover of the Celia Thaxter's Garden, Isles of Shoals Maine, created by the Impressionist painter Childe Hassam in 1890.

projectImage
HARDWARE LIST
1 FIT0625 2xAAA Battery Holder with Cover and Power Switch
1 FIT0192 36mm 8ΩSpeaker
1 DFR0119 3W Mini Audio Stereo Amplifier
1 DFR0039 lilypad button module
1 DFR0652 Firebeetle Board-M0 (V1.0)
1 A Reel of White Ultra Fine Silver-plated PFA Teflon High Temperature Resistance Wire 0.38mm outer diameter
1 16 inch self-adhesive photo album
1 FIT0456 Straight/Cross Screwdriver
1 KIT0077 Soldering Starter Tool Set
1 USB Type-C Cable
1 Double Adhesive Tape
1 PC
projectImage

Software 

 

1. Arduino IDE

2. Audacity Audio Editor

3. voice_album.ino Code

STEP 1
Install Arduino IDE and FireBeetle M0 SDK, and Test the development environment

Download and install Arduino IDE, and test FireBeetle M0 Board.

Download the latest IED at Arduino Official Web: https://www.arduino.cc/en/Main/Software

 

When Arduino IDE is installed, open it, download and install FireBeetle M0 SDK.

 

projectImage

Click File->Preferences

projectImage

1) Click the icon marked with red circle 1, then the box for inputting URL will pop up.

2) Copy the following address to the box:

http://download.dfrobot.top/firebeetle/

3) Click OK to save it.

4) Click OK in Preferences interface to save the setting.

Click Tools->Board->Boards Manager

projectImage

Then we can see the SDK of the FireBeetle SAMD Board, click “Install”.

projectImage

After that we can see the FireBeetle M0 board in Board interface, select it.

projectImage

Connect the FireBeetle M0 board to a PC with a USB cable, then a new COM can be found by the OS.

projectImage

To test whether the board can work properly, let’s run a simple P13 LED blink program.

projectImage
projectImage

Click the arrow button in the upper right corner, the LED flashing program will be compiled and burned into the main-board. In the process of burning and writing, the LED on the main-board P13 flashes quickly. When the lower right corner of the IDE displays done uploading, it indicates that the program download is completed.

projectImage

If the green LED on the FireBeetle M0 P13 flickers according to the rhythm of one second on and one second off, it means that the board works well, and we have set up the development environment.

STEP 2
Hardware Soldering

Weld the audio power amplifier, loudspeaker, and five buttons together. The wires for connecting the buttons should be about 15cm.

projectImage

Connection Diagram

projectImage
STEP 3
Prepare Photos and Record Audio

Prepare the photos and the stories we wanted to tell. Recording audio files of 5 stories with mobile phones, please speak loudly, by which the signal-to-noise ratio can be improved.

When finished that, transfer these files to the PC. They are usually. M4a files and we need to rename the files. Because the numbers of five keys in the program are from 0 to 4, so name our files as 0, 1, 2, 3, 4.

projectImage

These files are compressed dual channel. We need to convert them into WAV mono files that can be decoded by software on FireBeetle M0.

Use the software Audacity to convert m4a file into mono WAV file, it is free and open source.

Download Address: https://www.audacityteam.org/

projectImage

After we installed the Audacity, we have to download a free ffmpeg-win-2.2.2.exe plug-in.

https://lame.buanzo.org/#lamewindl

projectImage

When installed the ffmpeg-win-2.2.2.exe, click Edit->Preferences in Audacity.

projectImage

Click Libraries ->FFmpeg Library -> Location

Select the installation path of FFmpeg and click OK.

projectImage

Click Audacity software file > Open to open the 0.m4a file just recorded.

Click the drop-down button above the track and select “Split Stereo to Mono”.

projectImage

Click the mute button of a channel. Set Project rate as 44100HZ.

projectImage

Click File -> Export -> Export as WAV, export the WAV file.

projectImage

Select Unsigned 8-bit PCM at Encoding, and save the 0.wav file.

projectImage

Convert the rest 4 .m4a files into. Wav files as the way above.

 

Connect the FireBeetle M0 board to the computer through a USB cable. Double click the RST button on the side. At this time, the RGB light on the main-board turns green and the computer pops up a U-disk. Copy the 5 .WAV files to the U-disk. The transferring speed is slower than the usual U-disk, so please wait patiently.

projectImage

After that, hit the RST button to enter programming mode.

STEP 4
Download Codes into FireBeetle M0 Board

Open Arduino IDE, click Sketch -> Include Library -> Add .ZIP Librar to add the AudioZero.zip library.

projectImage

Click File->Open in Arduino IDE

Open voice_album.ino, click the upload icon to upload the audio photo album codes into the FireBeetle M0 board.

projectImage

 

If we test that when pressing the five buttons, the corresponding song can be played, then the programming and circuit parts are finished. Next, we just need to install the hardware circuit into our photo album.

STEP 5
Install the Circuit into the Photo Album

There are three screws in the album. Remove the bottom screw so we can install the circuit conveniently.

projectImage

The first page of the album.

projectImage

Remove the screw on the last page of the photo album.

Use tweezers to make the button wires go through the book axis.

projectImage

Get the circuit connected, and then recover the screw of the album.

projectImage

Fix the battery box, FireBeetle M0 board and speaker on the album with double-sided adhesive tape.

projectImage

 

Put the photos in the album.

projectImage

Now, all done! You can give it a try if you are interested.

icon AudioZero.zip 6KB Download(6)
icon Audio-Album Code-EN.rar 2KB Download(3)
License
All Rights
Reserved
licensBg
1