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. 



No comments:

Post a Comment