Go Back   Home > Forums > >

Equipment & Tools From test equipment to hand tools

Sine or square waves to sawtooth waves
Sine or square waves to sawtooth waves
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
Old 22nd September 2014, 03:40 PM   #1
merlin el mago is offline merlin el mago  Europe
Sin Bin
 
Join Date: Sep 2009
Location: Catalonia - Europe Union
Question Sine or square waves to sawtooth waves

How to convert sine or square waves to sawtooth waves?

TIA
Felipe
  Reply With Quote
Old 22nd September 2014, 05:25 PM   #2
Kiriakos is offline Kiriakos  Greece
Banned
 
Join Date: Jul 2014
Location: In from of my workbench
Mate you are the magician, and you are the one that should teach us your tricks.

From the other hand there is a magic spell called as function generator, as soon you will disappear 300 EUR from your wallet, you will see it landing at your front door.
  Reply With Quote
Old 22nd September 2014, 05:46 PM   #3
Vasquo is offline Vasquo  United States
diyAudio Member
 
Join Date: Sep 2014
Location: Nashville, TN
Quote:
Originally Posted by merlin el mago View Post
How to convert sine or square waves to sawtooth waves?
TIA
Felipe
Type eBay.com
  Reply With Quote
Old 22nd September 2014, 06:33 PM   #4
Mark Johnson is offline Mark Johnson  United States
diyAudio Donor
diyAudio Member
 
Mark Johnson's Avatar
 
Join Date: May 2011
Location: Silicon Valley
Sine or square waves to sawtooth waves
I slapped together a little sawtooth-wave generator on a scrap of perfboard, to help me figure out transformer winding polarities (also known as Winding Dots). It is powered from a little 5VDC wall wart adaptor, that I salvaged from an old "Wireless G" wifi router in the trash heap.

Since the circuit runs from single supply 5V, I selected a CMOS 5V rail-to-rail dual opamp from Microchip, the MCP6022 (data page), of which I have several dozen in my parts box. The first opamp is used as a comparator, and the second is used as a unity gain buffer, at lower right. 100 ohms in series prevents anything bad from happening if the output drives a very low impedance load, such as an accidental short circuit.

You can simulate this exact circuit in LTSPICE and watch it work; just substitute a Linear Technology 5V_RRIO opamp in the simulation. It needs to be CMOS because you overdrive the input pair by 2 volts; bipolars would melt. The LTC6081 appears to be a good choice.

HOWEVER, months after I built this thing, I realized that any wildly asymmetric waveform would accomplish the same mission (transformer dot identification); the only requirement is that you be able to tell right-side-up from up-side-down. A square wave with duty cycle << 50% meets this criteria, and is waaaay easier to generate: just an NE555, 2 resistors, and 2 capacitors. D'oh!
Attached Images
File Type: png schematic.png (11.9 KB, 175 views)
File Type: png write_up.png (75.2 KB, 170 views)
  Reply With Quote
Old 22nd September 2014, 06:45 PM   #5
SY is offline SY  United States
diyAudio Moderator Emeritus
 
SY's Avatar
 
Join Date: Oct 2002
Location: Chicagoland
Follow the square wave with an integrator.
__________________
"You tell me whar a man gits his corn pone, en I'll tell you what his 'pinions is."
  Reply With Quote
Old 22nd September 2014, 09:31 PM   #6
Mark Johnson is offline Mark Johnson  United States
diyAudio Donor
diyAudio Member
 
Mark Johnson's Avatar
 
Join Date: May 2011
Location: Silicon Valley
Sine or square waves to sawtooth waves
Quote:
Originally Posted by SY View Post
Follow the square wave with an integrator.
Hi Stuart, I don't think that's correct. I don't think the integral of a square wave is a sawtooth wave. Why not? Because the derivative of a sawtooth wave is certainly not a square wave. Rather, the derivative of a sawtooth is a constant (where the waveform is a ramp) plus a negative Dirac delta function, an impulse downwards (where the waveform is a step).

Stephen Boyd assigns this as a homework problem in his introductory circuits class at Stanford Univ: 3(d) In the space below, sketch the derivative of a sawtooth signal. Be sure to label all axes, slopes, magnitudes of any impulses, etc.

Here is his answer from the solution sheet (link):
Click the image to open in full size.

It's a constant (at a/T) plus a delta function of magnitude -a .

Probably what you meant was that a triangle wave is the integral of a square wave. However a triangle wave is symmetric, which may or may not fulfill the original poster's requirements.
Attached Images
File Type: png stanford.png (34.7 KB, 273 views)

Last edited by Mark Johnson; 22nd September 2014 at 09:47 PM. Reason: host the image file on diyAudio server instead of imgur.com
  Reply With Quote
Old 22nd September 2014, 09:42 PM   #7
SY is offline SY  United States
diyAudio Moderator Emeritus
 
SY's Avatar
 
Join Date: Oct 2002
Location: Chicagoland
I failed to distinguish triangle from sawtooth. I will now go down to my special dungeon and receive lashes.

Thanks, Mark!
__________________
"You tell me whar a man gits his corn pone, en I'll tell you what his 'pinions is."
  Reply With Quote
Old 23rd September 2014, 02:15 AM   #8
Mark Johnson is offline Mark Johnson  United States
diyAudio Donor
diyAudio Member
 
Mark Johnson's Avatar
 
Join Date: May 2011
Location: Silicon Valley
Sine or square waves to sawtooth waves
You can simulate this exact circuit in LTSPICE and watch it work; just substitute a Linear Technology 5V_RRIO opamp in the simulation. It needs to be CMOS because you overdrive the input pair by 2 volts; bipolars would melt. The LTC6081 appears to be a good choice.
I tried this today and indeed it worked. However, Linear Technology's LT6081 dual opamp has a "sleep" pin (while my preferred 5V_RRIO device (the MCP6022) does not). So I simulated with its big brother instead, the LT6082 quad opamp -- four of the exact same CMOS 5V_RRIO opamps in a single package, but without a sleep pin to connect on the LTSPICE schematic. Whew!

Here are a couple simulated waveforms. The comparator outputs a wee little "sliver pulse", just wide enough to pull the timing capacitor down to ground. Then the MOSFET shuts off and the LM334 current source starts charging up the capacitor again, on a delightfully linear ramp: dV/dt = I/C . I is constant, C is constant, thus dV/dt is constant, thus the ramp she is linear.
Attached Images
File Type: png LTSPICE.png (22.4 KB, 134 views)
  Reply With Quote
Old 24th September 2014, 11:50 AM   #9
merlin el mago is offline merlin el mago  Europe
Sin Bin
 
Join Date: Sep 2009
Location: Catalonia - Europe Union
It's ok the attached schematic?
Attached Images
File Type: gif NE555-duty-cycle SIGNAL GENERATOR.gif (6.5 KB, 34 views)
  Reply With Quote
Old 24th September 2014, 12:38 PM   #10
merlin el mago is offline merlin el mago  Europe
Sin Bin
 
Join Date: Sep 2009
Location: Catalonia - Europe Union
Or is enough this 555 astable with a frequency of 1kHz and a mark to space ratio of 2:1
Attached Images
File Type: gif ne555-astable-design 1khz.gif (3.3 KB, 25 views)

Last edited by merlin el mago; 24th September 2014 at 12:41 PM.
  Reply With Quote

Reply


Sine or square waves to sawtooth wavesHide this!Advertise here!
Thread Tools

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Square Waves? Tom Danley Multi-Way 64 10th February 2020 04:15 AM
How to analyze square waves? Troncones Equipment & Tools 2 6th February 2011 07:52 PM
tuning forks for pure sine waves? cuibono Everything Else 13 17th September 2008 05:39 PM
sine waves on nos dac regal Digital Source 5 11th March 2007 10:38 PM
Sine and square waves percieved pitch, why? baggystevo82 Everything Else 33 11th March 2005 05:18 AM


New To Site? Need Help?

All times are GMT. The time now is 06:13 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Copyright ©1999-2021 diyAudio
Wiki