Pages: 1 2 [3]   Go Down
Author Topic: how to do low voltage analog switching?  (Read 2432 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Running those pots at 20mA when their absolute max rating is 11mA is a bad idea. Are you sure that you can't get a low enough resistance using 10mA?

Actually, in general I need the full current range of the Vactrols, 0 to 40mA... I hadn't realized that the digital pots were so limited. I just copied the circuit from the arduino examples page.

That is the key problem in my circuit: being able to use an Arduino to digitally control a variable voltage divider with 500kohm max resistance, through which an analog signal flows with +1.5 to -1.5v range.  Using PWM to control the LED brightness allowed me to do that, even if it was somewhat coarse, and the PWM whistle got into the audio somehow. The results were pretty good.

When I saw the digital pot example on the Arduino page, and tried it out, it seemed to work fine, even at 30+mA, so I thought that was a perfect way of eliminating the PWM and also using very few components since each digipot has 6 channels and can be controlled by SPI, requiring very few pins...

If I go the DAC route, then I guess the current to the LED will again be pulsed by the DAC? Or would the OP-AMP flatten then into a constant DC voltage?

I'm really perplexed now that the digital pots seem to be out of the picture.

Thanks,
Bob

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking, could I not use the op-amp with the digital potentiometer voltage divider to keep the current output by the pot wiper very low, while controlling the output current through the LED as the voltage output of the pot divided by R?

Thanks,
Bob
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A plain voltage follower is easy to implement... With a digipot too... a selector guide should show an op-amp with that kind of drive. As a point of fact I have a video cable driver. An old one. is the Elantec EL2157, SOT-8 and 90 mA @ +12V V supply I'm quite certain although I haven't done the research beyond looking up that part... I bought several hundred of them as a joke ebay bid I thought would never work... It did. Video cable drivers are meant to drive 75 ohm cable at frequencies to several hundred MHz albeit at unity gain. They are only current sources this one will go from .1V to Vsupply{12V - 1.8V} or 10.2V... and supply better than 50 mA.

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1789
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

FYI

Hi-end audio might use military grade relay for switch and motorized potentiometer for volume control.



motor potentiometer, Ebay


Need new one?

http://www.potentiometers.com/alps_motorized_rotary.cfm

There is a 1,200 piece minimum order requirement on all ALPS products.
« Last Edit: May 09, 2013, 02:43:58 am by sonnyyu » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6613
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually, in general I need the full current range of the Vactrols, 0 to 40mA... I hadn't realized that the digital pots were so limited. I just copied the circuit from the arduino examples page.

Most op amps won't provide 40mA output current, especially quad ones. For 40mA output I would boost the op amp output using a transistor, as in the attached schematic.

If I go the DAC route, then I guess the current to the LED will again be pulsed by the DAC? Or would the OP-AMP flatten then into a constant DC voltage?

DACs produce a steady output, not a pulsed output.

Another possibility is to reduce and smooth the PWM output using 2 resistors and a capacitor, and then use the same op amp circuit to feed the LEDs. But then you would need 15 PWM pins.

I was thinking, could I not use the op-amp with the digital potentiometer voltage divider to keep the current output by the pot wiper very low, while controlling the output current through the LED as the voltage output of the pot divided by R?

You could, but a DAC is a more obvious choice, and you can get octal DACs vs. hex digipots.


* Scan 179.JPG (77.48 KB, 1653x1165 - viewed 23 times.)
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Most op amps won't provide 40mA output current, especially quad ones. For 40mA output I would boost the op amp output using a transistor, as in the attached schematic.

Thank you for the circuit! I've looked at it but of course have more questions, sigh.  I tried to understand the circuit but I'm really only guessing... 
  • Will the DAC + op-amp+transistor allow for the full current range through the LED, i.e. 0 to 40mA?
  • What type and value of capacitor would be needed at the DAC ref2 connection?
  • The DAC produces a variable voltage from 0 to 1 Volt?
  • Then the op-amp maintains that 0 to 1V on it's output, then the transistor amplifies the current?
  • The LED sees 5V input always?
  • But how is the current at the LED controlled?
Thank you again,
Bob
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6613
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

    Thank you for the circuit! I've looked at it but of course have more questions, sigh.  I tried to understand the circuit but I'm really only guessing...  
    • Will the DAC + op-amp+transistor allow for the full current range through the LED, i.e. 0 to 40mA?
    yes, in steps of 0.156mA
    • What type and value of capacitor would be needed at the DAC ref2 connection?
    0.1uF ceramic will be fine
    • The DAC produces a variable voltage from 0 to 1 Volt?
    yes, if you apply 1V to the REF pins and don't enable the x2 amplifier when you send commands to the DAC, then it will produce 0 to 1V output
    • Then the op-amp maintains that 0 to 1V on it's output, then the transistor amplifies the current?
    the op amp maintains that 0 to 1V across the 25 ohm resistor, and nearly all the current in that resistor passes through the LED
    • The LED sees 5V input always?
    the transistor acts as a constant current source, so the LED drops whatever voltage it needs when passing that current. With that circuit and a 5V supply, up to about 3.5V max is available for the LED. I am assuming this is enough for your Vactorols.
    • But how is the current at the LED controlled?
    see above

    Thank you again,
    Bob
    [/list]
    « Last Edit: May 09, 2013, 06:10:21 am by dc42 » Logged

    Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

    Offline Offline
    Jr. Member
    **
    Karma: 0
    Posts: 79
    View Profile
     Bigger Bigger  Smaller Smaller  Reset Reset

    ...

    Wow!  That is such an elegant solution!

    Thank you SO MUCH !

    Last question:  Do you think that the circuit will actually work?

    I find it hard to believe that I can now actually understand all the things you've shown me. What a great learning experience this thread has been!  Maybe you should give up safety critical software and teach ;-)  (I used to work in ATC sw and knew a bunch of guys at a UK safety critical ADA house...;-)

    Thank you,
    Bob
    Logged

    Offline Offline
    Jr. Member
    **
    Karma: 0
    Posts: 79
    View Profile
     Bigger Bigger  Smaller Smaller  Reset Reset

    Hello (again ;-)

    I've been studying the data sheet for the TLC5628C and am wondering how to control it from the Arduino?

    Is controlling it similar to that shown in the shift register example? using the SPI library? Or is there some other way?

    I see that it has a "clock" and a "data" pin, and then 2 pins called "Load DAC" and "Load" ?  I tried to understand the rest of the data sheet, but some pointers would be very helpful...

    I will have to use SPI to control 5 74HC595 shift registers and 2 TLC5628C DACs hopefully using SPI, but I cannot see how this works from the simple example on the Arduino tutorial page...

    Thanks again,
    Bob
    Logged

    Pages: 1 2 [3]   Go Up
    Jump to: