2017年3月7日星期二

Y2 Project Week 5

Week 5

The improvement of the circuit

The problem in last week was the first thing to do in this week, which is the error of the phase difference may be higher than our expectation.  We discussed and found the reason was that the values of capacitor in the cascade circuit and the parallel circuit are different.  Therefore, we need to do the calculation and choose the suitable capacitor before connecting the circuit.
In this week, we decided to replace the BJT by the MOS.  The advantages of the MOS are that it save the space on the breadboard and it only determined by the voltage.  When it compared to the BJT, it does not need to change the value of the capacitor in the circuit.  The following figures will show the MOS and the whole circuit:

Figure 1

Figure 2




Figure 3



The new circuit will collect the voltage and current by the ARM, and then the voltage will be transferred into square wave.  Next, the ARM will calculate the original power factor of the circuit.  After the calculation of the original power factor, the ARM will change the voltage of the MOS in order to realize the switch function of the MOS.  Afterwards, the circuit will be connected to the different capacitors.  The ARM will calculate the power factor and reserve the best capacitor.  The result will be displayed on the LED screen of the ARM. 
However, the new circuit still has some problems.  The most important problem is that the amplifier can not work.  The amplifier is used to amplify the voltage to the MOS, and the voltage will determine the state of the MOS.  If the amplifier can not work, the whole circuit will not work.  In addition, when we tested the circuit, we found that the accuracy will decrease when we increase the frequency.  These two problems cause the new circuit can not work well.

Test of the circuit

After using the MOS to replace the BJT, we need to test the whole circuit to check the circuit can work or not.  The following figure will display the result of the circuit:

Figure 4
From the result, we can see the power factor has been improved.  It has realized the function of saving energy.  This technology can be applied in our daily life to help us to save energy and improve the efficiency when we using the electronic appliance.


2017年3月2日星期四

Y2 Project Week 4

Week 4

The aim of this week's group project

In this week, we need to solve the problem of the circuit in last week and then connect the circuit to the ARM microcontroller in order to finish the whole design and test for the project.

The design of the circuit

The first part of this stage is to solver the problem in last week.  Last week, we found that the voltages in cascade circuit have a problem, which is that the value of voltage of a resistor is 0 and the other resistor's voltage is the voltage of the whole cascade circuit.  In this week, we checked the circuit and simulate the circuit by using the PSPICE.  After the checking and testing, we found that the reason for the problem is the wrong connection of the circuit. The wire form two channels of the oscilloscope should be connected together when two wires are required to realize the function of connecting to the earth ground.  
The next step is to test the whole circuit without the ARM microcontroller. When we using oscilloscope to test the circuit, we found that the error of the phase may be higher than our expectation.  In order to solve this problem, our group member raised a solution to replace the inductance by the capacitor.  We decided to try this solution in next week.
Without the problem of the error of the phase, our circuit was successful because we can find the phase difference on the oscilloscope.  The figure for the circuit and the wave to indicate the phase difference are displayed in figure 1, figure 2 and figure 3.

Figure 1


Figure 2


Figure 3

The code for the ARM

Unfortunately, we still cannot solve the problem in last week, which is the computer cannot display the time of testing on the screen because of the problem of the port from the ARM microcontroller.  It sometimes displays the result and it sometimes does not display the result.  That is really confused us.  
Beside this problem, we complete the logic and the code of the ARM.  The whole logic for ARM to realize the function has 5 steps.  Firstly, it collect the voltage on the power and the resistor.  Secondly, it transfer these voltage into the square wave.  If the voltage is higher than the value of average value, it will be considered as the value 1.  If the voltage is lower than the value of average value, it will be considered as the value 0.  Thirdly, using these voltages in square wave to calculate the phase difference.  Fourthly, using the phase difference to calculate the power factor.  Fifthly, change to another capacitor and then repeating the steps to calculate the power factor.
The square wave of the voltage by using the ARM to realize this function and the code for the ARM are displayed in the figure 4 and figure 5.

Figure 4

Figure 5


2017年2月20日星期一

Y2 Project Week 3

Week 3

The aim of this week's group project

In this week, we need to solve the problem of the circuit in last week and then finishing the design of the whole circuit.  In addition, we need to think the basic logic of the code for the ARM to realize the function and the code can ensure the ARM can run automatically.

The design of the circuit

Firstly, we discussed the reason why the branch cannot work.  We concluded the reason is that the current of the BJT may be ignored because we just focused on the voltage. In addition, the βof the BJT was ignored as well.  Therefore, we tried to change the value of resistors Rc and Re to test the circuit can work or not.  Secondly, we followed the Teaching Assistant's advice, we simulated the circuit on the computer by using the PSPICE software.  It was found that the circuit can work regularly.  After the simulation, we checked the real circuit and finally found that there is a wrong connection on the breadboard.
After the correction, we designed the whole circuit which will be displayed in the figure 1 and figure 2:

Figure 1

Figure 2

After the connection, we tested this circuit and found it still exist a problem is that the voltage of resistor in cascade circuit is 0 and another resistor have the whole voltage of the cascade circuit.  This problem will be discussed in next week with the supervisor's help.

The code for the ARM 

In this week, we have designed the basic logic of the code.  Firstly, input the voltage and current to the ARM.  Secondly, the ARM will calculate the phase difference and then calculate the power factor.  Thirdly,the output voltage will be added to the BJT in open circuit in order to connect the capacitor to the circuit.  Fourthly, the ARM will repeat the second and third step to find the most suitable power factor value and choose the best capacitor.
The theoretical foundation for the basic logic are that the phase difference can be calculate by the difference value between two signals in time domain and the ARM can provide voltage for BJT by its port.
However, there still exist some problems in details when we tested the code. Firstly, the time cannot be read because it cannot be displayed on the computer screen due to the problem of the port.  Secondly, we did not know the accuracy and the interval time between the detecting the difference value of two different signals in time domain.  Therefore, the code part still need us to work more hard in order to solve these problems.

Figure 3: one part of the code




2017年2月16日星期四

Y2 Project Week 2

Week 2

Revision:

In this week's lab time, we do the revision for the week 1 in order to remember the key point.  We simulate the circuit in week 1 and then display the wave in oscilloscope to prove the feasibility of this circuit.  The figure is displayed to show the power factor correction:
Figure 1

Design circuit:

After the tutorial with supervisor, we have designed a circuit to the realize the function of change different capacitor to select the best capacitor to ensure the value of power factor is the closest to the 1.  The idea is that we can design three branches in parallel and all of them are controlled by the capacitor.  When the voltage of the bipolar junction transistor reach the specific value, the branch can be connected.  The figure of the branch in the circuit is displayed in the figure 2 and figure 3:
Figure 2

Figure 3

However, when we used this circuit in the real circuit, we found a problem is that there is no change for the voltage of BJT when we changed the supply voltage.  Therefore, we need more discussion and practice in next week in order to solve this problem.

The code for the ARM 

In this week's lab time, we also discussed the code for the ARM in order to realize the function of the ARM can select the best capacitor after the calculation of the power factor.  We searched the Internet and found some similar code in Arduino language which is similar to the ARM.  Therefore, we decided to transfer the code into the ARM language in next week.  




2017年2月6日星期一

Y2 Project Week 1

Week 1: Basic preparation for the project

Introduction:

This week,we made some preparation for the project.  The aim of this project is to find the solution to improve the efficiency which means the value of power factor should be close to 1.

What we did in this week:

With the guidance of the supervisor, we created a basic structure to realize this function.  The basic structure is displayed in the figure 1.  In this structure, students need to input code to the ARM microcontroller to realize the function of detecting the most suitable capacitor form C1 to C3 in order to obtain the most suitable value which is close to the 1.  In addition, the ARM microcontroller need to have the function of calculating the power factor of the circuit.
Figure 1

After knowing the basic structure, we discussed the method to calculate the power factor.  We found that the voltage and current between ARM and circuit can be used to calculate the power of the circuit.  Then the power factor can be obtained by the equation: Real Power/Apparent Power.
In order to prove this method is practicable or not, we designed a simple circuit which is displayed in the figure2:
Figure 2

Using the oscilloscope to display the voltage and current between ARM and circuit, we found that it is practicable to calculate the apparent power of the circuit.
We will focus on the code of the ARM and the circuit in next week.