simple triangle generator driving me mad!!! - diyAudio
Go Back   Home > Forums > Amplifiers > Class D

Class D Switching Power Amplifiers and Power D/A conversion

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 19th September 2009, 12:36 AM   #1
diyAudio Member
 
geekysuavo's Avatar
 
Join Date: Apr 2008
Location: United States
Unhappy simple triangle generator driving me mad!!!

hello all,

i've breadboarded a simple triangle generator as shown in the attached schematic, but the output at pin 1 just locks up to the negative rail, v+ goes to -0.7v, and v- stays at -5v!!! what is happening???

using a naiive opamp model (i'm using an ad823 on the breadboard), spice simulates this just fine as a 300khz squarewave at 10vpp and a 300khz triangle wave at 5vpp...

could this be something as dumb as my scope probe?

thanks...
~ brad.
Attached Files
File Type: pdf trigen.pdf (5.8 KB, 256 views)
  Reply With Quote
Old 19th September 2009, 02:27 AM   #2
diyAudio Member
 
jackinnj's Avatar
 
Join Date: Apr 2002
Location: Llanddewi Brefi, NJ
you can download a copy of Multisim with the Analog Devices opamps from the ADI website -- free. It will show you how the opamp is searching for the power rails.
  Reply With Quote
Old 19th September 2009, 02:58 AM   #3
diyAudio Member
 
gain wire's Avatar
 
Join Date: Nov 2004
Location: NCR
Hi Brad,
sounds like you've got something wired wrong on the supplies. What are you using as a power supply. It would be easier of we couild actually see what you've got wired on your breadboard
I assume the IC is not getting hot? What IC is it?
__________________
Trans-directional-servo-logamp non-zerocrossing autogain compressing thingamajig
  Reply With Quote
Old 19th September 2009, 04:13 AM   #4
diyAudio Member
 
geekysuavo's Avatar
 
Join Date: Apr 2008
Location: United States
regarding the power supply, here is a pic (sorry for the quality):
tri01.jpg

the psu is two trafos with 12.6Vrms secondaries with primaries in parallel in mains, each of the secondaries goes to a rectifier bridge and the (+) of the lower bridge is tied to the (-) of the higher bridge at the 820uF filter caps to form ground. the unregulated +/-17Vdc is regulated by an LM7805 and an LM7905, each with 0.1uF ceramic caps on its input and output to ground. at no load the rails are +4.97V and -4.97V from the LM7805 and the LM7905, respectively. the ground from between the diode bridges is connected to earth ground.

let me know if i need to draw it... i probably will anyways.

as for the IC (AD823AN) getting hot, it doesn't. actually, none of the ICs do. it just locks up on the negative rail. i can't find any evidence of oscillation or loss of magic smoke...

~ brad.
  Reply With Quote
Old 19th September 2009, 04:51 AM   #5
diyAudio Member
 
geekysuavo's Avatar
 
Join Date: Apr 2008
Location: United States
Thumbs up Fixed!! Huzzah!!

thanks for the help! it turns out that in my haste to breadboard this thing, i miswired the PSU just enough to mess the whole thing up. now this baby runs great!

tri02.jpg

thanks again, and sorry for the n00bish mistake!
~ brad.

Last edited by geekysuavo; 19th September 2009 at 04:56 AM. Reason: pic too big
  Reply With Quote
Old 19th September 2009, 04:53 AM   #6
diyAudio Member
 
gain wire's Avatar
 
Join Date: Nov 2004
Location: NCR
Thank you for the picture and very good description. You won't need to to draw a schematic of the power supply, I understood your description. Seems fine to me. However, another uqestion: when you say you have 0.7V at v+ and -5v at v-, you mean pins 4 and 8 of the opamp?

If this is what you mean then obviously you've forgotten to connect the positive supply to the rail on your breadboard. Or the IC. From what I can see on the picture (by the way take the picture at a further distance I think that should make the focus better) you seem to have pins 4 and 8 going to a rail on each side of the breadboard, however I cannot tell if the top rail is connected.

Now another little thing I noticed was that 100pF seems pretty small to make an opamp oscillate at 300khz.

In any case I stick to my original theory: a wiring mistake from the power supply to the opamp.
__________________
Trans-directional-servo-logamp non-zerocrossing autogain compressing thingamajig
  Reply With Quote
Old 19th September 2009, 04:58 AM   #7
diyAudio Member
 
gain wire's Avatar
 
Join Date: Nov 2004
Location: NCR
Quote:
Originally Posted by geekysuavo View Post
thanks for the help! it turns out that in my haste to breadboard this thing, i miswired the PSU just enough to mess the whole thing up. now this baby runs great!

Click the image to open in full size.

thanks again, and sorry for the n00bish mistake!
~ brad.
Aha! that's what I thought! I knew you'd find it...

Nice job on the breadboard by the way. My breadboard is a battlefield of discrete and integrated components linked with spaghetti of different lengths

while we're on this subject, what's that oscilloscope?
__________________
Trans-directional-servo-logamp non-zerocrossing autogain compressing thingamajig
  Reply With Quote
Old 19th September 2009, 05:05 AM   #8
diyAudio Member
 
geekysuavo's Avatar
 
Join Date: Apr 2008
Location: United States
Quote:
Originally Posted by gain-wire View Post
Nice job on the breadboard by the way.
thanks, but even being tidy doesn't keep me from making wiring mistakes! :P

Quote:
Originally Posted by gain-wire View Post
while we're on this subject, what's that oscilloscope?
it's an EZ OS-5060A 60MHz dual-trace analog. works great for everything i need.

~ brad.
  Reply With Quote
Old 21st September 2009, 03:46 AM   #9
diyAudio Member
 
geekysuavo's Avatar
 
Join Date: Apr 2008
Location: United States
hmm... well it runs now, but it's at 200khz instead of 300khz... any hint as to why this is occurring? it doesn't seem like scope probe capacitance or parasitic breadboard capacitance or part tolerances could do it alone... maybe altogether?

thanks for all the help!
~ brad.
  Reply With Quote
Old 21st September 2009, 04:48 AM   #10
diyAudio Member
 
geekysuavo's Avatar
 
Join Date: Apr 2008
Location: United States
Thumbs up now a new issue: comparator rise-time?

ok, i've tweaked the component values to get a "close-enough" frequency of 275khz, which is good enough for a first class-d try on a breadboard.

BUT

i've hooked an lm393 dual comparator to the triangle wave in order to generate a pwm waveform (positive comparator input is tied to ground for now) i get a really crummy square wave with a super-slow rise-time! my pull-up resistor is 5.9k (close to the datasheet value of 3.0k) and the power to the comparator is +/-12V. decreasing the pull-up to 470 ohms improves the rising-edge wave shape at the cost of cutting the bottom of the PWM wave at GND instead of -12V... is this comparator just too slow or is there a problem with its implementation?

the 'scope doesn't lie:
Click the image to open in full size.

thanks,
~ brad.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Audio Generator Ilkhom Everything Else 4 30th November 2013 01:51 PM
Sine wave - Square & Triangle wave generator using Transistors / OP-Amps lineup Solid State 20 9th October 2006 12:15 AM
Discrete triangle generator sovadk Class D 5 25th May 2005 03:01 PM


New To Site? Need Help?

All times are GMT. The time now is 07:10 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2