Sunday 26 February 2017

Week 4

This is the fourth lab week for Y2 project. With the first four weeks work, our group project have already achieved the prototype of the conveyor belt sensor by using two Arduino Uno chips. Below is the pictures of our first  temperature-temperature and temperature-speed circuit respectively.


Figure 1: prototype of the temperature-temperature circuit


Figure 2: prototype of the temperature-speed circuit

Below is the proposals of this week;
  1. Test the output Pin 9 of the Arduino UNO chip utilised in temperature-speed circuit;
  2. Draw the Arduino layout circuit by using software Fritzing;
  3. Start soldering the circuit according to the Arduino layout schematic;
  4. Test the electric fan working on the temperature-temperature circuit and try to combine these two functional circuit.
The output of Pin 9 from Arduino board in temperature-speed circuit is shown in figure 3(a) and (b):


Figure 3(a): Pin 9 output when the temperature is 42C


Figure 3(b): Pin 9 output when the temperature is 51C
It can be shown that in figure 3(a), the average output voltage is around 276mV and in 3(b) is 498mV. The comparison between different temperature conditions indicate that, for higher temperature, the duty time in PWM voltage output will also increase to drive the motor in a higher speed.
The layouts of the temperature-speed circuit and temperature-temperature circuit are shown in figure 4(a) and (b) respectively:
Figure 4(a): Arduino schematic for temperature-speed control circuit

Figure 4(b): Arduino schematic for temperature-temperature control circuit

Here in figure 4(b), an PMDC motor is replaced for the electric fan.
The rated voltage of the electric fan is approximately 5V. After adjusting and testing, a 6V battery is connected to the collector of the transistor and a $1000\Omega$
The last part of this post, I will show you a draft interpretation of our temperature-speed circuit roughly:



Wednesday 22 February 2017

Week 3

Summary of week three's activities:
The week was mainly focused on adding the object sensor function to the temperature-speed function that can detect the distance from the obstacle/object. Initially, our first attempt was to use an IR emitter and sensor pair to transduce the distance signal as this link (Arduino IR sensor tutorial) and another link show. The IR emitter will emit the IR light which will be further detected by the receiver. Once the light path is blocked, the voltage will be set high immediately. The fundamental circuit we used for IR distance detecting and converting is shown in figure 1 and figure 2 shows the corresponding actual circuit we built. However after test, the IR receiver that we ordered can only detect a discrete IR impulse as an IR remote does. In the end, it seems that this application cannot achieve the function as we expected initially. 

Figure 1: Arduino UNO connection for fundamental IR sensor with obstacle detecting


Figure 2: Actual connection circuit for IR obstacle detecting circuit


An alternative distance detecting is to use a Ultrasonic device which can automatically send out an Ultrasonic wave. The Ultrasonic wave will be reflected back to the kit so that the distance can be calculated through reflecting time. The Arduino schematic is shown in figure 3. It is a trick when programming the code for Ultrasonic detecting, however it would be much easier if a NewPin function/header file was installed firstly into the Arduino library. Figure 4 shows the working detail of this Ultrasonic distance detector by using Serial display function in Arduino code assembly. Consequently, our second  method which uses the Ultrasonic emitter and receiver pairs was proven to be working as intended with high accuracy on distance measurement.


Figure 3: Fundamental Arduino UNO schematic for Ultrasonic distance detector circuit



Figure 4: Working test for Ultrasonic distance sensor

After testing the Ultrasonic kit properly, we then added the device on the temperature-speed control circuit coherently and merged the code for distance detector within the primary code. In order to harmonise these two functions, here, we summarised the relationship involved for distance detecting. We assume that roughly, when the object (for example, cake) is transmitted approaching to the one end of the belt, a buzzer should be triggered to alert the costumers. The frequency of buzzer should be set to be inversely proportional to the distance which means that the narrower the distance is remaining, the shriller the sound will become. The frequency of the buzzer will be controlled automatically by the distance $x$ between 0 to 30$cm$:
$$f(Hz) = \left\{ \begin{array}{rcl}\frac{1}{2\times (x^2 + 25)}& \mbox{for}& 5 \leq x \leq 30 \\ 0 & \mbox{for} & x < 5\end{array}\right.$$
The second equation of the buzzer frequency indicates that if the distance between the obstacle and the margin is smaller than 5$cm$, the buzzer will be triggered until the distance being resettled. Besides, the motor speed under this circumstance should also be 0.


In order to control the frequency of the buzzer in this circuit, two delay functions are invoked as:
digitalWrite(13,HIGH);
      delay(buzzervalue*buzzervalue+25);  // adjust this value for your convenience
      digitalWrite(13,LOW);
      delay(buzzervalue*buzzervalue+25);  // adjust this value for your convenience
Since the period of buzzer is set to be $2 \times (x^2 + 25)$, so the high pulse and low pulse of the sound should be maintained by  $(x^2 + 25)$ seconds. Here, 13 represents for the Arduino Pin which connected to the positive Pin of the positive buzzer.
The whole circuit is shown in figure 5 below:


Figure 5: Actual Arduino connection circuit for temperature-speed function 
with the application of temperature sensing, 
speed control and distance control


Objectives for the upcoming week:
  • Finish implementing the ultra sonic sensor along with its code.
  • Start building the physical conveyor belt for demonstrating purposes.
  • designing the poster and what materials should be included in it.


Tuesday 14 February 2017

Week 2

Summary of the week activities:
The fundamental activities we achieved is to start programming the Arduino code for the speed controlling circuit. Since we have already test the validity of the PWM voltage control by simulation, we will not bother too much in the theorem scope in this week. The figure below shows the overall structure for the temperature sensing and speed controlling circuit:


We discussed on the speed and temperature ranges that can suit our conveyor belt requirements and consequentially vary the speed of the motor depending on the surroundings temperature changing. Here is the determined relationship between temperature and the speed of the motor. Assuming the working temperature $t$ of the conveyor belt is between 40 to  90$ C^{\circ}$ and the motor rotation speed n is settled into the range between 0 to 255 units which will be in turn linearly dependent on the temperature. Hence:
$$n=3.1t-24\qquad for \ 40≤t≤90$$
and,
$$n=0 \qquad for\ t≤40 \ or \ t≥90$$
This linear relationship can be easily achieved by using a map function in Arduino UNO standard programming. The format should look like below:

fanSpeed = map(temp, tempMin, tempMax, 100, 255); // the actual speed of fan

Besides, it is proper to include an indicator, for instance, an LED to represent the speed of motor on the main control panel. Here again assuming a linear relationship between LED light intensity (regarded as L from 0 to 255 units) and the temperature (regarded as T from 40 to 90$C^{\circ}$) detected, the function will become: 
$$n=5.1t-204\qquad for \ 40≤t≤90$$
and,
$$n=0 \qquad for\ t≤40 \ or \ t≥90$$
The achievement for coding is similar as the fan speed control shown above.
After testing the programme with all functions, we started to build the whole circuit as shown in figure 1. The basic idea for this motor speed control is that, the Arduino chip and relevant codes will transduce the temperature signal in a suitable PWM voltage signal to output. The PWM signal will intermittently open or shut the transistor so that the DC voltage supply will be compensated adding on the DC motor. In addition, we also changed the components a little to make the circuit suitable for the ordered components' specifications. For instance, the 12v DC voltage supply was replaced by 6v and the base resistor was dropped to ensure a sufficient base current that can flow into the NPN transistor. The following video is attached to show the draft functions of the temperature-speed circuit. 


This video above demonstrates that the change in temperature will contribute a relevant change in the motor speed. The LCD screen will display the current surrounding temperature and motor speed. The motor will not rotate until the temperature is higher than 40$C^{\circ}$ and after that the motor will speed up linearly with the temperature changing. Besides, it is convenient to indicate the working mode of the motor explicitly. As shown in the video, the light intensity of the LED will also be changed depending on the temperature varying which is synchronized with the motor speed.

Notes and plans for the next week:

  1. A further function was suggested to build is a sensor that could detect the distance of the obstacle and stop the circuit when the object on the conveyor belt closes to a certain point. This sensor can be built on a new chip or on the original temperature-speed circuit;
  2. Another circuit should be built to achieve the temperature adjusting function. This part is recommended to build in a new circuit that will not violate with the original one. The cooling system can be an electric fan or any other refrigeration devices. 



Wednesday 8 February 2017

Week 1


First week summary:

The first week objective focused on the sensor functions achieving, that is, searching for the theorem background to accomplish the conveyor belt functions. Then we simulated the behaviour of each circuit. And decided to use Arduino UNO chip as our functional devices to achieve each functions. In this case, we will not bother calculating the specific relationship between temperature and the consequential speed.
In order to change the speed of the motor depending on the temperature, we decided to use Pulse Width Modulation (PWM) voltage control method in this case.
Pulse width modulation (PWM) is a voltage regulating method that can generate a series of voltage pulses of different duty time so that a varying average voltage will be generated and the speed of the motor will be controlled. For a large duty circle (see right side of figure 1), a higher average voltage will be generated.


Figure 1: PWM control output with different duty time

Theoretically, a 555 timer can be used to generate a voltage pulses with different duty circles. The working time and free time of the outcome pulses can be easily controlled by a pair of parallel variable resistors and capacitor. The simulation result of 555 timer by using Multisim is shown in figure 2. Besides, the diodes shown below works as current rectifier to prevent inverse flowing. 


Figure 2: Multisim schematic and PWM simulation result of 555 timer

It can be shown that a Pulse with a specific duty time can be generated. The active and free time can be calculated as:
$$T_H=0.693(R_1+R_{x1})C$$ $$T_L=0.693(R_2+R_{x2})C$$ $$T=T_H+T_L=0.693(R_A+R_B)C$$
And the consequential voltage becomes:
$$V_{RMS}=V\sqrt{\frac{R_1+R_2}{R_A+R_B}}$$

For a protection circuit, when the temperature goes higher than some critical value, the buzzer should start ringing. In figure 3, the critical voltage for the buzzer is set to be $1.5V$. $R_1$ represents for the thermistor. When the surrounding temperature becomes appr. $50C^{\circ}$, the corresponding resistance becomes 350$\Omega$. In order to trigger the buzzer at this resistance value, the resistance of the constant resistor $R_3$ can be set to be $585\Omega$ and the consequential output voltage around the buzzer becomes $1.508V$.  
Figure 3: Multisim schematic circuit and simulation result for the buzzer alert part

Notes:


A few components were order in this lab session in order to accomplish more functions to the circuit such as alarm and temperature control.

Second weeks objectives:
  • Start using Arduino UNO board to achieve the simulation results above. This involves coding and connecting.
  • Approval of the component list from Dr.Raja.

Project Overview


This a 2nd year bachelor project in University of Liverpool. The aim of the Project is to build a conveyor belt sensor that can detect the temperature change and react correspondingly on the conveyor speed. Besides a cooling system and security alert system are also concerned in this project. Below are the overview of this project. One application for this circuit is an automated oven for cake baking.


People Involved in this Project:

  • Supervisor: Dr.Raja. Munira
  • Project members:
  1. Xu,   Wangkun
  2. Al Khatri, Hatem Salim Ali
  3. Alghamdi, Abdulla Ghazi O
  4. Dashti, Lojain A H  M J
  5. Sulaiman, Maryam Elubobie

Project Overview:

The conveyor belt sensor should accomplish the following functions:
  1. Varying the speed of the motor depending on the temperature. When temperature goes up, the consequential speed of the motor should also go high;
  2. Immediate shut the motor and alert for narrow distance;
  3. A screen displays the current surrounding temperature and motor speed;
  4. A cooling system that can refrigerate the belt when the temperature is higher than a manually set value;
  5. Operationally, some indicators to show the working status of the circuit.
The following parts show the components we ordered to achieve these functions:

Component Amounts
Arduino UNO board 2
Positive buzzer 1
LED Severl
Resistor in different resistances Several
10k Potentiometer 2
LM35 thermistor 2
NPN transistor BC547 2
6V DC voltage source 2
Hook up wires Several
Diode 1N4007 2
5v DC motor 2
5v DC electric fan 1
LCD screen 1
Ultrasonic distance detector 1
Belt and Tyres 1
USB2-102 Cable 1
Table: Component ordering list

Some of the fundamental components are also shown in the below pictures:
Figure: Thermister LM35 

Figure: LCD display suitable for Arduino UNO