triangle wave generator

19
2/28/2016 Triangle Wave Generator http://pcbheaven.com/circuitpages/Triangle_Wave_Generator/ 1/19 Home Contact Projects Experiments Circuits Theory BLOG PIC Tutorials Time for Science RSS Terms of services Privacy policy Home Projects Experiments Circuits Theory BLOG PIC Tutorials Time for Science 2 July 2009 Author: Giorgos Lazaridis Triangle Wave Generator This is a very simple and yet useful circuit for generating triangle wave. It can be used for many applications where a medium+ preciseness triangle waveform is required. It can also generate nonsymmetrical waveforms making it also useful in audio applications Another feature that this circuit can provide is that it generates square pulses as well. Although this is not the reason that this circuit is designed and there are much better ways to generate rectangular pulses, you can use them from this circuit as they are in phase with the triangle wave. Let's see it in action first! The circuit Following is the circuit diagram: It is designed to operate under 5 Volts, but different voltages can be applied as well, taking in account the maximum operation voltage of the OPAMPS. The two opamps currently used are the known 741 chips. Different OPAmps can be used as well, and also dual chips for simplicity. The right OPAmp will operate as an integrator and the left as a comparator. When power is given to the circuit, the comparator drives it's output HIGH. This signal is driven to the integrator through the resistor R. The capacitor C then starts to charge gradually with RC time constant. While the capacitor is charging, the output of the integrator is also Search 2 Tweet 38 Like Stu Reddit this Electrolytic Capacitors Capacitor Size Types Of Capacitors Ceramic Capacitors Power Capacitors Printed Circuit Board DC Capacitors LED Home Lighting Electronic Project Ideas ads Advertisement HOT in heaven! Warning: Error while sending QUERY packet. PID=7907 in /home/pcbhea6/public_html/m_pages/new_in_heaven.php on line 7 MySQL server has gone away www.pcbheaven.com Triangle wave oscillator 1:07 / 1:30 The circuit in operation 11,083 people like this. Like Share

Upload: suraj

Post on 13-Jul-2016

26 views

Category:

Documents


0 download

DESCRIPTION

useful

TRANSCRIPT

Page 1: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 119

Home Contact Projects Experiments Circuits Theory BLOG PIC Tutorials Time for Science RSS Terms of services Privacy policy

Home Projects Experiments Circuits Theory BLOG PIC Tutorials Time for Science

2 July 2009Author Giorgos Lazaridis

Triangle Wave Generator

This is a very simple and yet useful circuit for generatingtriangle wave It can be used for many applications where amedium+ preciseness triangle waveform is required It can alsogenerate nonshysymmetrical waveforms making it also useful inaudio applications

Another feature that this circuit can provide is that itgenerates square pulses as well Although this is not the reasonthat this circuit is designed and there are much better ways togenerate rectangular pulses you can use them from this circuit asthey are in phase with the triangle wave

Lets see it in action first

The circuit

Following is the circuit diagram

It is designed to operate under 5 Volts but different voltages can be applied as well takingin account the maximum operation voltage of the OPshyAMPS

The two opshyamps currently used are the known 741 chips Different OPshyAmps can be usedas well and also dual chips for simplicity The right OPshyAmp will operate as an integrator and theleft as a comparator When power is given to the circuit the comparator drives its output HIGHThis signal is driven to the integrator through the resistor R The capacitor C then starts to chargegradually with RC time constant While the capacitor is charging the output of the integrator is also

Search

2

Tweet

38Like

StumbleUpon

Reddit this

ElectrolyticCapacitors

Capacitor Size

Types OfCapacitors

CeramicCapacitors

PowerCapacitors

Printed CircuitBoard

DC Capacitors

LED HomeLighting

ElectronicProject Ideas

ads Advertisement

HOT in heaven

Warning Error while sending QUERY packet PID=7907 inhomepcbhea6public_htmlm_pagesnew_in_heavenphp

on line 7MySQL server has gone away

wwwpcbheavencom

Triangle wave oscillator

107 130

The circuit in operation

11083 people like thisLike Share

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 219

taken to its low state with the same rate When the positive input of the comparator through thevoltage divider that the 47K and 100K resistors perform is driven low enough then it changes stateand the integrator starts operating viceshyversa

It is easily understood that the frequency of oscillation will only have to do with the RCstandard That is true A half cycle period is exactly the result of the R x C A full cycle is twice thisamount Therefore the frequency is

FOSC =1

2 x R x C

In our test circuit the R resistor is 22K and the C capacitor is 100nF The oscillationfrequency would be

FOSC =1

2 x 22x103 x 100x10shy9

And that would make 22727Hz approximately In real life the frequency measured wasabout 218Hz This is a rather small (tiny) difference between the theoretical and the practical valueconsidering that the resistors have 5 accuracy and so does the capacitor as well

Elimination the DC voltage from the output

If you watch the output signal in a oscilloscope then you will notice that the trianglewaveform is above of the zero voltage The offset is caused by DC voltage In order to eliminate thisvoltage shift you should add a capacitor in series to the circuit The value of the capacitor should bechosen accordint tot he oscillation frequency of the circuit For low frequencies 1shy100 Hz a 47uFto 10uF would work just fine Above you should consider using smaller capacitors A wrongcapacitor selection would cause signal distortion and sometimes will add significant resistance to theoutput The following circuit demonstrates the previous circuit with a series capacitor

And the results of this circuit are as follows

As you can see the waveform right after the capacitor is slightly above the zero voltagewhere the waveform before the capacitor is several voltages above due to the DC voltage shift Nowthe output is easier to be used

Further amplification

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 319

Due to the nature of triangle waveforms and their applications most of the times the signalshould be as high as possible reaching up to the supplys voltage For that and to be our circuitpresentation complete we have add a signal amplifier using a 2N2222 transistor The transistor isconnected right after the DC cutoff capacitor (naturally) and is fixedshybiased with commonshyemitterconnection

Lets take a look now to the oscilloscope for the results I chose to show 3 channelssimultaneously all at the same ground level and all with the same amplitude division so that thedifferences are clear

The difference is clear now The yellow waveform is the output of the integrator As you cansee the lowest point of the triangle is at about 24V above zero and the highest is at 4volts (16V pshyp) The green waveform comes right after the DC cutoff capacitor Almost with the same amplitude(14V pshyp) this waveforms lowest point is touching the zero line Finally the blue waveform Thisis the output of the transistor It starts from zero to 5 volts (5V pshyp) Notice also that this waveform isinverted in comparison to the others and that is because the transistor amplifier is an invertingamplifier

Now that you know the outputs you can choose the circuit of your will

Adjusting the circuit

You may have alreadynotice this tricky trimmer on thebottom left corner of the circuitThis is the symmetryadjustment It is most possiblethe the circuit will not oscillateby the time you power it onThat would be normal Youneed to adjust the symmetry at

Generating nonshysymmetrical

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 419

first

If you have an oscilloscope the symmetry can be fineadjusted with a straightshyforward method Just put your probe onthe integrator or the transistor output and turn the trimmer untilyou get a nice triangular waveform You may also like to have asawshytooth like waveform right edge or left edge This can beadjusted by the trimmer For large changes you should considerchanging the 47K resistor otherwise the circuit shall not oscillate

For those who does notown an oscilloscope i havesome good news A pair of PCspeakers would be your probefor the moment Connect onechannel of the speaker rightafter the capacitor and the ground of the speakers connect it tozero DO NOT CONNECT THEM AFTER THETRANSISTOR OR BEFORE THE CAPACITOR I could not

predict the results Then turn them on with the volume at 16 Start rotating the trimmer Accordingto the oscillation frequency that you have chosen you will hear an audio signal like a beep orbooooooo or something similar Continue rotating the potentiometer The signal will becomelouder and louder After a while the signal will start loosing intensity and become weaker Theposition where the signal had the loudest sound is the one that the triangular waveform has the mostequalshysided form

A last trick

It has been already mentioned that this circuit can generaterectangular pulses as well This is not the reason of creationthough There are better oscillators for this reason Nevertheless ifyou need square pulses in phase with the triangular waveform thecircuit can provide these to you

The rectangular pulses are taken directly from the outputof the comparator OPshyAmp That would be the left one in ourcircuit The pulses have almost the same amplitude as the powersupply They have just a little bit voltage shift that most of thetimes does not cause any troubles If there is a problem a DCcutoff capacitor will solve it

You should keep in mind that the rectangular pulses areinverted in comparison to the triangular waveform This mean thatwhen the triangular waveform is at its most high level the rectangular pulse is reaching zero andviceshyversa But if you compare them to the triangular waveform taken from the transistor amplifierthen you will notice that they are NOT inverted and that is because the transistor performs aninverting amplifier

Relative pages

Basic transistor circuitsThe transistor theory of operationThe voltage divider theoryOpshyAmp IC PinoutsDrCalculus OpshyAmp inverting amplifier calculatorDrCalculus OpshyAmp nonshyinverting amplifier calculatorDrCalculus Standard resistor values calculatorDrCalculus Voltage divider calculator

Comments

Name

Email (shall not be published)

waveforms Adjusting the circuit withoutan oscilloscope

How to get one channel ofyour old PC speakers jack and

use it as a probeYou should connect the

speaker channel right after theDC cutoff capacitor

The rectangular pulses areNOT inverted in comparisonto the triangular waveformtaken from the transistor

inverting amplifier

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 519

Website

Notify me of new posts via email

Write your comments below BEFORE you post a commentYou are welcome to comment for corrections and suggestions

on this page But if you have questions please use the forum instead to post it Thank you

Submit your comment

At 16 June 2015 145341 user Kenneth wrote [reply Kenneth]

Nice Thank you )

At 10 July 2014 173202 user cerene wrote [reply cerene]

it is very good lesson i learned alot from it thanks much

At 17 May 2014 51604 user Richard Anderson wrote [reply Richard Anderson]

I have been looking for a way to replace the transistor output stage with an op amp I knowI could mess with the gain to get full voltage about three looks close but I would preferthat the output stage be proportional without needing adjustment

At 11 April 2014 85026 user Erfan wrote [reply Erfan]

iam so frustrated Because every time i trying to fix my circuiti get more frustrated and iamnot getting succeedcan you please give me a schematic that works properly with LM393

At 30 March 2014 122737 user ram wrote [reply ram]

guyz help me to build a circuit to convert 230v ac to 230v triangular wave

At 12 October 2013 81945 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

mike check the specifications of the scope for 20KHz

At 10 October 2013 142110 user mike wrote [reply mike]

Will a pc scope using sound card work

At 9 October 2013 95308 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

micheal Its a prototype circuit for learning not a product so you need to configure ityourself with an oscilloscope

At 9 October 2013 71123 user micheal wrote [reply micheal]

Pls I need to build a 5000shy6000Hz triangle wave oscillating between 0 and 12v(peak topeak is 12v since that is the supply voltage)With so many people complaining am confused as to which transistor I should use so as toensure that the triangle is perfectI am using R= 10k and C= 10nfpls any advice on the transistor amplification so that thetriangle does not get skewed or something

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 619

I need it to be perfect 12v peak to peaki dont have an oscilloscope so it makes my workharder as I would have experimented myself but maybe someone has tested and confirmeditthanks

At 2 October 2013 115142 user Shadrack wrote [reply Shadrack]

Thank you very much for the triangular wave generator circuit It works perfectly well Ivebeen trying out other circuits I got from the internet as I needed to use it for a switchshymodepower supply (my first ever) amp they didnt work except for yours which produced suchincredibly clean waves I was more than amazed This post is simply to say thank you foryour efforts they are extremely appreciated by myself Mr Giorgos Lazaridis

At 9 July 2013 83511 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

By the way I used a clamping diode connected to the capacitor and a diode and highvalue resistor between capacitor and output Now i have a perfect triangle going from shy03to 495V

Greets

K

At 9 July 2013 82449 user Kboy wrote [reply Kboy]

Ems

Hi you probably have VCC hooked up to the voltage dividerVCC needs to be connected to the full 5V VCCshy to groundInputshy of the left opamp and input of the right opamp need to be connected to the voltagedivider meaning 25V

Do you have a picture or sketch of your circuit

Greets

K

At 3 July 2013 122117 user Ems wrote [reply Ems]

Ive tried building the circuit on a breadboard but it doesnt oscillate at all I have a steady25V output Id appreciate any suggestions as to where Im going wrong Many thanks

At 16 June 2013 145042 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Going negative is normal because you probably use big capacitor Try a smallerone shy say 470 nF

At 16 June 2013 144334 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

Not exactly without capacitor it floats around 65shy7V with the same 5V amplitude Ill trywith a 2N3904 or F245C tomorrow Or are there other optionsI didnt want to use a transistor actually but if it seems to be the only solution oh well sobe it o)

I just dont understand why the voltage can go negative after the capacitor

Thanks in advance

At 16 June 2013 132117 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Since you use a rail to rail try without the capacitor It gos 0 to V

At 16 June 2013 95355 user Kboy wrote [reply Kboy]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 719

Hi

Lots of thanks for this tutorial very helpfulIm just having one problemI built this circuit with a TL082 railshytoshyrail opshyamp The purpose was to make a 25kHz triangle wave with an output going from 0 to 5 volts Itried that with a 12V computer PSU as a sourceEverything looks great and is working but with a capacitor in series with the output of the2nd opshyamp (trying to create a wave like the green one in your scope) the triangle wavegoes from shy25V to 25V instead of 0 to 5V Ive rebuild it over and over again withdifferent resistors and all but to no avail

Im lost here I dont understand Am I doing something wrong

Thanks in advance

K

At 1 May 2013 224005 user Martins wrote [reply Martins]

I love this site and you huys are doing a great jobI am using NI Multisim to simulate this circuit but i can get it to oscillate All i have is asingle line as my output for both OP AMP Please i need help if you have a copy of thiscircuit that has been simulated via multisim or any other simulator can you send it via mymailso i can see where i am missing somethingBelieve me i have tried every suggestion made on this comment pageThanks for your kind response

At 23 March 2013 220017 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Markus though i havent tried it i suppose yes

At 17 March 2013 165038 user Markus wrote [reply Markus]

Hello

I would like to thank the author of this tutorial Thank you Great tutorial that I will havegood use of

One question though Say that I use two rail to rail OPshyamps instead and remove thetransistor with its bias resistors and capacitor After that I change the 47k resistor betweenthe two OPshyamps to one just under 100kohm say 82k Wouldnt that increase the amplitude of the triangle wave coming out from the second OPshyamp close to the 5V input Thus giving closely the same result as using the transistor

ThanksMarkusSweden

At 18 October 2012 72939 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali simple 555 can go to 300KHz Use a CMOS 555 to go higher

At 16 October 2012 51132 user Kali wrote [reply Kali]

Giorgos Lazaridisthanks for your prompt reply Could you please suggest any circuit or IC which cangenerate 500khz square wave Can ic555 timer generate that particular signal

At 16 October 2012 43658 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali no the 741 can go up to 10 khz

At 16 October 2012 41211 user Kali wrote [reply Kali]

Is the first circuit efficient enough to generate 500KHz triangular and square waveforms Please let me know Thanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 819

At 13 April 2012 70908 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Brett Check this outhttpwwwpcbheavencomuserpagesFlexible_555_LED_Pulsing_Circuit

At 13 April 2012 25342 user Brett wrote [reply Brett]

Thanks for a very well described circuit I am wanting to slowly light a LED ramping upfrom off to full brightness and back down again over and over

I want a full cycle to be quite slow say 15 seconds to light and another 15 to dim againMy questions areshy will the RC values be outside what the chipcircuit can handle I believe there aremaxmin values for these and such high RC values may be outside the acceptable valuesshy will the output allow me to drive several LEDs They will be high intensity onesdrawing 30mA each and I plan on having 9 of them (there is a specific reason for being 9)Now 270mA may require a slightly higher rated transistor if I want it to run cool but thebigger question is whether the design will actually allow me to drive 9 diocese

Of course each LED would have its own current limiting resistor

BTW absolutely perfect linear is not essential

Thanks for any advice you can give

At 19 March 2012 61628 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Charlie Yep indeed the pot is to adjust a sawtooth if you want

At 19 March 2012 40710 user Charlie wrote [reply Charlie]

hii put this in falstads simulator leaving C as 1uf and R as 10K however i left the right nonshyinvert connected to gnd not the pot and i got a better triangle than with it connected to thepot (not sawtooth)

At 28 January 2012 194702 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Richard Geduld you will need to add a transistor amplifier like the 2n2222 that i haveadd to amplify the current

At 28 January 2012 191838 user Richard Geduld wrote [reply Richard Geduld]

Hi thanks for thisI would like to connect an LED to the circuit that pulses at the frequency of the trianglewave However when I connect an LED between the wave output and ground it preventsthe circuit from oscillating Is there any way to achieve thisMuch Appreciated

At 20 November 2011 192048 user josh wrote [reply josh]

yes pure triangle waves Are not an option on any of my synths Ive been looking to getinto exsperimenting with pure triangle waves

At 8 August 2011 125752 user Kammenos wrote [reply Kammenos]

dieter the beseshyemitter voltage do not exceed the 06shy07 volts depending on thetransistor voltage The parameter Vbe you refer to is the maximum reverseshybiased voltagethat the transistor diode can handle You may not reverseshybias a 2N2222 with higher than 5volts

At 8 August 2011 115315 user dieter wrote [reply dieter]

ok thanks for all the helpThis will give a a good base to further develop the circuit

One last question the 5V emitter base voltage is this the voltage applied to the base thuscoming from the comparator signal or is this the voltage on the emitter which means a

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 2: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 219

taken to its low state with the same rate When the positive input of the comparator through thevoltage divider that the 47K and 100K resistors perform is driven low enough then it changes stateand the integrator starts operating viceshyversa

It is easily understood that the frequency of oscillation will only have to do with the RCstandard That is true A half cycle period is exactly the result of the R x C A full cycle is twice thisamount Therefore the frequency is

FOSC =1

2 x R x C

In our test circuit the R resistor is 22K and the C capacitor is 100nF The oscillationfrequency would be

FOSC =1

2 x 22x103 x 100x10shy9

And that would make 22727Hz approximately In real life the frequency measured wasabout 218Hz This is a rather small (tiny) difference between the theoretical and the practical valueconsidering that the resistors have 5 accuracy and so does the capacitor as well

Elimination the DC voltage from the output

If you watch the output signal in a oscilloscope then you will notice that the trianglewaveform is above of the zero voltage The offset is caused by DC voltage In order to eliminate thisvoltage shift you should add a capacitor in series to the circuit The value of the capacitor should bechosen accordint tot he oscillation frequency of the circuit For low frequencies 1shy100 Hz a 47uFto 10uF would work just fine Above you should consider using smaller capacitors A wrongcapacitor selection would cause signal distortion and sometimes will add significant resistance to theoutput The following circuit demonstrates the previous circuit with a series capacitor

And the results of this circuit are as follows

As you can see the waveform right after the capacitor is slightly above the zero voltagewhere the waveform before the capacitor is several voltages above due to the DC voltage shift Nowthe output is easier to be used

Further amplification

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 319

Due to the nature of triangle waveforms and their applications most of the times the signalshould be as high as possible reaching up to the supplys voltage For that and to be our circuitpresentation complete we have add a signal amplifier using a 2N2222 transistor The transistor isconnected right after the DC cutoff capacitor (naturally) and is fixedshybiased with commonshyemitterconnection

Lets take a look now to the oscilloscope for the results I chose to show 3 channelssimultaneously all at the same ground level and all with the same amplitude division so that thedifferences are clear

The difference is clear now The yellow waveform is the output of the integrator As you cansee the lowest point of the triangle is at about 24V above zero and the highest is at 4volts (16V pshyp) The green waveform comes right after the DC cutoff capacitor Almost with the same amplitude(14V pshyp) this waveforms lowest point is touching the zero line Finally the blue waveform Thisis the output of the transistor It starts from zero to 5 volts (5V pshyp) Notice also that this waveform isinverted in comparison to the others and that is because the transistor amplifier is an invertingamplifier

Now that you know the outputs you can choose the circuit of your will

Adjusting the circuit

You may have alreadynotice this tricky trimmer on thebottom left corner of the circuitThis is the symmetryadjustment It is most possiblethe the circuit will not oscillateby the time you power it onThat would be normal Youneed to adjust the symmetry at

Generating nonshysymmetrical

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 419

first

If you have an oscilloscope the symmetry can be fineadjusted with a straightshyforward method Just put your probe onthe integrator or the transistor output and turn the trimmer untilyou get a nice triangular waveform You may also like to have asawshytooth like waveform right edge or left edge This can beadjusted by the trimmer For large changes you should considerchanging the 47K resistor otherwise the circuit shall not oscillate

For those who does notown an oscilloscope i havesome good news A pair of PCspeakers would be your probefor the moment Connect onechannel of the speaker rightafter the capacitor and the ground of the speakers connect it tozero DO NOT CONNECT THEM AFTER THETRANSISTOR OR BEFORE THE CAPACITOR I could not

predict the results Then turn them on with the volume at 16 Start rotating the trimmer Accordingto the oscillation frequency that you have chosen you will hear an audio signal like a beep orbooooooo or something similar Continue rotating the potentiometer The signal will becomelouder and louder After a while the signal will start loosing intensity and become weaker Theposition where the signal had the loudest sound is the one that the triangular waveform has the mostequalshysided form

A last trick

It has been already mentioned that this circuit can generaterectangular pulses as well This is not the reason of creationthough There are better oscillators for this reason Nevertheless ifyou need square pulses in phase with the triangular waveform thecircuit can provide these to you

The rectangular pulses are taken directly from the outputof the comparator OPshyAmp That would be the left one in ourcircuit The pulses have almost the same amplitude as the powersupply They have just a little bit voltage shift that most of thetimes does not cause any troubles If there is a problem a DCcutoff capacitor will solve it

You should keep in mind that the rectangular pulses areinverted in comparison to the triangular waveform This mean thatwhen the triangular waveform is at its most high level the rectangular pulse is reaching zero andviceshyversa But if you compare them to the triangular waveform taken from the transistor amplifierthen you will notice that they are NOT inverted and that is because the transistor performs aninverting amplifier

Relative pages

Basic transistor circuitsThe transistor theory of operationThe voltage divider theoryOpshyAmp IC PinoutsDrCalculus OpshyAmp inverting amplifier calculatorDrCalculus OpshyAmp nonshyinverting amplifier calculatorDrCalculus Standard resistor values calculatorDrCalculus Voltage divider calculator

Comments

Name

Email (shall not be published)

waveforms Adjusting the circuit withoutan oscilloscope

How to get one channel ofyour old PC speakers jack and

use it as a probeYou should connect the

speaker channel right after theDC cutoff capacitor

The rectangular pulses areNOT inverted in comparisonto the triangular waveformtaken from the transistor

inverting amplifier

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 519

Website

Notify me of new posts via email

Write your comments below BEFORE you post a commentYou are welcome to comment for corrections and suggestions

on this page But if you have questions please use the forum instead to post it Thank you

Submit your comment

At 16 June 2015 145341 user Kenneth wrote [reply Kenneth]

Nice Thank you )

At 10 July 2014 173202 user cerene wrote [reply cerene]

it is very good lesson i learned alot from it thanks much

At 17 May 2014 51604 user Richard Anderson wrote [reply Richard Anderson]

I have been looking for a way to replace the transistor output stage with an op amp I knowI could mess with the gain to get full voltage about three looks close but I would preferthat the output stage be proportional without needing adjustment

At 11 April 2014 85026 user Erfan wrote [reply Erfan]

iam so frustrated Because every time i trying to fix my circuiti get more frustrated and iamnot getting succeedcan you please give me a schematic that works properly with LM393

At 30 March 2014 122737 user ram wrote [reply ram]

guyz help me to build a circuit to convert 230v ac to 230v triangular wave

At 12 October 2013 81945 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

mike check the specifications of the scope for 20KHz

At 10 October 2013 142110 user mike wrote [reply mike]

Will a pc scope using sound card work

At 9 October 2013 95308 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

micheal Its a prototype circuit for learning not a product so you need to configure ityourself with an oscilloscope

At 9 October 2013 71123 user micheal wrote [reply micheal]

Pls I need to build a 5000shy6000Hz triangle wave oscillating between 0 and 12v(peak topeak is 12v since that is the supply voltage)With so many people complaining am confused as to which transistor I should use so as toensure that the triangle is perfectI am using R= 10k and C= 10nfpls any advice on the transistor amplification so that thetriangle does not get skewed or something

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 619

I need it to be perfect 12v peak to peaki dont have an oscilloscope so it makes my workharder as I would have experimented myself but maybe someone has tested and confirmeditthanks

At 2 October 2013 115142 user Shadrack wrote [reply Shadrack]

Thank you very much for the triangular wave generator circuit It works perfectly well Ivebeen trying out other circuits I got from the internet as I needed to use it for a switchshymodepower supply (my first ever) amp they didnt work except for yours which produced suchincredibly clean waves I was more than amazed This post is simply to say thank you foryour efforts they are extremely appreciated by myself Mr Giorgos Lazaridis

At 9 July 2013 83511 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

By the way I used a clamping diode connected to the capacitor and a diode and highvalue resistor between capacitor and output Now i have a perfect triangle going from shy03to 495V

Greets

K

At 9 July 2013 82449 user Kboy wrote [reply Kboy]

Ems

Hi you probably have VCC hooked up to the voltage dividerVCC needs to be connected to the full 5V VCCshy to groundInputshy of the left opamp and input of the right opamp need to be connected to the voltagedivider meaning 25V

Do you have a picture or sketch of your circuit

Greets

K

At 3 July 2013 122117 user Ems wrote [reply Ems]

Ive tried building the circuit on a breadboard but it doesnt oscillate at all I have a steady25V output Id appreciate any suggestions as to where Im going wrong Many thanks

At 16 June 2013 145042 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Going negative is normal because you probably use big capacitor Try a smallerone shy say 470 nF

At 16 June 2013 144334 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

Not exactly without capacitor it floats around 65shy7V with the same 5V amplitude Ill trywith a 2N3904 or F245C tomorrow Or are there other optionsI didnt want to use a transistor actually but if it seems to be the only solution oh well sobe it o)

I just dont understand why the voltage can go negative after the capacitor

Thanks in advance

At 16 June 2013 132117 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Since you use a rail to rail try without the capacitor It gos 0 to V

At 16 June 2013 95355 user Kboy wrote [reply Kboy]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 719

Hi

Lots of thanks for this tutorial very helpfulIm just having one problemI built this circuit with a TL082 railshytoshyrail opshyamp The purpose was to make a 25kHz triangle wave with an output going from 0 to 5 volts Itried that with a 12V computer PSU as a sourceEverything looks great and is working but with a capacitor in series with the output of the2nd opshyamp (trying to create a wave like the green one in your scope) the triangle wavegoes from shy25V to 25V instead of 0 to 5V Ive rebuild it over and over again withdifferent resistors and all but to no avail

Im lost here I dont understand Am I doing something wrong

Thanks in advance

K

At 1 May 2013 224005 user Martins wrote [reply Martins]

I love this site and you huys are doing a great jobI am using NI Multisim to simulate this circuit but i can get it to oscillate All i have is asingle line as my output for both OP AMP Please i need help if you have a copy of thiscircuit that has been simulated via multisim or any other simulator can you send it via mymailso i can see where i am missing somethingBelieve me i have tried every suggestion made on this comment pageThanks for your kind response

At 23 March 2013 220017 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Markus though i havent tried it i suppose yes

At 17 March 2013 165038 user Markus wrote [reply Markus]

Hello

I would like to thank the author of this tutorial Thank you Great tutorial that I will havegood use of

One question though Say that I use two rail to rail OPshyamps instead and remove thetransistor with its bias resistors and capacitor After that I change the 47k resistor betweenthe two OPshyamps to one just under 100kohm say 82k Wouldnt that increase the amplitude of the triangle wave coming out from the second OPshyamp close to the 5V input Thus giving closely the same result as using the transistor

ThanksMarkusSweden

At 18 October 2012 72939 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali simple 555 can go to 300KHz Use a CMOS 555 to go higher

At 16 October 2012 51132 user Kali wrote [reply Kali]

Giorgos Lazaridisthanks for your prompt reply Could you please suggest any circuit or IC which cangenerate 500khz square wave Can ic555 timer generate that particular signal

At 16 October 2012 43658 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali no the 741 can go up to 10 khz

At 16 October 2012 41211 user Kali wrote [reply Kali]

Is the first circuit efficient enough to generate 500KHz triangular and square waveforms Please let me know Thanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 819

At 13 April 2012 70908 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Brett Check this outhttpwwwpcbheavencomuserpagesFlexible_555_LED_Pulsing_Circuit

At 13 April 2012 25342 user Brett wrote [reply Brett]

Thanks for a very well described circuit I am wanting to slowly light a LED ramping upfrom off to full brightness and back down again over and over

I want a full cycle to be quite slow say 15 seconds to light and another 15 to dim againMy questions areshy will the RC values be outside what the chipcircuit can handle I believe there aremaxmin values for these and such high RC values may be outside the acceptable valuesshy will the output allow me to drive several LEDs They will be high intensity onesdrawing 30mA each and I plan on having 9 of them (there is a specific reason for being 9)Now 270mA may require a slightly higher rated transistor if I want it to run cool but thebigger question is whether the design will actually allow me to drive 9 diocese

Of course each LED would have its own current limiting resistor

BTW absolutely perfect linear is not essential

Thanks for any advice you can give

At 19 March 2012 61628 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Charlie Yep indeed the pot is to adjust a sawtooth if you want

At 19 March 2012 40710 user Charlie wrote [reply Charlie]

hii put this in falstads simulator leaving C as 1uf and R as 10K however i left the right nonshyinvert connected to gnd not the pot and i got a better triangle than with it connected to thepot (not sawtooth)

At 28 January 2012 194702 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Richard Geduld you will need to add a transistor amplifier like the 2n2222 that i haveadd to amplify the current

At 28 January 2012 191838 user Richard Geduld wrote [reply Richard Geduld]

Hi thanks for thisI would like to connect an LED to the circuit that pulses at the frequency of the trianglewave However when I connect an LED between the wave output and ground it preventsthe circuit from oscillating Is there any way to achieve thisMuch Appreciated

At 20 November 2011 192048 user josh wrote [reply josh]

yes pure triangle waves Are not an option on any of my synths Ive been looking to getinto exsperimenting with pure triangle waves

At 8 August 2011 125752 user Kammenos wrote [reply Kammenos]

dieter the beseshyemitter voltage do not exceed the 06shy07 volts depending on thetransistor voltage The parameter Vbe you refer to is the maximum reverseshybiased voltagethat the transistor diode can handle You may not reverseshybias a 2N2222 with higher than 5volts

At 8 August 2011 115315 user dieter wrote [reply dieter]

ok thanks for all the helpThis will give a a good base to further develop the circuit

One last question the 5V emitter base voltage is this the voltage applied to the base thuscoming from the comparator signal or is this the voltage on the emitter which means a

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 3: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 319

Due to the nature of triangle waveforms and their applications most of the times the signalshould be as high as possible reaching up to the supplys voltage For that and to be our circuitpresentation complete we have add a signal amplifier using a 2N2222 transistor The transistor isconnected right after the DC cutoff capacitor (naturally) and is fixedshybiased with commonshyemitterconnection

Lets take a look now to the oscilloscope for the results I chose to show 3 channelssimultaneously all at the same ground level and all with the same amplitude division so that thedifferences are clear

The difference is clear now The yellow waveform is the output of the integrator As you cansee the lowest point of the triangle is at about 24V above zero and the highest is at 4volts (16V pshyp) The green waveform comes right after the DC cutoff capacitor Almost with the same amplitude(14V pshyp) this waveforms lowest point is touching the zero line Finally the blue waveform Thisis the output of the transistor It starts from zero to 5 volts (5V pshyp) Notice also that this waveform isinverted in comparison to the others and that is because the transistor amplifier is an invertingamplifier

Now that you know the outputs you can choose the circuit of your will

Adjusting the circuit

You may have alreadynotice this tricky trimmer on thebottom left corner of the circuitThis is the symmetryadjustment It is most possiblethe the circuit will not oscillateby the time you power it onThat would be normal Youneed to adjust the symmetry at

Generating nonshysymmetrical

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 419

first

If you have an oscilloscope the symmetry can be fineadjusted with a straightshyforward method Just put your probe onthe integrator or the transistor output and turn the trimmer untilyou get a nice triangular waveform You may also like to have asawshytooth like waveform right edge or left edge This can beadjusted by the trimmer For large changes you should considerchanging the 47K resistor otherwise the circuit shall not oscillate

For those who does notown an oscilloscope i havesome good news A pair of PCspeakers would be your probefor the moment Connect onechannel of the speaker rightafter the capacitor and the ground of the speakers connect it tozero DO NOT CONNECT THEM AFTER THETRANSISTOR OR BEFORE THE CAPACITOR I could not

predict the results Then turn them on with the volume at 16 Start rotating the trimmer Accordingto the oscillation frequency that you have chosen you will hear an audio signal like a beep orbooooooo or something similar Continue rotating the potentiometer The signal will becomelouder and louder After a while the signal will start loosing intensity and become weaker Theposition where the signal had the loudest sound is the one that the triangular waveform has the mostequalshysided form

A last trick

It has been already mentioned that this circuit can generaterectangular pulses as well This is not the reason of creationthough There are better oscillators for this reason Nevertheless ifyou need square pulses in phase with the triangular waveform thecircuit can provide these to you

The rectangular pulses are taken directly from the outputof the comparator OPshyAmp That would be the left one in ourcircuit The pulses have almost the same amplitude as the powersupply They have just a little bit voltage shift that most of thetimes does not cause any troubles If there is a problem a DCcutoff capacitor will solve it

You should keep in mind that the rectangular pulses areinverted in comparison to the triangular waveform This mean thatwhen the triangular waveform is at its most high level the rectangular pulse is reaching zero andviceshyversa But if you compare them to the triangular waveform taken from the transistor amplifierthen you will notice that they are NOT inverted and that is because the transistor performs aninverting amplifier

Relative pages

Basic transistor circuitsThe transistor theory of operationThe voltage divider theoryOpshyAmp IC PinoutsDrCalculus OpshyAmp inverting amplifier calculatorDrCalculus OpshyAmp nonshyinverting amplifier calculatorDrCalculus Standard resistor values calculatorDrCalculus Voltage divider calculator

Comments

Name

Email (shall not be published)

waveforms Adjusting the circuit withoutan oscilloscope

How to get one channel ofyour old PC speakers jack and

use it as a probeYou should connect the

speaker channel right after theDC cutoff capacitor

The rectangular pulses areNOT inverted in comparisonto the triangular waveformtaken from the transistor

inverting amplifier

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 519

Website

Notify me of new posts via email

Write your comments below BEFORE you post a commentYou are welcome to comment for corrections and suggestions

on this page But if you have questions please use the forum instead to post it Thank you

Submit your comment

At 16 June 2015 145341 user Kenneth wrote [reply Kenneth]

Nice Thank you )

At 10 July 2014 173202 user cerene wrote [reply cerene]

it is very good lesson i learned alot from it thanks much

At 17 May 2014 51604 user Richard Anderson wrote [reply Richard Anderson]

I have been looking for a way to replace the transistor output stage with an op amp I knowI could mess with the gain to get full voltage about three looks close but I would preferthat the output stage be proportional without needing adjustment

At 11 April 2014 85026 user Erfan wrote [reply Erfan]

iam so frustrated Because every time i trying to fix my circuiti get more frustrated and iamnot getting succeedcan you please give me a schematic that works properly with LM393

At 30 March 2014 122737 user ram wrote [reply ram]

guyz help me to build a circuit to convert 230v ac to 230v triangular wave

At 12 October 2013 81945 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

mike check the specifications of the scope for 20KHz

At 10 October 2013 142110 user mike wrote [reply mike]

Will a pc scope using sound card work

At 9 October 2013 95308 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

micheal Its a prototype circuit for learning not a product so you need to configure ityourself with an oscilloscope

At 9 October 2013 71123 user micheal wrote [reply micheal]

Pls I need to build a 5000shy6000Hz triangle wave oscillating between 0 and 12v(peak topeak is 12v since that is the supply voltage)With so many people complaining am confused as to which transistor I should use so as toensure that the triangle is perfectI am using R= 10k and C= 10nfpls any advice on the transistor amplification so that thetriangle does not get skewed or something

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 619

I need it to be perfect 12v peak to peaki dont have an oscilloscope so it makes my workharder as I would have experimented myself but maybe someone has tested and confirmeditthanks

At 2 October 2013 115142 user Shadrack wrote [reply Shadrack]

Thank you very much for the triangular wave generator circuit It works perfectly well Ivebeen trying out other circuits I got from the internet as I needed to use it for a switchshymodepower supply (my first ever) amp they didnt work except for yours which produced suchincredibly clean waves I was more than amazed This post is simply to say thank you foryour efforts they are extremely appreciated by myself Mr Giorgos Lazaridis

At 9 July 2013 83511 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

By the way I used a clamping diode connected to the capacitor and a diode and highvalue resistor between capacitor and output Now i have a perfect triangle going from shy03to 495V

Greets

K

At 9 July 2013 82449 user Kboy wrote [reply Kboy]

Ems

Hi you probably have VCC hooked up to the voltage dividerVCC needs to be connected to the full 5V VCCshy to groundInputshy of the left opamp and input of the right opamp need to be connected to the voltagedivider meaning 25V

Do you have a picture or sketch of your circuit

Greets

K

At 3 July 2013 122117 user Ems wrote [reply Ems]

Ive tried building the circuit on a breadboard but it doesnt oscillate at all I have a steady25V output Id appreciate any suggestions as to where Im going wrong Many thanks

At 16 June 2013 145042 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Going negative is normal because you probably use big capacitor Try a smallerone shy say 470 nF

At 16 June 2013 144334 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

Not exactly without capacitor it floats around 65shy7V with the same 5V amplitude Ill trywith a 2N3904 or F245C tomorrow Or are there other optionsI didnt want to use a transistor actually but if it seems to be the only solution oh well sobe it o)

I just dont understand why the voltage can go negative after the capacitor

Thanks in advance

At 16 June 2013 132117 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Since you use a rail to rail try without the capacitor It gos 0 to V

At 16 June 2013 95355 user Kboy wrote [reply Kboy]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 719

Hi

Lots of thanks for this tutorial very helpfulIm just having one problemI built this circuit with a TL082 railshytoshyrail opshyamp The purpose was to make a 25kHz triangle wave with an output going from 0 to 5 volts Itried that with a 12V computer PSU as a sourceEverything looks great and is working but with a capacitor in series with the output of the2nd opshyamp (trying to create a wave like the green one in your scope) the triangle wavegoes from shy25V to 25V instead of 0 to 5V Ive rebuild it over and over again withdifferent resistors and all but to no avail

Im lost here I dont understand Am I doing something wrong

Thanks in advance

K

At 1 May 2013 224005 user Martins wrote [reply Martins]

I love this site and you huys are doing a great jobI am using NI Multisim to simulate this circuit but i can get it to oscillate All i have is asingle line as my output for both OP AMP Please i need help if you have a copy of thiscircuit that has been simulated via multisim or any other simulator can you send it via mymailso i can see where i am missing somethingBelieve me i have tried every suggestion made on this comment pageThanks for your kind response

At 23 March 2013 220017 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Markus though i havent tried it i suppose yes

At 17 March 2013 165038 user Markus wrote [reply Markus]

Hello

I would like to thank the author of this tutorial Thank you Great tutorial that I will havegood use of

One question though Say that I use two rail to rail OPshyamps instead and remove thetransistor with its bias resistors and capacitor After that I change the 47k resistor betweenthe two OPshyamps to one just under 100kohm say 82k Wouldnt that increase the amplitude of the triangle wave coming out from the second OPshyamp close to the 5V input Thus giving closely the same result as using the transistor

ThanksMarkusSweden

At 18 October 2012 72939 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali simple 555 can go to 300KHz Use a CMOS 555 to go higher

At 16 October 2012 51132 user Kali wrote [reply Kali]

Giorgos Lazaridisthanks for your prompt reply Could you please suggest any circuit or IC which cangenerate 500khz square wave Can ic555 timer generate that particular signal

At 16 October 2012 43658 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali no the 741 can go up to 10 khz

At 16 October 2012 41211 user Kali wrote [reply Kali]

Is the first circuit efficient enough to generate 500KHz triangular and square waveforms Please let me know Thanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 819

At 13 April 2012 70908 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Brett Check this outhttpwwwpcbheavencomuserpagesFlexible_555_LED_Pulsing_Circuit

At 13 April 2012 25342 user Brett wrote [reply Brett]

Thanks for a very well described circuit I am wanting to slowly light a LED ramping upfrom off to full brightness and back down again over and over

I want a full cycle to be quite slow say 15 seconds to light and another 15 to dim againMy questions areshy will the RC values be outside what the chipcircuit can handle I believe there aremaxmin values for these and such high RC values may be outside the acceptable valuesshy will the output allow me to drive several LEDs They will be high intensity onesdrawing 30mA each and I plan on having 9 of them (there is a specific reason for being 9)Now 270mA may require a slightly higher rated transistor if I want it to run cool but thebigger question is whether the design will actually allow me to drive 9 diocese

Of course each LED would have its own current limiting resistor

BTW absolutely perfect linear is not essential

Thanks for any advice you can give

At 19 March 2012 61628 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Charlie Yep indeed the pot is to adjust a sawtooth if you want

At 19 March 2012 40710 user Charlie wrote [reply Charlie]

hii put this in falstads simulator leaving C as 1uf and R as 10K however i left the right nonshyinvert connected to gnd not the pot and i got a better triangle than with it connected to thepot (not sawtooth)

At 28 January 2012 194702 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Richard Geduld you will need to add a transistor amplifier like the 2n2222 that i haveadd to amplify the current

At 28 January 2012 191838 user Richard Geduld wrote [reply Richard Geduld]

Hi thanks for thisI would like to connect an LED to the circuit that pulses at the frequency of the trianglewave However when I connect an LED between the wave output and ground it preventsthe circuit from oscillating Is there any way to achieve thisMuch Appreciated

At 20 November 2011 192048 user josh wrote [reply josh]

yes pure triangle waves Are not an option on any of my synths Ive been looking to getinto exsperimenting with pure triangle waves

At 8 August 2011 125752 user Kammenos wrote [reply Kammenos]

dieter the beseshyemitter voltage do not exceed the 06shy07 volts depending on thetransistor voltage The parameter Vbe you refer to is the maximum reverseshybiased voltagethat the transistor diode can handle You may not reverseshybias a 2N2222 with higher than 5volts

At 8 August 2011 115315 user dieter wrote [reply dieter]

ok thanks for all the helpThis will give a a good base to further develop the circuit

One last question the 5V emitter base voltage is this the voltage applied to the base thuscoming from the comparator signal or is this the voltage on the emitter which means a

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 4: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 419

first

If you have an oscilloscope the symmetry can be fineadjusted with a straightshyforward method Just put your probe onthe integrator or the transistor output and turn the trimmer untilyou get a nice triangular waveform You may also like to have asawshytooth like waveform right edge or left edge This can beadjusted by the trimmer For large changes you should considerchanging the 47K resistor otherwise the circuit shall not oscillate

For those who does notown an oscilloscope i havesome good news A pair of PCspeakers would be your probefor the moment Connect onechannel of the speaker rightafter the capacitor and the ground of the speakers connect it tozero DO NOT CONNECT THEM AFTER THETRANSISTOR OR BEFORE THE CAPACITOR I could not

predict the results Then turn them on with the volume at 16 Start rotating the trimmer Accordingto the oscillation frequency that you have chosen you will hear an audio signal like a beep orbooooooo or something similar Continue rotating the potentiometer The signal will becomelouder and louder After a while the signal will start loosing intensity and become weaker Theposition where the signal had the loudest sound is the one that the triangular waveform has the mostequalshysided form

A last trick

It has been already mentioned that this circuit can generaterectangular pulses as well This is not the reason of creationthough There are better oscillators for this reason Nevertheless ifyou need square pulses in phase with the triangular waveform thecircuit can provide these to you

The rectangular pulses are taken directly from the outputof the comparator OPshyAmp That would be the left one in ourcircuit The pulses have almost the same amplitude as the powersupply They have just a little bit voltage shift that most of thetimes does not cause any troubles If there is a problem a DCcutoff capacitor will solve it

You should keep in mind that the rectangular pulses areinverted in comparison to the triangular waveform This mean thatwhen the triangular waveform is at its most high level the rectangular pulse is reaching zero andviceshyversa But if you compare them to the triangular waveform taken from the transistor amplifierthen you will notice that they are NOT inverted and that is because the transistor performs aninverting amplifier

Relative pages

Basic transistor circuitsThe transistor theory of operationThe voltage divider theoryOpshyAmp IC PinoutsDrCalculus OpshyAmp inverting amplifier calculatorDrCalculus OpshyAmp nonshyinverting amplifier calculatorDrCalculus Standard resistor values calculatorDrCalculus Voltage divider calculator

Comments

Name

Email (shall not be published)

waveforms Adjusting the circuit withoutan oscilloscope

How to get one channel ofyour old PC speakers jack and

use it as a probeYou should connect the

speaker channel right after theDC cutoff capacitor

The rectangular pulses areNOT inverted in comparisonto the triangular waveformtaken from the transistor

inverting amplifier

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 519

Website

Notify me of new posts via email

Write your comments below BEFORE you post a commentYou are welcome to comment for corrections and suggestions

on this page But if you have questions please use the forum instead to post it Thank you

Submit your comment

At 16 June 2015 145341 user Kenneth wrote [reply Kenneth]

Nice Thank you )

At 10 July 2014 173202 user cerene wrote [reply cerene]

it is very good lesson i learned alot from it thanks much

At 17 May 2014 51604 user Richard Anderson wrote [reply Richard Anderson]

I have been looking for a way to replace the transistor output stage with an op amp I knowI could mess with the gain to get full voltage about three looks close but I would preferthat the output stage be proportional without needing adjustment

At 11 April 2014 85026 user Erfan wrote [reply Erfan]

iam so frustrated Because every time i trying to fix my circuiti get more frustrated and iamnot getting succeedcan you please give me a schematic that works properly with LM393

At 30 March 2014 122737 user ram wrote [reply ram]

guyz help me to build a circuit to convert 230v ac to 230v triangular wave

At 12 October 2013 81945 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

mike check the specifications of the scope for 20KHz

At 10 October 2013 142110 user mike wrote [reply mike]

Will a pc scope using sound card work

At 9 October 2013 95308 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

micheal Its a prototype circuit for learning not a product so you need to configure ityourself with an oscilloscope

At 9 October 2013 71123 user micheal wrote [reply micheal]

Pls I need to build a 5000shy6000Hz triangle wave oscillating between 0 and 12v(peak topeak is 12v since that is the supply voltage)With so many people complaining am confused as to which transistor I should use so as toensure that the triangle is perfectI am using R= 10k and C= 10nfpls any advice on the transistor amplification so that thetriangle does not get skewed or something

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 619

I need it to be perfect 12v peak to peaki dont have an oscilloscope so it makes my workharder as I would have experimented myself but maybe someone has tested and confirmeditthanks

At 2 October 2013 115142 user Shadrack wrote [reply Shadrack]

Thank you very much for the triangular wave generator circuit It works perfectly well Ivebeen trying out other circuits I got from the internet as I needed to use it for a switchshymodepower supply (my first ever) amp they didnt work except for yours which produced suchincredibly clean waves I was more than amazed This post is simply to say thank you foryour efforts they are extremely appreciated by myself Mr Giorgos Lazaridis

At 9 July 2013 83511 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

By the way I used a clamping diode connected to the capacitor and a diode and highvalue resistor between capacitor and output Now i have a perfect triangle going from shy03to 495V

Greets

K

At 9 July 2013 82449 user Kboy wrote [reply Kboy]

Ems

Hi you probably have VCC hooked up to the voltage dividerVCC needs to be connected to the full 5V VCCshy to groundInputshy of the left opamp and input of the right opamp need to be connected to the voltagedivider meaning 25V

Do you have a picture or sketch of your circuit

Greets

K

At 3 July 2013 122117 user Ems wrote [reply Ems]

Ive tried building the circuit on a breadboard but it doesnt oscillate at all I have a steady25V output Id appreciate any suggestions as to where Im going wrong Many thanks

At 16 June 2013 145042 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Going negative is normal because you probably use big capacitor Try a smallerone shy say 470 nF

At 16 June 2013 144334 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

Not exactly without capacitor it floats around 65shy7V with the same 5V amplitude Ill trywith a 2N3904 or F245C tomorrow Or are there other optionsI didnt want to use a transistor actually but if it seems to be the only solution oh well sobe it o)

I just dont understand why the voltage can go negative after the capacitor

Thanks in advance

At 16 June 2013 132117 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Since you use a rail to rail try without the capacitor It gos 0 to V

At 16 June 2013 95355 user Kboy wrote [reply Kboy]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 719

Hi

Lots of thanks for this tutorial very helpfulIm just having one problemI built this circuit with a TL082 railshytoshyrail opshyamp The purpose was to make a 25kHz triangle wave with an output going from 0 to 5 volts Itried that with a 12V computer PSU as a sourceEverything looks great and is working but with a capacitor in series with the output of the2nd opshyamp (trying to create a wave like the green one in your scope) the triangle wavegoes from shy25V to 25V instead of 0 to 5V Ive rebuild it over and over again withdifferent resistors and all but to no avail

Im lost here I dont understand Am I doing something wrong

Thanks in advance

K

At 1 May 2013 224005 user Martins wrote [reply Martins]

I love this site and you huys are doing a great jobI am using NI Multisim to simulate this circuit but i can get it to oscillate All i have is asingle line as my output for both OP AMP Please i need help if you have a copy of thiscircuit that has been simulated via multisim or any other simulator can you send it via mymailso i can see where i am missing somethingBelieve me i have tried every suggestion made on this comment pageThanks for your kind response

At 23 March 2013 220017 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Markus though i havent tried it i suppose yes

At 17 March 2013 165038 user Markus wrote [reply Markus]

Hello

I would like to thank the author of this tutorial Thank you Great tutorial that I will havegood use of

One question though Say that I use two rail to rail OPshyamps instead and remove thetransistor with its bias resistors and capacitor After that I change the 47k resistor betweenthe two OPshyamps to one just under 100kohm say 82k Wouldnt that increase the amplitude of the triangle wave coming out from the second OPshyamp close to the 5V input Thus giving closely the same result as using the transistor

ThanksMarkusSweden

At 18 October 2012 72939 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali simple 555 can go to 300KHz Use a CMOS 555 to go higher

At 16 October 2012 51132 user Kali wrote [reply Kali]

Giorgos Lazaridisthanks for your prompt reply Could you please suggest any circuit or IC which cangenerate 500khz square wave Can ic555 timer generate that particular signal

At 16 October 2012 43658 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali no the 741 can go up to 10 khz

At 16 October 2012 41211 user Kali wrote [reply Kali]

Is the first circuit efficient enough to generate 500KHz triangular and square waveforms Please let me know Thanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 819

At 13 April 2012 70908 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Brett Check this outhttpwwwpcbheavencomuserpagesFlexible_555_LED_Pulsing_Circuit

At 13 April 2012 25342 user Brett wrote [reply Brett]

Thanks for a very well described circuit I am wanting to slowly light a LED ramping upfrom off to full brightness and back down again over and over

I want a full cycle to be quite slow say 15 seconds to light and another 15 to dim againMy questions areshy will the RC values be outside what the chipcircuit can handle I believe there aremaxmin values for these and such high RC values may be outside the acceptable valuesshy will the output allow me to drive several LEDs They will be high intensity onesdrawing 30mA each and I plan on having 9 of them (there is a specific reason for being 9)Now 270mA may require a slightly higher rated transistor if I want it to run cool but thebigger question is whether the design will actually allow me to drive 9 diocese

Of course each LED would have its own current limiting resistor

BTW absolutely perfect linear is not essential

Thanks for any advice you can give

At 19 March 2012 61628 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Charlie Yep indeed the pot is to adjust a sawtooth if you want

At 19 March 2012 40710 user Charlie wrote [reply Charlie]

hii put this in falstads simulator leaving C as 1uf and R as 10K however i left the right nonshyinvert connected to gnd not the pot and i got a better triangle than with it connected to thepot (not sawtooth)

At 28 January 2012 194702 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Richard Geduld you will need to add a transistor amplifier like the 2n2222 that i haveadd to amplify the current

At 28 January 2012 191838 user Richard Geduld wrote [reply Richard Geduld]

Hi thanks for thisI would like to connect an LED to the circuit that pulses at the frequency of the trianglewave However when I connect an LED between the wave output and ground it preventsthe circuit from oscillating Is there any way to achieve thisMuch Appreciated

At 20 November 2011 192048 user josh wrote [reply josh]

yes pure triangle waves Are not an option on any of my synths Ive been looking to getinto exsperimenting with pure triangle waves

At 8 August 2011 125752 user Kammenos wrote [reply Kammenos]

dieter the beseshyemitter voltage do not exceed the 06shy07 volts depending on thetransistor voltage The parameter Vbe you refer to is the maximum reverseshybiased voltagethat the transistor diode can handle You may not reverseshybias a 2N2222 with higher than 5volts

At 8 August 2011 115315 user dieter wrote [reply dieter]

ok thanks for all the helpThis will give a a good base to further develop the circuit

One last question the 5V emitter base voltage is this the voltage applied to the base thuscoming from the comparator signal or is this the voltage on the emitter which means a

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 5: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 519

Website

Notify me of new posts via email

Write your comments below BEFORE you post a commentYou are welcome to comment for corrections and suggestions

on this page But if you have questions please use the forum instead to post it Thank you

Submit your comment

At 16 June 2015 145341 user Kenneth wrote [reply Kenneth]

Nice Thank you )

At 10 July 2014 173202 user cerene wrote [reply cerene]

it is very good lesson i learned alot from it thanks much

At 17 May 2014 51604 user Richard Anderson wrote [reply Richard Anderson]

I have been looking for a way to replace the transistor output stage with an op amp I knowI could mess with the gain to get full voltage about three looks close but I would preferthat the output stage be proportional without needing adjustment

At 11 April 2014 85026 user Erfan wrote [reply Erfan]

iam so frustrated Because every time i trying to fix my circuiti get more frustrated and iamnot getting succeedcan you please give me a schematic that works properly with LM393

At 30 March 2014 122737 user ram wrote [reply ram]

guyz help me to build a circuit to convert 230v ac to 230v triangular wave

At 12 October 2013 81945 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

mike check the specifications of the scope for 20KHz

At 10 October 2013 142110 user mike wrote [reply mike]

Will a pc scope using sound card work

At 9 October 2013 95308 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

micheal Its a prototype circuit for learning not a product so you need to configure ityourself with an oscilloscope

At 9 October 2013 71123 user micheal wrote [reply micheal]

Pls I need to build a 5000shy6000Hz triangle wave oscillating between 0 and 12v(peak topeak is 12v since that is the supply voltage)With so many people complaining am confused as to which transistor I should use so as toensure that the triangle is perfectI am using R= 10k and C= 10nfpls any advice on the transistor amplification so that thetriangle does not get skewed or something

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 619

I need it to be perfect 12v peak to peaki dont have an oscilloscope so it makes my workharder as I would have experimented myself but maybe someone has tested and confirmeditthanks

At 2 October 2013 115142 user Shadrack wrote [reply Shadrack]

Thank you very much for the triangular wave generator circuit It works perfectly well Ivebeen trying out other circuits I got from the internet as I needed to use it for a switchshymodepower supply (my first ever) amp they didnt work except for yours which produced suchincredibly clean waves I was more than amazed This post is simply to say thank you foryour efforts they are extremely appreciated by myself Mr Giorgos Lazaridis

At 9 July 2013 83511 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

By the way I used a clamping diode connected to the capacitor and a diode and highvalue resistor between capacitor and output Now i have a perfect triangle going from shy03to 495V

Greets

K

At 9 July 2013 82449 user Kboy wrote [reply Kboy]

Ems

Hi you probably have VCC hooked up to the voltage dividerVCC needs to be connected to the full 5V VCCshy to groundInputshy of the left opamp and input of the right opamp need to be connected to the voltagedivider meaning 25V

Do you have a picture or sketch of your circuit

Greets

K

At 3 July 2013 122117 user Ems wrote [reply Ems]

Ive tried building the circuit on a breadboard but it doesnt oscillate at all I have a steady25V output Id appreciate any suggestions as to where Im going wrong Many thanks

At 16 June 2013 145042 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Going negative is normal because you probably use big capacitor Try a smallerone shy say 470 nF

At 16 June 2013 144334 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

Not exactly without capacitor it floats around 65shy7V with the same 5V amplitude Ill trywith a 2N3904 or F245C tomorrow Or are there other optionsI didnt want to use a transistor actually but if it seems to be the only solution oh well sobe it o)

I just dont understand why the voltage can go negative after the capacitor

Thanks in advance

At 16 June 2013 132117 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Since you use a rail to rail try without the capacitor It gos 0 to V

At 16 June 2013 95355 user Kboy wrote [reply Kboy]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 719

Hi

Lots of thanks for this tutorial very helpfulIm just having one problemI built this circuit with a TL082 railshytoshyrail opshyamp The purpose was to make a 25kHz triangle wave with an output going from 0 to 5 volts Itried that with a 12V computer PSU as a sourceEverything looks great and is working but with a capacitor in series with the output of the2nd opshyamp (trying to create a wave like the green one in your scope) the triangle wavegoes from shy25V to 25V instead of 0 to 5V Ive rebuild it over and over again withdifferent resistors and all but to no avail

Im lost here I dont understand Am I doing something wrong

Thanks in advance

K

At 1 May 2013 224005 user Martins wrote [reply Martins]

I love this site and you huys are doing a great jobI am using NI Multisim to simulate this circuit but i can get it to oscillate All i have is asingle line as my output for both OP AMP Please i need help if you have a copy of thiscircuit that has been simulated via multisim or any other simulator can you send it via mymailso i can see where i am missing somethingBelieve me i have tried every suggestion made on this comment pageThanks for your kind response

At 23 March 2013 220017 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Markus though i havent tried it i suppose yes

At 17 March 2013 165038 user Markus wrote [reply Markus]

Hello

I would like to thank the author of this tutorial Thank you Great tutorial that I will havegood use of

One question though Say that I use two rail to rail OPshyamps instead and remove thetransistor with its bias resistors and capacitor After that I change the 47k resistor betweenthe two OPshyamps to one just under 100kohm say 82k Wouldnt that increase the amplitude of the triangle wave coming out from the second OPshyamp close to the 5V input Thus giving closely the same result as using the transistor

ThanksMarkusSweden

At 18 October 2012 72939 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali simple 555 can go to 300KHz Use a CMOS 555 to go higher

At 16 October 2012 51132 user Kali wrote [reply Kali]

Giorgos Lazaridisthanks for your prompt reply Could you please suggest any circuit or IC which cangenerate 500khz square wave Can ic555 timer generate that particular signal

At 16 October 2012 43658 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali no the 741 can go up to 10 khz

At 16 October 2012 41211 user Kali wrote [reply Kali]

Is the first circuit efficient enough to generate 500KHz triangular and square waveforms Please let me know Thanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 819

At 13 April 2012 70908 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Brett Check this outhttpwwwpcbheavencomuserpagesFlexible_555_LED_Pulsing_Circuit

At 13 April 2012 25342 user Brett wrote [reply Brett]

Thanks for a very well described circuit I am wanting to slowly light a LED ramping upfrom off to full brightness and back down again over and over

I want a full cycle to be quite slow say 15 seconds to light and another 15 to dim againMy questions areshy will the RC values be outside what the chipcircuit can handle I believe there aremaxmin values for these and such high RC values may be outside the acceptable valuesshy will the output allow me to drive several LEDs They will be high intensity onesdrawing 30mA each and I plan on having 9 of them (there is a specific reason for being 9)Now 270mA may require a slightly higher rated transistor if I want it to run cool but thebigger question is whether the design will actually allow me to drive 9 diocese

Of course each LED would have its own current limiting resistor

BTW absolutely perfect linear is not essential

Thanks for any advice you can give

At 19 March 2012 61628 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Charlie Yep indeed the pot is to adjust a sawtooth if you want

At 19 March 2012 40710 user Charlie wrote [reply Charlie]

hii put this in falstads simulator leaving C as 1uf and R as 10K however i left the right nonshyinvert connected to gnd not the pot and i got a better triangle than with it connected to thepot (not sawtooth)

At 28 January 2012 194702 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Richard Geduld you will need to add a transistor amplifier like the 2n2222 that i haveadd to amplify the current

At 28 January 2012 191838 user Richard Geduld wrote [reply Richard Geduld]

Hi thanks for thisI would like to connect an LED to the circuit that pulses at the frequency of the trianglewave However when I connect an LED between the wave output and ground it preventsthe circuit from oscillating Is there any way to achieve thisMuch Appreciated

At 20 November 2011 192048 user josh wrote [reply josh]

yes pure triangle waves Are not an option on any of my synths Ive been looking to getinto exsperimenting with pure triangle waves

At 8 August 2011 125752 user Kammenos wrote [reply Kammenos]

dieter the beseshyemitter voltage do not exceed the 06shy07 volts depending on thetransistor voltage The parameter Vbe you refer to is the maximum reverseshybiased voltagethat the transistor diode can handle You may not reverseshybias a 2N2222 with higher than 5volts

At 8 August 2011 115315 user dieter wrote [reply dieter]

ok thanks for all the helpThis will give a a good base to further develop the circuit

One last question the 5V emitter base voltage is this the voltage applied to the base thuscoming from the comparator signal or is this the voltage on the emitter which means a

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 6: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 619

I need it to be perfect 12v peak to peaki dont have an oscilloscope so it makes my workharder as I would have experimented myself but maybe someone has tested and confirmeditthanks

At 2 October 2013 115142 user Shadrack wrote [reply Shadrack]

Thank you very much for the triangular wave generator circuit It works perfectly well Ivebeen trying out other circuits I got from the internet as I needed to use it for a switchshymodepower supply (my first ever) amp they didnt work except for yours which produced suchincredibly clean waves I was more than amazed This post is simply to say thank you foryour efforts they are extremely appreciated by myself Mr Giorgos Lazaridis

At 9 July 2013 83511 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

By the way I used a clamping diode connected to the capacitor and a diode and highvalue resistor between capacitor and output Now i have a perfect triangle going from shy03to 495V

Greets

K

At 9 July 2013 82449 user Kboy wrote [reply Kboy]

Ems

Hi you probably have VCC hooked up to the voltage dividerVCC needs to be connected to the full 5V VCCshy to groundInputshy of the left opamp and input of the right opamp need to be connected to the voltagedivider meaning 25V

Do you have a picture or sketch of your circuit

Greets

K

At 3 July 2013 122117 user Ems wrote [reply Ems]

Ive tried building the circuit on a breadboard but it doesnt oscillate at all I have a steady25V output Id appreciate any suggestions as to where Im going wrong Many thanks

At 16 June 2013 145042 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Going negative is normal because you probably use big capacitor Try a smallerone shy say 470 nF

At 16 June 2013 144334 user Kboy wrote [reply Kboy]

Giorgos Lazaridis

Not exactly without capacitor it floats around 65shy7V with the same 5V amplitude Ill trywith a 2N3904 or F245C tomorrow Or are there other optionsI didnt want to use a transistor actually but if it seems to be the only solution oh well sobe it o)

I just dont understand why the voltage can go negative after the capacitor

Thanks in advance

At 16 June 2013 132117 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kboy Since you use a rail to rail try without the capacitor It gos 0 to V

At 16 June 2013 95355 user Kboy wrote [reply Kboy]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 719

Hi

Lots of thanks for this tutorial very helpfulIm just having one problemI built this circuit with a TL082 railshytoshyrail opshyamp The purpose was to make a 25kHz triangle wave with an output going from 0 to 5 volts Itried that with a 12V computer PSU as a sourceEverything looks great and is working but with a capacitor in series with the output of the2nd opshyamp (trying to create a wave like the green one in your scope) the triangle wavegoes from shy25V to 25V instead of 0 to 5V Ive rebuild it over and over again withdifferent resistors and all but to no avail

Im lost here I dont understand Am I doing something wrong

Thanks in advance

K

At 1 May 2013 224005 user Martins wrote [reply Martins]

I love this site and you huys are doing a great jobI am using NI Multisim to simulate this circuit but i can get it to oscillate All i have is asingle line as my output for both OP AMP Please i need help if you have a copy of thiscircuit that has been simulated via multisim or any other simulator can you send it via mymailso i can see where i am missing somethingBelieve me i have tried every suggestion made on this comment pageThanks for your kind response

At 23 March 2013 220017 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Markus though i havent tried it i suppose yes

At 17 March 2013 165038 user Markus wrote [reply Markus]

Hello

I would like to thank the author of this tutorial Thank you Great tutorial that I will havegood use of

One question though Say that I use two rail to rail OPshyamps instead and remove thetransistor with its bias resistors and capacitor After that I change the 47k resistor betweenthe two OPshyamps to one just under 100kohm say 82k Wouldnt that increase the amplitude of the triangle wave coming out from the second OPshyamp close to the 5V input Thus giving closely the same result as using the transistor

ThanksMarkusSweden

At 18 October 2012 72939 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali simple 555 can go to 300KHz Use a CMOS 555 to go higher

At 16 October 2012 51132 user Kali wrote [reply Kali]

Giorgos Lazaridisthanks for your prompt reply Could you please suggest any circuit or IC which cangenerate 500khz square wave Can ic555 timer generate that particular signal

At 16 October 2012 43658 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali no the 741 can go up to 10 khz

At 16 October 2012 41211 user Kali wrote [reply Kali]

Is the first circuit efficient enough to generate 500KHz triangular and square waveforms Please let me know Thanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 819

At 13 April 2012 70908 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Brett Check this outhttpwwwpcbheavencomuserpagesFlexible_555_LED_Pulsing_Circuit

At 13 April 2012 25342 user Brett wrote [reply Brett]

Thanks for a very well described circuit I am wanting to slowly light a LED ramping upfrom off to full brightness and back down again over and over

I want a full cycle to be quite slow say 15 seconds to light and another 15 to dim againMy questions areshy will the RC values be outside what the chipcircuit can handle I believe there aremaxmin values for these and such high RC values may be outside the acceptable valuesshy will the output allow me to drive several LEDs They will be high intensity onesdrawing 30mA each and I plan on having 9 of them (there is a specific reason for being 9)Now 270mA may require a slightly higher rated transistor if I want it to run cool but thebigger question is whether the design will actually allow me to drive 9 diocese

Of course each LED would have its own current limiting resistor

BTW absolutely perfect linear is not essential

Thanks for any advice you can give

At 19 March 2012 61628 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Charlie Yep indeed the pot is to adjust a sawtooth if you want

At 19 March 2012 40710 user Charlie wrote [reply Charlie]

hii put this in falstads simulator leaving C as 1uf and R as 10K however i left the right nonshyinvert connected to gnd not the pot and i got a better triangle than with it connected to thepot (not sawtooth)

At 28 January 2012 194702 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Richard Geduld you will need to add a transistor amplifier like the 2n2222 that i haveadd to amplify the current

At 28 January 2012 191838 user Richard Geduld wrote [reply Richard Geduld]

Hi thanks for thisI would like to connect an LED to the circuit that pulses at the frequency of the trianglewave However when I connect an LED between the wave output and ground it preventsthe circuit from oscillating Is there any way to achieve thisMuch Appreciated

At 20 November 2011 192048 user josh wrote [reply josh]

yes pure triangle waves Are not an option on any of my synths Ive been looking to getinto exsperimenting with pure triangle waves

At 8 August 2011 125752 user Kammenos wrote [reply Kammenos]

dieter the beseshyemitter voltage do not exceed the 06shy07 volts depending on thetransistor voltage The parameter Vbe you refer to is the maximum reverseshybiased voltagethat the transistor diode can handle You may not reverseshybias a 2N2222 with higher than 5volts

At 8 August 2011 115315 user dieter wrote [reply dieter]

ok thanks for all the helpThis will give a a good base to further develop the circuit

One last question the 5V emitter base voltage is this the voltage applied to the base thuscoming from the comparator signal or is this the voltage on the emitter which means a

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 7: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 719

Hi

Lots of thanks for this tutorial very helpfulIm just having one problemI built this circuit with a TL082 railshytoshyrail opshyamp The purpose was to make a 25kHz triangle wave with an output going from 0 to 5 volts Itried that with a 12V computer PSU as a sourceEverything looks great and is working but with a capacitor in series with the output of the2nd opshyamp (trying to create a wave like the green one in your scope) the triangle wavegoes from shy25V to 25V instead of 0 to 5V Ive rebuild it over and over again withdifferent resistors and all but to no avail

Im lost here I dont understand Am I doing something wrong

Thanks in advance

K

At 1 May 2013 224005 user Martins wrote [reply Martins]

I love this site and you huys are doing a great jobI am using NI Multisim to simulate this circuit but i can get it to oscillate All i have is asingle line as my output for both OP AMP Please i need help if you have a copy of thiscircuit that has been simulated via multisim or any other simulator can you send it via mymailso i can see where i am missing somethingBelieve me i have tried every suggestion made on this comment pageThanks for your kind response

At 23 March 2013 220017 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Markus though i havent tried it i suppose yes

At 17 March 2013 165038 user Markus wrote [reply Markus]

Hello

I would like to thank the author of this tutorial Thank you Great tutorial that I will havegood use of

One question though Say that I use two rail to rail OPshyamps instead and remove thetransistor with its bias resistors and capacitor After that I change the 47k resistor betweenthe two OPshyamps to one just under 100kohm say 82k Wouldnt that increase the amplitude of the triangle wave coming out from the second OPshyamp close to the 5V input Thus giving closely the same result as using the transistor

ThanksMarkusSweden

At 18 October 2012 72939 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali simple 555 can go to 300KHz Use a CMOS 555 to go higher

At 16 October 2012 51132 user Kali wrote [reply Kali]

Giorgos Lazaridisthanks for your prompt reply Could you please suggest any circuit or IC which cangenerate 500khz square wave Can ic555 timer generate that particular signal

At 16 October 2012 43658 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Kali no the 741 can go up to 10 khz

At 16 October 2012 41211 user Kali wrote [reply Kali]

Is the first circuit efficient enough to generate 500KHz triangular and square waveforms Please let me know Thanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 819

At 13 April 2012 70908 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Brett Check this outhttpwwwpcbheavencomuserpagesFlexible_555_LED_Pulsing_Circuit

At 13 April 2012 25342 user Brett wrote [reply Brett]

Thanks for a very well described circuit I am wanting to slowly light a LED ramping upfrom off to full brightness and back down again over and over

I want a full cycle to be quite slow say 15 seconds to light and another 15 to dim againMy questions areshy will the RC values be outside what the chipcircuit can handle I believe there aremaxmin values for these and such high RC values may be outside the acceptable valuesshy will the output allow me to drive several LEDs They will be high intensity onesdrawing 30mA each and I plan on having 9 of them (there is a specific reason for being 9)Now 270mA may require a slightly higher rated transistor if I want it to run cool but thebigger question is whether the design will actually allow me to drive 9 diocese

Of course each LED would have its own current limiting resistor

BTW absolutely perfect linear is not essential

Thanks for any advice you can give

At 19 March 2012 61628 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Charlie Yep indeed the pot is to adjust a sawtooth if you want

At 19 March 2012 40710 user Charlie wrote [reply Charlie]

hii put this in falstads simulator leaving C as 1uf and R as 10K however i left the right nonshyinvert connected to gnd not the pot and i got a better triangle than with it connected to thepot (not sawtooth)

At 28 January 2012 194702 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Richard Geduld you will need to add a transistor amplifier like the 2n2222 that i haveadd to amplify the current

At 28 January 2012 191838 user Richard Geduld wrote [reply Richard Geduld]

Hi thanks for thisI would like to connect an LED to the circuit that pulses at the frequency of the trianglewave However when I connect an LED between the wave output and ground it preventsthe circuit from oscillating Is there any way to achieve thisMuch Appreciated

At 20 November 2011 192048 user josh wrote [reply josh]

yes pure triangle waves Are not an option on any of my synths Ive been looking to getinto exsperimenting with pure triangle waves

At 8 August 2011 125752 user Kammenos wrote [reply Kammenos]

dieter the beseshyemitter voltage do not exceed the 06shy07 volts depending on thetransistor voltage The parameter Vbe you refer to is the maximum reverseshybiased voltagethat the transistor diode can handle You may not reverseshybias a 2N2222 with higher than 5volts

At 8 August 2011 115315 user dieter wrote [reply dieter]

ok thanks for all the helpThis will give a a good base to further develop the circuit

One last question the 5V emitter base voltage is this the voltage applied to the base thuscoming from the comparator signal or is this the voltage on the emitter which means a

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 8: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 819

At 13 April 2012 70908 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Brett Check this outhttpwwwpcbheavencomuserpagesFlexible_555_LED_Pulsing_Circuit

At 13 April 2012 25342 user Brett wrote [reply Brett]

Thanks for a very well described circuit I am wanting to slowly light a LED ramping upfrom off to full brightness and back down again over and over

I want a full cycle to be quite slow say 15 seconds to light and another 15 to dim againMy questions areshy will the RC values be outside what the chipcircuit can handle I believe there aremaxmin values for these and such high RC values may be outside the acceptable valuesshy will the output allow me to drive several LEDs They will be high intensity onesdrawing 30mA each and I plan on having 9 of them (there is a specific reason for being 9)Now 270mA may require a slightly higher rated transistor if I want it to run cool but thebigger question is whether the design will actually allow me to drive 9 diocese

Of course each LED would have its own current limiting resistor

BTW absolutely perfect linear is not essential

Thanks for any advice you can give

At 19 March 2012 61628 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Charlie Yep indeed the pot is to adjust a sawtooth if you want

At 19 March 2012 40710 user Charlie wrote [reply Charlie]

hii put this in falstads simulator leaving C as 1uf and R as 10K however i left the right nonshyinvert connected to gnd not the pot and i got a better triangle than with it connected to thepot (not sawtooth)

At 28 January 2012 194702 user Giorgos Lazaridis wrote [reply Giorgos Lazaridis]

Richard Geduld you will need to add a transistor amplifier like the 2n2222 that i haveadd to amplify the current

At 28 January 2012 191838 user Richard Geduld wrote [reply Richard Geduld]

Hi thanks for thisI would like to connect an LED to the circuit that pulses at the frequency of the trianglewave However when I connect an LED between the wave output and ground it preventsthe circuit from oscillating Is there any way to achieve thisMuch Appreciated

At 20 November 2011 192048 user josh wrote [reply josh]

yes pure triangle waves Are not an option on any of my synths Ive been looking to getinto exsperimenting with pure triangle waves

At 8 August 2011 125752 user Kammenos wrote [reply Kammenos]

dieter the beseshyemitter voltage do not exceed the 06shy07 volts depending on thetransistor voltage The parameter Vbe you refer to is the maximum reverseshybiased voltagethat the transistor diode can handle You may not reverseshybias a 2N2222 with higher than 5volts

At 8 August 2011 115315 user dieter wrote [reply dieter]

ok thanks for all the helpThis will give a a good base to further develop the circuit

One last question the 5V emitter base voltage is this the voltage applied to the base thuscoming from the comparator signal or is this the voltage on the emitter which means a

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 9: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 919

negative 5 volts

I ask because in the term BVeb and also in your description the emitter is mentioned first

At 8 August 2011 72522 user Kammenos wrote [reply Kammenos]

dieter unfortunately i am not the best one to tell you about transistors i will try though Igoogled and found that 2n2222 can be substituted with the BC337 2N4401 and 2N3904(attention because it has different pinout) Here are some specs that you need to take intoaccount

First the Base open emitter and collector voltages must be sufficient for your applicationAs you need 5 volts most transistors are ok The collector current (Ic) must be enough todrive your load 2N2222 can handle up to 800mA The power dissipation must be able tohandle your load 2N2222 handles up to 500mW

The above parameters have to do with the power of the transistor One important parameterwhich must be near the same is the current amplification usually shown as hfe 2N2222has around 75 so your transistor should not exceed 100 hfe

I hope thats enough

At 5 August 2011 63530 user dieter wrote [reply dieter]

My question about the voltage was about the square wave coming out of the third opampwhen creating the pwm wave in this circuit

httppcbheavencomscriptsimagepresentphpfilename=2Fcircuitpages2Fimages2Fvoltagecontrolledpwm_1246686333jpg

Looking at the square graph and presuming that the scale of the oscilloscope presenting thesquare also is set to 5 volts its quite safe to say that the low voltage is about 125V It touches the first line which is 14 of 5VSo this is quite ok

The 2n2222 transistor is not for sale here and i wonder if you know which other modelswould be a good replacementI looked at transistor specs and I am not sure which values should match or be close to the2n2222s Could you provide me with some properties the transistor should meet in orderfor me to make a proper choiceWe can rule out breakdown voltage limits since they are always higher then what thiscircuit is powered by so it will come down to other voltage and several currentrequirements I am correct

At 4 August 2011 114949 user Kammenos wrote [reply Kammenos]

dieter i do not really remember what the low voltage was but i can tell you from mypicture of the oscilloscope that it must be around 25 volts Look the picture with the 3lines The blue is the 0shy5 volts and the yellow is the output of the circuit before thecapacitor The green is after the capacitor I think that i had the same voltdiv selection forall channels and also i had the 0 line for all channels aligned otherwise this picture wouldnot have sense So i can safely assume that the low voltage for the yellow line is close to25 volts

It is certain that if you directly drive a mosfet it will not work as expected You need to adda transistor to scale the voltage to the levels you want

At 4 August 2011 75228 user dieter wrote [reply dieter]

Hello kammenos

unforunately not my power supply is a car battery with a steady 124V when under load

After some study into opamp characteristics and especially the 741 I came to theconclusion that due to the design it simply is not possible for the 741 to produce anegative signal out of only a positive currentWith me my oscilloscope sais it does so it has to be my oscilloscope soundcardmeasuring wires or anything other then the circuit itself otherwise I should have a magic orfaulty 741 installedThis is exactly what you say now so its quite a relieve not to have to break my headanymore over what is wrong with the circuit

The square wave according to my scope also forms around the 0v line which is animpossibility so it simply has to be the measuring equipment

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 10: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1019

Its time for a real scope

Another thing When you put the triangle through the second comparator to produce thesquare pwm signal what is your voltage of the low off part commonly as I read it shouldbe around the 18Vcis that correct

my purpose is to use it as a function generator to drive a power mosfet and as I read in thespecs the threshold voltage lies around the 21V minimum so if the off time voltage of thewave is around 18V the mosfet still should be fully closed

Can you confirm this from your experience

Thank you very much for your help so far

At 4 August 2011 44901 user Kammenos wrote [reply Kammenos]

dieter aaaaa now i understand what you mean You mean that the output of the opshyamp isa signal around the ground correct Are you using dual power supply like for example +12and shy12 or single (like for example +12 and 0) A signal around the ground is not possiblewith single power supply It could be also a setting on the oscilloscope like for example asetting for AC or DC signal in the input

At 3 August 2011 223111 user dieter wrote [reply dieter]

Hello kammenos

Yes I already thought so about the transistor Its the first time I work with them mosfetsseem to be less sensitive

But the transistor doesnt explain the signal forming equally around the 0v axis instead ofabove This signal was the outcome of the basic circuit WITHOUT transistor and extra capacitor As far as I know with the basic circuit it shouldnt even be possible to create a signal in thenegative

I checked the connections over and over again and rebuilt the circuit several timeseverything is ok but still nothing changes

The only option I can think of is the influence of my oscilloscope perhapsIt is a sound card version I made the wires myself using a coax and two resistors to reducethe voltage Whatever voltage I use in the wires however this doesnt change anything

This really puzzles me

Apart from the transistor which isnt built in what could cause the +V shyV signal in thebasic circuit you think

At 3 August 2011 44916 user Kammenos wrote [reply Kammenos]

dieter probably the transistor is dead You must be careful when prototyping withtransistors The base resistors must never become too close to zero I burn transistorsmyself this way To avoid this whenever i am not lazy i put a small resistor (like 220 or330 ohms) in series with the pot so that if i accidentally go to zero ohms the current willnot exceed maximum Moreover there are situations where transistor biasing require very fine turns on thepotentiometer If this is the case you may try to change the 470 resistor connected at the Cof the transistor Be careful not to put a smaller resistor than 150 ohms there

At 31 July 2011 203243 user dieter wrote [reply dieter]

kammenos

I havent placed the 130K and transistor yet The +12v shy12v triangle as described forms asresult of the basic circuit with only the 47k 100k and R between the opamps and thecapacitor as shown in the very first schematic on this page strange

I added the transistor circuit today using a fixed 120k resistor It gave a signal also aroundthe 0 volt lineAfter building in a pot I wasnt able to get a signal at all and when put back to the fixedresistor configuration it remained dead Are transistors easily damaged the onlyexplanation i have for the transistor circuit to stop producing a signal

At 31 July 2011 70751 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 11: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1119

dieter obviously you have to change the polarization of the transistor amplifier Do thisby changing the 130K resistor Put a potentiometer instead When you set the pot and youhave the output you want then you can replace the potentiometer with a resistor (measurethe resistance of the potentiometer)

At 30 July 2011 230944 user dieter wrote [reply dieter]

Hello Kamennos

I have built this circuit because in combination with the dcshycontrolled comparator and avariable resister in the opamp circuit I hoped I was able to get a frequency and pwmcontrolled ttlshylook alike circuit This is exactly what I was looking for

It works well except for 1 major difference between the result of your triangle circuit andmine the triangle forms around the 0v axis so from shy 12v to +12V I used 12V instead of5 however with 5V I got the same results

I used the exact same components and the basic circuit so without the extra capacitor andthe transistor with resistorsI did change the value of the capacitor over the integrator and used a variable resistor forfrequencys is the range of 3shy9 kHzThese do not change the character of the wave I presume only the frequency

This link shows a screenprint of the wave

httpfarm7staticflickrcom60025992129946_f39c6e3772jpg

I really need this wave with its lowest point on the 0 volt line as you have but I have noidea how to do this or what to change I am quite a beginner in this area Theoretically there shouldnt be a need to change anything at all but practically thereobviously isI checked everything a dozen times but it is exactly as you prescribed here on this page

Do you have any ideas to what might have gone wrong

At 25 January 2011 75308 user Kammenos wrote [reply Kammenos]

MST you will need to work with a high voltage transistor like NTE175 or similar I cannottell you more details unless i test it myself as working with such voltages is dangerous

At 24 January 2011 211539 user MST wrote [reply MST]

How to get the triangular wave with amplitude 245V or 250V Because I want to comparethe triangular wave with sine wave of amplitude 240V to produce Pulse Width ModulationPlease advice Thank you in advance

At 19 January 2011 122506 user Milen wrote [reply Milen]

Yes Kammenos

I plan to drive a DC motor but I think that PWM has to reach 0V in order to sithch theopen collector transistor I hve trnasistor BD241 and I plan to drive the motor trough it Asafter I will need to drive the motor in both directions of rotation I will need to do it troughHshyBridge LM298

Do you think that after the transistor or the HshyBrigge I will have PWM going dowin to 0V

Because I think that if the PWM does not go to 0V I will be not able to full use thecapacity of the PWM speed regulation method

Thanks

At 19 January 2011 104956 user Kammenos wrote [reply Kammenos]

Milen 741 is normal to have this offset and cannot become 0 Only if you had a negativesupply as well (eg +5 shy5) What do you want to drive with this PWM anyway A transistorswitch will solve you the problem 100 (which is no problem at all) Do you plan todirectly connect something on the 741 like a motor

At 18 January 2011 211855 user Milen wrote [reply Milen]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 12: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1219

Hello KammenosTriangle wave at the colector of 2N2222 is quite a lot improved after tunning the transistorbiasing By using two potentiometers I found that R130 kohm has to be changed to 100kohms and R22 kohms has to be changed to R10+R47 in series

But the problem with the PWM at pin 6 of the third 741 still can not be solved No changeis observed The bottom edge of the wave still stays at 18 V and does not want to change at all This isnot acceptable for PWM waveI think that this is some problem with the third 741 op amp What ever you do it alwaysstays at 18V bottom edge

You can see the pictures herehttptinypiccomviewphppic=dvouuhamps=7httptinypiccomviewphppic=1z4eb80amps=7

Do you have any idea how to make the PWM to reach 0V at the bottom

Thanks

At 18 January 2011 114806 user Milen wrote [reply Milen]

Thanks Kammenos

I will try itonce I am back from work and sure that i will let you know the results

At 18 January 2011 105726 user Kammenos wrote [reply Kammenos]

The Rb is correct Just to be sure add a small resistor (like 220 Ohms) between the Rb andthe power supply (so it never becomes 5V) As far as the 4K7 pot you do not have it correct Remove the wire from the pot to groundAs a matter of fact for this potentiometer (which will be connected actually as a rheostat)only the 2 connections will be used the middle and one other (does not really matterwhich) The middle will go to the base of the transistor (like the one from Rb shy as you haveit now) and the other will go to the capacitor Tell me the results of this

At 18 January 2011 103714 user Milen wrote [reply Milen]

Thanks Kammenos for your supportActually I am beginner in this field I heve prepared two pictures which you can see in thefollowing linkshttptinypiccomviewphppic=2vs1audamps=7httptinypiccomviewphppic=6sxvnsamps=7Is this the righr way to connect the potentiometer (100 kohms) like voltage divider on theplace of the current 130 kohms resistorCan I use also similar potentiometer of 47 kohms on the place of current 22 kohms resistorin order to be more flexible in tuning the transistorIf this on the pirture is a wrong connection of the potentiometer please tell me which pinof the potentiometer where to be connected

Thanks

At 18 January 2011 62521 user Kammenos wrote [reply Kammenos]

Ok Milen i got the point What you really need to do is change the biasing of thetransistor I use one 130K resistor and a 22K to bias the base while you should use avoltage divider with a potentiometer (for test of course and then replace with resistors) sothat you can transfer the Q Do you know how to do this

BYV 26E is fast but has forward voltage typical to 25 volts The 1N4148 has typical 075to 1 The best solution of all would be a shottky diode with less forward voltage 1N5817for example has 035 drop

If you have a potentiometer like 100K try to change the transistor bias In that case keepin mind that you may need to decrease the 22K resistor The must also be much decreasedsomething like 1K or 15K is a good start

At 17 January 2011 210919 user Milen wrote [reply Milen]

Hello KammenosI tried it to put diode immediately after the 1uF (between the capacitor and the 33 kohmresisistor) I have diode BYV 26E (could I use this one) which is supper fast one Butwith this diode I got a stright line voltage of 56 V (circuit supply voltage is 6V) at pin 6 of

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 13: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1319

the third 741 where the PMW has to appear I have UA741CP chip My prblem is that I can not get PWM signal going down to 0V as it has to be but I have

18V at the bottom edge of the PWM signal as on the picture here httptinypiccomviewphppic=2zex8opamps=7

Would you please suggest some other solution or I realy have to try with 1N4148 diode

Thanks

At 17 January 2011 92656 user Kammenos wrote [reply Kammenos]

Milen try to add a diode in series right after the capacitor (anode connected to thecapacitor) It will cause a slight voltage drop For example 1N4148 will drop some 07volts You can choose another resistor for smaller drop but i do not think this will benecessary If you have problem with the switching speed use a faster diode (again i think1N4148 will be fine)

At 15 January 2011 222012 user Milen wrote [reply Milen]

Hello Kamennos

I bought a breadboard and assembled the circuit on it this is the full circuit for the PWMgeneration with voltage control The circuit now oscillates properly The problem is thatafter the 1uF electrolytic capacitors I still have 03 035 V of DC voltage and I can notremove it I changed the capacitor with to 2uF and to 10 nF but still the same It is the samesituation at the collector of the 2N2222 transistor where I have 06 07V DCI run the circuit with supply voltage of 45V The resistor r is 47 kohms and the capacitoris 100 nF as I target 1 kHz of frequency I have put some pictures at the following linkshttptinypiccomviewphppic=jsir2ramps=7httptinypiccomviewphppic=v45e8xamps=7httptinypiccomviewphppic=ofzlgkamps=7httptinypiccomviewphppic=6gkgfoamps=7httptinypiccomviewphppic=fdyb20amps=7httptinypiccomviewphppic=iolp9vamps=7httptinypiccomviewphppic=2zex8opamps=7

Would you please have a look on themI do not have oscilloscope and I use National Instruments board NI6008 which cam samplemax at 10 kHz at the analog input channel That is why the triangles and rectangles are notwith well described shape

Would you please advise me how to solve this issue

Thank you very much

At 14 January 2011 164202 user Milen wrote [reply Milen]

Yes you are rigth

I will by breadboard and try it on it

Thanks

At 14 January 2011 121458 user Kammenos wrote [reply Kammenos]

i thought that you had a prototype on a breadboard you have solder the components icannot see them how they connect each other i strongly suggest to get yourself a couple ofbreadboards it is super easy and simple for prototyping plus there is no way to makeerror during soldering

At 13 January 2011 215505 user Milen wrote [reply Milen]

Hello KammenosI did not find the way to upload the pictures in the forumI put them on the followin linkshttpi52tinypiccom16lkymsjpghttpi51tinypiccomacr2f8jpgI have more op amps 741Actually I am using UA741CP And for capacitor I use WIMA MKS 4 01400shyX1Do you think that any op amp could be faildThanks

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 14: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1419

At 13 January 2011 162115 user Kammenos wrote [reply Kammenos]

34 of a turn is ok do you have replacement 741 it may be neededYou can send images to the forumhttppcbheavencomforum

At 13 January 2011 110614 user Milen wrote [reply Milen]

Thank you very much for your response KmmmenosI am sure that it works but probably I have made some mistake as I am beginner in thisfieldI will check it once again and I will send you some pictures

The trimer that I have put is not that much sensitive Shall It has only 34 turnCould you advise me how could i send you pictures so that you can check them

Thanks

At 13 January 2011 82137 user Kammenos wrote [reply Kammenos]

That is strange Milen I tested the circuit again from a scratch following the schematicline by line like i saw it for the first time the circuit worked for me immediately afterputting some power with the RC you chose it oscillates at 105 KHz what i can do for youis send me some close photos to inspect itCheck out this linkhttppcbheavencomtempvideoaviandhttppcbheavencomtempimagejpg

Make sure that you have the potentiometer adjusted Otherwise you get the deads heartbeat line

At 11 January 2011 203323 user Milen wrote [reply Milen]

Hello

Thanks for the good theory video and explanations

I created this circuit for triangle wave generation but I also have a problem shy the circuitdoess not oscilate and I get a stright line of constant voltage I use 45 kohms for R and 100nF for C targeting 1kHz of frequency I have also conected pin 7 of the op amps to the DC5V and pins 4 to the ground as I had forgotten this in the begining but still I can not makeit oscilate

Would you please advice me what could be the reason

Thanks

At 12 November 2010 82904 user Kammenos wrote [reply Kammenos]

Remark 1 The potentiometer you have seems that the negative is in the wrong track It isnot clear but i think it should be connected one hole aboveRemark 2 The 2nd 741 (right) has no ground (pin 4)Remark 3 Confirm that yellow cable from pot goes to pin 2 of left 741Make these corrections and if not work post some new photos Please get some also fromabove (do not put part values)

At 11 November 2010 132935 user pradeep wrote [reply pradeep]

I am unable to create new post server error is occuring

So I uploaded them at this link

httppicasawebgooglecomlivegapTriangularWaveauthkey=Gv1sRgCOCrt7WyshyYTZFQampfeat=directlink

Please check it

At 11 November 2010 121329 user Kammenos wrote [reply Kammenos]

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 15: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1519

Get some detailed photos from the circuit youve done I prefer clear close photos wherethe parts are shown clear Then make a new thread in the forum(httppcbheavencomforum) and post them I will be notified automatically no need tonotify me Do it and we will continue our conversation there

At 11 November 2010 120921 user pradeep wrote [reply pradeep]

I tried it tooI was unable to get rectangular pulses too

Please help me

I have to get this done as soon as possible

I appreciate your effort

At 11 November 2010 111254 user Kammenos wrote [reply Kammenos]

Did you try to adjust the 10K potentiometer You need to make slow steps Put theoscilloscope directly to the output of the 741 Do you get at least rectangular pulses to thefirst 741

At 11 November 2010 111128 user pradeep wrote [reply pradeep]

I provided 10V Vcc is the problem with Vcc value

or should I change the opamp for 50KHz value if i must change the opampwhat theopamp should be

At 11 November 2010 110833 user pradeep wrote [reply pradeep]

I did connect the ground and Vcc Its still a straight line

At 9 November 2010 143224 user Kammenos wrote [reply Kammenos]

The RC is ok Heve you put DC power to the 741 Many people forget to do this step Youneed to provide 5 volts to pin 7 and ground to pin 4

At 9 November 2010 100430 user pradeep wrote [reply pradeep]

I m getting a straight line when i implement the above circuit

R= 1k ohm

C= 10 micro farad

i want 50 khz frequency and 2V peak voltage can u suggest me the circuit with properspecifications

thanx in advance

At 2 November 2010 211152 user Kammenos wrote [reply Kammenos]

Looks like that the transistor base gets too much current Do you use 1uF capacitor or youhave 10 It must be 1uF If it is 1uF then try increasing the 22K resistor at the base of thetransistor I recommend you use a potentiometer (50K for example) in series with a 10Kresistor That should do fine

At 2 November 2010 210134 user Ricky wrote [reply Ricky]

Kammenos thx for your help =) I almost got the triangle wave (0Vshy5V) but the output issatured and almost square Some way to solve it easily

At 2 November 2010 75017 user Kammenos wrote [reply Kammenos]

Ricky in the 3rd circuit there is an amplifier transistor stage at the end (2N2222) At thispoint you should get an amplified signal at the collector Measure at the point where the

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 16: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1619

470 ohms resistor meets the 2N2222 C connector You must have 5 volts signal Use 1uFcapacitor for the interface of the base of the transistor try other transistor if it does notwork It would help a lot if i see pictures from your oscilloscope Upload them in ourforum (httppcbheavencomforum) and give the link here

At 2 November 2010 64641 user Ricky wrote [reply Ricky]

Im havng problems with the offset and amplifier circuits I want to do a 1khz oscilator(0V to 5V) so I use R=5k and C=01uF

The problem starts wehn the signal pass by the first cap I tried a 10uF for this circuit butthe output stay between shy1V and 1V When i tried to use the 3rd circuit the output waveis almost a DC wave I dont know how to fiz it Can you help me

At 28 October 2010 175431 user nawras wrote [reply nawras]

i need some help in my project is about digital function generatorcon any one help me

At 28 October 2010 103752 user Kammenos wrote [reply Kammenos]

use the 3rd circuit with the transistor amplifier Power the transistor with 10 volts insteadKeep the oscillator at 5 volts to operate You may need to change the 3 resistors thatpolarize the transistor but you better put an oscilloscope to see the results

At 28 October 2010 91946 user Wimbo wrote [reply Wimbo]

Hi

when i try to eleminate the offset the triangle wave goes below 0I want to compare it to a 0shy10V signal So i also need a triangle 0shy10Vany help possible Thanks

Wim

At 13 October 2010 153545 user Kammenos wrote [reply Kammenos]

I just use 5v DC to operate

At 13 October 2010 153155 user Capn wrote [reply Capn]

I cannot get this circuit to operate properly I have modeled it using NI Multishysim and Ionly get one cycle out of this configuration before it goes flat

Are you using a DC input Or are you putting some AC signal to the supply

At 11 September 2010 175951 user Kammenos wrote [reply Kammenos]

Sure

At 11 September 2010 175338 user mystic07 wrote [reply mystic07]

thanks that really helpedwill the output be in the form of impulses if instead of a triangle wave a sawtooth signalwas applied at the input of the 3rd opamp

At 11 September 2010 61035 user Kammenos wrote [reply Kammenos]

I suppose that you made a PWM generator with DC voltage duty cycle selector I have asimilar circuit herehttppcbheavencomcircuitpagesVoltage_Controlled_PWM_Generator

You can remove the 2N2222 amplifier along with the 3 biasing resistors and then youhave exactly the circuit you described Read the theory from there and also you can readthe theory for PWM herehttppcbheavencomwikipagesPWM_Modulation

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 17: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1719

At 11 September 2010 60148 user mystic07 wrote [reply mystic07]

I have done a practical like this one at school but the output from the 2nd op amp wascompared to a DC voltage using a 3rd opamp followed by a capacitor impulses wereobtained at output i dont understand the theory could you please help me withthat)Thanks

At 7 September 2010 171859 user Kammenos wrote [reply Kammenos]

ground it is

At 7 September 2010 150326 user i8wrld wrote [reply i8wrld]

What did you connect Vccshy to on the opamps Ground or Negative Supply

At 1 September 2010 165333 user Kammenos wrote [reply Kammenos]

Using the formula that i give with 01 uF capacitorFor 1KHz R = 5 KOhmFor 10KHz R = 500 Ohms

So use o1 uF capacitor for C and 470Ohms resistor in series with a 5K potentiometer forR Then you need to test because theoretical values may differ from real

At 1 September 2010 142510 user kenlee wrote [reply kenlee]

hellocan u give me some idea or circuit diagram to determine the ranges of 1khz shy10khz only

At 4 August 2010 71653 user libz wrote [reply libz]

ok2 thank you can we ask another schematic diagram for square and triangularwaveform generator ranges the output from 1 khz shy 10khz

At 11 July 2010 103623 user Kammenos wrote [reply Kammenos]

You need to replace the R with a variable resistor You need to experiment to find thevalues for R and C

At 11 July 2010 101728 user Kammenos wrote [reply Kammenos]

Watch the video carefully This potentiometer will adjust the symmetry of the signal

At 11 July 2010 101708 user libz wrote [reply libz]

how to varry the output frequency of the generatorfrom 1khz to 10khz what im going todo

At 11 July 2010 101149 user libz wrote [reply libz]

what is the use of the 10k potentiometer

At 11 July 2010 95820 user Kammenos wrote [reply Kammenos]

Not possible with only one resistor You need to have a multiple selector switch to changethe capacitors

At 11 July 2010 95528 user libz wrote [reply libz]

how 2 varry the frequency output from 1K hz shy 10k hz

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 18: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1819

At 30 April 2010 122939 user Brian Farmer wrote [reply Brian Farmer]

By the way I am using an LM324 op am and LM393 comparator

At 30 April 2010 122736 user Brian Farmer wrote [reply Brian Farmer]

My frequency is only 3KHz

Also I started with an op amp for the comparator and after testing changed to an actualcomparator to get cleaner (more vertical without slew) switching

At 30 April 2010 40542 user Kammenos wrote [reply Kammenos]

The maximum frequency for 741 would be around 10KHz Are you trying a higherfrequency You may consider changing the opshyamp Try also to change the capacitor

At 30 April 2010 24412 user Brian Farmer wrote [reply Brian Farmer]

I am getting a spike at each peak of the triangle wave

Why

How to eliminate that

Am I doing something incorrect

At 16 February 2010 210827 user Nikos wrote [reply Nikos]

Thanks for the info guyzzz

I am in middle of an assignment currently and i really need two such generators in myboard though I must make them sawtooth( I may have some ideas)

I was trying similar configuration using op amps for the triangle wave but I found yoursmore suitable Especially the part with the variable resistor

Thanks againGreat site too

At 5 February 2010 163948 user Kammenos wrote [reply Kammenos]

you can use a transformer to drop down to 12 for example and then a voltage divider todrop it to 3 volts and measure this with the AD converter of the PIC

At 5 February 2010 144517 user noel d souza wrote [reply noel d souza]

i want do 440v ac voltmeter using pic project can any one help

At 17 December 2009 151422 user Kammenos wrote [reply Kammenos]

Hello DennisThis is perfectly normal because the 2n2222 is biased for 5V Above 5V the transistoroperates in saturation and this causes the one side of the triangle to become straightAs for the bending i suppose that it comes from the capacitor What capacitor you useTry 100 K resistor (R) and 01 uF capacitor (C) instead of an electrolytic capacitor If itworks please post the results for us to know

At 17 December 2009 150224 user Kammenos wrote [reply Kammenos]

Hello S L LauThe max frequency for this circuit is around 10KHz You could increase this number byusing another opshyamp but i am not sure about this

At 17 December 2009 120456 user Dennis wrote [reply Dennis]

Why is it that at at voltages beyond 5V it produces a trapezoid instead of a triangle Alsowhy is it that at 50hz frequency one side of the triangle wave looks bent Please advise me

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks

Page 19: Triangle Wave Generator

2282016 Triangle Wave Generator

httppcbheavencomcircuitpagesTriangle_Wave_Generator 1919

on how to change this circuit to produce a clean triangle wave of 50HZ at 13V Thanks

At 17 December 2009 73723 user S L Lau wrote [reply S L Lau]

Hi I have one question here Is there any restriction to the max frequency that can beachieved I only managed to get a max of 8khz and it start to distort Please kindly advise

At 1 October 2009 125027 user kammenos wrote [reply kammenos]

Hi MickI will make a complete theory+circuit for the transistor amplifiers

At 30 September 2009 211324 user Mick wrote [reply Mick]

Please more details for the transistor amplifier

At 12 August 2009 102119 user Stefan wrote [reply Stefan]

I really like the way you present the circuits and the Modular way you put them

I began from the Ambient Light Controller that needed the Voltage Controlled PWMThe Voltage Controlled PWM needed the Triangle Wave Generator and that lead me hereI like the way you are presenting them

Keep Up

Stefan

At 8 July 2009 192234 user beatnick wrote [reply beatnick]

Yes youre right RTFM )I just looked the pics

At 7 July 2009 205737 user kammenos wrote [reply kammenos]

and a capacitor wo a value as well

They are for setting the oscillation If you read the theory you will find out how to select avalue for those two

At 7 July 2009 163011 user beatnick wrote [reply beatnick]

In the 3rd schematic you have an R resistor without value

At 4 July 2009 44705 user kammenos wrote [reply kammenos]

In our pages we will only upload circuits that worked on our workbench

At 3 July 2009 220957 user amanths wrote [reply amanths]

At last one that works Thanks