electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
Square wave to sawtooth converter
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
picsynth



Joined: Oct 16, 2008
Posts: 27
Location: New Zealand

PostPosted: Sat Jan 31, 2009 9:25 pm    Post subject: Square wave to sawtooth converter Reply with quote  Mark this post and the followings unread

Thought I'd share this circuit of my own design to convert square wave to 256 step sawtooth.

The loop filter consisting of two 50k resistors and 2.2 uF (Tantalum) are critical components and were chosen carefully to avoid any portamento effects, you could play around with these if you wanted portamento and other effects.

Kevin

http://www.geocities.com/picsynth


sawtooth.jpg
 Description:
 Filesize:  72.24 KB
 Viewed:  1903 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

sawtooth.jpg


Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Feb 01, 2009 2:00 am    Post subject: Reply with quote  Mark this post and the followings unread

Is the sawtooth output amplitude the same regardless of input frequency? I'm guessing "yes"

I've messed with the 4046 and found that it's possible to make the tracking fast enough that proves the naysayers are just wrong. Very Happy Good work.

My circuit (NOTE: NOT A SQUARE TO SAW CIRCUIT, ONLY A 4046 CIRCUIT) is here: http://home1.gte.net/res0658s/fatman/4046pll.html This receives a trackable input and produces several harmonically related outputs. It does, however, have the tracking characteristic requirements of the OP's circuit and can be adjusted.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
picsynth



Joined: Oct 16, 2008
Posts: 27
Location: New Zealand

PostPosted: Sun Feb 01, 2009 1:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes the output amplitude is independant of input frequency.

I tried a number of components for the PLL loop filter before arriving at 2x50k and 2.2uF. The circuit works well up to B6.

These components are very critical to operation of the circuit. Too low values for the resistors and you loose the lower harmonics of your saw and it turns to a pulse or PLL skips around, too high and you get portamento (which is actually quite interesting effect).
Maybe the naysayers gave up because getting the loop filter right is tricky.

There is a slight distortion of the waveform output on frequency change even with these components.

I can see this on a scope but not hear it when listening to the sawtooth as I think it results in some odd/even harmonics being injected which are present in the saw anyway.

So what would you use the circuit for ? Converting output of digital logic (eg a PIC, CMOS etc...) into a great sounding sawtooth !

Kevin
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Feb 01, 2009 1:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, the tricky factor of the loop filter is why I made mine adjustable. It will make a chirp for large jumps like 3 octaves, but usually, there's no trace of any tracking delay. And yes, the portamento is cool, I use that intentionally - sounds cool when it's mixed with the driving signal because if the driving signal does not have portamento or portamento with different timing, there's a dissonence at the note attack that is interesting.
_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
moylando



Joined: Dec 11, 2008
Posts: 13
Location: Philadelphia

PostPosted: Wed May 13, 2009 12:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Grant Richter from Wiard gets a ramp wave directly from the capacitor of the 4046 in his WoggleBug. I believe he credits someone else with the idea. Google for the schematic.
Back to top
View user's profile Send private message
droffset



Joined: Feb 02, 2009
Posts: 515
Location: London area
Audio files: 2

PostPosted: Sun May 17, 2009 5:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

This looks cool, I'll try to work it into my Lunetta machine Smile
Back to top
View user's profile Send private message
Rolbista



Joined: Nov 17, 2012
Posts: 23
Location: Poland

PostPosted: Fri Mar 01, 2013 1:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

moylando wrote:
Grant Richter from Wiard gets a ramp wave directly from the capacitor of the 4046 in his WoggleBug. I believe he credits someone else with the idea. Google for the schematic.


http://pugix.com/synth/wp-content/uploads/2008/03/woggle-wog.pdf is this the schematic you're referring to? Which part of the circuit would convert a square to a sawtooth, I can't see any input pin on the 4046 for it. I think I'll try the circuit at the top of this thread eventually, but I'm trying to save board space in the project I'm working on. Are there any other SQR-> SAW converters circuits? like a 555 generator clocked externally?

EDIT:
Oh, wait, is the input the pin labeled "smooth tone SQ"? Which parts are essential? I don't really need the CV shaping parts, just a converter
Back to top
View user's profile Send private message
elmegil



Joined: Mar 20, 2012
Posts: 2177
Location: Chicago
Audio files: 16

PostPosted: Fri Mar 01, 2013 9:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Grant's wogglebug is here:

http://www.musicsynthesizer.com/wogglebug/wogglebug.html

The one you linked to is by Richard Brewster. Not sure if the circuits are similar enough to get the same conversion out of them.
Back to top
View user's profile Send private message
Rolbista



Joined: Nov 17, 2012
Posts: 23
Location: Poland

PostPosted: Wed Mar 06, 2013 9:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Ok, tried the 4046/4024 circuit and it works. The output is more of a "sawtoothoid" really, kinda looks like a reversed ADSR symbol. When I play legato it keeps the shape, but when I play separate notes it sometimes begins as a square for a split second to form into a sawtooth later. Is that a thing of trimming the 50k resistors and the 2,2uF cap? Also will it run on 12V, becauce my comparators forming a square wave run on 12 and there is a big difference in amplitude beetween saw and square (saw being much lower)

By the way, i used a 150pF cap instead of 180pF
Back to top
View user's profile Send private message
picsynth



Joined: Oct 16, 2008
Posts: 27
Location: New Zealand

PostPosted: Mon Sep 30, 2013 2:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi
The circuit was intended for a constant input ie a square wave that does not cut out after each note. The VCA would be added after this circuit. It will jump around if the input cuts off. It does handle changes in frequency well ie playing different notes, but not complete cut off.
Yes you can tune the 50k resistors and 2.2 uf cap - that is fun and can result in amazing portamento and effects etc if you want them
The circuit will run from 12 V

Kevin

PICSYNTH
http://picsynth.000space.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use