Assignments 4

To undertake these assignments, install Microchip MPLAB (www.microchip.com), Labcenter ISIS Lite (www.proteuslite.com), and CCS C Lite (www.ccsinfo.com). Application files may be downloaded from www.picmicros.org.uk. Run the applications in MPLAB with Proteus VSM selected as the debug tool. Display the animated schematic in VSM viewer, with the application COF file attached to the MCU (see the appendices for details).

Assignment 4.1

Download the mechatronics board simulation file PICDEMboard.DSN and attach the program test.cof. Check that the simulation runs correctly, causing the outputs at Port D to display a binary count. Modify the delay count and confirm that the output timing changes accordingly.

Assignment 4.2

Download the PICDEM mechatronics board simulation file PICDEMdcmotor.DSNand attach the program motorsim.cof. Check that it runs correctly, displaying the motor revs completed on the display after the input switch has been operated. Modify the program to measure the time interval between pulses from the motor sensor and display the speed in rev/sec. To implement this, measure the pulse interval in microseconds using Timer1 (maximum count=65 ms) in Capture mode, MCU clock=4 MHz. This gives the time taken for half a rev in microseconds, th, and the speed can then be calculated, in rev/sec=106/2 th. For example, if the speed is 3000 rpm (probably exceeding the maximum achievable by the motor), we should see 50 rev/sec on the display. The value of th will then be 10 ms, a count of 10,000 in Timer1. We can see from this that the minimum speed measurable is about 10 rev/sec. Use a suitable prescale value to extend this value to less than 1 rev/sec, and modify the program to improve the precision of the speed measurement to ±0.1 rev/sec.

Assignment 4.3

A temperature controller program is required for the mechatronics board that implements a cooling system. The DC motor has a fan attached, and the controller increases the fan speed when the temperature increases. Connect up the mechatronics board for PWM control of the DC motor. Write a cooling program that reads the temperature sensor and modifies the motor speed accordingly. Demonstrate the application in simulation or hardware as facilities allow.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.72.232