Scenarios

The UCL Department of Engineering requires students to undertake multiple week-long group projects during the course of our studies. These are dubbed “scenarios.”

Typically, we are organised into groups of 4-5 students and presented with a practical problem for which we have to design a technical solution. This would include a hardware and software element. By the end of the week , our goal is to have a working prototype that is subsequently presented to faculty members and judged on effectiveness.

On this page, I will be going into more detail on some of the projects I have been involved in and the work that was produced.

 


Scenario A: Electromagnetic Lifting

The aim of this project was to design an electromagnet that can lift the greatest weight possible. We could choose between several wire gauges and two different batteries (9V or 1.5V). In order to optimise our electromagnet, we needed to select components which maximise the magnetic field strength (NI) and minimise the total resistance [r+(pl/A)].

There was clear trade-off between resistance and the number of turns in the coil. This is because as ‘N’ increases, ‘l’ also increases but we don’t want the resistance of the wires to be too high. We had to find the optimal point for both.

Next, we had to choose the battery. Again, there was a trade-off between the current each battery supplies and its internal resistance.

To the left is a diagrammatic representation of the circuit that wElectromagnet Circuite used.

In order to decide which wire gauge and battery to use, we calculated: NI; total resistance and the maximum weight for each one. Below is an example for the 9V battery.

 

Gauge Battery (V) Total Resistance (Ohms) NI (ampere-turns) Max Weight (kg)
25.000 9.000 10.45085167 584.3925639 37.01984912

We also performed a series of trials to determine how the weight lifted by the electromagnet varies with the gauge. The results are displayed graphically below.

temp

In the end, our electromagnet was able to lift 50kg.

 


Scenario B: Coffee Scales

In a coffee shop, various grind sizes of coffee beans determine the flow rate of coffee expelled from the coffee machine. There is a specific value of flow rate that indicates the beans have been grinded to the optimum size where the taste of coffee gets the best rating, this flow rate is about 1ml per second.

We needed to design a device which can be used to estimate the flow rate. This device needed to have the following features:

  • A digital timer which measures and displays the time it takes to make one cup of coffee
  • A digital weighing scale which can be used to measure the weight of the cup of coffee that is produced
  • The entire device must be small enough to fit onto the platform where they put the coffee cup

Our complete design specification is outlined below.

 

Specifications

Parameter Min Max Units
Supply Voltage 2.5 3.5 V
Weight     1 157 g
Time measurable 1 120 s
Weight measurable 0.1 49.1 g

Components

Item Component Quantity Cost
1 Resistor 30Ω 1 £0.02
2 Load cell / scale 1 £10
3 msp430 launchpad 1 £10
4 INA125PA Amplifier 1 £0.50
5 MCCOG21605B6W LCD screen 1 £5
6 Waterproof casing 1 £6
TOTAL COST 6 £21.10
Click here to view the code used for the MSP430 micro-controller.

#include <msp430g2553.h>;
#include "C:\Users\zceeabh\Documents\Energia\LCD\LCD.h";
#include "C:\Users\zceeabh\Documents\Energia\LCD\LCD.cpp";
LCD mylcd(0x3E); //Create LCD object
float weight;
int Weight = 0; // analogue value read from the pot
int Weight2 = 0;
int minute=0, second=0, milli =0;
char realtime[10];
char realweight[10];
int weight10;
unsigned long millis2 = 0;
unsigned long millisnow;
unsigned long time;
int input =P1_3;
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
mylcd.init();
mylcd.backLight(500);
mylcd.writeString("Mass:");
mylcd.lineFeed();
mylcd.writeString("Time:");
mylcd.home();
mylcd.forward();
... //repeat 13 times

mylcd.writeString("g");
mylcd.lineFeed();
mylcd.forward();
... //repeat 9 times

mylcd.writeString("s");
mylcd.blinkOff();
mylcd.cursorOff();
}
void loop() {
Timer();
RealWeight();
delay(0);
}

void RealWeight(void){
Weight = (analogRead(input))-100;
Weight2 = Weight/3.5;
weight10 = Weight2 * 10;

if (Weight2 <10)
{
sprintf(realweight,"00%d.%d",abs(Weight2),abs(weight10%10));
}

else if (Weight2 ==0)
{
sprintf(realweight,"000.0");
}

else if (Weight2>=10, Weight2<100)
{
sprintf(realweight,"0%d.%d", abs(Weight2), abs(weight10%10));
}

else
{
sprintf(realweight,"%d.%d", abs(Weight2),abs(weight10%10));
}

mylcd.home();
mylcd.forward();
mylcd.forward();
mylcd.forward();
mylcd.writeString(5,realweight);
}

void Timer(void)
{
time = (millis()-millis2);
second = time/1000;
if (second==60)
{
minute++;
time=0;
millis2 = millis();
}

if (second < 10)
{
sprintf(realtime, "%d:0%d", minute, second);
}

else
{
sprintf(realtime,"%d:%d", minute, second);
}

if (minute == 2)
{
minute = 0;
}

mylcd.lineFeed();
mylcd.lineFeed();
mylcd.forward();
... //repeat 6 times

mylcd.writeString(realtime);
}

 

System and Circuit Diagrams

DSC_0104

DSC_0105

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Scenario C: Mission to Mars

The aim of this scenario was to design an audio transmission system by which astronauts could communicate with one another on the planet Mars. Certain specifications had to be met, including that the system needed to be wireless and not based on the transmission of radio frequency waves. In addition, it should be as portable, lightweight and power-efficient as possible. There was also a budget restriction of £20.

In order to meet these requirements, our team designed a system based on infra-red radiation.

Microphone Pre-Amplifier Circuit

micResistors, R1 =R2 = 4.7k, sets the reference at mid point between VCC = 3V and ground. Thus, this set the op amp for single supply use.

The gain of this preamplifier, which is 34dB (50x), is set by resistors R3 = 10k and R4 = 500k. A 1 MHz gain bandwidth product for the UA741 is more than enough for most audio application since the normal audio range is from 20 Hz to 20kHz.

R5 provides the bias voltage for the microphone. C1 and C2 are provided to block out the DC voltage offset.

 

Transmitter Circuit

transmitterThe signal to be transmitted is applied to the base of Q1 via resistor R4. The transistor Q1 drives the IR transmitting diodes D1 and D2. The audio input will be modulated to the IR signals transmitted. The transmitted IR signals will be picked by the photo transistor.

The microphone pre-amp circuit shown before is outputted to the input of this circuit (Vin). Vin is varied by the audio signal sent by the microphone pre-amp circuit.

9V PP3 batteries are used in order to power and bias D1 and D2 sufficiently and also because they are very efficient.

 

 

Receiver Circuit

receiverThe signal to be received from the transmitter is picked up by the photo transistor Q2. The emitter voltage of the transistor Q2 will change according to the sound modulated to the IR signal. The transistors Q3 and Q4 amplify this signal to drive the speaker or headphone attached to the audio OUT (Vout). C1 and R3 form a filter to avoid interference from stray IR signals.

An 8Ω speaker has been used to hear the audio signal. This speaker is loud but power efficient.

 

 

 


Scenario X: EMG Sensor

For this project, we had to build an electromyogram to measure the electrical activity of muscles at rest and during contraction.

The input to our system came from electrodes placed on the surface of the skin, which we made ourselves using copper coins. The input signal picked up by the electrodes was then pre-processed by a circuit and sent to an Arduino. This interfaced with our output LED array that displayed the size of our signal.

For full technical details of the circuit, please view our group presentation here.

Click here to view the Arduino code.

void setup(){
for(int i = 0; i &lt; NUM_LED; i++){ //initialize LEDs as outputs
pinMode(leds[i], OUTPUT);
}
MAX = MAX_High;
}
void loop(){
for(int i = 0; i &lt; 10; i++){ //takes ten readings in ~0.02 seconds
reading[i] = analogRead(A0);
delay(2);
}
for(int i = 0; i &lt; 10; i++){ //average of the readings
finalReading += reading[i];
}
finalReading /= 10;
for(int j = 0; j &lt; NUM_LED; j++){ //make all LEDs low
digitalWrite(leds[j], LOW);
}
finalReading = constrain(finalReading, 0, MAX);
litLeds = map(finalReading, 0, MAX, 0, NUM_LED);
for(int k = 0; k &lt; litLeds; k++){
digitalWrite(leds[k], HIGH); // This turns on the LEDS required
}
}

 

Below are some pictures of our system.

DSC_0044DSC_0041

DSC_0043

 


Scenario Y: Signal Processing

The aim of this scenario was to determine the number being dialed through a telephone line.

In order to generate the input signal, we attached a pair of antennae’s to the cable. We then processed the signal using a circuit we designed involving various filtering and amplification stages. Next, we analysed this signal using MATLAB to perform an FFT and determine the peaks. These could then be matched with the corresponding DTMF frequencies to determine each digit of the number dialed.

The technical details are outlined in our group presentation, which can be viewed here.

Below is our full circuit diagram along with the spectrum observed.

circuit diagram

scope-spectrum

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.