The solar cell performance test system consists of two parts: hardware structure and measurement and control software. The hardware structure mainly includes three parts: optical path system, sample chamber and measurement circuit, as shown in Figure 1. The software is mainly divided into two parts: upper computer software and lower computer program.
Xenon lamp is selected as the sunlight simulation light source because it has a wide and continuous spectral range, covering ultraviolet light to infrared light, and is an ideal sunlight simulation light source. The light source is converted into an alternating complex light signal by a chopper, and then passes through a grating monochromator to provide an alternating monochromatic light signal for the test system. The existence of the bias light source enables the system to have the conditions for testing multi-cell solar cells. Xenon lamps and halogen tungsten lamps can be used as light sources. The solar cell sample to be tested and the calibrated standard detector are placed on the moving platform in the sample chamber and connected to the computer through a data acquisition card. The host computer software can configure the hardware system status and obtain the acquisition card data. After data processing, it generates the absolute spectral response curve of the standard detector, the absolute spectral response curve of the solar cell to be tested, and the quantum efficiency curve.
2 Overall design of the host computer and data processing
2.1 Overall design of the host computer
As a medium for human-computer interaction, the host computer software should have the characteristics of simple interface, easy user understanding, and simple and fast operation. In view of the fact that C++ Builder, a high-performance visual integrated development environment, has a large number of reusable controls and powerful database processing capabilities [1-2], this software is selected as the development tool. The software interface is shown in Figure 2.
3.1 HID firmware program design
The host computer detects the USB device by changing the level signal of the hub receiving end, which requires the device end D+ or D- to be connected to a pull-up resistor to a 3.3 V power supply. The STM32F103 microcontroller does not do internal pull-up in this link, so a soft pull-up circuit is built to simulate the connection and disconnection of the pull-up resistor by using the level change of the I/O port PE0. The USB hardware implementation is shown in Figure 5.
The communication between the HID device and the host is completed through the USB control pipe (the default pipe is endpoint 0) and interrupt pipe 1. The descriptors of the HID device include device descriptors, configuration descriptors, interface descriptors, endpoint descriptors, string descriptors, HID descriptors, report descriptors, and entity descriptors. The first five descriptors belong to the USB device standard descriptors, while the last three are HID class device specific descriptors. The definition of HID device attributes is realized by configuring the descriptors, such as product ID: idProduct (PID), manufacturer ID: idVendor (VID), including the definition of the port and the definition of the message format. The
initial data exchange process between the host and the USB device is completed through enumeration. The USB-HID class device parses the host's request and sends a descriptor to the host during enumeration to respond to the host's request. The system uses the solar cell short-circuit current data as a message. When the short-circuit current measurement is completed, the USB device sends the message to the host to complete the information transmission. The HID firmware program flow chart is shown in Figure 6.
3.1.1 USB device standard descriptor
The device standard descriptor is mainly defined in the usb_desc.c file. The specific operations are as follows:
(1) Edit the CustomHID_DeviceDes-criptor device descriptor, and define the experimental PID and VID of the device in little-endian mode as 0×123 4 and 0×567 8.
(2) Edit the ConfigurationDescriptor
configuration descriptor, define the interface number as 0, define the endpoint, and define the interface protocol as a HID custom device.
(3) Edit the Endpoint Descriptor endpoint descriptor, and define the maximum packet length of the input and output endpoints as 8 B.
(4) Edit the CustomHID_ReportDescriptor message descriptor and set the 8 B message format.
(5) Edit the StringLangID, String
Vendor, StringProduct, and StringSerial descriptors to set the device manufacturer ID, product ID, and product serial number.
3.1.2 USB endpoint settings
Edit the usb_prop.c file and configure the endpoints. The specific operations are as follows:
(1) Edit the CustomHID_Reset(void) function to initialize endpoint 0 and endpoint 1, and call the SetEPType() function to initialize endpoint 0 as a control endpoint type and endpoint 1 as an interrupt endpoint type.
(2) Call SetEPRxAddr() and SetEPTxAddr() to set the address of the received and sent data.
(3) Call SetEPTxCount() and SetEPRxCount() to set the length of the received and sent data to 8 B.
3.1.3 Main function framework
Write the main.c file and complete the following content:
(1) Include the key header files stm32f10x_lib.h, usb_lib.h, and hw_
config.h.
(2) Call Set_System(), USB_Interrupts_ConFig(), Set_USBClock(), and USB_Init() functions to configure the system clock, USB interrupt, USB clock, and initialization.
(3) Write the CustomHID_Send() data sending function, call UserToPMABufferCopy(), put the data into the output buffer, and call SetEPTxValid(ENDP1) to make endpoint 1 valid to send data.
(4) Write the CustomHID_Receive() data receiving function, call the PMAToUserBufferCopy() function to obtain data, and call the SetEPRxValid(ENDP1) function to make endpoint 1 valid to receive data.
3.2 Design of the host computer communication module
The C++ Builder integrated development environment calls the Windows API function to develop the USB-HID program module. By calling the Windows basic library function to obtain the globally unique identifier (GUID), device ID, device interface, buffer pointer and other information of the HID device, the message information is finally obtained, and the parsed data is handed over to the data processing module for further processing. The host computer HID program flow chart is shown in Figure 7.
The functions that the host computer calls to implement communication with the USB-HID device are as follows:
(1) Use the HidD_GetGuid function to obtain the 128-bit GUID.
(2) Use the SetupDiGetClassDevs function to obtain the device information group.
(3) Use the SetupDiEnumDeviceInterfaces function to identify the HID interface.
(4) Use the SetupDiGetDeviceInterfaceDetail function to obtain the device path.
(5) Use the CreateFile function to open the device and use the CloseHandle function to release resources.
(6) Use the HidD_GetAttributes function to obtain the device ID.
(7) Use the HidD_GetPreparsedData function and the HidD_Free
PreparsedData function to obtain the buffer pointer and release resources.
(8) Use the WriteData function and the ReadFile function to send and read messages.
4 Software test results
The software detects that the relevant equipment is in a connected state, places the standard solar cell and the solar cell to be tested on the sample chamber test table, and configures the relevant test parameters. Under the conditions of scanning range 300 nm~1 200 nm, wavelength interval 10 nm, chopper and lock-in amplifier reference frequency 2 Hz, single point test 10 times, and buffer time 10 s, the data uploaded by the USB-HID device is successfully obtained. The host computer software calls the TeeChart control to draw the spectral response curve of the battery to be tested, and the test results are shown in Figure 8.
USB has gradually replaced the serial port and become the commonly used interface and communication method for test instruments at this stage, which greatly enhances the versatility and ease of use of the instrument. The system adopts USB communication method. At the same time, the host computer software has the ability to obtain stable and accurate data, and accurately and intuitively displays the test results in the form of images, which has certain practical value.
References
[1] Yuan Xue, Xu Chaoyang, Zhu Chunguang, et al. C++ Builder 6 Introduction and Improvement [M]. Changsha: National University of Defense Technology Press, 2002.
[2] Wu Yixian, Wu Mucheng. Wonderful C++ Builder 6 Programming [M]. Beijing: Science Press, 2003.
[3] GB 11009-1989 Solar Cell Spectral Response Test Method [S]. Approved by the Ministry of Machinery and Electronics Industry of the People's Republic of China on March 2, 1989: implemented in 1990.
[4] Liao Jilin. USB2.0 Application System Development Example [M]. Beijing: Publishing House of Electronics Industry, 2006.
[5] Xue Yuanyuan. USB Application Development Technology Encyclopedia [M]. Beijing: People's Posts and Telecommunications Press, 2006.
Previous article:A high-efficiency DC-DC module power supply implementation solution
Next article:Understand the importance of power components in power systems
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Share W5500 routines
- 【ESP32-C3-DevKitM-1】Create a project + turn on the RGB light
- [SAMR21 new gameplay] 23. Rotary encoder rotaryio
- I hope you can give me some advice on the prospects of smart sensors.
- Share: Capsule Robot Antenna Design Information (English)
- The award-winning live broadcast will start at 10:00 this morning: "Dadatong helps you unlock the new generation of ADAS technology"
- Free Pinouts eBook (The Pinouts Book) V0.3
- [ESK32-360 Review] 4. Run the virtual serial port routine
- 【TI recommended course】#Lecture on basic knowledge of electronic circuits#
- Low-pass filter waveform distortion problem