| Author |
Message |
Sodium

Joined: Feb 11, 2012 Posts: 13 Location: Sweden
|
Posted: Fri Mar 02, 2012 9:08 am Post subject:
How to get a perfect sawtooth from a cmos? |
 |
|
Hi,
I’m new to this forum although I’ve been building some Lunetta-styled noise machines over the past year. It’s incredibly inspiring to browse and read all the stuff here, although sometimes it’s hard to find exactly what you’re looking for.
Now. I’m trying to get a clean and straight sawtooth out from an ordinary cmos like the 40106 using a general purpose PNP transistor and a simple RC network. Even if my result isn’t too bad, I’m not completely satisfied with it. The main problem is that the slope is slightly curved, and when I lower the pitch, the curve becomes even more prominent.
My question is; are there any “simple ways” to shape a clean saw from a square wave (or from a triangle for that matter), without involving too many components? Any feedback or pointers appreciated.
Thanks
/M |
|
|
Back to top
|
|
 |
JingleJoe

Joined: Nov 10, 2011 Posts: 789 Location: Lancashire, England
Audio files: 14
|
Posted: Fri Mar 02, 2012 4:42 pm Post subject:
Re: How to get a perfect sawtooth from a cmos? |
 |
|
| Sodium wrote: | Hi,
I’m new to this forum although I’ve been building some Lunetta-styled noise machines over the past year. It’s incredibly inspiring to browse and read all the stuff here, although sometimes it’s hard to find exactly what you’re looking for.
Now. I’m trying to get a clean and straight sawtooth out from an ordinary cmos like the 40106 using a general purpose PNP transistor and a simple RC network.
|
Circuit diagram please. I know the standard schmitt based cmos oscillator very well, but I want to see how you have encorporated a transistor.
| Sodium wrote: | Even if my result isn’t too bad, I’m not completely satisfied with it. The main problem is that the slope is slightly curved, and when I lower the pitch, the curve becomes even more prominent.
My question is; are there any “simple ways” to shape a clean saw from a square wave (or from a triangle for that matter), without involving too many components? |
No.
I don't like being that definate, let me rephrase: not to my knowledge anyway.
You would have to linearize the charging time of the capacitor and I have had trouble finding a way to do that, I think there is some way to do it with a constant current source but I'm not sure how, it might remove the ability to change the charge time and thus frequency. _________________ As a mad scientist I am ruled by the dictum of science: "I can't really be certain but I think I might have an idea"
Green Dungeon Alchemist Laboratories |
|
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 19583 Location: The Netherlands, Enschede
Audio files: 116
G2 patch files: 317
|
Posted: Fri Mar 02, 2012 5:08 pm Post subject:
Re: How to get a perfect sawtooth from a cmos? |
 |
|
| JingleJoe wrote: | | You would have to linearize the charging time of the capacitor and I have had trouble finding a way to do that, I think there is some way to do it with a constant current source but I'm not sure how, it might remove the ability to change the charge time and thus frequency. |
Yes, you'd then change the charge time by changing the current ... if you want to go really minimal ... roughly ... a transistor 's collector current is proportional to it's base current, so changing the base current would change the charge time for a capacitor ... now find a way to discharge the capacitor ... prolly a diode from from the inverting Schmitt trigger out to the capacitor.
But ... that's maybe what Sodium tried  _________________ Jan |
|
|
Back to top
|
|
 |
Sodium

Joined: Feb 11, 2012 Posts: 13 Location: Sweden
|
Posted: Fri Mar 02, 2012 5:59 pm Post subject:
Schematics + scope image |
 |
|
Ok, so here's the schematics, all values are tveakable (obviously) but this config gives me the best saw right now. As you can see the slope is curved but there should be a way to straighten it out, I hope
| Description: |
|
| Filesize: |
98.96 KB |
| Viewed: |
40 Time(s) |
| This image has been reduced to fit the page. Click on it to enlarge. |

|
| Description: |
|
| Filesize: |
17.3 KB |
| Viewed: |
61 Time(s) |
| This image has been reduced to fit the page. Click on it to enlarge. |

|
|
|
|
Back to top
|
|
 |
Cynosure

Joined: Dec 11, 2010 Posts: 482 Location: Toronto, Ontario - Canada
Audio files: 29
|
Posted: Fri Mar 02, 2012 6:13 pm Post subject:
|
 |
|
I'm impressed even with the shape that you have managed to get.
One thing about the two caps though - isn't that just the same as a 1680pF cap? _________________ jacobwatters.com |
|
|
Back to top
|
|
 |
JingleJoe

Joined: Nov 10, 2011 Posts: 789 Location: Lancashire, England
Audio files: 14
|
|
|
Back to top
|
|
 |
RingMad

Joined: Jan 15, 2011 Posts: 181 Location: Montreal, Canada
Audio files: 2
|
Posted: Sat Mar 03, 2012 4:50 am Post subject:
|
 |
|
| JingleJoe wrote: | | Here is my sawtooth/ramp VCO circuit (see attachments). |
Since I've been having many losing battles against op amps these days, could you tell me which one you are using and if you are running it with a bipolar supply or not? Thanks! |
|
|
Back to top
|
|
 |
JingleJoe

Joined: Nov 10, 2011 Posts: 789 Location: Lancashire, England
Audio files: 14
|
Posted: Sat Mar 03, 2012 5:50 am Post subject:
|
 |
|
| RingMad wrote: | | JingleJoe wrote: | | Here is my sawtooth/ramp VCO circuit (see attachments). |
Since I've been having many losing battles against op amps these days, could you tell me which one you are using and if you are running it with a bipolar supply or not? Thanks! |
LM324 is brilliant, fuck what everyone else says. It's fine for simple sound machines, I'm just about to buy some CA3140E op amps which are really top notch devices, the LM358 is good too, apparently its more of a comparator but I have had it operating really well as an op amp voltage follower and amplifier.
All these op amps go down to the bottom rail, and should work from a single rail, exceeding the input range causes odd things (a slight overshot on a voltage follower I made this morning resulted in blips to the negative rail which would make nasty clicks in the audio, solved by checking my wiring elsewhere in the circuit) My main advice is check your input range, output range and output current and make sure you have not exceeded them.
Also sometimes adding a capacitor in series with the input of an op amp amplifier makes everything better, not entirely sure why though but I'm not complainig, it works  _________________ As a mad scientist I am ruled by the dictum of science: "I can't really be certain but I think I might have an idea"
Green Dungeon Alchemist Laboratories |
|
|
Back to top
|
|
 |
Sodium

Joined: Feb 11, 2012 Posts: 13 Location: Sweden
|
Posted: Sat Mar 03, 2012 4:47 pm Post subject:
|
 |
|
@Cynosure: Yep, that would be the same as a 1680pF cap, if they existed, but I don’t think they do. I drew the schematic just as it looks on my breadboard. I’m really no expert in electronic theory, but I think the effect might differ a little bit if you set up two different caps in parallel due to their individual charging/discharging values, as opposed to a single one. But I might be wrong here, so don't take my word for it.
@JingleJoe . Thanks for the schematic, nice and very clean setup with your op-amp there. I’ll try it out tomorrow. |
|
|
Back to top
|
|
 |
|