Ldc1000 tracking car

    A car capable of automatically following the shape of a wire has been designed and built using the LDC1000 inductor-to-digital converter as its core component. The system consists of several key modules: a main control module, a metal signal detection module, a speed detection module, a motor drive module, and a power supply module. The STC89C52 microcontroller serves as the central processing unit, analyzing the detected metal distance signals to determine if the trolley has deviated from its path. Based on this information, it makes directional adjustments, enabling the trolley to follow a specified plane runway automatically.

    Automatic tracking systems are widely used in industrial automation, but each method has its own limitations. For example, mechanical chain-based systems suffer from wear and require significant space. Photoelectric reflection-based systems need black tracks and are sensitive to ambient light. Camera-based pattern recognition requires advanced algorithms and is also affected by lighting conditions.

    In response to these challenges, this paper proposes a solution that utilizes the LDC1000 to detect and interpret the presence of a wire, enabling automatic tracking.

    Introduction to LDC1000

    Ldc1000 tracking car

    The LDC1000 is a new Inductor-to-Digital Converter (LDC) developed by Texas Instruments. It offers advantages such as low power consumption, compact size, and cost-effectiveness. Its SPI interface allows for easy integration with microcontrollers. The LDC1000 only needs one external PCB coil or a custom-made coil for non-contact inductive sensing. Unlike traditional Q meters, which measure coil inductance, the LDC1000 detects the spatial relationship between an external metal object and the test coil connected to it.

    This device can be used for various applications such as horizontal or vertical distance detection, angle measurement, displacement monitoring, motion detection, vibration detection, and metal component identification. It finds use in automotive, consumer electronics, computing, industrial, communications, and medical fields.

    Ldc1000 tracking car

    STC89C52 Interface with LDC1000

    Ldc1000 tracking car Mcu and LDC1000 interface diagram

    When using the OC port of the STC89C52 to simulate an SPI interface for communication with the LDC1000, the following steps should be followed:

    • Set the chip select signal to low.
    • Write the register address to the LDC1000 via the SPI line. The highest bit indicates whether it's a write (0) or read (1), and the remaining 7 bits represent the register address.
    • During the 8 clock cycles, the SDO line is in a high-impedance state.
    • If the command is in a read/write mode, the highest bit of the transmitted data is 1, and the SDO sends the 8-bit byte from the corresponding register.
    • The SDI line receives the 8-bit byte data from the STC89C52 and writes it to the appropriate register.
    • Set the chip select signal back to high to release control of the slave device.
    Ldc1000 tracking car LDC1000 SPI read and write timing diagram

    STC89C52 Driver Design

    The following driver functions were implemented based on the SPI interface timing of the LDC1000:

    
    // Read 1B data
    unsigned char Ldc_SPIread(void);
    
    // Write 1B data
    void Ldc_SPIwrite(unsigned char ch);
    
    // Write register
    void LDC1000_WriteReg(unsigned char addr, unsigned char dat);
    
    // Read register
    unsigned char LDC1000_ReadReg(unsigned char addr);
    
    // Chip initialization
    void LDC1000_Init(void);
    
    // Read distance parameters
    unsigned int ReadValue(void);
    

    Control Logic

    The front of the car is equipped with an inductive antenna. As the car moves along the wire, due to factors like uneven road surfaces or asymmetrical wheels, the car body may deviate from the track, resulting in three possible cases: A, B, and C (as shown below).

    Ldc1000 tracking car

    Under the three scenarios A, B, and C, the values obtained from the function ReadValue() are Fa, Fb, and Fc, respectively. The relationship between them is Fa > Fb and Fc > Fb. Therefore, when the value is Fb, the car goes straight. Otherwise, it turns left or right depending on the deviation. The program flow is as follows:

    Ldc1000 tracking car

    According to the above principle, the system tracks the experimental car and the wire, with the serial port monitoring the data. The wire diameter is over 0.9mm, and the tracking car includes a control board, display, photoelectric speed measurement, motor, Bluetooth transceiver module, and more. The sampled data is monitored to check if the car is off-track.

    Ldc1000 tracking car
    Ldc1000 tracking car Ldc1000 tracking car

    Summary

    Non-contact inductive coil detection can be achieved using a PCB coil or a custom-made coil, and metal detection can be conveniently performed by analyzing how the metal object affects the magnetic field of the induction coil. After actual testing, it was found that metal objects within 3 cm can be effectively detected by setting the module register values appropriately. External lighting conditions have minimal impact on the system, and it can also quickly detect metal within a certain distance and identify the type of metal.

    Attached: LDC1000 Driver

    
    #include "reg52.h"
    
    // LDC COMMANDS
    #define LDC1000_CMD_REVID 0x00
    #define LDC1000_CMD_RPMAX 0x01
    #define LDC1000_CMD_RPMIN 0x02
    #define LDC1000_CMD_SENSORFREQ 0x03
    #define LDC1000_CMD_LDCCONFIG 0x04
    #define LDC1000_CMD_CLKCONFIG 0x05
    #define LDC1000_CMD_THRESHILSB 0x06
    #define LDC1000_CMD_THRESHIMSB 0x07
    #define LDC1000_CMD_THRESLOLSB 0x08
    #define LDC1000_CMD_THRESLOMSB 0x09
    #define LDC1000_CMD_INTCONFIG 0x0A
    #define LDC1000_CMD_PWRCONFIG 0x0B
    #define LDC1000_CMD_STATUS 0x20
    #define LDC1000_CMD_PROXLSB 0x21
    #define LDC1000_CMD_PROXMSB 0x22
    #define LDC1000_CMD_FREQCTRLSB 0x23
    #define LDC1000_CMD_FREQCTRMID 0x24
    #define LDC1000_CMD_FREQCTRMSB 0x25
    
    sbit PIN_LDC_CS = P1^0;
    sbit PIN_LDC_SO = P1^1;
    sbit PIN_LDC_SCK = P1^2;
    sbit PIN_LDC_SI = P1^3;
    
    #define SET_PIN_LDC_SI(bValue) PIN_LDC_SI = bValue
    #define GET_PIN_LDC_SO() PIN_LDC_SO
    #define SET_PIN_LDC_SCK(bValue) PIN_LDC_SCK = bValue
    #define SET_PIN_LDC_CS(bValue) PIN_LDC_CS = bValue
    
    /*--------------------------------------------------------------- Function: Read 1B data input: No output: 1B data----------------------- -----------------------------------------*/
    unsigned char Ldc_SPIread(void)
    {
        unsigned char i = 0;
        unsigned char ch = 0;
        for(i = 0; i < 8; i++)
        {
            SET_PIN_LDC_SCK(0);
            ch <<= 1;
            SET_PIN_LDC_SCK(1);
            if(GET_PIN_LDC_SO()) ch |= 0x01;
        }
        SET_PIN_LDC_SCK(0);
        return (ch);
    }
    
    /*--------------------------------------------------------------- Function: Write 1B data input: ch--1B data output: None -------------------- --------------------------------------------*/
    void Ldc_SPIwrite(unsigned char ch)
    {
        unsigned char i = 0;
        for(i = 0; i < 8; i++)
        {
            SET_PIN_LDC_SCK(0);
            if(ch & 0x80) SET_PIN_LDC_SI(1);
            else SET_PIN_LDC_SI(0);
            SET_PIN_LDC_SCK(1);
            ch <<= 1;
        }
        SET_PIN_LDC_SCK(0);
    }
    
    // write register
    void LDC1000_WriteReg(unsigned char addr, unsigned char dat)
    {
        addr = addr & 0x7F;
        SET_PIN_LDC_CS(0);
        Ldc_SPIwrite(addr);
        Ldc_SPIwrite(dat);
        SET_PIN_LDC_CS(1);
    }
    
    //Read register
    unsigned char LDC1000_ReadReg(unsigned char addr)
    {
        unsigned char temp;
        addr = addr | 0x80;
        SET_PIN_LDC_CS(0);
        Ldc_SPIwrite(addr);
        temp = (UINT8)Ldc_SPIread();
        SET_PIN_LDC_CS(1);
        return temp;
    }
    
    // Chip initialization
    void LDC1000_Init(void)
    {
        LDC1000_WriteReg(LDC1000_CMD_RPMAX, 0x13);
        LDC1000_WriteReg(LDC1000_CMD_RPMIN, 0x3A);
        LDC1000_WriteReg(LDC1000_CMD_SENSORFREQ, 0x94);
        LDC1000_WriteReg(LDC1000_CMD_LDCCONFIG, 0x17);
        LDC1000_WriteReg(LDC1000_CMD_CLKCONFIG, 0x02);
        LDC1000_WriteReg(LDC1000_CMD_INTCONFIG, 0x02);
        LDC1000_WriteReg(LDC1000_CMD_THRESHILSB, 0x50);
        LDC1000_WriteReg(LDC1000_CMD_THRESHIMSB, 0x14);
        LDC1000_WriteReg(LDC1000_CMD_THRESLOLSB, 0xC0);
        LDC1000_WriteReg(LDC1000_CMD_THRESLOMSB, 0x12);
        LDC1000_WriteReg(LDC1000_CMD_PWRCONFIG, 0x01);
    }
    
    // Read distance parameters
    unsigned int ReadValue(void)
    {
        unsigned int iTemp;
        iTemp = LDC1000_ReadReg(LDC1000_CMD_PROXMSB);
        iTemp <<= 8;
        iTemp += LDC1000_ReadReg(LDC1000_CMD_PROXLSB);
        return iTemp;
    }
    

    Portable Power Station

    Portable power supply humanized output port design: AC dual output port 220V output, to solve multi-channel power demand; DC 24V, 12V cigarette lighter, dual 5V USB output, more widely used. Can meet the needs of most electrical appliances, such as energy storage system for LED Light,energy storage system for outdoor, energy storage system for medical equipment,mobile phones, telephones, digital cameras, mobile hard drives, digital cameras, tablets, laptops, car starters, pumps, postal and telecommunications, environmental instruments Etc; can also be used in the following areas such as: finance, first aid, excavation, exploration, military, science, media, tourism, disaster relief, medical assistance, environmental protection and areas with widespread power shortages.

    Portable Storage,Ac Rechargeable Battery,Portable Energy Storage System,Outdoor Portable Energy Storage System,Portable Battery With AC/DC Output,High Capacity Portable Battery

    Enershare Tech Company Limited , https://www.enersharepower.com

    Previous Post: Bag dust collector smokes and ash causes - Database & Sql Blog Articles
    Next Post: Ldc1000 tracking car
    Home
    Recent Posts
    • Academician Zhao Kuiping predicted that virtual …
    • Develop industry standards, Mozilla will standar…
    • AICRobo's first self-delivered robots succes…
    • AICRobo's first self-delivered robots succes…
    • Leaf area analyzer for stability analysis of spr…
    • Leaf area analyzer for stability analysis of spr…
    • Not too small cannon - my first ITX small steel …
    • Determination of the content of compounds by UV-…
    • Determination of the content of compounds by UV-…
    • Determination of lead in whole blood by AA-1800 …
    • Determination of lead in whole blood by AA-1800 …
    • Effect of E292 of Escherichia coli leucine-tRNA …
    • Effect of E292 of Escherichia coli leucine-tRNA …
    • Appropriate thawing method for bottled serum - D…
    • Bag dust collector smokes and ash causes - Datab…
    • Ldc1000 tracking car
    • Ldc1000 tracking car
    • Shandong Province issued the 13th Five-Year Educ…
    • ELISA kit special coating method - Database &…
    • Electronic platform scales crashed how to do - H…