### Project Conclusion

We worked with and analyzed the components of analog and digital electronic systems to ultimately be able to control the direction and position of a DC brush motor.

To accurately run the motor a digital driver was built  and was used with PROmotion software to direct a microprocessor.

We wrote a lab based on the research and learning we were doing that was applicable to teaching the principals of voltage control at the high school level.

 Digital Control     PWM controlled motor. The rheostat provided a constant DC voltage between -5V and +5V at the non-inverting input while the frequency generator was set at 10V, 1kHz to give an effective average voltage from the op-amp between -5V and +5V. The PWM duty cycle was communicated through the MOSFET setting an average effective voltage across the motor between 0V and +5V.   The rheostat moves a constant DC voltage between +5V and -5V. A frequency generator provides a triangle wave that is compared by the op-amp to the DC voltage. When the triangle wave is a lower voltage then the DC voltage the op-amp saturates at a high voltage, switching the MOSFET on. When the triangle wave is higher voltage then the DC voltage the op-amp saturates at a low voltage, switching the MOSFET off.  Because this happens at a very high frequency (1K Hz) the motor sees and average voltage set by the duty cycle (Ton/ Toff). PWM direction controlled motor with H-Bridge. Each Logic gate allows the PWM wave to pass on to the H-Bridge. Each switch controls half of the H-bridge. When one switch is pushed it allows part of the circuit to be closed and moves the motor forward. The opposite is true with the second switch. When the H-bridge driver was connected to the computer running the PROmotion software we replaced the op-amp PWM and the two manual switches with connections to a microprocessor. The program can accurately control Analog Control       The comparator shows proportional gain with Vout changing in proportion to V1 + V2. Notice that if the sum of input voltages is positive, the output voltage is negative and vice versa. The slope of the graph shows a negative unit gain as the comparator is set up as an inverting amplifier with the op-amp resistors having the same value.     Shown above is a Rotary Position Closed-Loop Servo System.  A potentiometer connected to the shaft of the DC Brush Motor provides a feedback signal which is inverted and compared with Vin from the input potentiometer. The difference controls the angle through which the motor turns. The output did not have enough power to drive the motor, so a power amplifier was used to increase the current the motor.  The oscilloscope is used to compare the input potentiometer signal (yellow) with the feedback signal (blue) from the motor potentiometer. As the input increases the motor turns one way to realign itself with the input voltage. As the input decreases the motor turns the other way for the same reasoning.  The mirroring of the signals shows accurate motor control.