Author |
Message |
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Fri Aug 24, 2018 3:03 pm Post subject:
Using arduino like a 4066 or 4016 CMOS chip |
|
|
Hi there, stumbled upon this while completing my arduino based synthDVM module.
I imagine experienced arduinoers have seen this before but I hadn't.
Use digital pins as High-z or ground, and then hook that to op amps to pass or crush analog signals.
I put a post about how this works on my blog
For me it turned the arduino into a cool 4016/4066 like audio switching beast, but without having to worry about on resistance or how high z the high z is.
Hope someone else finds this useful. Thanks! _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
|
PHOBoS
Joined: Jan 14, 2010 Posts: 5591 Location: Moon Base
Audio files: 705
|
Posted: Sat Aug 25, 2018 6:26 am Post subject:
|
|
|
If I understand correctly it is actually the opamp you are using as the switch not the arduino, though it is needed as it can change the impedance of
its pins. This should also be possible with a transistor and I think that way you could make a switch that can handle bipolar voltages with a wider
range than a standard 4016/4066. Neat trick, might come in useful some day _________________ "My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Sat Aug 25, 2018 6:49 am Post subject:
|
|
|
Possible with a transistor, yes, basically switching between low (pin is output and low) and HiZ (pin is input) makes the pin an open drain output (open collector for a transistor) .. so yes .. it makes it behave like a transistor where the collector is left open.
This also allows for limited level shifting of signals as the high level is determined by the voltage the external resistor is getting (it can not go over the supply voltage of the processor (or actually its maximum input voltage, which sometimes is higher than the supply voltage)) but it can be lower (but not below zero)).
The drawback is that this tends to get a somewhat slow(ish) switching behavior, as the external resistor will limit the maximum current to flow into the pin (and wire) capacitance. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Sat Aug 25, 2018 4:58 pm Post subject:
|
|
|
PHOBoS wrote: | If I understand correctly it is actually the opamp you are using as the switch not the arduino, though it is needed as it can change the impedance of
its pins. |
Hi PHOBoS: you understand correctly.
using a transistor to clobber an op amp, with or without an Arduino controlling its base, is interesting. I'll mess with that on the bench. Thanks! _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
|
AlanP
Joined: Mar 11, 2014 Posts: 746 Location: New Zealand
Audio files: 41
|
Posted: Sat Aug 25, 2018 11:30 pm Post subject:
|
|
|
What kind of distortion or filtering would you get, if the transistor had some kind of CV input, and not a digital signal? |
|
Back to top
|
|
|
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Sun Aug 26, 2018 12:08 pm Post subject:
|
|
|
Apologies in advance for this wordy response.
I am going to try to experiment with this on my bench but first let's see if we can agree on what's being discussed. Please See this quicky drawing.
Is this what we're talking about?
--The collector of the transistor is soldered to the 30K and 10K voltage divider
--The emitter has a 1K resistor to ground so you don't burn up the transistor.
--The op amp is whatever, a TL071 for instance.
--Power for the op amp is +/- 15V, so you can pass an analog signal through it, or kill it.
OK here's where it gets interesting: Question:
--by energizing the transistor base, the question is, does it kill off any signal flowing out of the opamp to whatever is next (I'd probably use a dual op amp and buffer this signal?).
What I suspect:
if you can energize the base enough to bring the collector down to ground, it should. It clobbers the output of the op amp, without heating anything up/killoing things/magic smoke.
If you leave the base alone, the op amp output isn't affected. The world is a happy place.
For me, This worked when the transistor was a digital out of an Arduino nano. You have to flip pin mode from INPUT to OUTPUT/LOW but you're doing the same thing as a transistor would do.... I saw this with my own eyes.
So I think yes, if an Arduino works, a transistor should work as well.
So: Does it work with the transistor instead? it's worth messing with. I don't think I've seen this circuit fragment used a lot but then I don't do this analog electronics thing as much as most of you other forum members do.
Alan P: I don't think the type of signal you feed the opamp or the transistor base matters. To kill whatever is going through the opamp, you send current through the base of the transistor, and this current can be supplied by a "digital" as long as there enough current to drive the transistor into saturation, so we assume digital "on" is greater than .7 or so V relative to ground and can source some current--You do have to kick some current through the transistor base to emitter to ground, but not much.
Or, whatever feeds the transistor base can be analog--an audio signal that's over .7V relative to ground? A CV from another output that has a 1K resistor in series? Output of another op amp? Whatever. It shouldn't matter, whatever will make the collector go to ground should work.
I apprecaite Phobos' idea--if the tranny works that's a really easy way to switch analog signals on and off. Someone should screw around with this?
Or maybe I'm no longer following this thread?
If anyone wants to try it out, let me know if it works. I would normally use a 4066 for this but to me this seems more analog and I do computers all damn day otherwise. Thanks for reading.
Description: |
|
Filesize: |
737.75 KB |
Viewed: |
293 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
_________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
|
|