Hands-free passive keyless entry (PKE) is quickly becoming a mainstream application for automotive remote keyless entry and is becoming a common option for new models. This method eliminates the need to press a transmitter button to lock or unlock the car door, and allows easy access to the vehicle as long as you have a valid transponder.
Hands-free PKE applications require two-way communication between the base station and the transponder unit. The base station unit in the vehicle sends a low frequency (LF) command to search for transponders in the surrounding area. Once the owner's transponder is searched, the transponder automatically responds to the base station unit. The base station unit opens the door after receiving a valid verification response signal.
In a typical PKE application, the output power of the base unit is designed to be the maximum power allowed by the electromagnetic radiation standards set by government agencies. When operating under a 9V to 12V DC power supply, the maximum antenna voltage that can be achieved is about 300V peak-to-peak. Due to the non-propagation characteristics of low-frequency signals (125kHz), the signal level received by a typical key fob transponder about two meters away from the transmitting base unit is only about a few mV peak-to-peak. In addition, due to the directional characteristics of the antenna, if the antenna is not facing the base antenna, the input signal level of the transponder will be very weak.
If PKE does not work properly, the most likely reason is that the transponder input signal level is too weak. Therefore, for hands-free PKE applications to work reliably, the input signal should be strong enough (above the input sensitivity level) within any desired communication range. To make the PKE system reliable, system design engineers must consider four important parameters: the output power of the base station command signal, the input sensitivity of the transponder, the directivity of the antenna, and the battery life of the transponder.
The PIC16F639 is an MCU with a three-channel analog front end (AFE) whose analog front end features are controlled by the MCU firmware. Due to its ease of use, this device can be used in a variety of intelligent low-frequency detection and two-way communication applications. This article discusses the design circuit examples of using the PIC16F639 MCU to implement an intelligent PKE transponder and gives examples of the MCU firmware in the circuit. Design engineers can easily modify these circuits and MCU firmware according to the user's specific application.
Figure 1: Smart passive keyless entry (PKE) system using two-way communication.
PIC16F639 PKE transponder
PIC16F639 includes a digital MCU part (PIC16F639 core) and an analog front end (AFE) part, which can be used for a variety of low-frequency detection and intelligent two-way communication applications. Figure 1 shows an example of a typical PKE system. The base station unit sends a 125kHz command signal to search for valid transponders around. If the received command is valid, the PKE transponder will return a response signal.
The PIC16F639 device has high analog input sensitivity (up to 1mV peak-to-peak) and has three antenna connection pins. By connecting three antennas pointing in the X, Y and Z directions, the transponder can receive signals from any direction at any time, thereby reducing the possibility of signal loss caused by the directivity of the antenna. The input signals of each antenna pin are detected independently and then added. Each input channel can be enabled or disabled individually by programming the configuration register. The fewer channels are enabled, the lower the power consumption of the device.
To achieve hands-free operation, the transponder continuously waits and detects input signals, which reduces battery life. Therefore, to reduce operating current, the digital MCU part can be in low current mode (sleep mode) while the analog front end (AFE) searches for valid input signals. The digital MCU part is awakened only when the AFE detects a valid input signal. This function can be achieved by using an output enable filter (wake-up filter). The PIC16F639 has 9 output enable filter options. The user can program the filter using the configuration register. Once the filter is programmed, the device will only transmit the detected output to the digital part when the input signal meets the filter requirements.
Figure 2: Passive keyless entry (PKE) transponder configuration circuit diagram.
An example configuration of a PKE transponder is shown in Figure 2. This transponder includes a PIC16F639 device, an external LC resonant circuit, a push button, a UHF transmitter, a backup battery (optional), and a 3V lithium battery.
The digital part has two I/O ports, PORTA and PORTC. Each PORTA pin can be individually configured as a level change interrupt pin, while each PORTC pin does not have the level change interrupt function. The AFE part shares the three I/O pins RC1, RC2 and RC3 of the digital part PORTC, which are internally connected to the CS, SCLK/ALERT and LFDATA/CCLK/RSSI/SDIO pads of the AFE. LFDATA/CCLK/RRSI and ALERT are AFE outputs. SDIO, SCLK and CS are used to program or read the AFE configuration register.
To save battery energy, the AFE part is usually in sleep mode while the digital part is detecting the LF input signal. Although the output pads of the AFE are connected to the PORTC pin internally, the AFE output cannot wake up the digital part through a level change interrupt event because the PORTC pin is not a level change interrupt pin. Therefore, it is recommended to connect the LFDATA and ALERT pins of the AFE to the PORTA pin externally, as shown in Figure 2. The digital part
is awakened when one of the following three conditions occurs: there is an AFE output on the LFDATA pin; there is an AFE output on the ALERT pin; an event of pressing the switch button on PORTA.
Figure 3: Due to the directivity of the antenna, in practical applications, the detection distance is maximum when the two antennas are parallel and the detection distance is shortest when they are orthogonal.
External LC resonant antenna
The PIC16F639 device has three low frequency input channels. The LCX, LCY, and LCZ pins are used to connect an external LC resonant antenna circuit (for each LF input channel). The external circuit is connected to the antenna input pins and the LCCOM pin. LCCOM is a common pin for all external antenna circuits. When the internal detection circuit detects a strong input signal, it is recommended to connect a capacitor (1 to 10 μF) between the LCCOM pin and ground to provide a stable operating state.
Although the PIC16F639 has three LC input pins to connect to three external antennas, users can use only one or two antennas instead of using all three antennas simultaneously, depending on the specific application. The operating current consumption is proportional to the number of channels enabled, and the fewer channels enabled, the less current is consumed, but it is strongly recommended to use all three antennas in hands-free PKE applications.
To detect low-frequency magnetic fields, a tuned loop antenna is usually used. To maximize the antenna voltage, the loop antenna must be precisely tuned to the desired frequency. For PKE applications, the antenna should be tuned to the base station carrier frequency. The loop antenna consists of a coil (inductor) and several capacitors that form a parallel LC resonant circuit. The antenna voltage is maximized by increasing the loop surface area and the quality factor (Q) of the circuit. [page]
The resonant frequency of the LC tank circuit is given by Equation 1:
Among them, L is the loop inductance and C is the capacitance.
For a given LC resonant circuit, the received antenna voltage can be approximately expressed by Equation 2.
Where fc = base station carrier frequency (Hz); △f = |fc-fo|; fo = LC circuit resonant frequency (Hz); N = number of turns of the loop coil; S = loop surface area (m2); Q = LC circuit quality factor; Bo = magnetic field strength (Weber/square meter); α = angle of signal arrival.
In Equation 2, the quality factor (Q) is a measure of the frequency selectivity of the tuned circuit. Assuming the capacitor is lossless at 125kHz, the Q of the LC circuit will be primarily determined by the inductance.
Where fo is the tuning frequency, L is the inductance value, and r is the impedance of the inductor.
In typical transponder applications, the inductance value ranges from 1 to 9 mH. For air-core inductors, the Q value of the LC circuit is greater than 20, and for ferrite core inductors, the Q value is about 40.
The term Scosα in equation 2 represents the effective surface area of the antenna, which is the area of the loop that is exposed to the incident magnetic field. When cosα is equal to 1, the effective surface area of the antenna is maximum, and the antennas of the base station and the transponder unit are facing each other. In practical applications, the detection distance is maximum when the two antennas are parallel and minimum when they are orthogonal. Figure 3 graphically illustrates the antenna orientation problem in practical applications.
[page]
Figure 4: Recommended transponder circuit board antenna layout.
As shown in Equation 2 and Equation 3, when the LC circuit is accurately tuned to the frequency of the incident carrier, the induced voltage on the coil is the largest. However, in actual applications, due to the different tolerances of the LC components, the LC resonant frequencies of each transponder are also different. To compensate for the errors caused by component tolerances, each channel of the PIC16F639 has an internal tuning capacitor group. The capacitance value can be programmed to a maximum of 63pF in steps of 1pF, and the capacitance value increases monotonically with the increase of the configuration register bit.
The capacitance can be effectively tuned by monitoring the RSSI current output. The RSSI output is proportional to the input signal strength, so the closer the LC circuit is tuned to the carrier frequency, the higher the monitored RSSI output. The total capacitance value increases as the configuration register bits increase, and the resulting internal capacitance is added to the capacitance of the LC circuit. As the internal resonant capacitance increases, the LC resonant frequency will decrease.
Figure 5: Each resonant antenna of the transponder circuit must be tuned to the base unit’s carrier frequency for optimal signal reception.
Battery backup and no-battery mode
In actual applications, it is possible that the battery may accidentally be disconnected from the circuit temporarily, such as when the transponder falls on a hard surface. If this happens, the data stored in the MCU may not be correctly restored. To avoid accidental battery disconnection, users can consider using a backup battery circuit. The backup battery circuit can temporarily provide VDD voltage to the transponder. This circuit is recommended for precision transponders, but it is not necessary for all applications. In Figure 2, D4 and C1 form a battery backup circuit. When the battery is connected, C1 is fully charged, and when the battery is temporarily disconnected, C1 provides VDD voltage.
When the transponder is in battery-free operation, it is called battery-free mode. In Figure 2, diodes D1, D2, D3, and C1 form the power supply circuit for battery-free mode. When the transponder coil generates voltage, the coil current flows through diodes D1 and D2 to charge C1, which can provide VDD voltage for the transponder. This power supply circuit is useful when the PIC16F639 is used in anti-collision transponder applications that require battery-free operation. Depending on the application, the capacitance value of C1 in battery-free mode varies from a few microfarads to a few farads.
Figure 6: In the base station circuit, current driver U1 amplifies the power of the 125 kHz square wave pulses from the MCU. The square wave pulse output of U1 is converted into a sine wave after passing through the LC series resonant circuit composed of L1, C2, C3 and C4.
Transponder circuit
The transponder circuit has three external LC resonant circuits, five push button switches, a 433.92MHz resonator for UHF data transmission and several components for battery backup mode.
Each LC resonant circuit is connected to the LC input and LCCOM pins. The air core antenna is connected to the LCX input and the two ferrite rod inductors are connected to the LCY and LCZ pins. The LCCOM pin is the common pin for the three antenna connections and is grounded through C11 and R9. Each resonant antenna must be tuned to the carrier frequency of the base station unit to achieve the best signal reception (Figure 5). The internal capacitors of each channel can be used to tune the antenna to the best state.
When the device is initially powered on, the digital section uses SPI (CS, SCLK/ALERT, and SDIO) to program the AFE configuration registers. Due to the high input sensitivity of the AFE (approximately 3mV peak-to-peak), the AFE is very sensitive to environmental noise, so measures must be taken to avoid excessive AC noise along the PCB traces. Capacitors C6 and C12 are used at the VDD and VDDT pins, respectively, to filter out the noise.
Diodes D1 and D2 and capacitor C5 are used in battery backup mode, and diodes D2, D3 and D7 and capacitor C5 are used in no-battery mode. A larger capacitance of C5 is required for stable operation in no-battery mode. Capacitor C5 stores the charge from the battery and coil voltage through diodes D3 and D7. When the battery is temporarily disconnected, the charge stored in C5 can maintain the power supply of the PIC16F639 device. Diodes D3 and D7 are connected to each other through the air-core coil, generating a strong coil voltage in the three external LC resonant antennas.
Once a valid input signal is detected, the digital MCU part is awakened and issues a response if the command signal is valid.
The transponder can respond using an internal modulator (LF talkback) or an external UHF transmitter. Each analog input channel has an internal modulator (transistor) between the input and LCCOM pins. If the AFE receives a clamp or unclamp command from the digital MCU part, the internal modulator is turned on and off, respectively. The antenna voltage is clamped and unclamped according to the clamp or unclamp command, respectively, which is called LF talkback. LF talkback is only used in short-range applications. The base station can detect the change in the transponder antenna voltage and reconstruct the modulated data.
In long-distance applications, the transponder uses a UHF transmitter. The UHF (433.92 MHz) resonator U2 and the power amplifier Q1 form a UHF transmitter that is turned on and off with a key. The capacitance of capacitors C2 and C3 is in the range of about 20pF, depending on the circuit layout. L1, which is generally formed by the metal traces of the printed circuit board, is a UHF antenna, and the efficiency will be significantly improved by increasing its loop area.
When the MCU I/O pin outputs a logic high level, the UHF transmitter is partially turned on, otherwise it is turned off. The RC5 output is the modulated data of the UHF signal, which can be reconstructed by the UHF receiver of the base station.
Base station circuit
The base station unit consists of an MCU, a 125kHz transmitter/receiver and a UHF receiver module. The base station sends out a 125kHz low frequency command signal and receives responses from the transponder via UHF and LF. After sending out the LF command, the base station checks for a response via the LF or UHF link.
The 125kHz transmitter generates a carrier signal based on the pulse width modulator (PWM) output of the MCU. Current driver U1 amplifies the power of the 125kHz square wave pulse from the MCU. The square wave pulse output of U1 is converted into a sine wave after passing through the LC series resonant circuit composed of L1, C2, C3, and C4. L1 is an air-core inductor for the 125kHz LF antenna (Figure 6).
The antenna radiates strongest when the LC series resonant circuit is tuned to the frequency of the PWM signal. At the resonant frequency, the LC circuit impedance is minimum, which maximizes the L1 load current, generating a strong electromagnetic field. The user can tune the LC circuit by monitoring the coil voltage on L1. The components after diode D1 are used to receive the LF intercom signal from the transponder. When the transponder responds with the LF intercom, the coil voltage on L1 changes due to the magnetic field generated by the transponder coil voltage. Since the transponder coil voltage is initially generated by the base station antenna (L1), the response voltage is 180o out of phase with the initial voltage. Therefore, under given conditions, the voltage on L1 will change with the transponder coil voltage.
The change in coil voltage on L1 can be detected by an envelope detector and a low-pass filter formed by D1 and C5. The detected envelope signal passes through active gain filters U2A and U2B. The demodulated analog output is fed to the comparator input pin of the MCU for pulse shaping. The comparator output is available on TP6 and decoded by the MCU.
Previous article:Realization of reactive power compensation algorithm for three-phase mismatch of load based on PIC16C72
Next article:Design of adjustable countdown reminder based on PIC16F627 microcontroller
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- TouchGFX Design" + graph waveform drawing 2
- Let you know the composition and indicators of the voltage-stabilized power supply module
- FPGA_100 Days Journey_Matrix Keyboard Design
- Playing with Zynq Serial 27 - Exporting PS hardware configuration and creating a new SDK project
- Recommend an FPGA development board, with schematic diagram
- [Mil MYS-8MMX] Mil MYS-8MMQ6-8E2D-180-C National Day Application - Use the terminal to draw
- FAQ: Developing secure IoT edge-to-cloud applications on Linux using PKCS #11 and secure devices
- CC2640 TIRTOS adds IIC configuration
- ARM co-founder launches "SAVE ARM" campaign to intervene in NVIDIA acquisition
- How to convert PWM signal into analog signal