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.

Voltage Clamp

Status
Not open for further replies.
ThirtyTwo said:
could the op-amp be zapped by too high an amperage? The 12v on my car is at 6AMPS. When i was testing it on a computer power supply everything worked fine, but the 12v amps were really low
No. The circuit only draws as much current as it needs. Your car battery, unless you have a fuse in the circuit (which you should add, if you don't already have one) can supply much more than 6 amps - as much as a hundred amps or more under heavy load, like starting.
 
ok I didnt really want to order those parts and have to wait another couple days so i started looking for another 12v source and i found a regulated 12v off the computer. I hooked up to it and the op-amp isnt burning up anymore.

i replaced the op-amp but im still getting about .02v higher on the output than the input, its not much but i think its making my motor run crappy :(

do you think i could put a big resistor between output and ground or is there a better way to do it?

thx
 
Ok im going to make another one in the future that is better, the one i made works fine but it has about 8 resistors adding up to around 90k of resistance from output to ground to drop the extra .02 volts so im going to figure out the exact resistance i need and use that in the next one. And i want to add what you said to make it more durable to voltage spikes.

but when i put the stuff you said in my circuit maker simulator it didnt work???

i didnt know if the capacitors were supposed to be in series or parallel, but when i tried with them in series it wouldnt even simulate and in parallel i get -226.7mv(note: in the simulator both triangles must be supplied with power and ground)

i couldnt define the capacitors as being electrolytic or ceramic, maybe that has something to do with it???
 

Attachments

  • voltclamp.jpg
    voltclamp.jpg
    25.3 KB · Views: 825
woops sorry, i flipped the diode around and it works now :)

so that shematic with the diode flipped is what you meant right?


lol also maybe you guys could help me with this, id like to take that circuit and add another trimmer and have that trimmer set a safety point so that if my boost spikes too high it will cut my engine and save it from blowing up. so input = output until voltage at trimmer1 is reached and then it clamps it at trimmer1's voltage but if input reaches voltage at trimmer2 it either clamps it at trimmer2's voltage or just lets input = output again.
sry i keep going on and on with this thread but i dont know much about electronics :(
 
Yes, flip the zener. And change the connection on the input protection diode as shown below.
To protect your engine from excessive boost, just limit the voltage on the end of your boost set pot to the appropriate level. How are you deriving that voltage (+5V?) now?
 

Attachments

  • voltclamp.gif
    voltclamp.gif
    15 KB · Views: 836
oh i forgot, in the simulation i just put a set voltage to pin5 to make it easier to change; i have a trimmer between a +5v and pin5 on my actual board to adjust clamping voltage.

but for the boost protection, this voltage clamp actually makes my motor quite vaulnerable to overboost. the computer gets a voltage from the boost sensor and if it gets to like 4.3v(11 psi) it shuts my engine down, so im putting this clamp in to stop the voltage at 4.25 or so, that way the computer doesnt see past 10.5psi of boost and it wont shut my motor down. so even if im getting 20psi(4.95v) of boost, the computer only sees 10.5psi(4.25v)

the problem is that 20psi will destroy my motor so id like to make the clamp have another trimmer to set to a safety point where it will stop clamping and let "input = output" or "input = safety trimmer's voltage" which will let the computer see the real boost and shutdown the motor.
 
I think the schematic below will do what you want. The transfer function is posted below the schematic. The LM324 is identical to LM358, except it has 4 amplifiers instead of 2.
 

Attachments

  • boost_clamp_wave.gif
    boost_clamp_wave.gif
    6.8 KB · Views: 662
  • boost_clamp.gif
    boost_clamp.gif
    5.7 KB · Views: 1,172
wow thats awesome, thank you alot. now on to building it lol

ill post back on how things go with it, but it works awesome in my sim

thx again, it does exactly what i need it too :)
 
Sebi said:
LM358 is a dual op-amp, so the supply pin 4 and 8.

I wired it just like the attached image (post #4). I know this is from about a year ago or more but I was wondering if someone can chime in. My supply is only 5v but everything else is hooked up right. My input is 5v as well. The problem is if i clamp it at 0v i get an output of 1.6v and if I clamp it at 5v it only goes to like 3.something, not sure what i am doing wrong. I see in later posts to maybe flip a diode.
 
RedCarzRFaster said:
I wired it just like the attached image (post #4). I know this is from about a year ago or more but I was wondering if someone can chime in. My supply is only 5v but everything else is hooked up right. My input is 5v as well. The problem is if i clamp it at 0v i get an output of 1.6v and if I clamp it at 5v it only goes to like 3.something, not sure what i am doing wrong. I see in later posts to maybe flip a diode.

Hi, sorry for my large posts in the other topic, I didn't realise it was specifically for 'boost', the pure analogue (opamps) approch seems to be to best route.

As for your circuit, it is designed to be used with a +12V supply. So powering it by 5v (same as the Vref, your input form the sensor) will mean it won't funciton properly. Also, opamps have a 'maximum output voltage' rating. This means that with a 5v supply, the output cannot swing too close to the power voltage. For the LF358, the datasheet, it says with a supply of +/- 15V (thats dual power supply) the output can swing 13v above and below 0v. So, it can't output the same range of voltage as its power supply. Basically, you're powering it by 5v, so, no matter how the circuit is configured, it won't be able to output higher than about 4V, or lower than 1V. When its powered by 12V it is capable of putting out +11v and 1V (with reference the 'GND'/0V)
It uses the 5v supply for the sensor as its voltage reference, and the 12V supply as its power.

I'm not sure if you know about 'dual rail' supplies (don't want to be patronising here).

The link provided in this topic, http://www.teamfc3s.org/info/articles/fcd/diy_fcd.htm, discusses it, but it doesn't actually require it. Its a bit hard to explain :/

Ultimately, if you wish to use that circuit, it must be powered by +12V from your battery. The Vref should be connected to the sensors power supply (+5V) and Gnd, is, well, GND, your chasis (preferably where the sensor connects). 4 connections in total.

If you must have it powered by 5V, then things could get tricky, as few opamps can output that close to the power supply (0.3v - 4.7). Although you did mention you wanted it clamped at 4.3, leaving 0.7 between output and power....*might* be possible. I'll wait for your repsonse before I post anything else, sorry I could be of much help this time,

Blueteeth.
 
Blueteeth said:
Hi, sorry for my large posts in the other topic, I didn't realise it was specifically for 'boost', the pure analogue (opamps) approch seems to be to best route.

As for your circuit, it is designed to be used with a +12V supply. So powering it by 5v (same as the Vref, your input form the sensor) will mean it won't funciton properly. Also, opamps have a 'maximum output voltage' rating. This means that with a 5v supply, the output cannot swing too close to the power voltage. For the LF358, the datasheet, it says with a supply of +/- 15V (thats dual power supply) the output can swing 13v above and below 0v. So, it can't output the same range of voltage as its power supply. Basically, you're powering it by 5v, so, no matter how the circuit is configured, it won't be able to output higher than about 4V, or lower than 1V. When its powered by 12V it is capable of putting out +11v and 1V (with reference the 'GND'/0V)
It uses the 5v supply for the sensor as its voltage reference, and the 12V supply as its power.

I'm not sure if you know about 'dual rail' supplies (don't want to be patronising here).

The link provided in this topic, http://www.teamfc3s.org/info/articles/fcd/diy_fcd.htm, discusses it, but it doesn't actually require it. Its a bit hard to explain :/

Ultimately, if you wish to use that circuit, it must be powered by +12V from your battery. The Vref should be connected to the sensors power supply (+5V) and Gnd, is, well, GND, your chasis (preferably where the sensor connects). 4 connections in total.

If you must have it powered by 5V, then things could get tricky, as few opamps can output that close to the power supply (0.3v - 4.7). Although you did mention you wanted it clamped at 4.3, leaving 0.7 between output and power....*might* be possible. I'll wait for your repsonse before I post anything else, sorry I could be of much help this time,

Blueteeth.


Yes thanks. I hooked it up to a 9v supply now and the device can now out put 1.6-5v instead of 1.6-3.5v. My problem is getting it to go below 1.6v? I saw in a previos post to use a 10k ohm resistor at the output or something and well it does nothing. Thanks for all your input and you long posts, they are very helpful.

Edit: By 1.6-5v (and 1.6-3.5v before I changed the supply from 5v to 9v) I am not altering the input but rather the "clamped" voltage off the potentiometer. Maybe that is my problem and I should put a potentiometer at the input as well and set the clamp to 5v but turn the input down all the way.
 
Last edited:
Hi again,

How are you testing this? Have you got a pot (voltage divider) connected to the input and the +5v supply (one lug 0v, one 5v, and the wiper as the input), so you can vary the input voltage form 0-5V just by turning it?

quote: Maybe that is my problem and I should put a potentiometer at the input as well and set the clamp to 5v but turn the input down all the way.

Yep. Although the pot at the input would 'simulate' the output of your sensor. So you set the clamp votlage pot, and slowly turn the input from 0v to 5v, and it 'should' hold the output at a certain threshold. if the input is unconnected, god knows what it will do...probably just pick up noise, so the voltage could be anything.

I think that the reason your circuit refuses to put out less than 1.6V is because of the opamp itself. As I said, opamps have an output voltage swing less than the supply voltage, it will never output 0V or Vcc (your power supply voltage), I guess, for your opamp, the lowest outptut with respect to ground is 1.6V.

http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/a741p2.html
for a different opamp, but has useful info

The LF358 apparently allows the output voltage to be very close to the negative supply (GND in this case) are you using this one? Theoretically, it should allow it to drop below 1v.

From that 'DIY FCD' page, he does explain it rather well, and I've been thinking about that circuit, but my analogue knowledge is not what it should be. All it seems to be is a voltage follower (a buffer) with a low pass filter on the input to attenuate noise pickup (but not eliminate), and a comparator. The comparator uses a diode in reverse bias so that the output swtiches from one input, to the other. Ie: from your signal, to your reference, set by the pot. (bit similar to my idea, but simpler, and rather clever :D)

If your app (your sensor) is identical to the one in the page mentioned above, then I don't think you need to worry, as the graph he has shows the lowest output of the sensor to be in the order of 2v.

Let me know how you get on.

Blueteeth.
 
Blueteeth said:
Hi again,

How are you testing this? Have you got a pot (voltage divider) connected to the input and the +5v supply (one lug 0v, one 5v, and the wiper as the input), so you can vary the input voltage form 0-5V just by turning it?

quote: Maybe that is my problem and I should put a potentiometer at the input as well and set the clamp to 5v but turn the input down all the way.

Yep. Although the pot at the input would 'simulate' the output of your sensor. So you set the clamp votlage pot, and slowly turn the input from 0v to 5v, and it 'should' hold the output at a certain threshold. if the input is unconnected, god knows what it will do...probably just pick up noise, so the voltage could be anything.

I think that the reason your circuit refuses to put out less than 1.6V is because of the opamp itself. As I said, opamps have an output voltage swing less than the supply voltage, it will never output 0V or Vcc (your power supply voltage), I guess, for your opamp, the lowest outptut with respect to ground is 1.6V.

http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/a741p2.html
for a different opamp, but has useful info

The LF358 apparently allows the output voltage to be very close to the negative supply (GND in this case) are you using this one? Theoretically, it should allow it to drop below 1v.

From that 'DIY FCD' page, he does explain it rather well, and I've been thinking about that circuit, but my analogue knowledge is not what it should be. All it seems to be is a voltage follower (a buffer) with a low pass filter on the input to attenuate noise pickup (but not eliminate), and a comparator. The comparator uses a diode in reverse bias so that the output swtiches from one input, to the other. Ie: from your signal, to your reference, set by the pot. (bit similar to my idea, but simpler, and rather clever :D)

If your app (your sensor) is identical to the one in the page mentioned above, then I don't think you need to worry, as the graph he has shows the lowest output of the sensor to be in the order of 2v.

Let me know how you get on.

Blueteeth.

Yes since the LM358 that I am using is 1.5v off I think this is my issue. At the input it is always 5v, I am only changing the clamp voltage when I refer to any voltage change. I set the clamp to 0v but the output is still 1.6v which I think is my problem since it will never be clamped this low and that would be the 1.5v offset from ground. I think I need to set it to 0v so the output will be 1.6v but then turn the input to almost 0v as well opposed to the 5v it is constantly set at. Since off the first amp the output will be 5v that when I turn the pot to 0v it tries to get it to ground but it is still a 1.5v offset. I should be changing the input voltage as well. Thanks for the input I will try this out later on when I get home from work.
 
Hi, forgot to add something.

The graph on the page only shows voltages from 2-5V from the sensor, with 'pressure' on the X-axis. However, the circuit doesn't need to do anything (except pass the signal through) until the clamping voltage......which he suggests you set between 3 and 4v.

I've just prototyped it, with a TL072, but it'll do. And theres strange behavoir when the input drops below 1.5V The output shoots straight to 4.9V regardless of the clamping voltage. Also, if the clamping voltage is set below 3V, it doesn't clamp.....the output will go straight past it to 3.5V BUT...it still lowers the gain of the opamp somehow....that is, with an input of say 4V and a clamp voltage of 2.6V the output is 3.2V. If it was 'perfect' that would be 2.6V obviously.

Now, thats obviously not great clamping, it lets it go past the threshold. However, for the range he stated it needs to operate on, given the sensor signals range (2-4V apparently) and the threshold which should be set between 3 and 4V, it works. Surprisingly well.

I'm unsure why it behaves wonderfully in this range, but output it goes 'gaga', probably because of the limit of the opamp unable to output (or even input) voltages within 1.5v of GND or VCC. I don't think the diodes bias of 0.6v has much to do with it though.
So, it seems to be absolutely fine for HIS application. Howabout yours? I've been racking my brains for a solution, but other that the ones I came up with in the other topic, I'm stumped for now :(

Blueteeth.
 
The inputs of a TL072 are Jfets and they don't work and cause the output to suddenly invert when the input voltages get to within about 2.5V from the negative supply.
The inputs of an LM358 work fine down to the negative supply.
 
audioguru said:
The inputs of a TL072 are Jfets and they don't work and cause the output to suddenly invert when the input voltages get to within about 2.5V from the negative supply.
The inputs of an LM358 work fine down to the negative supply.

Ok they do work fine down to the negative supply which means it probably has to do with my input. I will lower the input voltage to 0v opposed to leaving the input at 5v and lowering the clamped voltage to 0v. Thanks for your input. This project has been driving me crazy, I cant stop thinking about it.
 
Use an LM393 as an op amp, and it will go almost to zero on the output, because you don't need the diode. The LM393 doesn't have a lot of bandwidth when used this way, but it will still be lots faster than you require.
 

Attachments

  • clamp.PNG
    clamp.PNG
    13.3 KB · Views: 425
Hi Ron,
Doesn't the LM393 comparator oscillate when it has negative feedback?
Or does the 10nF with the 100 ohms compensate it?
 
Ron H said:
Use an LM393 as an op amp, and it will go almost to zero on the output, because you don't need the diode. The LM393 doesn't have a lot of bandwidth when used this way, but it will still be lots faster than you require.

Interesting, very interesting. Glad someone from the original posts over a year ago chimmed in. I will definately have to test out this idea but unfortunately I only have 4 LM358's at my house and a LM324. I might have to order a LM393 if I cannot figure out my dilema.
 
audioguru said:
Hi Ron,
Doesn't the LM393 comparator oscillate when it has negative feedback?
Or does the 10nF with the 100 ohms compensate it?
According to the sim :eek:, it doesn't oscillate with the 100 ohms/10nF. I didn't test it in hardware.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top