I'm trying to learn about electronics, so please bear with me and keep in mind that my idea may be completely nonsensical…
I have this voltage regulator: T317CM
I want to regulate the voltage of a circuit using the digital pinout of a computer board, which is on a separate circuit. If the digital input is high, the voltage of the circuit should be reduced, and if the digital input is low the voltage should be unaffected. Or vice-versa, it doesn't matter. I want a setup something like this:
I can't make any sense of the datasheet, but with a few packs of cells and a multimeter I can reduce 7V to 2V, and keep at 7V if I short two of the pins. If I just make the diagram above the voltmeter always reads 7V, regardless of the pinout voltage. The pinout circuit only connects to the circuit being regulated with that wire – does the ground wire need to be connected somewhere too?
Here's a table of expected inputs/outputs:
V of Digital Pin | V in | V at voltmeter
0V 7V 7V
2V 7V 5V
5V 7V 2V
These are just rough values and it can be the other way around if that makes the circuit simpler (eg, V at voltmeter = 7V when digital pin is 5V)
Best Answer
It's probably too late for OP, but I'll give the answer to the actual problem: How can a 317 regulator be switched to a low voltage under control of a digital signal. The answer is actually shown in the linked datasheet:
When the "TTL control" signal is high, the lower resistor in the adjustment divider is effectively shorted, and the output voltage will drop to about 1.2 V (maybe 1.4 V, accounting for the Vce-sat of the transistor).
For a 3.3 V logic signal, the 1k resistor in the base of the transistor may have to be reduced.
If the "reduced" output level needs to be higher than 1.2 V, an extra resistor could be added at the collector of the transistor.