4

As per the circuit diagram below, I'm trying to use a phototransistor with a digital potentiometer so that the sensitivity can be adjusted. PH_TR connects to an analog pin on a SAMD21 chip.

Is there any reason why this won't work. I'm not entirely sure how the digital potentiometer works. Will having W connected to GND as well as the low part of the resistor cause any problems?

What I'm trying to achieve is a resistance that can be adjusted between 0\$\Omega\$ and 10k\$\Omega\$.

TPL0401 Datasheet (digital potentiometer)

TEPT5700 Datasheet (phototransistor)

Circuit Diagram

  • I am not familiar with those chips but the fact that it's a potentiometer means that the output 'W' will be some fraction of the input 'H'. You have 'W' grounded so you are trying to use it as a rheostat rather than potentiometer. You should provide a link (in your question) to the datasheet. – Transistor Dec 17 '17 at 23:54
  • Added datasheets @Transistor. Also, you're correct, I'm trying to use it as a rheostat, so actually in this case, what I need is a digital rheostat (or a digital potentiometer that can act as one). I should have known that! – CircularRecursion Dec 17 '17 at 23:58
  • In general it will work but you'll have to work out how the "wiper resistance" varies with "wiper position". It's possible it won't be monotonic, if that matters to you. – Spehro Pefhany Dec 18 '17 at 00:36
  • The Resistor is linear and definitely monotonic (all the switches are is series), but you need to use GND and W and ignore H. – Jack Creasey Dec 18 '17 at 01:10
  • This is a bad circuit because if resistance between H and W is set to a low value (<150 Ohm) and there is enough light hitting the phototransistor (both are external conditions; not inherently excluded by the circuit) both components might get damaged. – Curd Jul 19 '18 at 13:22
  • At least you should add a series resistor to guarantee that \$R_{min} > 0\$. – Curd Jul 19 '18 at 13:33

2 Answers2

0

This chip is 100 to 10k but using a PV current source may be a much higher or lower impedance so your operating range is limited by the low 3.3V limit and the output is a scaler product of the current *10k and rheostat ratio.

I would suggest an alternative design if you can define the specs.

Tony Stewart EE75
  • 1
  • 3
  • 54
  • 182
0

Another way to make a 'programmable' potentiometer is to take a simple LED, and connect an LDR to it by using (black) isolation tape. Make sure no light except from the LED reaches the LDR.

The resistor of the LED should be chosen so that the maximum brightness can be reached (depending on the type/forward voltage of the LED). The type of LDR is in your case is 10K ohm.

Also this way the two 'subcircuits' can be decoupled (like a kind of analog optocoupler).

Than by lighting the LED, the LDR will change resistance. It doesn't look professional, but for about 5 cents you have a programmable resistor.

See comment of user253751: The above is calla a vactrol.

Also called a resistive opto isolator, see: https://en.wikipedia.org/wiki/Resistive_opto-isolator

Michel Keijzers
  • 13,867
  • 18
  • 69
  • 139
  • 1
    Why are you talking about a LDR but are drawing a photodiode? Using a photodiode will not work as described because it acts as a variable **current source** not as a **variable resistor**. – Curd Jul 19 '18 at 13:30
  • @Curd I meant an LDR, removed the circuit since I couldn't find an LDR. – Michel Keijzers Jul 19 '18 at 14:18
  • 1
    Keyword: that assembly is a *vactrol* – user253751 Feb 03 '21 at 18:45
  • @user253751 ... thanks I didn't know that, I added it to the answer. – Michel Keijzers Feb 03 '21 at 18:57
  • Apparently music synthesizer enthusiasts use them a lot, because they let you vary almost any resistor in your circuit to change the sound - imagine having some kind of oscillator or filter except one of the resistor values also oscillates. – user253751 Feb 03 '21 at 18:58
  • @user253751 Also didn't know that, but I can see the use of it. The music synthesizer I own is fully digital, so I guess it's more for analog synths. – Michel Keijzers Feb 03 '21 at 19:48
  • 1
    @MichelKeijzers Yes, analog synths. Some day I'll build one to play around with. Then reimplement the whole thing on a tiny microcontroller :P - this is very tangential, but I think one reason people like analog synths is that you can get effects you didn't plan for by varying random bits of the circuit, whereas with a digital one you have to think up equations. – user253751 Feb 03 '21 at 19:59
  • @user253751 I have a Korg Kronos which has some digital implementations of analog synths (like the MS-20) and it's fun to play around with the 'virtual' cables. – Michel Keijzers Feb 03 '21 at 20:58