The goal of this practicum is to prepare your robot for its first dive in the test tank, during which we will measure a second order transient response. You will need to solder motor drivers onto your E79 PCB and make a connector for your pressure sensor and motor. This is also a good opportunity to make sure your pressure sensor is working.
Review this oscilloscope tutorial. This tutorial includes information specific to the E79 circuit board, and it is to help you solidify oscilloscope skills you have been practicing. There will be a practical quiz at the end of the practicum. You will have another chance to complete the quiz at the end of P2D.
Soldering
Supplying multiple voltages from the power supply
Measuring multiple signals on an oscilloscope
Frequency response analysis
Gain
A plot or image showing the input-output behavior of an H-bridge driven by a square wave.
Turn in Submission Sheet (found on Sakai)
1x H-bridge (SN754410, 16-pin chip)
4 x 1 screw terminal
1x 16-DIP socket
1x 10kOhm resistors
1x 0.1uF bypass capacitors
1x 1.0 uF bypass capacitors
Pressure Sensor
Note: If your board is not working properly after soldering on components, be sure to spend some time checking out these debugging tips.
An H-bridge is a set of four switches that allow a voltage to be applied to a load such as a motor in either direction. This is useful, for example, when controlling motors that need to spin both forwards and backwards. The basic layout of an H-bridge is shown in Figure 4.1.
By closing switches S1 and S4, a voltage will be applied to the motor from the left terminal to the right terminal, while by closing switches S2 and S3, a voltage will be applied to the motor from the right to the left.
Figure 4.1: H-bridge diagram.
H-bridges are useful because they can both apply voltage in both directions as well as provide a lot more power to a load than the pins of a microcontroller or a myDAQ can. In Practicum 1A, you used a control box to control your robot. This control box contained 2 manually toggled Double-Pole Double-Throw (DPDT) switches that were wired to act as an H-bridge.
Your E79 PCB will use SN754410 quad half bridge drivers to control your robot’s motors. The SN754410 chip contains four half bridges that can be combined into two full H-bridges that control two independent motors. Take a moment to look over the datasheet for the SN754410. Notice the voltage range and current capabilities in section 1 as well as the pinout in section 6.
The E79 PCB can hold one H-bridge. You will need to solder three components: a 10 kOhm resistor, and 2 capacitors (1 uF and .1 uF). Your board should already be populated with a 16-pin socket for the H-bridge. Figure 4.2 shows the components and where they should be soldered.
Figure 4.2(a): H-bridge parts.
Figure 4.2(b): Where the H-bridge parts should already be soldered.
Start by soldering the capacitors and the 10 kOhm resistor. Once these components are soldered, your PCB should look like the picture in Figure 4.3
Figure 4.3: Your PCB after soldering the capacitors and 10kOhm resistor
You will need to solder in a screw terminal on the top right corner of the board. Make sure you solder the screw terminal so the four holes face away from the board, because that is where you will be plugging in wires.
This is where you will plug in your motor, the motor's power supply, and the thermistor throughout the course of the semester. In this practicum we will be focusing on the motor.
Answer question 2 on the submission sheet
Figure 4.4: Your PCB after soldering on the screw terminal.
In this section you will test your H-bridge to make sure that you have soldered it correctly. You will provide a known input signal to the H-bridge and measure the voltage at the output of the H-bridge to verify that it behaves correctly.
Locate a ribbon cable and your breakout board. Plug the breakout board into a breadboard so you can easily measure using the oscilloscope. See the bottom of Figure 5.1.
Looking at Figure 5.1 and the zoomed in 5.2, you can see there are a few wires set up.
From right to left:
Pin 1A -- is connected to a square wave generator (the red lead from the GenOut port) and an oscilloscope probe.
Pin 2A -- is grounded. Putting all the grounds on one wire is cleaner than having a separate ground wire for each ground, so notice that the pin is connected through a short wire to a shared ground wire in the picture. The grounds of the power supply, oscilloscope and signal generator are connected to this shared ground wire too.
Pin Vm -- is the power supplied to drive the motor, which will use 6.6V. Because of some unusual power supply behavior, this needs to be provided by the "+6V" output of the power supply.
Pin 5V -- is the power supplied to the H-bridge, which requires 5V. This will be generated by the "+20V" output of a power supply because the "+6V" ouput is being used by Pin Vm.
Pin GND -- is grounded.
Pin PRES -- is ignored in this lab.
Pin TEMP -- is ignored in this lab.
Pin AGND -- is ignored in this lab.
Figure 5.1: Set up for testing H-bridge.
Figure 5.2: Close-up of breakout board connections.
We will power the PCB by providing 6.6V to pin Vm and 5V to pin 5V. Use a dual-banana-plug-BNC adapter to connect the 6V output on your power supply to a BNC cable terminated with BNC-hook connectors. MAKE SURE THAT THE GROUND TAB ON THE BANANA PLUG IS ON THE CORRECT SIDE. Connect the 20V output on your power supply to a red banana cable terminated with an alligator clip. Figure 5.3 shows these connections at the power supply.
Turn on your supply and set the 6V output to 6.6V (or as high as it will go) and the 20V output to 5V. Note that adjusting your wiring with the power supply on (referred to as “hot-plugging”) is very bad practice. It’s easy to accidentally connect something to power and damage it. Get in the habit of turning your supply off when manipulating your circuit.
Figure 5.3: Power supply set up.
Supply a 400Hz square wave oscillating between 0V and 3.3V to pin 1A (pin 2A is ground). The WaveGen settings should match Figure 5.5.
Figure 5.5: Details of square wave input.
Attach a wire to screw terminal pin 1Y and attach an oscilloscope probe to it.
You should see two waveforms similar to those shown in Figure 5.7. One waveform is the 3.3V square wave input. The other waveform is a square wave with a high voltage of ~6.6V. It is OK if your low signals aren’t exactly at ground. The output voltage from the motor driver is much higher than the voltage from the waveform generator because the motor driver amplifies the input using power from the power supply.
Figure 5.7: Input and output signals from the H-bridge without the motor connected.
Finally, attach your motor between screw terminal pins 1Y and 2Y without disconnecting the oscilloscope probe wired to 1Y. This configuration is shown in Figure 5.8.
Now the waveform of the motor driver output should look like that shown in Figure 5.9. The output signal from the motor driver should not be a perfect square wave when the motor is connected because the motor is highly inductive. If the motor driver output is a perfect square wave, check to make sure the motor is connected correctly.
Capture an oscilloscope trace of your input and output for your motor for you submission sheet (Question 3). Record the time you finish this section in your submission sheet (Question 4).
Figure 5.8: Connecting motor to PCB.
Figure 5.9: Motor driver output when the motor is attached.
Don't forget add your answers to the questions you find in your practicum manual to your submission sheet for the day! (Question 1)
In this section you will investigate the effects of driving the motor with square waves of different frequencies. You haven't covered square waves in detail, but recall that a square wave can be broken down into the sum of many sine waves, so square waves behave similar to sine waves in frequency response analysis.
The motor system is a low pass filter from an electrical signal input to a rotation rate output. You will learn more about filters in a few weeks, but for now, this means that low frequency inputs are passed and high frequency inputs are attenuated.
Now you will drive a motor with a square wave of different frequencies and use frequency response analysis to understand the rotation rate.
Set the frequency of the square wave driving the motor to 1Hz. The motor should be alternating between being completely on and completely off. The rotation rate of the motor oscillates between its maximum and minimum rotation rates.
Increase the frequency of the square wave to 10Hz. Rather than alternating between on and off, the motor should now alternate between two different rotation rates. Rather than oscillating between its maximum and minimum rotation rates, the motor now oscillates between two smaller rotation rates.
Now increase the frequency to 100Hz. The motor should be spinning at a constant rate.
Based on what you've just seen, you should now understand how it is possible for the motor to spin at a constant rate even though it is driven by a time varying voltage. Since the motor is a low pass filter, high frequency input signals are attenuated.
Follow the instructions here to make your umbilical. This is important to your success in Practicum 2D! You only need to do sections 1 and 2. Get a picture for your submission sheet (Question 5)
Follow the instructions on the Reference Page to dry test your robot.
To complete the practicum please
Return all tools and adapters from the gray box to the gray box
Return the oscilloscope probes to the top drawer of your workstation
Hang all cables neatly on the rack on the side of your workstation
Be sure the power supply and oscilloscope are off
Please store your robot with box and PCB in your designated cabinet
Please leave the ribbon cable at your workstation
Clean up scrap wire and other debris from your workstation
Remember to submit your submission sheet!
1. H-bridge diagram:
https://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/H_bridge.svg/2000px-H_bridge.svg.png
2. SN754410 datasheet:
http://www.ti.com/lit/ds/symlink/sn754410.pdf
3. Full Parts List (below):
Tools Per Station / Team
Power Supply
Oscilloscope
Function Generator
Multimeter
Soldering Iron
Solder Sponge
2 x Oscilloscope probes
Materials Centrally Available
1x H-bridge (SN754410, 16-pin chip)
4x1 screw terminal
1x 16-DIP socket
1x 10k resistors
1x 0.1uF bypass capacitors
1x 1.0 uF bypass capacitors
Pressure Sensor