Imitating button press with transistor on DFplayer

Thread Starter

Verdruss

Joined Jan 30, 2026
13
Ok, I tried a little bit, put 10k for R1 and again played with different values for R2. With the artificial pulse of 0.5 sec it works with 10k Ohm, doesn't work with 1k Ohm, and with two 4.7k Ohms in series it sometimes works so there seems to be some sense of edgecase. 22k Ohm also works.

What I find weird is that the pulse generated by the capacitor seems to be too long (why else would i need the manufactured pulse by the arduino to make it work) but lowering R2 makes it stop working and increasing it seems fine.
 

panic mode

Joined Oct 10, 2011
4,995
when control signal is low, Q1 is off, so C1 gets charged through R2 and base of Q2. this is slow charging due R2 value.
when control becomes 5V, Q1 shorts left side of C1 to GND and C1 discharges quickly since there is no resistor involved..

while C1 is charging, Q2 is on so input pin is low (current flows from input pin through Q2 to GND).
otherwise Q2 is off and input pin is high (current cannot flow from input pin through Q2, so voltage at that pin rises).

the waveform of control and output are technically the same. the only major differences are:
1. voltage at Q2 is independent of trigger circuit supply (it is 5V but may also be 12V and output would still be 3.3V max)
2. R2*C1 time constant is used not to create pulse of fixed duration but stretch the output pulse low state (shorten output pulse high state). if you are driving "control" input by hand, you will not even notice the difference. but if you are driving it using some circuit with precise pulse duration, you can see the different length of output pulse..

you have turned this into an XY problem. instead of saying "this (explained) is what i want to achieve using these parts, please help" you never show how you are connecting things, which mode you want to use etc. that player can be controlled in different ways. digital mode controls use on/off pulses (level does not change). analog controls use pulses where current through sereis resistor changes. you do not know or did not state which control mode you want to use, you stubbornly keep on pushing for digital control while complaining that "it works if i add resistor XXX value".

i am not sure about operation of circuit in #24. the way i see it, since capacitively coupled signal should pass without any shape change. both flanks would match the trigger. to create pulse of defined length, irrespective of control pulse length, use monostable multivibrator.

https://www.electronics-tutorials.ws/waveforms/monostable.html
 

sghioto

Joined Dec 31, 2017
8,634
i am not sure about operation of circuit in #24
Post 24 is a monostable.
When the control signal is at 5 volts, pin7 an open collector output is OFF.
When the control signal is at 0 volts, C1 pulls the reset pin Low which pulls pin7 Low to trigger the DF mini.
Pin7 stays Low until the charge on C1 rises to appx 0.8volts.
 

Thread Starter

Verdruss

Joined Jan 30, 2026
13
Version #2:
This provides a definitive ON-OFF response.
Pulse duration controlled by C1 and R1.
Appx 0.5 sec with values listed.

View attachment 363654
Yeah, I had the feeling that I would probably need a 555 and then be done with the whole problem... I'll try that after soem more tinkering with your first version. Thanks a lot!

2. R2*C1 time constant is used not to create pulse of fixed duration but stretch the output pulse low state (shorten output pulse high state). if you are driving "control" input by hand, you will not even notice the difference. but if you are driving it using some circuit with precise pulse duration, you can see the different length of output pulse..
Hm, but then I misunderstand something. I wanted to control the length of the output going low with the capacitor and the resistor. And ( as far as I understand it) Q2 is only turned on while the capacitor is charging so by manipulating those values It should be possible to control the timing there right? In the end the control wont pulse, I just want the change from 5V to 0V trigger a short pulse on the pin of the player.

you have turned this into an XY problem. instead of saying "this (explained) is what i want to achieve using these parts, please help" you never show how you are connecting things, which mode you want to use etc. that player can be controlled in different ways. digital mode controls use on/off pulses (level does not change). analog controls use pulses where current through sereis resistor changes. you do not know or did not state which control mode you want to use, you stubbornly keep on pushing for digital control while complaining that "it works if i add resistor XXX value".
I'm sorry that your frustrated but those are the things I stated in the name of the thread and my first post (that I wanted to use the the I/O mode of the player, using the 33k resistor setting etc.) From then I just tried the Version 1 that sghioto proposed. And trying different resistor values is just my way of finding out why it doesn't work as expected. Just some troubleshooting.
 

panic mode

Joined Oct 10, 2011
4,995
Post 24 is a monostable.
When the control signal is at 5 volts, pin7 an open collector output is OFF.
When the control signal is at 0 volts, C1 pulls the reset pin Low which pulls pin7 Low to trigger the DF mini.
Pin7 stays Low until the charge on C1 rises to appx 0.8volts.
does that work if control signal is shorter than RC configured time constant? not familiar with this configuration so i would expect that early rising of control to 5V would switch of the output.
 

sghioto

Joined Dec 31, 2017
8,634
i would expect that early rising of control to 5V would switch of the output.
That is correct.
I would think that the pulse duration to activate the DF would be less then 250msec.
That can be verify by using a push button switch.
Asking Verdruss how long the control signal stays at zero volts when activated.
 
Top