Write an interrupt service routine

Assignment Help Other Engineering
Reference no: EM131056001

Requirements

You have been tasked to design a controller for a 3d printer whose total manufacturing cost should be less than $250AUD. The 3d printer has three gantry's which control either the x,y or z position of the printer head. Each gantry is moved by a single DC motor.

The controller should position the head of the printer in 3d space according to x,y and z co-ordinates. The co-ordinates are sent to the controller via an RS232 communication link.

The size of the controller should smaller than 130x 130x 100mm. The total weight of the controller should be less than 225gm. The controller should be low power and consume less than 1W when idle, and less than 5W when running.

Questions

PLEASE ANSWER ALL QUESTIONS WITHIN LMS

1. Fill out the following detailing the requirements of the project. (HW Design Lecture)

Name

Purpose

Inputs

Outputs Functions

Manufacturing cost

Power

Physical size & weight

2. (a) How much does the 3d printing head move in between pulses from the encoder. Give your answer in mm to four decimal places Hint, both outputs have 211 pulses per revolution. Use circumference = πd in your answer. Show all working.

Distance moved per pulse: ___mm

(b) Two mathematical equations are shown below, one for forward movement and one for reverse movement. Each update the position of the 3d printing head dependent on its movement. This occurs whenever a rising edge is detected on output A. The position should be in µm. Hint. You will require the previous position known.

Forward
Position = position + ____(µm)

Backwards

Position = position - _____(µm)

3. Write an interrupt service routine which updates the position of the 3d printing head. It is activated whenever a rising edge is detected on output A. hint your code should update the position in µm, dependent on wither the printing head is moving backwards or forwards.

#pragma interrupt
void isr outputA(void)
{

}

4. Write a formula which calculates the error in mm between the position of the 3d printing head and the desired position given by RS232 communication link.

position error = _______mm

5. Write some code which intialises timers 0,1 and 2 to operate in PWM mode.

void init pwmvoid

{

}

6. (a) The input to the PWM timers is to be defined by the following equation.

PWM = Kp x position error + offset.

Where Kp is the error gain and is constant. What offset is required to ensure that when the error term is zero that the PWM output is 50%.

(b) Write some code which performs the following:

- Ensures that, Kp x position error + offset, does not exceed the limits of the available PWM input (positive or negative).

- If the above equation is larger than the available maximum PWM input, set the PWM input to its maximum input.

- If the above equation is less than zero, set the PWM input to zero. Assume Kp x position error is never larger than ±65535

(c) Explain what will occur as the error approaches zero. ie. the printer head approaches the desired position. Will the output PWM at that particular point in time be large enough to move the printer head to the desired location?

You may add an attachment to aide your explanation.

(d) Explain what would happen if the gain Kp was extremely large. (ie. a small error produces a large PWM value.) Will the controller be able to move the head to the desired location?

7. Write an interrupt service routine (C code) named ‘posi RXD'. The interrupt service rou- tine runs whenever a byte is received via the RS-232 connection to the PC. The name of the byte received is ‘U1RXD'. The ISR should assemble the x,y and z position data ready for the error calculation.

#pragma interrupt

void posi RXD(void)
{

}

Attachment:- Assignment.rar

Reference no: EM131056001

Questions Cloud

Definitions and examples of specific job skills : For your third forum assignment, you will need to locate articles via Internet sources for definitions and examples of specific job skills and personality traits relevant to your career choice (Pre Sports Medicine). Be sure to include references ..
Find the least-squares regression line treating number : Find the least-squares regression line treating number of absences as the explanatory variable and final grade as the response variable
Explain rowe critique of kant objection : Explain Kant's objection.explain Rowe's critique of Kant's objection and then defend Kant against Rowe. Explain Rowe's critique of Kant's objection and then defend Kant against Rowe.
Evaluate the following scilab expressions yourself : For this homework you need to do all the problems in SCILAB. You will copy and paste your work into an office document and email it to me.
Write an interrupt service routine : ELE3EMB Assignment- Write an interrupt service routine (C code) named ‘posi RXD'. The interrupt service rou- tine runs whenever a byte is received via the RS-232 connection to the PC.
Academic or professional goals : how has your experience been integrative towards your academic or professional goals (experience has been great however I do not plan to work in this field, I have opened my own business instead)
Is there evidence to support the assumption : Test the hypotheses H0: μ = 22.5 versus H1: μ ≠ 22.5, using α = 0.05. Find the P-value. Is there evidence to support the assumption that interior temperature is normally distributed? Compute the power of the test if the true mean interior temperature..
Part of active population : There is little known about the very young and very old athlete. Choose one of these populations and discuss why you feel they are part of active population.
Compute the power of the test : Can you support a claim that mean sodium content of this brand of cornflakes is 130 milligrams? Use α = 0.05. Is there evidence that sodium content is normally distributed? Compute the power of the test if the true mean sodium content is 130.5 miligr..

Reviews

Write a Review

Other Engineering Questions & Answers

  Determining the interface contact resistance

Assuming negligible contact resistance between the wall and the casing, determine the wall inner temperature Ti, the interface temperature T1, and the fin base temperature Tb' Determine these temperatures if the interface contact resistance is Rt,..

  Research paper about aerospace engineering organization

Write research paper about aerospace engineering organization , choose any organization , talk about who are they and when they get started

  Analyze the three sections of the brain stem

Analyze the three sections of the brain stem, their individual functions, and their component role in brain physiology. Categorize the brainstem, cerebellum, and cerebrum in terms of anatomy and functions

  Find the minimum required channel length

Design the two-stage CMOS op amp in Fig. to provide a CMRR of about 72 dB. If all the transistors are operated at equal overdrive voltages of 0.15 V and have equal channel lengths, find the minimum required channel length. For this technology, / V..

  Three phase synchronous motor

Explain the methods of starting a three phase synchronous motor and the effects of variation of excitation with reference to the 'V' curve charecteristic

  What is the acceleration

A 15 kg steel container has 1.75 kilo moles of liquid propane inside. A force of 2 kN now accelerates this system. What is the acceleration?

  How the brittleness would impact fracturing treatment

What brittle rock is, and what ductile rock is, and how the brittleness would impact fracturing treatment of tight reservoirs -  identify if the rocks in the formation are brittle or ductile. Or where the rock indicates brittle characteristic and w..

  What is causes of submage arc welding

Is the joining of members together by applying enough melt and fuse the material, results in a number of discontinuities apparent during visual examination.

  Define stripping ratio and give three examples

Define stripping ratio and give three examples of the units it may be expressed in.

  Determining the fluid in rigid-body motion

The tank of liquid in the figure accelerates to the right with the fluid in rigid-body motion.

  Calculate the maximum bit rate

Using Shannons theorem,calculate the maximum bit rate that can be achieved on a fiber optical link with a signal to noise of 40db. The central wavelength of the light used is 850 nm wiht a band of 10 nm on either side.

  Overseas assignments acquisition & integration

Overseas Assignments, Acquisition & Integration.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd