Maker Pro
Maker Pro

Signal lenght detection

Yllis

May 1, 2018
7
Joined
May 1, 2018
Messages
7
I have a project which I would like to use as a switch to turn on another device. It consists of a microphone, amplifier, a led bar display driver and a transistor as a switch in the end. The idea is that the amplified microphone signal is "filtered" by the bar display driver (LM3914), which turns on and off leds depending on the signal strength. Now I have simply directed the output pin corresponding to the strongest signal to the base of a transistor to activate it when loud enough voice is detected.
This circuit works well. Now I would like to develop it so that it would only activate the transistor in the end, if the captured signal is loud enough for a certain period of time. This would eliminate triggering the circuit, if the loud voice is very short. First I planned to do this with 555 timers, but it does not to seem be that easy. Somehow I can't figure out how to do this, and ideas how to solve this are wellcome.
I am able to use PICs and arduinos, but if possible, I would like to keep this project non-programmable.
 

PETERDECO

Dec 19, 2019
239
Joined
Dec 19, 2019
Messages
239
I’m not at my workbench now so I can’t be too specific but it sounds like you need a simple R/C arrangement that will delay the transistor from turning on until the capacitor is charged. Try the output through a series resistor, an electrolytic to ground, then another series resistor to the base of the transistor. This is assuming an NPN transistor. Values will depend on your output voltage and time delay period.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,747
Joined
Nov 17, 2011
Messages
13,747
In a simulation, a single transistor doesn't give a good output signal for the transition between "pulse too short" and "pulse long enough" since the base voltage rises rather slowly. I added a second transistor and a feedback resistor to improve the behavior:
upload_2020-11-27_11-49-53.png

Attached is the simulation file for LTSPICE for you to play with. The component values and types are just examples. These need to be matched to your requirements, of course.

Regards,

Harald Kapp
 

Attachments

  • PulswidthDetector.asc
    2.1 KB · Views: 3

ratstar

Aug 20, 2018
485
Joined
Aug 20, 2018
Messages
485
I know a solution to this, short to a capacitor before you go to the base of the transistor, and itll act as a timer, only once the capacitor is filled will the transistor turn on. But youll have to put a 10k resistor around the cap to make sure it empties itself, and it'll only work with dc current, so you need a diode going to the branch, to rectify off the negative waves.
 

ratstar

Aug 20, 2018
485
Joined
Aug 20, 2018
Messages
485
@Yllis : better ignore post #4
Just my personal recommendation.
tee-hee =)

P.S. is q1 and q2 a latch? - i forgot to make my explanation one, mine would just temporarily fire the led when the sound was there, but wouldnt stay on like a switch, I actually dont know how to make a transistor only latch yet, except with an led and cad sul resistor.
 
Last edited:

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
The LM3914 LED driver used amplifies and rectifies the signal so that its outputs produce regulated current-to-ground to turn on an LED that has its anode connected to a positive voltage.
But the Pulse Width Detector circuit shown in post #3 needs a positive pulse as its input.
 

Nanren888

Nov 8, 2015
622
Joined
Nov 8, 2015
Messages
622
Seems most of the answers above are good ideas. Just as an aside, the idea of using a 555 is probably also viable. One possible approach is to have quiet times reset the timer, so if not reset in a certain amount of time, the timer times out, doing whatever it is that you wanted.
 

Yllis

May 1, 2018
7
Joined
May 1, 2018
Messages
7
Thank you for the answers.
I think I might go with the 555 timer option, as it would take less room on the board, and adjusting the time period is so much easier.

As was mentioned before the LM3914 activates the pins by grounding them. So a transistor is needed to convert this to positive voltage. This could be connected to the reset pin of the astable 555. So as long as there is no signal or it is shorter than the cycle lenght of the 555, the output pin stays in high state. I think this could work.
 

Yllis

May 1, 2018
7
Joined
May 1, 2018
Messages
7
As was mentioned before the LM3914 activates the pins by grounding them. So a transistor is needed to convert this to positive voltage. This could be connected to the reset pin of the astable 555. So as long as there is no signal or it is shorter than the cycle lenght of the 555, the output pin Is at Vcc. I think this could work.

Hmmm, no it does not work. I noticed that applying gnd to reset pin turns the output pin to gnd. And I assume that the moment the reset pin is at Vcc again, the cycle starts and output pin is at Vcc...
 
Top