Audio file control

At the risk of biting off more than I can chew.. I'd like to look at the possibility of creating a second arduino project for my daughter (6m).

If she wakes up in the middle of the night she is often soothed back to sleep with relaxing music off youtube. I would like to try and make a project that would allow me to remotely play an audio file (mp3). I know there are probably lots of easy/cheap ways to do this without an arduino but I'm doing this to learn so I don't mind if it costs a few quid or takes a while to complete.

My first thought was to use bluetooth to control the project but I imagine it would be hit and miss due to connection issues. Would the best method be wifi? Ideally I'd like to be able to control my previous project too, I presume this could be done by having a web page with two toggles, one to turn on/off the audio and the second to activate the 15min LED timer?

This kind of shield looks like it would do the trick but it's very expensive for what I'm after, are there any better alternatives?

I buy modules, last set I got was $16 for 5 DFPlayer Minis with serial control or connect button(s) directly.

With Arduino and maybe without you could pick up sound with a cheap microphone and watch how loud, how often and close the noises are to alert you instead of just playing lullabies.

AVR chip Arduinos make poor music players. SAM chip Arduinos cost more than a Nano and MP3 module.

There are MANY players for Arduino out this year, the market is buyer-friendly in places. I got the DFPlayers through Amazon but haven't tested them though they get good reviews, I got another player going (a few commands, it's serial-only) while waiting on shipping and it is not allergic to 5V.

If you're a beginner coder then get a module that can run on buttons, the Arduino can simulate button presses easy enough to get you started then you decide if you want to do more like read data from the module though the ones I have will not let me use the on-module micro-SD as a drive, the thing I would like most of all!

Highest prices I saw for the DFPlayer Mini were $8 or $9 each but TBH the good sites charging that much have support which my deal does not. If you want the extra, pay the extra, for just 1 unit it may be the better deal.

I would build the project using the following parts:

  1. Arduino UNO
  2. Adafruit Music Maker Mp3 Shield.
  3. ESP8266-01 for the wifi

The pros:

  • Adafruit Music Maker Mp3 Shield is a good quality shield with a properly documented library
  • Plenty of tutorials for the ESP8266.

The cons:

  • Adafruit is a little bit more expensive.

I paid less than $4 each for the DFPlayers and have complete doc in English.

What is "a little bit more"? Over 3x......

When you buy a shield you are getting a certain size board. Mostly the size of the board affects the cost because of parts yield from a large blank. Check the price of an Uno vs Nano or Mini on that. Modules are for people with less money to waste.

https://www.dfrobot.com/product-1121.html

Both have full support, code and wiring, check the sites.

Thanks for the replies guys, I will take some time this evening to go through the info and source some parts.

I like the idea of monitoring audio levels so will consider this as part of the build.

GoForSmoke:
I paid less than $4 each for the DFPlayers and have complete doc in English.

What is "a little bit more"? Over 3x......

When you buy a shield you are getting a certain size board. Mostly the size of the board affects the cost because of parts yield from a large blank. Check the price of an Uno vs Nano or Mini on that. Modules are for people with less money to waste.

A Mini MP3 Player with 6 Projects - DFRobot

Adafruit Music Maker MP3 Shield for Arduino (MP3/Ogg/WAV...) : ID 1790 : $29.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Both have full support, code and wiring, check the sites.

I didn't know those modules. Though in my experience Adafruit usually stands for quality. Cheaper modules usually have the habit of working not as good as advertised. The one from Adafruit is just plug and play. You can attach headphones/speakers with a normal audio jack. If it's worth the extra money is up to JacksonGee.

DFRobot is also a reputable house. The price difference is down to board size.
Are you familiar with OSH Park? They make Teensy’s under license to PJRC for less, quality controlled.

You have a major loyalty bias to smear “other boards” simply based on price difference.

GoForSmoke:
DFRobot is also a reputable house. The price difference is down to board size.
Are you familiar with OSH Park? They make Teensy's under license to PJRC for less, quality controlled.

You have a major loyalty bias to smear "other boards" simply based on price difference.

No I am not familiair with those. Calm down, I believe you when you tell me that they are good modules. I do not have a "major loyalty bias to smear "other boards" simply based on price difference.". In fact all my modules/boards are cheap ones except the mp3 module from Adafruit.

Would this module be ok for the wifi?

There are lots of variety and I'm not entirely sure what the differences are!

Looking to extend this project with a temperature and humidity sensor too, is this an ok sensor board? Seems a bit expensive Humidity and Temperature Sensor Breakout - Si7021 (SEN-13763) — Cool Components

JacksonGee:
Would this module be ok for the wifi?

WiFi Serial Transceiver Module w/ ESP8266 - 1MB Flash — Cool Components

There are lots of variety and I'm not entirely sure what the differences are!

Looking to extend this project with a temperature and humidity sensor too, is this an ok sensor board? Seems a bit expensive Humidity and Temperature Sensor Breakout - Si7021 (SEN-13763) — Cool Components

If your route is using the DFPlayer then you won't need an Arduino. You can just buy a Wemos D1 or a Nodemcu. Those boards have the ESP8266 chips on board. You can program them in the same way you program an Arduino.

I’m going to be lazy and go for the adafruit board, it’s not massively more expensive when shipping is added on to the DFPlayer. I also have quite a few unos lying around so it makes sense to use those up.

So I've been having a massive tidy up today and what do I come across.. a DFPlayer!!

A while ago I bought some bits and bobs, probably from banggood, and never got round to using any of them due to work commitments. Also realised that the WesMos is basically an uno so will still work with the other ideas I've got planned for the project. They're not too much different price wise to the wifi board either.

Tomorrow I've got a 32hr 3D print job on the go so perfect timing to be playing with some arduino toys.

JacksonGee:
So I've been having a massive tidy up today and what do I come across.. a DFPlayer!!

A while ago I bought some bits and bobs, probably from banggood, and never got round to using any of them due to work commitments. Also realised that the WesMos is basically an uno so will still work with the other ideas I've got planned for the project. They're not too much different price wise to the wifi board either.

Tomorrow I've got a 32hr 3D print job on the go so perfect timing to be playing with some arduino toys.

A Wemos together with the DFPlayer is a good combo :slight_smile:

Not sure why I didn't check if banggood sold them.. they're only £2.06 delivered!

There's docs and sketches out on the web.

I've had a tinker and got the player working but it's a bit of a bodge at the moment. A small speaker straight off the board is more than enough volume for what I'm after.

Could you point me to some good info to find out how to set up a web server? so that I can turn on/off pins on the arduino so I can control the player? Similarly I need to be able to retrieve data from temperature/humidity sensors and have them displayed on a webpage.

Any websites or key words to point me in the right direction will be much appreciated :slight_smile:

I need to run and you need to get the player docs.

Arduino pins can source ( OUTPUT HIGH ) or sink ( OUTPUT LOW ) up to 20=25mA safely.
We use resistors to limit current flow.

An IO pin moded INPUT but not read is electrically neutral.

All a switch does is open or close a contact, an Arduino pin can look like a button to ground or power or open switch.

But if you use the serial connection, 3 wires, you can send commands and get responses which takes more code.