1) Write a program to control the action of a chocolate machine. Display a message to
ask what kind of chocolate is required: Plain (30p), Brazil nut (35p), Luxury (50p). Use
keyboard to get the input character. This input must be validated as P, B or L depending
on the choice. Then money must be requested, in the form: “Please insert 30p “
depending on the selection. Display the message until the required amount has been
input. If too much has been inserted, then display a message indicating the amount of
change owing. And also display a message indicating ‘Thanks for Buying’. Try to use the
2) Determine the voltage across the resistor at given time intervals by using the below
equation. You enter the end time and the number of time steps required; the program will
determine the voltage at each of the time steps and stored in a text file, which can be
loaded into MATLAB and plotted.
Where Resistor R = 1e3 Ohms , Capacitor C = 1e-06 F, Applied voltage E = 10 volts.
I will send hints for the project.
1. Using Matlab with your labwork.
Select a labwork or any practical experiment you have completed, and use Matlab to help present or extend your results. This could include calculations, and plots, and your comments on them.
The motor shown drives a fan (inertia J = 10-4 kg m2 ).
Derive and plot graphs for the motor of Torque/ speed,
and power /speed.
The fan load Torque/ speed is given by:Nm *823.101.02weTload&#8722;+=
Plot the net torque [url removed, login to view] (Tnet = motor torque – fan torque)
Find the approximate time to accelerate a motor under load from rest to operational speed. secs )1(0dwTnetJtimew&#8747;=
You may use numerical methods, or the symbolic toolbox, or Simulink, or any method you choose.
[url removed, login to view] an engineering system in Simulink. Your system should include a source (a signal generator input), a sink (scope), and model an equation such as: dtdiLiRE+=, given R=100 ohms,, L = 100 mh, and tE50*2sin240&#960;= display i.
Or flow to a tank: oiqqdtdhA&#8722;=; ghpo&#961;=; ooRqp=with A = 0.2 m2; display h. Elaborate your model with extra features. 2/900mkg=&#961;
Program m-files using cells, HTML files, or word files are acceptable.
Files relevant will be uploaded to help with project.