Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:courses:unit-2-lab2b:start [2017/04/13 19:50] Marthalearn:courses:unit-2-lab2b:start [2021/10/13 22:18] (current) Arthur Brown
Line 1: Line 1:
 ====== Lab 2b: Dynamic Stepper Motor Control ====== ====== Lab 2b: Dynamic Stepper Motor Control ======
 +[[{}/learn/courses/unit-2-lab2a/start|Back to Lab 2a]]
 +[[{}/learn/courses/unit-2/start|Back to Unit 2]]
 +
 == Download This Document == == Download This Document ==
-  * {{ :learn:courses:unit-2-lab2b:lab_2b.pdf |Lab 2b PDF}}+{{ :learn:courses:unit-2-lab2b:lab_2b.pdf |Lab 2b PDF}}
  
  
Line 22: Line 25:
 ===== 3. Equipment List ===== ===== 3. Equipment List =====
 ==== 3.1. Hardware ==== ==== 3.1. Hardware ====
-  [[http://store.digilentinc.com/basys-mx3-pic32mx-trainer-board-recommended-for-embedded-systems-courses/|Basys MX3 trainer board]] +  [[https://digilent.com/shop/basys-mx3-pic32mx-trainer-board-for-embedded-systems-courses/|Basys MX3 trainer board]] 
-  [[http://store.digilentinc.com/usb-a-to-micro-b-cable/|Micro USB cable]] +  [[https://digilent.com/shop/usb-a-to-micro-b-cable/|Micro USB cable]] 
-  Workstation computer running Windows 10 or higher, MAC OS, or Linux +  Workstation computer running Windows 10 or higher, MAC OS, or Linux 
-  [[http://store.digilentinc.com/stepper-motor/|4 wire stepper motor]] +  [[https://digilent.com/shop/stepper-motor/|4 wire stepper motor]] 
-  [[http://store.digilentinc.com/5v-2-5a-switching-power-supply/|5V, 2.5A DC power supply]]+  [[https://digilent.com/shop/5v-4a-switching-power-supply/|5V, 4A DC power supply]]
  
 In addition, we suggest the following instruments: In addition, we suggest the following instruments:
-  [[http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,842,1018&Prod=ANALOG-DISCOVERY|Digilent Analog Discovery 2]]+  [[http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,842,1018&Prod=ANALOG-DISCOVERY|Digilent Analog Discovery 2]]
  
  
  
 ==== 3.2. Software: ==== ==== 3.2. Software: ====
-  [[http://www.microchip.com/mplab/mplab-x-ide|Microchip MPLAB X® v3.35 or higher]] +  [[http://www.microchip.com/mplab/mplab-x-ide|Microchip MPLAB X® v3.35 or higher]] 
-  [[http://www.microchip.com/xcdemo/xcpluspromo.aspx|XC32 Cross Compiler]] +  [[http://www.microchip.com/xcdemo/xcpluspromo.aspx|XC32 Cross Compiler]] 
-  [[http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library|PLIB Peripheral Library]] +  [[http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library|PLIB Peripheral Library]] 
-  [[http://store.digilentinc.com/waveforms-2015-download-only/|WaveForms 2015]]+  [[https://digilent.com/shop/software/digilent-waveforms/|WaveForms]]
  
  
Line 91: Line 94:
   - Concept maps   - Concept maps
     - Develop a Data flow diagram that relates slide switch inputs, push button inputs, and timer interrupts to stepper motor and seven segment LED outputs.     - Develop a Data flow diagram that relates slide switch inputs, push button inputs, and timer interrupts to stepper motor and seven segment LED outputs.
-    - Develop a state transition diagram similar to the one described in [[https://reference.digilentinc.com/learn/courses/unit-2/start|Unit 2]].+    - Develop a state transition diagram similar to the one described in [[/learn/courses/unit-2/start|Unit 2]].
     - Develop a control flow diagram that describes the total system operation. Background operations are represented separately from each foreground operation.     - Develop a control flow diagram that describes the total system operation. Background operations are represented separately from each foreground operation.
   - Review the pertinent schematic diagrams to determine the relevant IO pin assignments. Refer to Figs. A.3, A.4, and A.5 in Appendix A.   - Review the pertinent schematic diagrams to determine the relevant IO pin assignments. Refer to Figs. A.3, A.4, and A.5 in Appendix A.
Line 123: Line 126:
 **1.** Configure the Analog Discovery to display the PIC32 outputs used for the stepper motor control, as shown in Fig. 8.1. **1.** Configure the Analog Discovery to display the PIC32 outputs used for the stepper motor control, as shown in Fig. 8.1.
  
-{{ :learn:courses:unit-2-lab2b:lab_2b_fig_8_1.png?nolink&500 |Figure 8.1. Waveforms screen capture showing stepper motor output signals.}}+{{ :learn:courses:unit-2-lab2b:lab_2b_fig_8_1.png?nolink |Figure 8.1. Waveforms screen capture showing stepper motor output signals.}}
 //Figure 8.1. Waveforms screen capture showing stepper motor output signals.// //Figure 8.1. Waveforms screen capture showing stepper motor output signals.//
  
Line 148: Line 151:
 | 1 0 0 0 0 0 0 0  | Up    | 16.0                                                               | | 1 0 0 0 0 0 0 0  | Up    | 16.0                                                               |
  
-**b.** Capture the WaveForms 2015 screen when slide switches are configured for 0x40 (SW6, and SW4 set high resulting in 10.00 RPM), as shown in Fig. A.1, when BTND push button is depressed.+**b.** Capture the WaveForms screen when slide switches are configured for 0x40 (SW6, and SW4 set high resulting in 10.00 RPM), as shown in Fig. A.1, when BTND push button is depressed.
  
  
Line 155: Line 158:
 ===== 9. Questions ===== ===== 9. Questions =====
   - How are you able to accurately determine the number of steps per revolution? How many steps occur in the phase period shown in Fig. 8.1?    - How are you able to accurately determine the number of steps per revolution? How many steps occur in the phase period shown in Fig. 8.1? 
-  - How many steps occur in the same phase period for the screen capture completed under Testing 1.b? 
   - From the expression that converts RPM to ms per step, what is the effect of using integer division on the actual stepper motor rotational speed?     - From the expression that converts RPM to ms per step, what is the effect of using integer division on the actual stepper motor rotational speed?  
   - What is the measured stepper motor maximum rotational speed?    - What is the measured stepper motor maximum rotational speed? 
   - Using the pin designated for LCD DB0 on the Basys MX3 processor board (PIC32 RE0), measure the minimum and maximum ISR execution time. Using the MPLAB stopwatch feature and the assembler code for the Timer 1 ISR prologue and epilogue (saving and restoring) times, what is the worst case ISR execution time?   - Using the pin designated for LCD DB0 on the Basys MX3 processor board (PIC32 RE0), measure the minimum and maximum ISR execution time. Using the MPLAB stopwatch feature and the assembler code for the Timer 1 ISR prologue and epilogue (saving and restoring) times, what is the worst case ISR execution time?
-  - Using the pin designated for LCD DB0 on the Basys MX3 processor board, measure the minimum and maximum background loop. What is the worst case response time for a user input measured in microseconds? Does this agree with measurements taken for 5 above+  - Using the pin designated for LCD DB0 on the Basys MX3 processor board, measure the minimum and maximum background loop. What is the worst case response time for a user input measured in microseconds?
  
  
Line 183: Line 185:
 //Figure A.3. Switch setting for 18.25 RPM.// //Figure A.3. Switch setting for 18.25 RPM.//
  
-{{ :learn:courses:unit-2-lab2b:figure-a-4.png?nolink |Figure A.4. Push button schematic diagram.}}+{{ :learn:courses:unit-2-lab2b:lab_2b_fig_a_4.jpg?nolink&600 |Figure A.4. Push button schematic diagram.}}
 //Figure A.4. Push button schematic diagram.// //Figure A.4. Push button schematic diagram.//
  
-{{ :learn:courses:unit-2-lab2b:figure-a-5.png?nolink |Figure A.5. Schematic diagram of stepper motor driver.}}+{{ :learn:courses:unit-2-lab2b:lab_2b_fig_a_5.jpg?nolink&600 |Figure A.5. Schematic diagram of stepper motor driver.}}
 //Figure A.5. Schematic diagram of stepper motor driver.// //Figure A.5. Schematic diagram of stepper motor driver.//
  
Line 314: Line 316:
 | 77       | RD2   | AN25/RPD2/RD2                          | LED8_R        | "                        | | 77       | RD2   | AN25/RPD2/RD2                          | LED8_R        | "                        |
 | 88       | RF1   | RPF1/PMD10/RF1                         | MODE          | Stepper motor            | | 88       | RF1   | RPF1/PMD10/RF1                         | MODE          | Stepper motor            |
-| 25       | RB0   | PGED1/AN0/RPB0/RB0                     | P32_PGC/BTNU  | Push Button              | +| 25       | RB0   | PGED1/AN0/RPB0/RB0                     | P32_PGC/BTNL  | Push Button              | 
-| 24       | RB1   | PGC1/AN1/RPB1/CTED12/RB1               | P32_PGD/BTNL  | "                        |+| 24       | RB1   | PGC1/AN1/RPB1/CTED12/RB1               | P32_PGD/BTNU  | "                        |
 | 57       | RG2   | SCL1/RG2                               | SCL           | I2C - Accelerometer      | | 57       | RG2   | SCL1/RG2                               | SCL           | I2C - Accelerometer      |
 | 56       | RG3   | SDA1/RG3                               | SDA           | "                        | | 56       | RG3   | SDA1/RG3                               | SDA           | "                        |
Line 334: Line 336:
 | 63       | RC12  | CLKI/RC12/OSC1                                                                | | 63       | RC12  | CLKI/RC12/OSC1                                                                |
 | 64       | RC15  | CLKO/RC15/OSC2                                                                | | 64       | RC15  | CLKO/RC15/OSC2                                                                |
 +
 +----
 +
 +[[{}/learn/courses/unit-2-lab2a/start|Back to Lab 2a]]
 +[[{}/learn/courses/unit-2/start|Back to Unit 2]]
 +[[{}/learn/courses/unit-3/start|Go to Unit 3]]