audioguru said:
I think the melody IC has a DC output voltage when it plays.
Then use a series resistor to the base of a transistor with a capacitor to ground as a filter. Its collector resistor will cause the audio amp to be in a low current Chip Disable mode at rest, then turn on when the melody plays.
Dear EricG and Audiguru,
Thanks for your suggetions. Actually I thought of those ways before but I thought they won't be the right solutions. After your comments I decided to pactice them but unfortunately the resulat was the thing I expected. I describe why:
In the first way (using a capacitor, a resistor and a diod) the capacitor discharges very quickly while I need it keep the charge about 7seconds. Although I may be editable. I practiced resistors from 1ohm to 100K.
The second way(using a transistor as Audiguru recommended). I interpreted you mean the base of the transistor is connected to the output of the melody IC (through RB) and the collector to the pin 1 of Amplifier(That is for enabling Ic). That is to say, the amplitude of output signal of the melody IC is not constant, it changes from 1.8 volts to 0. The frequency is about 0.2 ms. Please see the attached file.
Please see if me logic is true:
When the melody signal is in it's pick, the transistor should be saturated and the collector goes VCE(sat) that is close to zero. So the MC34119 will be enable, The times the signal is zero, the trasnsitor is cut off and Vc=Vcc and the amplifier is disabled. so when there is no signal the amplifier is disable too.
Now that I added a transistor(PN2222A) and 2 resistors(Rb and Rc), see the second attached file, my calculations are as below:
regarding with the datasheet: HFE(min)=35
The saturation condition: VB<VC
VC=VCE(sat)=0.3
==> VB<0.3
VB=Vi - Rb x Ib <0.3 ==> RbxIb> 1.8-0.3 ==> RbxIb>1.5
(1)
VC=VCC- Rc x Ic ==>Rc x IC=3-0.3=2.7
(2)
Ic <= Hfe x Ib =35 x Ib
(3)
from 1,2,3 ==> Rb/35Rc > 1.5/2.7 ==>
Rb>20Rc
I choosed Rc= 100 and Rb=2.2K
The result was not good. Because the amplifier amplifyes just some parts of the signal and it destroys the output.
Please assist me to solve this problem or another solution.
Thanks