check in
Completed

Digital constant current Source - STARS

PRODigital constant current Source - STARS

tag

15
0
0
0
Mode:Full

License

CC BY-NC-SA 4.0

Creation time:2025-01-16 09:13:11Update time:2025-01-20 02:40:07

Description

It should be regarded as the first car specification design of the open source platform

Statement:

This work has been carefully conceived and written by the author, but due to the limitations of knowledge and experience, there may be shortcomings. If you find any mistakes or areas for improvement during your reading, please point them out. Your feedback is important to us, and we will actively incorporate and correct it to improve the quality of our work. Thank you for your understanding, support and valuable comments.

Error = (Output Current - Set Current) / Set Current, calculated incorrectly in the video. This corrects the errors that have been discovered.

Project

This project is a high-performance automotive-grade adjustable constant current source system, which is designed to optimize the light distribution of automotive headlights. External DAC with differential amplification circuit is used to control FB voltage and multi-communication interface to achieve accurate control and flexible adjustment of current. The core MCU is AT32A403AVGT7 by Artery to ensure the stability and reliability of the system. Four independent output design, each channel current adjustable range from 200mA to 1500mA, built-in short circuit and overtemperature protection, to ensure the safety of the equipment, current setting is not limited by FB feedback resistance.

Preface

It has taken 5 months since I signed up for the Spark program in May, and it is almost finished. Since I am an individual in the automotive-related industry, the easiest job of hardware should be to light the lamp. In the process of light distribution in automotive headlights, it is key to control the current of the LED lamp beads to the appropriate level. Excessive current will not only cause the lamp board or driver to overheat, but also affect the light distribution effect, making the illuminance (LUX) substandard, making it difficult to meet the light distribution standard of class A or B. Traditional LED driver ICs usually set a fixed output current, which requires frequent adjustment of the feedback resistor to adapt to different light distribution requirements, which is not only cumbersome to operate, but also difficult to adjust on the aluminum substrate driver board. In order to simplify this process and improve the success rate of light distribution, the authors propose a method to optimize the current by controlling the output of a constant current chip. In the early stage, I also considered using the constant current and constant voltage scheme, and the constant current and constant voltage scheme is also possible, but it is necessary to set the output voltage and output current two parameters at the same time, which I personally think is more troublesome. This method allows the parameters of the constant current chip to be adjusted to suit different light distribution requirements without changing the hardware, greatly reducing the tedious step of adjusting the feedback resistor. By precisely controlling the output of the constant current chip, it is possible to ensure that the LED lamp beads operate in the optimal current range, thereby improving the throughput rate of light distribution and simplifying the production process.

Project Description

The adjustable constant current source system is a solution to solve the difficulty of accurately controlling the current size and obtaining the current size of the load flow during LED light distribution, aiming to achieve fine adjustment of brightness by accurately controlling the current size of LED lamp beads and using PWM technology. At the heart of the project was the development of a high-performance adjustable current source that could not only sample and control the current in real time to ensure an accuracy of plus or minus 2%, but also dynamically adjust the output voltage rms in PWM control mode, providing a more flexible dimming solution for LED lighting. In addition, the system is equipped with a touch serial port screen and supports a variety of communication interfaces such as LIIN, CANFD, 485, 232, USB, etc., which enhances the user interaction experience and system compatibility. The innovation of the project lies in its ability to provide richer dimming options and communication capabilities while ensuring high-precision control, which is suitable for automotive lamp light distribution, automotive lighting, indoor and outdoor lighting, stage lighting control, billboard lighting and intelligent building lighting systems, bringing efficient, energy-saving and intelligent new options to the lighting market.

Open-source protocol

This project uses the CC BY-NC-SA 4.0 open source license, which is Creative Commons License-Attribution-NonCommercial-ShareAlike.

CC: Creative Commons License

BY: Attribution, you must give appropriate attribution, provide a link to this License, and indicate whether or not changes have been made (to the original work).

SA: You are free to reproduce, display and perform this work; You may not alter, transform, or alter the Work.

NC: Non-commercial use, you may not use this work for commercial purposes.

Open Source License

It can be understood that we allow you to copy freely, reproduce, and reprint should indicate the source, and the commercial use of this work (including small batches) is prohibited!!

Project-related features

The four adjustable constant current sources introduced in this project meet the diverse current control needs with their excellent performance and flexibility. The device features four independent outputs, each with precise current adjustment from 200mA to 1500mA, and a real-time display of the output current to ensure that the status of the device is clear at a glance. The built-in short-circuit protection and over-temperature protection mechanism provide additional safety for the device. The core adopts DCDC constant current chip, supports PWM mode and full current output, directly controlled through EN pin, combined with advanced PID algorithm, to achieve current accuracy control within plus or minus 1%. In addition, the device supports up to 60V working voltage, is equipped with RS232, RS485, CAN FD, LIN and universal serial port and other communication interfaces, and integrates USB interface to meet different communication needs. In particular, it is worth mentioning that the device is also equipped with a Taojingchi touch serial port screen, which provides an intuitive and friendly user interaction experience.

Project properties

This project is the first public and is my original project. The project has not won an award in another competition.

Automotive electronics

Automotive electronics is a collection of electronic technologies and equipment applied in automobiles, covering electronic control devices and on-board electronic systems. It includes engine management, chassis control, body electronics, and infotainment, and is designed to improve vehicle performance, safety, comfort, and intelligence, networking. With the advancement of technology, automotive electronics plays a core role in new energy vehicles and intelligent driving, promoting the innovation and development of the automotive industry.

AEC-Q qualified

AECQ is a series of automotive qualification verification standards developed by the Automotive Electronics Council to ensure the reliability and quality of automotive electronic components. These standards include AEC-Q100 (integrated circuit ICs), AEC-Q101 (discrete devices), AEC-Q102 (optoelectronic devices), AEC-Q103 (MEMS sensors), AEC-Q104 (multi-chip module MCM), and AEC-Q200 (passive devices such as resistors, capacitors, inductors), etc. AECQ standards cover a wide range of aspects from environmental testing, mechanical testing, electrical testing, and life testing to ensure the stability and reliability of automotive electronics under extreme environmental conditions. AECQ-qualified products are considered to meet the stringent requirements of the automotive industry and guarantee long-term stable operation in automotive applications.

Hardware components

The input EMC uses a π filter. VCC to 12V is TPS54360, because the vehicle-gauge DCDC is not very easy to purchase in the Lichuang shopping mall, so the non-automotive-gauge IC is used instead. 12V to 5V adopts Nanxin SC81440. 5V to 3.3V adopts ZLDO1117QG33TA. The main control MCU adopts the AT32A403AVGT7 of Artari. The op amp uses Runshi RS722PXK-Q1. DAC conversion chip GP8403-TC50-EW. The constant current chip adopts Lingxin LN33061Q1-1. The CAN chip uses Xinli special SIT1044QT/3,485 with SIT3485ESA, 232 with SIT3232EESE, LIN level translation with MOS tube, and USB to serial port with conventional 340.

Description of each hardware module:

Input EMC Filter:

A π filter is an electronic filter used to suppress electromagnetic interference (EMI). This filter consists of inductive and capacitive elements. The π filter blocks the transmission of high-frequency signals through the high impedance characteristics of the inductor to high-frequency noise, and at the same time uses the capacitor to direct the noise to the ground wire to achieve a low-pass filtering effect, allowing low-frequency signals to pass through and suppressing high-frequency noise. In addition, π filters help meet electromagnetic compatibility (EMC) standards, reduce external radiated interference from the device, and protect the power supply from transient voltage spikes, thereby improving the stability and reliability of the system. When designing π filters, they need to be precisely designed for the specific application and the desired suppression frequency range to achieve the best filtering effect.

The input terminal adopts 2 automotive SS310AQ Schottky diodes as anti-reflection function, the anti-reverse circuit is indispensable, can not be omitted, after the anti-reverse circuit, a 56V TVS is used as surge protection, followed by π filter.

BUCK conversion: VCC-12V

The BUCK chip is replaced by TI's non-vehicle specification, and other vehicle specifications are out of stock in the Lichuang Mall, so a non-vehicle specification is used instead, with a withstand voltage of 60V, an output current of more than 3A, and an output voltage of 12V to meet the functional requirements, the inductor adopts Taiqing PSPMAA1050H-220M-ANP, the Acxxx capacitor is Yageo, CLxxx is Samsung, the electrolytic capacitor adopts Yongming's in-line capacitor, and the freewheeling diode brand Yang Jie.

12V-5V

The 12V to 5V chip adopts the south core SC81440Q, the switching frequency is set by RT resistance, the circuit operating frequency is set to 400KHZ, the operating temperature range is -40 degrees -125 degrees, and the FB feedback voltage is 1V, so it is convenient to calculate the output voltage, and the feedforward compensation can be calculated by calculating the poles and zeros.The 12V to 5V chip adopts Nanxin SC81440Q, the switching frequency is set by RT resistance, the circuit working frequency is set to 400KHZ, the working temperature range is -40 degrees to 125 degrees, and the FB feedback voltage is 1V, so it is more convenient to calculate the output voltage, and the feedforward compensation can be calculated by calculating the pole and zero point.

Below is a loop baud diagram of the SC81440Q.

5V-3.3V

The classic LDO solution adopts the 1117Q of Meitai with a maximum output of 1A.

MCU

The MCU adopts the AT32A403AVGT7 of Artery, AT32A403AVGT7 is an automotive-grade microcontroller launched by Artery, based on a high-performance 32-bit ARM® Cortex-M4F® core, with a frequency of up to 200MHz, and equipped with a single-precision floating-point operation unit and a digital signal processor. It features 256KB of zero-wait flash memory and 224KB of SRAM, and supports a wide range of peripheral interfaces, including 3 I²C, 4 SPI/I²S, 3 USARTs and 4 UARTs, 2 SDIOs, 1 USB 2.0 full-speed interface, 2 CAN 2.0B, and 10/100M Ethernet MAC. In addition, it integrates three sets of 12-bit A/D converters with a 2M sample rate and 2 channels of 12-bit D/A converters, as well as a variety of timer and power management functions. AT32A403AVGT7 is packaged in QFN48, which can work stably in the industrial-grade temperature range of -40~105°C, which is very suitable for application scenarios such as Internet of Vehicles, in-vehicle audio and video systems, and USB devices. The microcontroller has passed AEC-Q100 automotive-grade reliability qualification, which meets the high reliability and stability requirements of automotive electronics, and is suitable for a variety of in-vehicle applications such as body control, ADAS assisted driving, and BMS for new energy vehicles.

Crystal oscillator

The AA0802LCSC-AHV2G is a high-performance automotive-grade crystal oscillator with a wide temperature range (-40°C to +150°C) and AEC-Q200 qualification. Available in frequencies from 7.2 to 48 MHz, ± 10 ppm frequency tolerance, and low aging rates.

The 32.768KHZ crystal oscillator model is AH03270006, and the price of this crystal oscillator is not cheap.

DAC module

In the later stage, considering that the control mode can be analog dimming, PWM dimming. CH1 CH2 channel is controlled by MCU DAC FB pin voltage, the analog quantity is divided into 0.8mV per grid for high-precision control, or the magnification can also be controlled with high precision, the output current is not affected by the FB sampling resistance value, CH4 is the PWM control mode, and CH3 is the FB control mode of the DAC chip.

The DAC module uses Runshi Technology's RS722PXK-Q1, a CMOS operational amplifier with a high gain bandwidth of 13MHz and rail-to-rail input and output characteristics, a typical input bias voltage of ±0.5mV, stable operation over a wide temperature range of -40°C to +125°C, and support a single supply of 2.7V to 5.5V or dual supply operation ± 1.35V to ±2.75V. The RS722PXK-Q1 meets AEC-Q100 Grade 1 standards for automotive applications and is ideal for a variety of application scenarios such as sensor signal amplification, photodiode amplification, active filters, test equipment, and driving analog-to-digital converters. The RS722PXK-Q1 in an SOIC-8 (SOP8) package not only has an excellent speed and power consumption ratio, but is also particularly suitable for automotive electronics and precision signal processing. In the design, the principle of the DAC module is to input the current of the load to the forward end of the op amp, use the DAC of the MCU to output a signal 10mV lower than the positive end, and then amplify the difference of 10mV by 20 times through the op amp, so as to output a voltage of 200mV. This is because the reference voltage of the FB pin is set to 200mV, and by adjusting the reference voltage of the op amp, the LED DRV chip can output at full current while avoiding entering PWM and analog dimming modes. However, considering that signal fluctuations can also be amplified by a factor of 20, which can affect the stability of the output voltage, a capacitor of 4.7 μF to 10 μF is incorporated into the output of the op amp to make the output voltage smoother. In addition, the output of the DAC needs to be equipped with a voltage follower, because the input impedance of the reducer is small, and if the op amp is directly driven by the MCU for signal amplification, it may encounter the problem of insufficient load capacity. The use of voltage followers can effectively improve the load capacity and ensure the stable transmission of signals.

Since the AT32A403A only has 2 DAC outputs, a DAC conversion chip (GP8403-TC50-EW) is used to convert the digital signal into an analog signal through the IIC protocol control, and the DIM pin of the LED DRV can be connected to the DAC for PWM dimming, because there is only a LN33061Q1-1 chip in hand, the PWM voltage needs to be very high, and this chip is not convenient to control, so it is not recommended to use this chip.

Constant current driver IC

The driver chip adopts the LN33X61Q1 of Lingxin Electronics, which is LN33X61Q1 a synchronous step-down LED driver power chip that meets the automotive AEC-Q100 Grade 1 standard launched by Lingxin Electronic Technology (Wuxi) Co., Ltd., with a wide input voltage range of 3.5V to 60V and a current accuracy of ±4% over the full temperature range. It integrates upper and lower power MOS transistors, provides output current from 0.6A to 1.5A, and supports switching frequencies from 400kHz to 2.1MHz. LN33X61Q1 offers PWM dimming, operates at nearly 100% duty cycle to achieve ultra-low input/output dropouts, and features accurate peak current clamping and internal control loop compensation. In addition, it includes over-temperature protection, under-voltage lockout, and a flag output via the FAULTB pins in the event of an open or short LED circuit. Housed in a thermally enhanced SOIC-EP8 package, the LN33X61Q1 chip is designed for applications such as automotive lamp drivers and LED driver power supplies, with an operating temperature range of -40°C to 125°C.

When using the external control FB pin, there is no need for 200mV/RFB, so it is not affected by the resistance of the RFB.

The input capacitance is calculated as shown in the figure below.

The output inductance is calculated as shown in the figure below.

The output capacitance is calculated as shown in the figure below.

When fixed FB control is used, the output current = 200mV/RFB. This is shown in the figure below.

The connectors are of the Jeste A2001AWR series.

CAN communication

CAN FD (CAN Flexible Data-Rate) is an enhanced version of the traditional CAN bus protocol, which significantly improves the efficiency of data transmission by introducing flexible data rates and greater data load capacity. CAN FD supports the use of standard bit rates in the arbitration phase to guarantee compatibility with legacy CAN devices, while higher bit rates of up to 8Mbps can be employed in the data phase, while the payload is scaled to 64 bytes per data frame. In addition, CAN FD also enhances the accuracy of timestamps and the anti-interference ability of signals, so that events in the network can be synchronized more accurately. Although CAN FD devices can communicate on the same network as conventional CAN devices, the latter cannot take advantage of the high data rates and large loads of CAN FD. These improvements to CAN FD make it ideal for applications that require high bandwidth, such as automotive networking, industrial automation, and multimedia transmission.

The SIT1044QT/3 is a high-performance CAN FD bus transceiver in Sillit, which uses 5V power supply, especially suitable for automotive and industrial control fields, and supports 5Mbps data transmission rate. The chip is compatible with 3.3V MCUs and is AEC-Q100 automotive-qualified, ensuring reliability in automotive applications. It has a built-in over-temperature protection function that automatically protects the chip from damage when the ambient temperature is too high. In addition, the SIT1044QT/3 is resistant to ±40V bus voltage, as well as a low-power standby mode for applications that require low-power operation. It has a wide I/O voltage range, supports 3.3V and 5V MCUs, and provides undervoltage protection on both VCC and VIO power pins. The chip also has high-speed CAN FD support, which can achieve flexible data rate transmission, has high immunity to electromagnetic interference to ensure stable signals, and the typical loop delay from TXD to RXD is less than 100ns, ensuring real-time communication.

485 Communications

SIT3485 is a high-performance 3.3V powered RS485/RS422 half-duplex transceiver that supports data rates up to 12Mbps for high-speed communication networks. It is designed with a unique 1/8 unit load that allows up to 256 nodes to be connected on the same bus, making it ideal for large-scale device networks. The chip is equipped with a variety of protection features, including driver short-circuit output protection and over-temperature protection, to ensure reliability under extreme conditions. In addition, the SIT3485 feature a low-power shutdown function, making it suitable for battery-powered or energy-critical applications. Separate driver and receiver enable control increases design flexibility, while excellent noise immunity and integrated transient voltage resistance make it ideal for use in electrically noisy environments. The SIT3485 operates from 3.0 to 3.6V and can accommodate temperatures ranging from -40 to 85 degrees Celsius.

232 Communications

SIT3232EESE is a 3.3V dual-channel RS-232 transceiver manufactured by Xinlit Corporation, which supports a power supply range of 3V to 5.5V, is TIA/EIA-232 compliant, and is designed for applications that require high ESD protection. The chip enables error-free communication at data rates of 120 kbps and features HBM ESD protection of over 15 kV and IEC-4100-4-2 contact discharge protection of over 8 kV. It features a dual-charge pump design that requires only four 1μF external capacitors for efficient power conversion and data transfer. With an operating temperature range of -40°C to 85°C, it is suitable for electrostatically sensitive communication environments to ensure signal stability and device safety.

LIN Communications

LIN (Local Interconnect Network) is a low-cost serial communication protocol for automotive and industrial environments, mainly used for communication between electronic control units (ECUs). It features low-speed transmission (1Kbps to 20Kbps), simple master-slave architecture, small-scale networking, and single-wire communication, making it ideal for cost-sensitive applications that do not require high-speed data transmission. The low cost of the LIN protocol is reflected in the fact that it does not require expensive hardware support, and the protocol itself is simple and easy to implement on a variety of microcontrollers. In addition, the LIN protocol supports diagnostic communication and allows the master node to query the status and diagnostic information of the slave device, so it is widely used in the automotive industry, such as window control, seat adjustment, and lighting control. The LIN protocol, managed by the LIN Alliance, ensures compatibility and standardization between different vendors. Since the AT32 can directly parse the LIN, it only needs to convert the level to receive or transmit normally. Since the LIN voltage range exceeds 3.3V, MOS bidirectional level translation is used to convert the LIN level to 3.3V or 3.3V to the level voltage corresponding to the LIN.

USB communication

CH340N is a USB to serial IC that supports full-speed USB2.0 interface with built-in clock and no need for external crystal oscillator.

Serial display

The touch screen adopts Taojingchi X5 version, which is large in size and easy to operate. Since I don't have time and don't know how to PS, the UI interface is very collapsed.

Shell

The shell overturned, and because the built-in 3D model did not match the actual size, the dimensional drawing of the device was not checked, resulting in a height conflict.

Software Description

The software is written in keil5, and since some of the code is secret, the library except the main function is encapsulated. A package with attachment name of xinhuo_20241007_2050 is a code source project.

To use the serial port tool, you need to connect the USB data cable to the host.

Place the configuration file in the same directory as the serial port tool.

Double-click to open the tool, and you can see that the interface does not have any parameters.

Click Extensions below.

After clicking Extension, the parameters set are shown in the figure below.

4001 represents the address, and 2001 is the parameter is magnified by 10 times, and the restored parameter is 200.1. We keep one decimal place for setting parameters, which includes the decimal part when setting, and expands the set parameters by 10 times by default when setting to achieve the effect of setting the decimal part, which is convenient for simple and clear communication.

Modbus Poll

Connect the USB cable to the slave and read the data. You can see the parameters set in the interface.

Once you have opened the modbus software, open the configuration file shown in the image below.

Click Quick connect (F5)

Once operational, the data from the screen is uploaded to the modbus software.

Physical display

This communication test method is carried out with two identical boards, one set as the master and the other as the slave. The master is responsible for sending CAN, RS-485, RS-232, LIN, and TTL signals to the slave, and the slave is responsible for receiving and interpreting these signals. In the case of CAN, RS-485, RS-232, LIN, TTL signals transmitted at the same time, the slave will respond according to the priority of the signal. For example, if the slave signals 200mA for the first time it is received, the output current is 200mA. If the CAN signal indicates an output of 300mA, the output current will be adjusted to 300mA. The screen of the slave will display the type of the current control signal, such as "CAN control" in the case of CAN control. Even if multiple signals are controlled at the same time, they do not interfere with each other.

When using LIN receive, connect the short cap to PA3, PA3 is the receiving port, and PA2 is the sender, so the slave is selected as PA3 and the master is PA2.

Load

The load tested was KW CELNM1. TG-Z6N6-ebvFfcbB46-15B3-A-S lamp beads, KW CELNM1.TG is an LED lamp bead for automotive headlamps and dynamic headlamps manufactured by ams-OSRAM, with a ceramic package and UX:3 chip technology, providing a typical light angle of 120° and white light of Cx = 0.32 and Cy = 0.33 according to CIE 1931 standards. The lamp has a 3A corrosion rating, is AEC-Q102 qualified, and has 8kV ESD protection. It has an operating temperature range of -40°C to 125°C, forward currents ranging from 50mA to 1500mA, and is capable of withstanding inrush currents of 5000mA and reverse currents of 200mA. At 1000mA forward current, the forward voltage is between 2.75V and 3.40V, and the actual thermal resistance is 4.6K/W to 5.6K/W and the electrical thermal resistance is 3.3K/W to 4.0K/W.

 

Automotive electronics design considerations

When designing automotive electronics, industry standards must be strictly followed, including high temperature resistance, vibration resistance, dust and moisture resistance, and electromagnetic interference resistance, to ensure the reliability and stability of the system. The design should consider the power and ground layout to ensure the stability and reliability of current transmission, and follow the safety standards of the automotive electrical system to prevent the circuit from causing hazards such as fire. At the same time, the maintainability of the circuit board is also very important, making it easy to repair and replace. Electromagnetic compatibility is also critical to avoid electromagnetic interference affecting other systems. In addition, materials that meet the requirements of the automotive environment should be used, such as high-temperature, dust-proof and moisture-proof materials, reasonable layout of circuits, reduction of line length, reduction of signal transmission delay, and planning of effective heat dissipation structures to ensure that electronic components do not overheat. Worst-case analysis and typical case analysis, as well as compliance with international standards such as ISO 7637-2, ensure the reliability of the circuit in a wide range of situations. Detailed calculations and tests are performed to verify the maximum current consumption, output voltage range, and minimum input voltage of the circuit to ensure that the design meets all requirements. Finally, the design should also take into account the various environmental conditions that the car may encounter to ensure its environmental adaptability.

Other

LN33061Q1-1, SC81440Q, AT32A403AVGT7 data sheet, 3D housing, software related materials have been uploaded to the attachment.

Video explanations

https://www.bilibili.com/video/BV1gh12YMEWn/?vd_source=ef56adc416b7137cf117f4a833b1cec7 

Thanks:

Thank you for your generous sponsorship of the JLC Stars Program, your support is very important to us and motivates me to keep moving forward. We look forward to working with you to create more brilliant achievements in the future.

          Sincerely

Salute

 

Design Drawing

Download File
The preview image was not generated, please save it again in the editor.

Attachments

OrderFile nameDownload times
1
LN33X61Q1_DS_CN_v0.7 - Vehicle .pdf
47
2
SC81440Q.pdf
20
3
AT32A403A.pdf
22
4
Assemblies. SLDASM
36
5
Lid. SLDPRT
20
6
3D Printed Backshell.SLDPRT
19
7
Stars serial assistant configuration.rar
23
8
Mbpoll1.mbp
21
9
xinhuo_20241007_2050.rar
99
Add to Album
0
0
Share
Report

Comment

All Comments(1)
Sort by time|Sort by popularity
Followers0|Likes0
Related projects
Empty

Bottom Navigation