Author |
Message |
rjh
Joined: Jan 20, 2013 Posts: 12 Location: Sweden
|
Posted: Sun Jan 20, 2013 5:04 am Post subject:
Help needed. Buffered output on CMOS / PIC? |
|
|
Hi! Most of my Google quires lead to this forum so I figured I join! Seams like a good place for this kind of stuff.
Recently got in to DIY:ing some modules for my modular synth (mostly Modcan A). Most of the projects are based around logic chips (4000 series) and PIC:s. What I'm wondering is, before I let these modules play with my other modules, what precautions should I take for the input / output. Most circuits I come across has either or both a buffer before the output (usually an op-amp) and a protective resistor (usually 10-100k). Is this considered common practice?
When reading up on the CMOS logic chips, I came across this document discussing buffered (suffix B) and unbuffered (suffix UB) logic ICs. I'm curious to know if this would eliminate the need for a buffer afterwards.
Bonus question: If the last stage of a circuit is an op-amp (a mixer for example), it doesn't make any sense buffering that output right?
Sorry for the total newbie questions, trying to learn.
Would be happy to post some circuit diagrams if that could help.
Any help is greatly appreciated!
edit: grammar / stupidity |
|
Back to top
|
|
|
elmegil
Joined: Mar 20, 2012 Posts: 2177 Location: Chicago
Audio files: 16
|
Posted: Sun Jan 20, 2013 10:39 am Post subject:
|
|
|
I usually use 1k on outputs, following the example of a lot of the stuff I've built by Thomas Henry. Can't say so much about inputs, Most of the stuff I've thrown together myself has been CV generators only (from arduino and such).
I can't say I know much about Buffered/Unbuffered CMOS, so I'll defer that to someone else.
I agree, buffering a mixer output doesn't seem like it should be necessary. |
|
Back to top
|
|
|
corex
Joined: Mar 02, 2010 Posts: 114 Location: Las Vegas
|
Posted: Sun Jan 20, 2013 12:36 pm Post subject:
|
|
|
It's bad practice to rely on the internal buffers because they can only source limited current. This is fine for CMOS-to-CMOS connections, but in a modular synth context you can't be sure where the output will go. So generally we re-buffer with an opamp, and then after that a current-limiting resistor (1K generally) to protect against shorts.
At the inputs, there is a different problem: logic levels. At 12 volts, CMOS will switch to logic high at around 8.4 volts (70%), so this won't switch at all from a 5V gate. Commonly, transistors are used here to boost the input signal. Ideally you want it to switch at a pretty low level for easy compatibility with a variety of signal sources... perhaps 1.2 to 2.5 volts.
Another problem at the inputs is that CMOS cannot take any voltage outside of its supply rails, and its supply is single-sided -- on a bipolar +/-12V supply you normally give the CMOS subcircuit 12V and GND. Therefore, any negative voltage reaching the CMOS input pin will be routed through the chip's power protection network, and those tiny diodes can't handle much. You will burn up the chip. Therefore, it must also be protected against negative voltages. Typically this is solved with an inline diode. |
|
Back to top
|
|
|
rjh
Joined: Jan 20, 2013 Posts: 12 Location: Sweden
|
Posted: Sun Jan 20, 2013 3:59 pm Post subject:
|
|
|
Thanks a lot for the info! Very informative. You just saved a few small diodes from burning. They will be grateful.
Just out of curiosity.. I came across this CGS diagram while searching for info. In the upper right corner, there's something that looks like a transistor buffer(?). Most transistor buffers I've seen takes a Vref which is added to the base. Would something like that be enough for the outs of a CD4xxxxB? I have a lot of transistors laying around and since I'm only dealing with CVs right now (0-5v) I can live without bipolarity.
Again, thanks a lot for the help! |
|
Back to top
|
|
|
corex
Joined: Mar 02, 2010 Posts: 114 Location: Las Vegas
|
Posted: Mon Jan 21, 2013 10:26 am Post subject:
|
|
|
Yeah that's a buffer. I'm not sure what the trade-offs are between a transistor and an opamp in this application. No DC offset should be added, though (no VRef).
Edit, from an EE friend: "Either work fine. For logic transistors are way easier to use. For analog scaling op amps are easier. Also keep in mind that that circuit [CGS] can drive a crapload of current just by changing the transistor and adding cooling." |
|
Back to top
|
|
|
rjh
Joined: Jan 20, 2013 Posts: 12 Location: Sweden
|
Posted: Mon Jan 21, 2013 1:30 pm Post subject:
|
|
|
Cool, thanks! Seems like every time I think I got the hang of something, a ton of other questions pop-up. Still a long way to go
Anyway, this is what I've come up with so far. The first stage amplifies the signal and then passes in into a Schmitt trigger. Most input will be CV but I do want the option to pass in AC. Any remarks / suggestions are of course appreciated.
Description: |
|
Filesize: |
10.11 KB |
Viewed: |
6243 Time(s) |
|
Description: |
|
Filesize: |
16.45 KB |
Viewed: |
107 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
|
|
Back to top
|
|
|
elmegil
Joined: Mar 20, 2012 Posts: 2177 Location: Chicago
Audio files: 16
|
Posted: Mon Jan 21, 2013 1:50 pm Post subject:
|
|
|
Some circuits (I'm thinking of a few different Thomas Henry circuits I've seen) put a switchable cap across the input to let you limit to AC only. Open switch, the signal goes through the cap and is AC coupled, closed switch, the cap is shorted and the signal is DC coupled. |
|
Back to top
|
|
|
rjh
Joined: Jan 20, 2013 Posts: 12 Location: Sweden
|
Posted: Mon Jan 21, 2013 2:24 pm Post subject:
|
|
|
hmm not sure I get the point of AC coupling in this circuit. Should be able to handle both AC and DC.. I guess the only point would be to have the option to eliminate some DC offset?
edit: spelling Last edited by rjh on Mon Jan 21, 2013 2:46 pm; edited 1 time in total |
|
Back to top
|
|
|
elmegil
Joined: Mar 20, 2012 Posts: 2177 Location: Chicago
Audio files: 16
|
Posted: Mon Jan 21, 2013 2:42 pm Post subject:
|
|
|
Right, that was what I thought you meant when mentioning AC. Overall, yes, you don't have to filter it, assuming you're not going to be sending in an AC signal of say, 10vpp at a DC offset of 5+, it ought to be fine.
Edit: not even 10vpp at 5V is really a problem, but I get the point across too. |
|
Back to top
|
|
|
corex
Joined: Mar 02, 2010 Posts: 114 Location: Las Vegas
|
Posted: Mon Jan 21, 2013 7:53 pm Post subject:
|
|
|
You may not need a Schmidtt trigger on the inputs, in which case you maybe could reduce parts count by using transistor buffers for the input network.
For example, http://yusynth.net/Modular/EN/DIVIDER/index.html
Oh wait, that example is a Schmidtt trigger... still looks like less parts.
Also, Yves uses a diode from ground to prevent negative voltages here (instead of inline). That could be a good idea. It will still allow a small negative voltage though. |
|
Back to top
|
|
|
rjh
Joined: Jan 20, 2013 Posts: 12 Location: Sweden
|
Posted: Tue Jan 22, 2013 2:05 am Post subject:
|
|
|
ah, surprised I didn't find that circuit before. Looks pretty much like what I want to do (though the purpose of this build is more to learn than anything).
Speaking of part count. I guess one alternative would be to just use a regulator and operate the whole circuit in the 0-5v range. Then use 5v zener diode at the input to protect against anything above 5v or negative (using the configuration in the diagram you posted but with a zener). This would eliminate the need for boosting the signal, leaving just the schmitt trigger at the input stage.. if the schmitt trigger has a high enough input impedance that is. More interestingly, the output buffers could then just be kept to a op-amp buffer without the need for any scaling. |
|
Back to top
|
|
|
Boogdish
Joined: Sep 21, 2009 Posts: 122 Location: Bloomington, IN
|
Posted: Tue Jan 22, 2013 7:55 am Post subject:
|
|
|
For PIC inputs, I usually put a 1k resistor between in the pin and the input, and have schottky diodes going to +5V and ground in parallel with the pin. In general, schottky's act faster than zeners. |
|
Back to top
|
|
|
wmonk
Joined: Sep 15, 2008 Posts: 528 Location: Enschede, the Netherlands
Audio files: 15
|
Posted: Tue Jan 22, 2013 11:52 am Post subject:
|
|
|
I breadboarded the discrete schmitt trigger, where I put 5V on the collector of the second transistor, and it works. I think this is a great approach for clock signals.
I wonder how much power different approaches use. _________________ Weblog! |
|
Back to top
|
|
|
corex
Joined: Mar 02, 2010 Posts: 114 Location: Las Vegas
|
Posted: Tue Jan 22, 2013 1:41 pm Post subject:
|
|
|
Boogdish wrote: | For PIC inputs, I usually put a 1k resistor between in the pin and the input, and have schottky diodes going to +5V and ground in parallel with the pin. In general, schottky's act faster than zeners. |
Yeah, I think the 1N4148 in the YuSynth design should probably be replaced with a Schottky for that reason -- faster. |
|
Back to top
|
|
|
rjh
Joined: Jan 20, 2013 Posts: 12 Location: Sweden
|
Posted: Wed Jan 23, 2013 4:38 pm Post subject:
|
|
|
wmonk wrote: | I breadboarded the discrete schmitt trigger, where I put 5V on the collector of the second transistor, and it works. I think this is a great approach for clock signals. |
Sounds like an interesting approach, but not sure I follow you completely. 15v on the first transistor and 5 on the other? |
|
Back to top
|
|
|
rjh
Joined: Jan 20, 2013 Posts: 12 Location: Sweden
|
Posted: Wed Jan 23, 2013 4:44 pm Post subject:
|
|
|
Boogdish wrote: | For PIC inputs, I usually put a 1k resistor between in the pin and the input, and have schottky diodes going to +5V and ground in parallel with the pin. In general, schottky's act faster than zeners. |
thanks, will give that a try next time. What does the schottsky's diode to +5 do? |
|
Back to top
|
|
|
wmonk
Joined: Sep 15, 2008 Posts: 528 Location: Enschede, the Netherlands
Audio files: 15
|
Posted: Wed Jan 23, 2013 5:08 pm Post subject:
|
|
|
rjh wrote: | Boogdish wrote: | For PIC inputs, I usually put a 1k resistor between in the pin and the input, and have schottky diodes going to +5V and ground in parallel with the pin. In general, schottky's act faster than zeners. |
thanks, will give that a try next time. What does the schottsky's diode to +5 do? |
It protects the output (of that circuit segment) from going higher then 5V. If it gets higher, the schottky will conduct, in effect clamping the output to 5V. _________________ Weblog! |
|
Back to top
|
|
|
rjh
Joined: Jan 20, 2013 Posts: 12 Location: Sweden
|
Posted: Thu Jan 24, 2013 4:01 am Post subject:
|
|
|
I'm probably missing something, but wouldn't the schottky to ground take care of that? I.e anything above the breakdown voltage will go to ground. Does schottky diodes work differently from zener in other ways than the switching time? |
|
Back to top
|
|
|
wmonk
Joined: Sep 15, 2008 Posts: 528 Location: Enschede, the Netherlands
Audio files: 15
|
Posted: Thu Jan 24, 2013 5:25 am Post subject:
|
|
|
Yes, a zener has a so called 'zener voltage', a voltage applied in reverse when the zener begins to conduct. Where a normal diode won't conduct in reverse, a zener will above that voltage.
A schottky doesn't have that property, but has a lower forward voltage drop. Where a normal silicon diode has a forward voltage drop of around 0.7V, for a schottky that's about 0.2V, allowing it to switch faster. _________________ Weblog! |
|
Back to top
|
|
|
|