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