Skip to content

 

 

 

Digital Outputs,

a

Pulse-width modulation, and

a

High-Current Outputs

 

 

 

 

 

 

Objectives

  • To use the TINAH to operate DC motors and hobby R/C (radio-control) servo motors.
  • To generate digital and PWM output signals, controlled by the TINAH Board, capable of driving high current resistive and inductive devices such as heaters, coils, and motors. The circuits developed here will be required to operate your drive system.

 

 

Pre-Lab

  1. Read about the TINAH Board’s motor driver circuitry from the class notes.  Plot the expected waveform from the TINAH motor output pins for an 80% duty cycle signal and for a -80% duty cycle (80% at reversed polarity)
  2. Familiarize yourself with the IRF5305 and HUF75321, the two MOSFET devices used in the course.   Downloads section ».
  3. Review the datasheets for the 3904 and 3906 BJTs.   Downloads section ».

 

 

Additional Info

  1. You can learn about RC servo motors, and the type of signals which are used to power them.  Servo Motor Intro (SparkFun)  »

 


Lab


1.   Directly drive a DC motor with the TINAH.

Write a program to drive one of your team’s motors directly using the TINAH  Board motor outputs.

    1. Make your program read in the value of the knob and use that value as the speed value (eg.  Set knob=512 as speed  = 0; knob = 0 is speed= -255, knob=1023 is speed=255)
    2. Note the amount of torque which you get when your motor is going at full-speed in either direction.  The current is limited by the 9V regulators on-board the TINAH which are used to power the on-board h-bridge chips (for the detailed schematic of the board, check the schematics online .  TINAH schematics >> , at the bottom of the TINAH Reference Page).

 

2.  Drive an RC servo motor with the TINAH.

Attempt to get one of the RC Servo Motor outputs to operate with the TINAH Board.  Code and pinout information can be found on the TINAH Hardware and Software page.

 

3.  View the  high-impedance ouptuts of the TINAH motor outputs.

Remove the motor and connect the two connections from the TINAH motor output to ground with a 10K resistor.  Observe the voltage waveforms at each motor output with respect to ground.  Remove the 10K resistor and observe the change in the voltage waveforms.  Sketch out the change in the resulting waveform; this is a result of the high-impedance state of the outputs when the motors have no current being driven through them.

Pinout information for the DC motors and the indicators can be found here:    Hardware description of DC Motor Outputs >>

 

4.   Make an external H-bridge circuit.

The TINAH Board motor outputs are not capable of driving the high-torque motors provided in your kit at full current.  In order to generate an appropriate signal, the signals derived from the TINAH Board motor outputs can be manipulated and used for motor control.  Today, you will use 15V from the benchtop power supplies, but in the future, you should be able to use the LiPo batteries with the same circuit.

    • In addition to the circuit shown below, you will also need to add the comparator circuit as discussed in the lecture.  The comparator circuit is required to interface the TINAH motor output signals (analyzed in the previous step)  to the H-bridge circuit in the diagram.
    • Watch the MOSFET temperature as you apply power to the circuit.  If it gets hot, shut power off, remove the MOSFETs, and check the voltages where the gates of the MOSFETS would be located – you should see them transition from 0 to 15V as required.
    • Make sure you use the TINAH Board 5V supply as the source of the comparator threshold voltage.
    • Note that there is an extra capacitor in this circuit – the 100 nF cap across the motor leads is meant as a first step to deal with noise (see Step 5 for more details)

 

5.    See the effect of the motors on the signal lines, and use of capacitors.

Probe the signal lines from the TINAH to the comparator and leading into the base of the transistors., both with the motor plugged into the H-bridge and with the motor removed.  See if you can see the difference in the  noise in the overall signal.   Look online to see info about how to use capacitors to reduce the noise generated by the DC motors –

You WILL NOT be able to put the capacitors at the +/- contacts directly at the motor, but only back on the breadboard.  You will be able to ground the case by taking a wire connected to ground and shorting it directly to the case.

 

6.   OPTIONAL BUT HIGHLY RECOMMENDED – Try out alternative H-bridge

Build and test the alternative h-bridge described at the bottom of the page.   This design was suggested by a TA in Summer 2015, and used by many groups to address problems with blown MOSFETs, at the cost of requiring a more rigid operating voltage range. 

 

After building the circuit, test out the operativoltage range of the alternative H-Bridge.   For this part, to power the H-bridge using the variable power supply on your bench (max 30V, max 2Amp), not the standard +/-15V supply which connects to the breadboard.   To connect the variable supply to the breadboard, get loose loose wire from the back of the Hebb 42 room to connect wire directly to the binding posts on the power supply (image from here), connect the power to your breadboard, and vary the voltage from 13V-15V, and verify the operating range of the H-bridge with the components.

 

 

Milestone

 

  • Demonstrate motor control with your H-Bridge driven by the TINAH Board, and any effects of noise from the DC motors on the rest of the circuit.

 

 

 

Referencesh-bridge-updated

HB-1 nd HB-2 refer to connection points to signals coming from the TINAH Board.    As you will find, the TINAH Board motor outputs are not appropriate for plugging directly into this circuit – as noted in the lab, you will also need to add the comparator circuit as discussed in the lecture.  The comparator circuit is required to interface the TINAH motor output signals (analyzed in the previous step)  to the H-bridge circuit in the diagram.

 

Table 1 – Output states of comparator circuit connecting to Traditional H-Bridge Circuit.

  HB-1 HB-2
STOP (BRAKE) lo lo
FORWARD hi lo
REVERSE lo hi
NOT ALLOWED hi hi

 

Table 2 – Parameters and maximum recommended values for  MOSFETs used in 25

  Max Current Max Voltage Rds(on)
N-channel Enhancement
MTP 3055 (old MOSFETS for course) 12 A 60 V 0.15 ohm
IRFZ14 (old MOSFETS for course) 10 A 60 V 0.20 ohm
HUF 75321 35 A 55 V 0.028 ohm
 
P-Channel Enhancement
MTP 2955 (old MOSFETS for course) -12 A -60 V 0.23 ohm
IRF 9Z14 (old MOSFETS for course) -6.7 A -60 V 0.50 ohm
IRF 5305 -31 A -55 V 0.06 ohm

 

Alternative H-Bridge Circuit

zener-h-bridge

Circuit schematic for the alternative H-bridge

 

Connections

IN A and IN B are connected to the TINAH motor +/- outputs (the ones with the LEDs). The H-bridge connects directly to these motor outputs, and no comparator circuit is needed.

VCC must be in the range 12V – 18V. The MOSFETs may be permanently damaged if VCC exceeds 20V. If VCC is less than 12V then the H-bridge may not function correctly, although it will not be damaged permanently.

alternate-h-bridge-breadboard

An example breadboard layout of the alternative H-bridge circuit. This circuit includes optional decoupling capacitors between VCC and GND.

 

Troubleshooting

The alternative H-bridge circuit is somewhat sensitive to MOSFET gate voltages. It is important that the gate voltages match the voltages listed in the troubleshooting reference guide shown below. If the gate voltages are correct but the H-bridge is still not functioning correctly, one or more of the MOSFETs may need to be replaced.

h-bridge-troubleshooting

 

End of Page