1
\$\begingroup\$

I'm using DFPlayer in stand-alone mode (no Arduino) for a music project. The buttons all have short-press and long-press commands. I want to trigger a short-press command by releasing a depressed normally-closed switch (ie. lifting an object containing a pressure switch.) Since the switch stays closed upon release, it would register as a long-press, but I want the short-press behavior.

Based on my research, it seems like a capacitor-based debounce circuit might allow me to accomplish this, but I can't make the jump from those examples and my application. I don't want to involve a microcontroller.

DFPlayer manual: https://github.com/Arduinolibrary/DFPlayer_Mini_mp3/raw/master/DFPlayer%20Mini%20Manual.pdf


UPDATE 6/19: To clarify the application, here is what we built previously. Musical Invitation: https://www.youtube.com/watch?v=r6qroO5coos

This used a different music player that doesn't have as good a sound quality, and required prying it out of a plastic enclosure (150 times) so we could modify it to control the lights, but it did have a push button to activate the music. We wired the switch normally-closed, so while it's in the box, it holds the switch open. As soon as the box opens, it releases the switch and begins playing. But in the new music player, it interprets normally closed as a long press, and depending on which pin I connect to, that will either play a track on infinite repeat, or increase the volume, neither of which are what I want, which is to play the track once and stop. We're working on a similar project and wish to use a better quality music player that requires less manual labor to assemble.

\$\endgroup\$
3
  • \$\begingroup\$ If you are getting some noise on the button states is posible to use a capacitor of 10n or 100n, this will depend of the noise; a high capacitance the circuit will take the signal as long push. \$\endgroup\$ Jun 19, 2018 at 5:51
  • \$\begingroup\$ Can you please explain a bit more? I dont get it. How exactly do you want to trigger a short press by lifting an object with a pressure switch? Can you provide a drawing? \$\endgroup\$ Jun 19, 2018 at 10:51
  • \$\begingroup\$ I updated the question with clarification as to our intended application. \$\endgroup\$ Jun 19, 2018 at 19:27

1 Answer 1

0
\$\begingroup\$

enter image description here

Try this. Play with component values. Node 1 to the pin on the DFPlayer. Sw1 is your switch. Normally the switch is closed so the transistor is off and the node 1 pin is internally pulled high (vcc). i.e. no input. If sw1 opens the transistor turns on and node1 is pulled to ground since the cap does not initially have any charge. Over time r2 charges the capacitor and Node 1 will eventually return to high Vcc. R2 and C will set the short duration time.


Correction : Move R2 to between the emitter of Q1 and the capacitor. The DFplayer data sheet does not give enough info to say if this will work but if you make R2 small (Say 2K to start with) and R1 big (say 10k to start with) it should work okay.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.