# Circuit help

Discussion in 'The Projects Forum' started by brian2k, Nov 17, 2014.

1. ### brian2k Thread Starter New Member

Nov 17, 2014
1
0
I am using the serial port to drive a transistor as a switch - see attached.

The serial signals every 3.5 secs and works as needed. When something odd happens instead of 3.5s - the serial signals in 1.5 secs from last trigger instead of 3.5secs.

Anyone know how I can drive another transistor as a switch if the timing is 1.5sec instead of the normal 3.5secs? So if timing is around 1.5sec since last signal DTS signal fire both transistors but if 3.5sec then only fire the one.

I want to use the same serial DTS line but trigger a second transistor if timing between last is 1.5secs but not fire when it is 3.5secs.

Thanks

2. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,518
515
Well, the time detection sounds like a job for a timer which, to my mind, brings up microcontroller. Which means that you put microcontroller (uC) between DTS pin/line and the two transistors.

The thing is... What is the output of the Serial Port? 15 volts? A regular uC usually operates at 5 volts so you will need some kind of circuit to reduce 15 volts from serial port to 5 volts that uC can safely accept. Maybe a voltage divider to reduce the voltage and add a buffer to isolate serial port from the uC. The buffer is for just in case, it is easy to build and not expansive, so I added it, but you can skip it if you got a spare old pc to experiment with.

3. ### ScottWang Moderator

Aug 23, 2012
4,934
777
If you mean fire is active or turn on the transistor, then I just think maybe you can using the software to do the modulation function as the 5Khz with 1.5S and the 1Khz with 3.5S, and the before you input the signals to the transistor then you can using RC band width filter to filtering the 5Khz for 1.5S and filtering the 1Khz for 3.5S.

4. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066
Show us a timing diagram of the two different pulse trains.

A re-triggerable one-shot comes to mind. If the period of the one shot is about 2sec, and it is triggered on every pulse, then if the pulses are 1.5s apart, it will not time out, and still be triggered when the next pulse comes.

If the pulses are 3.5s apart, then the one shot will time out between pulses, and not be triggered when the next pulse comes...

Jul 18, 2013
10,865
2,528
The 2n7000 was designed for this type of application but if this is a DTS signal from a RS232 port the mark/space voltage can be from +3 +25 to -3 -25.
A MAX232 ic is used for interfacing these when used with a PIC etc.
Max.

6. ### djsfantasi AAC Fanatic!

Apr 11, 2010
2,914
881
MikeML - you're brilliant. I've been playing around with several configurations of retriggerable one shots and some logic, but your approach is simpler. It also produces consistent results when there are a series of 1.5s periods, something the TS didn't really make clear as to how he wanted it to run...

Still not clear on how it works, though. There are two outputs desired. One tracks the DTS pulses. The second output goes high (drives a second transistor circuit) only on a 1.5s period pulse.

I've sketched out a little diagram. Can you explain how the 2nd output is obtained with your scheme.