Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

short pulse ---> long hi signal

Status
Not open for further replies.
Thanks gent's for your support.

I've just simulated the SCHMITT Trigger on Multisim and it seems to work.

I chenged the 10k Resistor to 470 Ohms to give it faster response and the C Vlaue is 10uF.


This gives me approx a second, What SCHMITT Trigger would you recommend and invertor?


Jason
 
Last edited:
You're welcome.

470:eek:hm: is much too low. 2 reasons:-
  1. It means you have to use a large electrolytic capacitor
  2. The resistor must be much greater than the output resistance of the ST. My recollection is that the Ro of 4000 series CMOS is about 500 :eek:hm:
If you look at the circuit I posted, I used a 100k.

I specified the ST in one of my early posts, 40106, 74C14, etc. The ST can be used as an inverter.

HOWEVER, I feel you are approaching it from the wrong angle.

You want to limit the pulse to 1.5 s because of the fire risk and that is fair enough, but the pulse does not need to be this long.

Most relays operate in less than 30 ms. I know you are not driving relays, but I expect that the momentary points switching (MPS) devices would operate in a similar time.

Do you have any data on the MPS devices? What pulse length do they need?

Say, they need at least 40 ms. Then I would arrange the PIC programme to:-
  1. operate the appropriate MPS by setting the respective i/o
  2. set and then (one or more instructions later) clear another i/o in order to trigger a 50 ms hardware timer.
  3. programme the PIC to poll the timer.
  4. when the timer expires, clear the MPS i/o thus releasing the MPS.
If 2 or more MPS must be set in quick succession, then you would set/clear each MPS i/o in turn. I really don't think a 50 ms or even a 100 ms delay in setting a MPS would be a problem in a model railway setup.

If you do it this way, all you need are 2 timers, ie. one per PIC as opposed to 50 timers to do it your way.
 
Last edited:
Thanks for your comments again ljcox,

The reason for not using the PIC for the timing is I'm running out of inturrupts at the moment, as you aware there is a limited amount of interupts you can use so I need these for other task.

I understand what your saying with having one timer per PIC but I don't think this would work for multiply switching.

i.e. Just say it is 1 second (I think it's lower then this but for a figure) I switch one on then start the timer, 900mS later I switch another one on, the timer runs out and then switches both off, therefore the 1st one was on for the required 1s, the 2nd for only 100mS???? Also as I've got High Level inturutps I may go away and do something else and not poll the timer for another second. So therefore the switch has been on for over 2 seconds??

The timer you gave me is the one I need and will cost penies, I don't have to worry about any timing issues because of the hardware, the only issue I have with the timer is; with the two 100k resistors the input pulse needs to be hi for approx 400mS. I need the input pulse to be approx 10mS, this is the reason I changed the 100k after the diode to 470 Ohms. Can you advise the correct way of acheving this??

Jason
 
Would the Hex invertor,74HC14N DIP14 2-6V be able to do the schmitt trigger and the invertor for me?

Jason
 
Last edited:
:eek:hm:
huttojb said:
The reason for not using the PIC for the timing is I'm running out of inturrupts at the moment, as you aware there is a limited amount of interupts you can use so I need these for other task.
Yes, I've understood this point since you first mentioned it.
huttojb said:
I understand what your saying with having one timer per PIC but I don't think this would work for multiply switching.

i.e. Just say it is 1 second (I think it's lower then this but for a figure) I switch one on then start the timer, 900mS later I switch another one on, the timer runs out and then switches both off, therefore the 1st one was on for the required 1s, the 2nd for only 100mS????
Yes, I've understood this point also since you first mentioned it.

But does the MPS really need 1 s to operate?
I can believe it if it is motor driven.
But if it driven by and electromagnet, then I would expect the operate time to be similar to that of a relay.

You will save significant cost if you only need a short pulse - as I said previously.
huttojb said:
Also as I've got High Level inturutps I may go away and do something else and not poll the timer for another second. So therefore the switch has been on for over 2 seconds??
Would servicing the interrupts take this long?
huttojb said:
The timer you gave me is the one I need and will cost penies, I don't have to worry about any timing issues because of the hardware, the only issue I have with the timer is; with the two 100k resistors the input pulse needs to be hi for approx 400mS. I need the input pulse to be approx 10mS, this is the reason I changed the 100k after the diode to 470 Ohms. Can you advise the correct way of acheving this??
Jason
I suggest that you use 10M for the long time so the capacitor will be in the order of 150 nF.

Thus if you make the other resistor 470:eek:hm: the charging time will be about 0.15 * (470 + 60) * 5 = 400 :mu:s.
I have allowed 60:eek:hm: for the output resistance of the PIC i/o.
 
Last edited:
huttojb said:
Would the Hex invertor,74HC14N DIP14 2-6V be able to do the schmitt trigger and the invertor for me?
Jason
The 74HC14 is very fast and much faster than you need. I would use either the 4584 or the 40106 Schmitt Triggers.

These are a Schmitt and an inverter but the 4069 is a Hex inverter and may be cheaper than the Schmitts, but you need a Schmitt for the timer function. So you could use 9 Schmitt ICs and eight 4069 ICs.

You will need 100 nF bypass capacitors across the Vdd ~ Vss pins of every second IC in order to suppress supply noise.

Do the MPS have limit switches? The points motors of full sized railways have them.
 
Thank you, the only one I can find in UK RS Components is Hex schmitt trigger,MC14584BCP, will this one acheive what I want.

Also I can't find the 4069 Hex inverter in RS so would Hex invertor,74HC14N DIP14 2-6V work.

I placed your values in Multisim and don't come out with the results you expected.

Sorry I forgot to answer the pull in time for the MPS, yeah I agree it is probably much less then 1second but that was the greatest time I would drive the MSP. I agree is maybe as little as 100mS - 300mS but this is something I haven't monitored.


Can you confirm I have done this correctly (see attachment)

This cct will be switching TIPL770 Power transistor, would this be able to drive the Base of this transistor???? Will I need to put any resistors in series??? A cct diagram would be nice!


Thanks again Len for all your help.
 

Attachments

  • Time Delay.JPG
    Time Delay.JPG
    287.6 KB · Views: 202
Last edited:
huttojb said:
Thank you, the only one I can find in UK RS Components is Hex schmitt trigger,MC14584BCP, will this one acheive what I want.
Yes, the MC14584 is the one I suggested (ie. the 4584) Motorola add a 1 in front. You could use the MC14584 ICs as inverters, but, in Australia, the 4069 is cheaper than the 4584. That's why I suggest you use 9 4584's and 8 4069's.
huttojb said:
Also I can't find the 4069 Hex inverter in RS so would Hex invertor,74HC14N DIP14 2-6V work.
As I said yesterday, the 74HC series is faster than you need.

I don't use RS as I have smaller suppliers who are cheaper and carry the ICs I need.

I've sent an email to a friend in the UK, he lives near Doncaster. I asked him where he buys his supplies. You should be able to find a smaller supplier than RS. I let you knw once I receive an answer from him.
huttojb said:
I placed your values in Multisim and don't come out with the results you expected.
I said you need 150 nF. You used 50 nF.
huttojb said:
Sorry I forgot to answer the pull in time for the MPS, yeah I agree it is probably much less then 1second but that was the greatest time I would drive the MSP. I agree is maybe as little as 100mS - 300mS but this is something I haven't monitored.
I suggest you measure it as you will save money if all you need is a pair of timers rather than 50 delay units.

You could write a simple PIC programme to generate a pulse of say 100 ms. If the MPS operates, then reduce it to say 60 ms. If that works reduce it to 20 ms. If it won't operate at 20, try 40 ms. This way you can home in on the operate time quickly, ie. keep dividing the difference by 2.
huttojb said:
Can you confirm I have done this correctly (see attachment)

This cct will be switching TIPL770 Power transistor, would this be able to drive the Base of this transistor????
You don't need a power transistor. I would use an N channel MOSFET such as the 2N7000.

huttojb said:
Will I need to put any resistors in series??? A cct diagram would be nice!
Yes you will need a series resistor. I'll draw a circuit once you resolve the MPS operate time issue.

huttojb said:
Thanks again Len for all your help.
You're welcome.
 
Len.

Thanks for the detailed response again.

firstly, I use RS cos I can get most of the stuff through work (the 1 for you and 1 for me methord) so thats the reasoning behind that.

The N channel MOSFET such as the 2N7000 is 0.2A, when I operate the MPS it pulls up to 2A, thats the reason I said I'll use the TIPL770 Power transistor (this is rated at 2.5A), please advise?

When I used your 150 nF C value it didn't work so I changed it to the 50 nF, I agree I have to monitor the timing of the MPS and operate this at this timing + a Bounce time.

I'll look into that in the next couple of days.

Thanks
 
huttojb said:
The N channel MOSFET such as the 2N7000 is 0.2A, when I operate the MPS it pulls up to 2A, thats the reason I said I'll use the TIPL770 Power transistor (this is rated at 2.5A), please advise?
I'm confused. You said in an earlier post that the MPS operates from 12 Volt and has a coil resistance of 120 :eek:hm:. That means a current of 100 mA. So whare does the 2A come from?
huttojb said:
When I used your 150 nF C value it didn't work so I changed it to the 50 nF
There must be something wrong with your simulation., The circuit will work with any capacitor value.
huttojb said:
I agree I have to monitor the timing of the MPS and operate this at this timing + a Bounce time.
Good.

I've posted some calculations of the Schmitt Trigger timer. The 4584 has a wide spread of threshold levels. The negative threshold for a 5 Volt supply is typically 1.4V with max/min of 2 V and 0.7 V. So the delay will vary from one IC to another.
 

Attachments

  • train.gif
    train.gif
    9.8 KB · Views: 163
Honestly I don't know where I got 120 Ohms from. I've just measured the coil again and it measures at 5 Ohms. So Like I worked out before 12/5 = 2.4A. (must of been thinking about something else)

When I monitor it on the power supply and put a current limit to 2A, it seems to give constant voltage supply and doesn't trip the power supply out.

So if I use a power transistor would the TIPL770 Power transistor work?

ljcox said:
There must be something wrong with your simulation., The circuit will work with any capacitor value.
QUOTE]

It works but the timeing is all wrong (well on the simulation) I will probably for the first module have to put the Capacitor on flyleads so I can change it to get the right time base.

Jason

Thanks again for all your time and response.
 
Last edited:
if only one transistor needs to be active at a time you could use the PIC and a few multiplexers to incorporate only one timing circuit. Or you could simply do the timing in the PIC firmware itself.

If several of these transistors are supposed to be active at the same time, but you know certain groupings of transistors will only have 1 on at a time, arrange those into groupings on a multiplexer with 1 timer per mux. That should help reduce the number of timers.
 
Thanks Ambient.

As peviously discussed Relays will be running at the same time.

Thanks for your advise

Jason
 
huttojb said:
Honestly I don't know where I got 120 Ohms from. I've just measured the coil again and it measures at 5 Ohms. So Like I worked out before 12/5 = 2.4A. (must of been thinking about something else)

When I monitor it on the power supply and put a current limit to 2A, it seems to give constant voltage supply and doesn't trip the power supply out.

So if I use a power transistor would the TIPL770 Power transistor work?
No. If you look at the data sheet it has a maximum Vce sat of 2.5V at Ic = 2.5 A with a base current of 0.5A.

So you would need another transistor to drive the base.

I suggest you look for an N channel MOSFET that can handle 2.5A.
huttojb said:
ljcox said:
There must be something wrong with your simulation., The circuit will work with any capacitor value.
It works but the timeing is all wrong (well on the simulation) I will probably for the first module have to put the Capacitor on flyleads so I can change it to get the right time base.
Did you see the attachment to my last post?

That shows the spread of timing with 150 nF and 10 M:eek:hm:.

And when I multipled the result of your simulation with 50 nF by 3 it was close to 1.5s.
 
Here is another option for you to consider.

C1 is charged via the resistor when the power is turned on.

The PIC applies a pulse to turn Q1 on long enough to operate R1.

The capacitor charge holds R1 operated briefly after the PIC pulse is removed.

C1 re-charges when R1 releases.

If you want to proceed with this option, I can calculate the value of C1 if you tell me the coil resistance and release current of which ever relay you choose.
 

Attachments

  • relay option.gif
    relay option.gif
    12.5 KB · Views: 176
Last edited:
Len

Good design and I can sort of follow what you mean, I think the cost of the relay may make this as a dis-advantage. The first design you come up with works and the cost isn't that bad.

Just a couple of questions, can you look at http://rswww.com and see if you can find me a transistor or MOSFET I can use?? I'm struggerling trying to find them

Also I can't find a 150nF Capacitor on the RS website?

And a question about using MOSFET's, I've got 1000's of STB100NF04L-1(035Y)N-CHANNEL 40V - 0.0036 W - 100A I2PAK
STripFET™ II POWER MOSFET, Obviously these will be rated very high for this application, but they free??? Doesn't there have to be biased at around 17V or something like that????

If I can use these FET's how would I bias them??

Jason
 
Jason,
Are you still intending to measure the operate times of a few MPSs?

You appear to be going full speed ahead with the hardware delay option.

huttojb said:
Len

Good design and I can sort of follow what you mean, I think the cost of the relay may make this as a dis-advantage. The first design you come up with works and the cost isn't that bad.
Yes, I thought the size and cost of the relays might be an issue, but I like to give people options so they can weigh them up and choose.

One advantage of the relay option is that the PIC only has to generate a pulse long enough to reliably operate the relays which is normally <30 ms.
So you would not have any overlap issues, ie. the PIC could queue the MPS operate requests (ie. if 2 or more happened by chance to occur within 30 ms)and operate the relays in turn.
huttojb said:
Just a couple of questions, can you look at http://rswww.com and see if you can find me a transistor or MOSFET I can use?? I'm struggerling trying to find them
I did not bother, the STB100NFO4-1 should be adequate, particularily if they are free.
huttojb said:
Also I can't find a 150nF Capacitor on the RS website?
Use 220 nF and a 6M8 resistor. These give about the same time constant.

Besides, if you look at the calculations I posted, you will see that the Schmitt Trigger ICs have a wide spread of threshold voltage so you will have to choose R and/or C in order to set the delay at about 1.5s. If you don't understand this point, let me know and I'll explain in more detail. It is a statistical issue.
huttojb said:
And a question about using MOSFET's, I've got 1000's of STB100NF04L-1(035Y)N-CHANNEL 40V - 0.0036 W - 100A I2PAK
STripFET™ II POWER MOSFET, Obviously these will be rated very high for this application, but they free??? Doesn't there have to be biased at around 17V or something like that????
You are confusing the max gate voltage with the gate voltage necessary to turn the FET on. If you study the data sheet, you will see a graph showing that for a Vgs of 2.5 Volt, the Id is about 40 Amp (from memory).

So if you drive the gate from the output of the inverter, (ie. 5 Volt) it will be more than adequate for your application.
huttojb said:
If I can use these FET's how would I bias them??
See comment above.
 
Last edited:
Len

Thank you for all your support,

Are you still intending to measure the operate times of a few MPSs?

Yes I am. The only problem is I have to build a cct for this, so I'm planning to build one PCB with the Schmitt Trigger with a time delay of around 1 second, then I will improve on this with the following 49 PCB's. This way I can make sure the Schmitt Trigger idea works and then test the closure time of the MPS.

Use 220 nF and a 6M8 resistor. These give about the same time constant.

Besides, if you look at the calculations I posted, you will see that the Schmitt Trigger ICs have a wide spread of threshold voltage so you will have to choose R and/or C in order to set the delay at about 1.5s. If you don't understand this point, let me know and I'll explain in more detail. It is a statistical issue.

I've looked at the spreed-sheet and understand the Min and Max value's (and your right, there is a lot spread. I'm gonna attempt to get approx 1 second time-delay with the first PCB and then attempt to improve from there.

You are confusing the max gate voltage with the gate voltage necessary to turn the FET on. If you study the data sheet, you will see a graph showing that for a Vgs of 2.5 Volt, the Id is about 40 Amp (from memory).

So if you drive the gate from the output of the inverter, (ie. 5 Volt) it will be more than adequate for your application.

So If I put the Source to ground, the drain to the low side of the MPS and then drive the gate directly from the invertor, this should work????? I've attempted this before and got into all sorts trouble. I'll Try again.

Jason
 
huttojb said:
So If I put the Source to ground, the drain to the low side of the MPS and then drive the gate directly from the invertor, this should work????? I've attempted this before and got into all sorts trouble. I'll Try again.

Jason
Yes, but don't neglect putting a diode across the MPS coil to protect the MOSFET.

I would use a PIC to measure the MPS operate time - as I wrote in an earlier post. Do you have a PIC tester? This would make it easy.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top