## The RL circuit with a DC Voltage source and a flyback diode

## Turning the RL circuit on and off in a simulation with a Ti-84 program

Electric circuits containing resistors and coils are often used in electrical engineering, such as in electric motors, relays, etc. Switching off coils (or inductances) suddenly without taking precautions can result in high voltages in circuits. This can damage components in the circuit.

Therefore, measures are necessary to prevent damage.

In DC circuits and in PWM amplifiers, fly back diodes are used to ensure that coil currents are not switched off suddenly. A program for the Ti-84 calculator has been developed to gain insight into the behaviour of the circuit, based on the firs order differential equation solver.

The circuit is shown below. As an example, we apply a 15 V DC voltage source, a resistor of 10 Ω and an inductance of 0.5 H. When switch S1 is closed, a current with a time constant L1/R1=0.5/10=0.05 seconds increases to 15/10=1.5 A.

The Ti program calculates the time constant and the current as a function of time for 10 times the time constant. In this case, 10*0.05=0.5 sec. After 0.5 sec, switch S1 is opened.

Once switch S1 is opened, the current through the coil chooses its way through the flyback diode D1 and resistor R2 and decreases to zero with a time constant L1/(R1+R2).

Be aware that the forward voltage of the diode also influences the flow of the current.

The forward voltage of the diode is free to choose, (in this example, 0.7V). Below are the Simulink and Ti results.

Comparing the Simulink results with the Ti84, the time it takes for the current to decrease from 1.5 A to 0 A is 138ms according to Simulink and 127ms according to the Ti-84 program. Simulink uses a more accurate diode model than the Ti-84 program; nevertheless, the results are acceptable and gives a good insight.

Download the program.