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

  Differences between chiral

Explain the differences between chiral, zig-zag and armchair carbon nanotubes. How may these structures be described mathematically? What are the predicted electronic properties of (10, 0), (21, -3) and (8, 8) SWNTs?

  Analysis of occupancy through prescriptive code analysis

The project will consist of a written paper and a presentation - Egress and Life Safety Analysis - FIRE 4500 (FIRE 2225)

  Roughly sketch the psd and find its bandwidth

Derive Sy(f ), the PSD of a Manchester (split-phase) signal in part (a) assuming 1 and 0 to be equally likely. Roughly sketch this PSD and find its bandwidth.

  Power plant schematics which model the rankine cycle

Develop the preliminary design for a steam power plant. The plant must produce 1000 MW of electricity using water as the working fluid and a supercritical pressure of 24 MPa

  How can a fieldbus system be implemented

How can a fieldbus system be implemented in an existing HART system - how can multiple variables be measured using a single fieldbus instrument?

  Enmin 5120 tunnelling and mine development a continuous

a continuous miner has the following specifications ltbrgtcutter drum width 3.2m ltbrgtdrum diameter across the picks

  Build a earthquake proof building

how to build a earthquake proof building

  Paper on new trends in ic packaging

Write a two page report based on the paper on New Trends in IC Packaging - the subject is Microelectronics Fabrication.

  Calculate the reflectivity of the air-glass interface

Crown glass has a refractive index of 1.51 in the visible spectral region. Calculate the reflectivity of the air-glass interface, and determine the transmission of a typical glass window.

  What additional power can be saved

A collection of logic gates for which the static power dissipation is zero, and the dynamic power dissipation is 10 mW is operating at 50 MHz with a 5-V supply. By what fraction could the power dissipation be reduced if operation at 3.3 V were pos..

  What is the peak secondary voltage

What is the Peak secondary voltage? What is the peak-to-peak voltage at the filter point considering non-ideal diode?

  Write the equations for lr and rr

Write the equations for LR and RR. Assume that BR overrides EM and that LT and RT override BR. Implement each function LR (BL, BR, EM, LT) and RR (BL, BR, EM, RT) with a 4-to-16-line decoder and external OR gates.

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