Appendix B
LM317 Voltage and Current Sources

The Texas Instruments LM317 adjustable voltage regulator is a flexible device that when combined with suitable external resistors and the NI myDAQ power supply can serve as the basis for a fixed or variable voltage source and a fixed or variable current source. Figure B.1 shows the LM317 package terminals as well as its schematic symbol. The LM317 sources current up to 1.5 amps, while the LM317L sources up to 100 mA. See the datasheets available at http://www.ti.com; enter “lm317” in the “Search by Part Number” field.


PIC


Figure B.1: LM317 adjustable voltage regulator: (a) package and terminals for 1.5-amp device (TO-220 package), (b) package and terminals for 100-mA device (TO-92 package), and (c) schematic symbol.

B.1 Variable Voltage Source

The circuit shown in Figure B.2 produces a variable voltage in the range 1.5 V to 13.5 V from the NI myDAQ +15V power supply. Figure B.3 shows the recommended breadboard layout for this circuit. Use bare-wire loops to facilitate easy connections with test leads to the NI myDAQ ±15-volt dual power supply. The horizontal voltage “rails” follow the top-to-bottom order of high to low voltage: +15 volts, variable voltage, ground, and -15 volts. Build this circuit on the left edge of your breadboard and leave it in place for all of your circuits projects.


PIC


Figure B.2: LM317 as a variable voltage source: (a) schematic diagram and (b) equivalent circuit.


PIC


Figure B.3: Recommended breadboard layout for the LM317-based variable voltage source: (a) top view of breadboard showing the component layout and voltage rail order, and (b) side view showing test lead connections between NI myDAQ and wire loops on the breadboard.

B.2 Current Source

The circuit shown in Figure B.4 produces a current whose value is approximately 1250/R mA. This circuit configuration “sources” current from the NI myDAQ +15V power supply and effectively operates as a current source with one terminal permanently attached to the NI myDAQ analog ground AGND.

The current source will operate as expected for circuits powered by the NI myDAQ ±15 V dual power supply provided the following conditions hold:

  1. The requested current does not exceed the 30 mA current limit of the NI myDAQ +15V power supply,
  2. The voltage of the ungrounded current source terminal does not rise higher than 13.5 V above ground, and
  3. The current set resistor R does not exceed approximately 1.2 kΩ (the minimum current ISRC is approximately 1 mA).

PIC


Figure B.4: LM317 adjustable voltage regulator as a grounded current source sourcing current from the NI myDAQ +15V power supply: (a) schematic diagram, (b) equivalent circuit model, and (c) recommended layout with the standard breadboard layout of Figure B.3.

Figure B.5 illustrates a similar current source that “sinks” current to the NI myDAQ -15 V power supply. The current source will operate as expected for circuits powered by the NI myDAQ ±15 V dual power supply provided the following conditions hold:

  1. The requested current does not exceed the 30 mA current limit of the NI myDAQ -15 V power supply,
  2. The voltage of the ungrounded current source terminal does not fall lower than 13.5 V below ground, and
  3. The current set resistor R does not exceed approximately 1.2 kΩ (the minimum current ISRC is approximately 1 mA).

PIC


Figure B.5: LM317 adjustable voltage regulator as a grounded current source sinking current to the NI myDAQ -15V power supply: (a) schematic diagram, (b) equivalent circuit model, and (c) recommended layout with the standard breadboard layout of Figure B.3.