help with a project with a timer , motor and mp3 sound module - Page 1
Forum section: electronics / projects

author: cuasitos
author_rank: Newbie
timestamp: February 22, 2023, 06:22:53 am
content: Hello, I need to know what I need to complete my project with a timer, motor and mp3 sound module that consists of setting a timer in minutes and when I press a button the motor and sound module start to work for the number of minutes that I set it in that moment and after that, the timer starts from zero, leaving me to set again the number of minutes I wantThank you and sorry for any mistake english is my second language

author: james_s
author_rank: Super Contributor
timestamp: February 22, 2023, 07:06:17 am
content: Can you provide more details? Specifically what modules? How do you want to set the number of minutes? This seems like a good job for an Arduino, maybe something like the nano.

author: cuasitos
author_rank: Newbie
timestamp: February 23, 2023, 06:22:44 am
content: first i saw online a mp3 sound module but i not sure if that one can be trigger by a external signal or just with the one coming with the module itselfFor the timer i want to be set by a button increasing or decreasing in minutes showing that on a screen an after that press another button to start at the same time the toy motor and the sound

author: mariush
author_rank: Super Contributor
timestamp: February 23, 2023, 07:06:45 am
content: Well, for the mp3 sound module ... does it turn on and default to the audio track so that you only have to press play? Could you maybe configure to play automatically on power up?There are modules which you have to "talk" to them through UART sending specific commands.If the module has buttons, then the buttons work by connecting two wires on the circuit board together, one wire is either going to ground pulling down the input/output wire to ground, or the wire is connected to some voltage so that when the button is pressed, that voltage goes to the input/output pin of the chip - that's how the chip detects a button is pressed.So if there's some buttons, you could connect your wire to that button and simulate the button being pressed using your microcontroller.Often people use cheap mp3 players precisely for this reason, instead of mp3 modules ... well, besides price.For example see this at 3.66$ each :https://www.ebay.com/itm/144092272329Has a on-off slide switch, so you can permanently set it to on and just disconnect battery using a npn transistor or mosfet to turn it off or on completely.It will default to first mp3 file from the sd card or internal usb memory, because there's no screen or anything, so you could just have your controller turn on power to the player a few seconds before you want sound to play, then press the play button as i explained in the above paragraph... when you want to stop you can just disconnect power.

author: james_s
author_rank: Super Contributor
timestamp: February 23, 2023, 07:32:37 am
content: You can get MP3 modules for exactly this purpose, I forget what they're called but I bought a few from aliexpress a while back. They're just a little PCB that enumerates as a USB drive and has some pins to control it. An arduino would make this pretty trivial but you're going to have to do some of the work yourself, if you haven't coded this would be a good excuse to try.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 23, 2023, 07:39:45 am
content: Like james_s wrote a bit more information would help.But you mention showing information on a display, so here is a link to how to setup a display connected to an arduino:https://www.instructables.com/LCD-1602-With-Arduino-Uno-R3/A project to control a mp3 player from an arduino can be found here:https://maker.pro/arduino/projects/how-to-use-the-dfmini-player-mp3-module-with-arduinoControlling a small motor with an arduino:https://www.tutorialspoint.com/arduino/arduino_dc_motor.htmCombine these together and you have what you want.Edit: I forgot about the timer:https://fritzing.org/projects/arduino-3-minutes-timerWhat I'm trying to express here is that a bit of google foo (or whatever search engine you prefer) can get you a lot of information you need for something like what you asked here.Edit2: Looked on Aliexpress and found thismodulefor playing mp3 files