Light Sensitive Music Box - MP3

Hello everyone!

I am new here, however I've read several forums before posting here.

I would like to design a light sensitive mp3 module, like the ones you get on birthday cards.
However, I only found videos on how to design a light sensitive breadboard that uses a LED that will turn on or off, depending on the amount of light that the light sensor absorbs. Similar question: http://forum.arduino.cc/index.php?topic=104067.0
http://forum.arduino.cc/index.php?topic=40747.0;nowap

So, I thought I could use an arduino to design my board design more easily. But I do not know from where to start.
I found a board design online that seems like its working, however it lacks the code that it might be needed in order to make the arduino communicate with the rest of the board. Here's a link: https://circuits.io/circuits/2926278-music-and-light

That's super easy.

You only need 4 parts:

  1. Arduino (For example Uno or Mega)
  2. mp3-shield (Compatible with the Arduino you pick)
  3. sd-card to put the music on
  4. photeresistor

You just program the Arduino to start playing the song if the light goes below a threshold. It's exactly the same as lighting a led only now you just start playing a song .

You probably need a resistor too.

There's a built-in example that shows you how to connect a photoresistor

Thank you for the fast replies!

I will try assembling everything today after I get my extra components (extra photoresistors etc).

So what I should do is code a loop to get the photoresistor data and make a speaker play the sound from the board, once a value is presented on the photoresistor?

How or maybe where do I connect the speaker?
Directly to my arduino or on top of a breadboard?

Thanks and sorry for the noob-ish questions

UPDATE:

I found out that the MP3 Shield with VS1053B and TF card slot for Arduino is compatible with my arduino model (which is arduino UNO).
So I must code the board to connect to the mp3 shield and then playback the tune I want once a value is presented to the photoresistor.

Do you have in mind and good code loop that will take care of "calibrating" the photoresistor once I open up the module?

Since I want to start the whole operation while the board is in complete darkness (a box) i might not even need a loop to see if the value that the photoresistor will output will increase.

Giorgos241:
Do you have in mind and good code loop that will take care of "calibrating" the photoresistor once I open up the module?

Since I want to start the whole operation while the board is in complete darkness (a box) i might not even need a loop to see if the value that the photoresistor will output will increase.

That's something you can easily code yourself :slight_smile:

Lennyz1988:
That's something you can easily code yourself :slight_smile:

Yes, I will. Once I figure out a good way to implement the whole design inside a box that I am creating. Also, I do not have the MP3 shield yet in my hand since its kinda pricey on the local stores (around 30-40 euros). The problem at the moment is space. I design a board that will fit on the top or bottom or a shoe box, so I will work once someone opens the box.