Kiwi Bruv Posted October 22, 2005 Report Share Posted October 22, 2005 I have built a simple PWM drive with a 555 and an op amp. The op amp drives a trans which drives a mosfet. However the mosfet seems to be latching.The mosfet is conducting, with no gate signal present, a test bulb lights brightly. When I apply the PWM to the gate the bulb dims as it should. I'm using an IRF 530.I simplified the circuit just driving straight from a 555, again it works fine until the gate signal is removed when it lights the bulb brightly again. PS is a 12V batt.I put a 91 ohm resistor in the gate line and a 100 microF cap across the power supply, but it made no difference.Can someone help me fix the problem? Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 22, 2005 Report Share Posted October 22, 2005 Hi Hi Kiwi,You shouldn't just "remove" a gate signal to turn-off a Mosfet, you should leave the resistor from its gate to its source.Mosfets have a fairly high capacitance from gate to source that can hold a charge for a long time without a discharge path. So of course they will be on. ;Dkiwi Quote Link to comment Share on other sites More sharing options...
Staigen Posted October 22, 2005 Report Share Posted October 22, 2005 HiAlso the diode D1 is connected wrong, it should be connected between +12Volt and the mosfets drain, cathode to +12Volt//Staigen Quote Link to comment Share on other sites More sharing options...
Guest Alun Posted October 23, 2005 Report Share Posted October 23, 2005 No staigen, D! is built into the MOSFET, it's parasitic there's no avoiding it. Quote Link to comment Share on other sites More sharing options...
Kiwi Bruv Posted October 23, 2005 Author Report Share Posted October 23, 2005 Audio guru,I don't think I explained properly.When the circuit powers up the bulb comes on fully. The signal is oscillating at the gate at 50% duty cycle but the mosfet isn't switching. I can remove the drive trans completely (source gate res remains in place) and the load remains on.So I thought it was the mosfet. I built the straight 555 astable to test the mosfet and as described the mosfet is switching at 50% duty in that circuit.Many thanks for your help Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 23, 2005 Report Share Posted October 23, 2005 You have a faulty Mosfet. Maybe you zapped its gate. :'( Quote Link to comment Share on other sites More sharing options...
Kiwi Bruv Posted October 23, 2005 Author Report Share Posted October 23, 2005 Found it, wired the mosfet and driver trans wrongly. Both working now though!Sorry for the bother. Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 23, 2005 Report Share Posted October 23, 2005 A 2N2222 or any other silicon transistor makes a pretty good 7V zener diode when its collector and emitter are reversed, doesn't it? Therefore the gate couldn't go lower than 5V. ;D Quote Link to comment Share on other sites More sharing options...
Kiwi Bruv Posted October 23, 2005 Author Report Share Posted October 23, 2005 Thnaks Audioguru, one more question if you please.I am finding that up to about 15kHz the full 0 to 100% duty cycle is covered by the full range of the 10K pot. As expected the 555 puts out 4 to 8V so the pot divider at the comparator is designed to duplicate that range.However at 25kHz the duty cycle is behaving strangely. 100% duty is at about 60% of the pot range ie 100% duty has shifted from 4V on the pot to maybe 6V and the range on the pot from 100% to 60% duty seems sharp or compressed, but after 50% it's smooth again.It's like the 555 is only putting out 6 to 8V at higher freq. I don't have a scope so can't see it.I wanted to operate the drive out of audible range so would liek to get it to 20Khz.Can you see why this might occur? Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 23, 2005 Report Share Posted October 23, 2005 Hi Kiwi,You don't show what the PNP transistor is doing.The old 741 opamp isn't any good above about 9kHz. A TL071 or TL081 and many new opamps are good for up to 100kHz. Quote Link to comment Share on other sites More sharing options...
Kiwi Bruv Posted October 23, 2005 Author Report Share Posted October 23, 2005 OK, I'll change the op amp.The pnp is to make the 555 timing cap charge linearly instead of exponentially so it gives a sawtooth output. Quote Link to comment Share on other sites More sharing options...
Guest Alun Posted October 23, 2005 Report Share Posted October 23, 2005 Hi Kiwi,You don't show what the PNP transistor is doing.The old 741 opamp isn't any good above about 9kHz. A TL071 or TL081 and many new opamps are good for up to 100kHz.That depends on the gain, which in my experiance when the gain is <10 the uA741 is good enough for audio i.e the bandwidth exceeds 20kHz.In this situation the 741 us being used as a comparator so it's open-loop which is the problem here, as audioguru said the 741 is far too slow to keep up with the 555. I'd also recommend a faster op-amp but not the TL071 or TL081, I'd go for the LM311 comparator with its output connected to +V with a 1k pullup, then I'd remove Tr2 and R3 and connect its output directly to Tr3.There are also far simpler ways to build a PWM, it can be done with a single IC like a dual op-amp or a 555. ;D Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 23, 2005 Report Share Posted October 23, 2005 That depends on the gain, which in my experience when the gain is <10 the uA741 is good enough for audio i.e the bandwidth exceeds 20kHz.The slow, old 741 produces triangle-waves above 9kHz at high output levels, and although you can't hear its 3rd harmonics beginning at about 27kHz, they cause intermodulation with some real harmonics producing artifacts that are audible.So a loud cymbals beat will sound something like a glass window being broken.The 741 with low gain (lotsa negative feedback) might reproduce alright the tiny, low-level, high frequency bells in a David Usher song. If your speakers, earphones and hearing can go that high.Many people think that a loud cymbals beat is supposed to sound like a glass window being broken!Many people can't hear frequencies above only about 4kHz! Quote Link to comment Share on other sites More sharing options...
Guest Alun Posted October 23, 2005 Report Share Posted October 23, 2005 All I know is awhile ago we were tasked to design a simple non-inverting 714 amplifier with a gain of 10 at college and write a report on it. We had to comment on the bandwidth, I measured 22kHz with a 100mV sinewave on the input and a +-12V supply. I was very impressed at how smooth the sinewave looked on the scope despite its high frequency and it near it was to the clipping limits.I can understand how a squarewave can produce a triangle wave output but I don't see how a pure sinewave can be distorted in such a manner when in theory the parasitic low pass filter in the 741 should reduce the higher frequency harmonics in the signal. Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 23, 2005 Report Share Posted October 23, 2005 All I know is awhile ago we were tasked to design a simple non-inverting 714 amplifier with a gain of 10 at college and write a report on it. We had to comment on the bandwidth, I measured 22kHz with a 100mV sinewave on the input and a +-12V supply. I was very impressed at how smooth the sinewave looked on the scope despite its high frequency and it near it was to the clipping limits.A 100mV input to an opamp with a gain of only 10 results in an output of only 1V. Far from 10V or 20Vp-p clipping.I can understand how a squarewave can produce a triangle wave output but I don't see how a pure sinewave can be distorted in such a manner when in theory the parasitic low pass filter in the 741 should reduce the higher frequency harmonics in the signal.When an opamp's output exceeds its max slew-rate, its output ramps and looks and sounds like a triangle wave.The typical slew-rate of a 741 opamp is only 0.5V/us. A TL071 opamp is 26 times faster.The high frequency rolloff of an opamp is different from it slew-rate limitation. A 741 opamp is flat to about 700kHz with a gain of 1 and an output level of a few mV. With a gain of 1000, it rolls-off above only 300Hz. Quote Link to comment Share on other sites More sharing options...
Guest Alun Posted October 23, 2005 Report Share Posted October 23, 2005 I understand now, so due to the slew rate the bandwidth of the amplifier will go down as the amplitude increases, this non-linear effect will distort the waveform a lot so a sinewave will become trianglular.I now I got my decimal in the wrong place before but to be truthful I can't remember what the input and output voltages were I think I just adjusted it so it wasn't clipping I think the times 10 probe may've also confused me. ;DI know there is a formula to count all of this but I've forgotton it, can you remeber it? Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 23, 2005 Report Share Posted October 23, 2005 I don't use a formula, I just never use a lousy old 741 opamp.I used one as an audio amp in 1965 and it sounded so bad, I never used one again! ;DOver the years I've seen and heard many audio amps with 741 opamps. I think I can recognise their terrible sound. An LM358 or LM324 low-power opamp is even worse for audio. Quote Link to comment Share on other sites More sharing options...
Guest Alun Posted October 23, 2005 Report Share Posted October 23, 2005 I don't use a formula, I just never use a lousy old 741 opamp.Neither do I, I'm just interested in the mathematical relationship between the slew rate, frequency, ampitude and bandwidth, I gen the general idea but I've looked though my notes and I can't find it. :(I used one as an audio amp in 1965 and it sounded so bad, I never used one again! ;DThe worst audio amp I built was when I was 13 I connected up a 741 with a complementary pair on the output like this:It suffered from terible cross over distortion as the poor little 741 pathetically tried to jump 1.4V every cycle.Over the years I've seen and heard many audio amps with 741 opamps. I think I can recognise their terrible sound. An LM358 or LM324 low-power opamp is even worse for audio. As far as I'm aware the latter two were never designed for audio, I'm thinking about doing an experiment by making a basic audio amplifier and testing several cheep and nasty op-amps to see which is the worse. ;D Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 23, 2005 Report Share Posted October 23, 2005 Hi Alun,Ha, your boosted-output 741 circuit was used with gain in a Korean (Goldstar, now called LG Electronics) speakerphone that I had to install and service in 1980. It had the worst pcb that I've ever seen. The copper was poorly stuck on the pcb with rice stuff. Users all complained about the buzzy sound so I added a resistor to fix it.I let the opamp drive the speaker through the resistor until there was enough current producing enough voltage drop to allow the transistors to take over for more current.When word (sound?) got around then I had to fix every phone in every company's office, a big job. Quote Link to comment Share on other sites More sharing options...
Kiwi Bruv Posted October 23, 2005 Author Report Share Posted October 23, 2005 I built the circuit out of bits and bobs so now I need to buy a new amp I might as well build it out of an LM324 quad.Will this allow me to have the pwm at 20kHz? Where do I look in the datasheet to show me this?Circuit I have in mind is at www.cpemma.co.uk/pwm_erg.html Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 24, 2005 Report Share Posted October 24, 2005 The circuit you posted has an LM324 operating at only about 91Hz.The LM324 is low-power and old, so is even slower than a 741. It has trouble above about 5kHz. Quote Link to comment Share on other sites More sharing options...
audioguru Posted October 24, 2005 Report Share Posted October 24, 2005 The TL072 dual opamp is so popular in stereo equipment that it costs less than a 741 single opamp. It is low noise, low distortion and wideband. I have used it for about 20 years. Quote Link to comment Share on other sites More sharing options...
Guest Alun Posted October 24, 2005 Report Share Posted October 24, 2005 Audioguru, you're an audio guru so you love your audio op-amps but here it's being used as a comparator so a linear low noise amplifier isn't needed so a much Quote Link to comment Share on other sites More sharing options...
Guest Alun Posted October 24, 2005 Report Share Posted October 24, 2005 Hi Alun,Ha, your boosted-output 741 circuit was used with gain in a Korean (Goldstar, now called LG Electronics) speakerphone that I had to install and service in 1980. It had the worst pcb that I've ever seen. The copper was poorly stuck on the pcb with rice stuff. Users all complained about the buzzy sound so I added a resistor to fix it.I let the opamp drive the speaker through the resistor until there was enough current producing enough voltage drop to allow the transistors to take over for more current.When word (sound?) got around then I had to fix every phone in every company's office, a big job.I know the feeling you do something good and then you have to pay for it.I've built a Class B amplifier that had very low crosover distortion and without a resistor like the one in your drawing. I used darlingtons with two diodes for the output stage so the gain stage only had to jump 0.7V and for the gain stage I used a darlington with a FET with the gate connected to it's source as a constant current load. With the feedback resistors giving a unity gain and the darlington having a GBWP of 300MHz it could jump the 0.7 in no time at all so crosover distortion wasn't visible on a scope and it sounded good enough too! Quote Link to comment Share on other sites More sharing options...
ante Posted October 24, 2005 Report Share Posted October 24, 2005 Formulas for Alun! ;D [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.