How to create a Op amp based Ramp?

Thread Starter

picstudent

Joined Feb 3, 2009
91
Thanks a lot for the concern. I need the same thing you pointed out.But I will repeat it once again in case something is not clear.

Here actually we are checking the short circuit in a electrolysis probe. Consider the case where probe is accidentally shorted and is remaining in that position with nobody noticing it. So at the instant the probe shorts monostable fires and MOSFET OFF. OK ? Now everything safe. (I hope so!) After the time out, say 10seconds MOSFET will ON again. But as the short is still remaining the Monostable should fire within milliseconds to OFF the MOSFET. This 'trying' will continue as long as this situation remains in hardware.(In software I will work out some methods to switch off after some time. But it may not respond in a timely manner, but MOSFET should be saved.
The circuits I tried and the one you provided is not meant for this effect. All needs what we call recovery time which is not acceptable as it is. Some workaround is needed. But how?
Hope I am clear.
Thanks again
 

Ron H

Joined Apr 14, 2005
7,063
I have a circuit that works like that, at least in simulation. It is a modification of my previous op amp oneshot.
The zener prevents the capacitor feedback voltage from breaking down the op amp input, a problem I had previously overlooked.
The transistor feedback holds off the DC input to the oneshot for a few milliseconds after it times out, allowing the oneshot to recover so it can have a new timing cycle that is almost as long as the first one. The oneshot will continue to retrigger for as long as the short exists. The MOSFET will be on for the few milliseconds it takes the oneshot to recover.
 

Attachments

Last edited:

Thread Starter

picstudent

Joined Feb 3, 2009
91
Thanks. it is ok in my proteus simulation also. i am proceeding with hardware work.
One or two things I have noticed.
1. The ON time of MOSFET is around 4-5 mS in my simulation. But I think that depends on short circuit current I am simulating also.
2. Actually I need to cut off the system at around 500ma. That I plan to implement in software using ADC result of current. I feel it is ok there.
But this short circuit protection behaves starngely when the current exceeds predefined levels just a little bit. ex. I hardwired the system to cut of at 500ma. So I used a divider for the input from current amplifier. 2.048 is reference. So if I need to cut of system at 2.5 Volts( 500 ma * .5Ohms = .25V .amplified by 10 gives 2.5 volts for 500ma.) I have to scale down 2.5V to 2.048V.right?.
In this situation I simulated for say 600mA which will give the voltage from curent amplifer somewhere below 3V. At this stage the output goes high and low with a period of around 10 seconds. But if we simulate a short circuit say current more than 1.5 amps ,it is perfectly ok. When the input voltage is just above the refernce ,that charging discharging mechanism gives some toggling.
Butt hat is not short circuit situation.So it is ok for the intended purpose. Do you see any tricks for this problem?
But this is managable I think. So wont trouble you again.
Thanks a lot again. I am out of deadlock now.
Will update later
 

Ron H

Joined Apr 14, 2005
7,063
The changes below should make the circuit independent of the amount of over-current. I replaced the recovery diode with a small MOSFET (2N7000 or 2N7002), I changed the reference to 2.5V, and the timing resistor to 8.2Meg to get the timeout closer to 10 seconds.
 

Attachments

Thread Starter

picstudent

Joined Feb 3, 2009
91
Thanks a lot. Great help.

One or two clarifications from academic point of view!

1. You changed the reference to 2.5V. I have no problem in my circuit for that. May I know the reason behind that change? Is to avoid a divider which I mentioned to scale down 2.5 volts to 2.048V or any constraints imposed by the introduction of that MOSFET?
2.Is there any parameter specifically important for the opamp to be used? To keep all channels completely isolated I plan to use a single package opamp for this? other part of circuit used low offset opamp OP07. 3 Nos. If I use a single opamp package for this I can keep all channels physically isolated in PCB.
The equipement I am trying to reverse engineer (?) frequently damages from probe shorting. So that is why I am very keen on that aspect.

I will post the circuit after simulation.
Thanks a lot. Hope one day I will get a chance to offer something you look for?
 

Thread Starter

picstudent

Joined Feb 3, 2009
91
update.

The toggling effect in proximity of the threshold current is over. Now it gives the usual behavior there also.
But in that area the MOSFET on period has substantially increased 100 to 200 milliseconds . That will be not be safe for the MOSFET.(?)
Q2 takes more delay to ON. Is it correct?
Should we introduce another comparator and provide a fixed 5 volts to current input of this opamp, so that this circuit will get full voltage irrespective of the current level. I feel it will be a overkill! There may be some simple method.

edit:

I don't think that is the cause. Something else is the reason for that increased on time.
 
Last edited:

Thread Starter

picstudent

Joined Feb 3, 2009
91
update:
If I use a op amp comparator to generate a +5V from the current amplifier output and fed to this circuit it works as intended. about 5ms on time and 10seconds off time.
The output of the comparator should not swing to minus. if so it will 'oscillate'. So I used a op-amp with single supply.
But this set up needs an extra opamp.

This is what I understood from Proteus simulation.
Thanks
 

Thread Starter

picstudent

Joined Feb 3, 2009
91

This is how I 'solved' the issue. Introduced a op amp to provide a voltage around 5V to current sense input of monoshot.

Dont know weather simpler method exists. Please coment.

R19 needs more than 3.5 volts to keep on time low. So shows proteus.Could we overcome that by making any other arrangements?

This seem to be working in simulation. But I feel there exists a cheap method.

Thanks
 

Attachments

Last edited:

Ron H

Joined Apr 14, 2005
7,063
That looks OK. I think you could use the same op amp everywhere. Have you tried that?
I tried some other ideas. One of them is below. You might want to try a simulation.
I changed the MOSFET type because of "singular matrix" problems with the 2N7002.
I changed the reference to 2.5V for two reasons. One is, as you surmised, to avoid the need to attenuate the voltage from the amplifier. The other is because I got rid of the 10k*10uF RC network between the 2.048V reference and the timing network on the oneshot. I got rid of the 10k*10uF in order to make the oneshot timing less dependent on short circuit current level, but that increased the current into the reference, which I believe is your A/D reference, and should not be hit with big current transients,
 

Attachments

Thread Starter

picstudent

Joined Feb 3, 2009
91
Thanks a lot again. Will try on my circuit simulation
Trying the same op amp means using OP07 for all stages? I was thinking of using two opamp package to save space. But if I need only one opamp for s/C protection I will use all OP07.
Ok about the need to switch to 2.5V reference.

But the problem is that logic level mosfet BSS123 is not available here.I have to purchase online.
Can arrange if needed.

can we manage with 2N7002 or this change really must?
Will see in simulation.

Thanks again.
 

Thread Starter

picstudent

Joined Feb 3, 2009
91
You might want to try a simulation.
Wonderful design!. it works more precisely than my previous double op amp version in Proteus simulation. I tried by using OP07 opamp there, as you suggested since all other stages are OP07 based. But the simulation fails to start. I think the problem with initial conditions or something, not sure. I tried other JFET, wide common mode voltage types, and it starts. i am not sure weather this is a issue in simulation only or will refelect in hardware. Anyway I switched to TL084 so that 4 channels can club together in proximity in PCB. Any way I am using a 4 in 1 opto . So complete channel physical seperation is not possible anyway.

For the 2.5Volt mechanism I plan to use a single Lm336 and supply to all channels. Do you see any problem in such a startegy? I cant get an idea of the series resistor in such a case. The current swings will be too wide?

Thanks for the simple circuit for my purpose.
 

Attachments

Ron H

Joined Apr 14, 2005
7,063
Wonderful design!. it works more precisely than my previous double op amp version in Proteus simulation. I tried by using OP07 opamp there, as you suggested since all other stages are OP07 based. But the simulation fails to start. I think the problem with initial conditions or something, not sure. I tried other JFET, wide common mode voltage types, and it starts. i am not sure weather this is a issue in simulation only or will refelect in hardware. Anyway I switched to TL084 so that 4 channels can club together in proximity in PCB. Any way I am using a 4 in 1 opto . So complete channel physical seperation is not possible anyway.

For the 2.5Volt mechanism I plan to use a single Lm336 and supply to all channels. Do you see any problem in such a startegy? I cant get an idea of the series resistor in such a case. The current swings will be too wide?

Thanks for the simple circuit for my purpose.
What series resistor are you referring to?
 

Thread Starter

picstudent

Joined Feb 3, 2009
91
What series resistor are you referring to?
Resistor R6 in series with LM336 (R24 in my schematics) to derive 2.5V reference.
You have put a 10k there. But when all the 12 channel reference is going to be fed from this source, we need to lower the value of this resistor to compensate for the sink (if any) from all the op amp reference inputs.right? The charging / discharging mechanism of mono shot draws from this line?


Thank you
 

Ron H

Joined Apr 14, 2005
7,063
Resistor R6 in series with LM336 (R24 in my schematics) to derive 2.5V reference.
You have put a 10k there. But when all the 12 channel reference is going to be fed from this source, we need to lower the value of this resistor to compensate for the sink (if any) from all the op amp reference inputs.right? The charging / discharging mechanism of mono shot draws from this line?


Thank you
I think that if you put 10 ohms between the LM336 and each 10uF cap, it eliminate this worry, but I doubt that it's a real problem. What are the odds that all (or even 2) oneshots will trigger at exactly the same time?

You can make the bias resistor as low as 1k if you need to, but I don't think you will. The current from the oneshot is transient. There is no substantial DC component.
 

Thread Starter

picstudent

Joined Feb 3, 2009
91
I think that if you put 10 ohms between the LM336 and each 10uF cap, it eliminate this worry, but I doubt that it's a real problem. What are the odds that all (or even 2) oneshots will trigger at exactly the same time?
I think my understanding about the circuit working is wrong. Let me ask something.
The Lm336 and bias resistor is just a regulator only like a Zener diode. (Right?)
It generates 2.5V. So what is wrong if two one shots triggered simultaneously?
Or is that bias resistor has any role in charging discharging time? In simulator I removed the 336 and bias resistor altogether and supplied a +2.5V source to drain of MOSFET. Then also it is working. Did I missed anything?
You can make the bias resistor as low as 1k if you need to, but I don't think you will. The current from the oneshot is transient. There is no substantial DC component.
Trying to understand that.

Thanks
 

Ron H

Joined Apr 14, 2005
7,063
I started to write a big treatise here about this LM336 issue, but the bottom line is, I don't have a model of it that I trust. I think you have to build the circuit and test it.
 
Top