1-Wire TWS Headset Solution Architecture and Design

Publisher:温馨时光Latest update time:2023-06-15 Source: elecfansKeywords:1-Wire Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The most striking feature of TWS earphones is the convenience of wireless wearing. Compared with traditional Bluetooth earphones, TWS earphones have many advantages such as small size, good sound quality, high stability, etc. They also have certain waterproofness and intelligence, which quickly attracted the attention of consumers. At present, the shipment volume and overall market size of TWS earphones are constantly expanding, and it is currently a hot research and development field in consumer electronics.


System Architecture

The 1-Wire TWS headset solution MAXREFDES1302 introduced in this article consists of two parts: a charging box and headset. The overall hardware architecture of the system is shown in Figure 1.

pYYBAGKivZ2AZA3EAAEFRIjgGvY794.png

Figure 1. 1-Wire TWS charging box and earphone system architecture.

The charging box uses a 3.7V 1500mAh single-cell lithium battery to power the system, and uses the MAX77651 charger that supports the USB Type-C protocol to charge the lithium battery. Users only need to use a single USB Type-C data cable to charge the entire device. In terms of the power rail, the charging box uses the MAX17224 boost module to boost the charger's system voltage to 5V. The 5V voltage generates a 3.3V voltage through the MAX38640 buck module to power the microcontroller MAX32655. At the same time, the 5V voltage is also transmitted to the headset through the 1-Wire control circuit as a charging power source for the headset system.


In terms of power monitoring, the charging box uses a MAX17262 fuel gauge with a built-in current-sense resistor to monitor the battery. This fuel gauge combines the traditional coulomb counting method with the innovative ModelGauge™ m5 EZ algorithm, does not require battery feature analysis, is flexible to configure, and is easy to use. In terms of microcontrollers, the charging box uses a microprocessor MAX32655 with a BLE 5.2 module and a built-in SIMO power module. The processor is rich in resources. In addition to the commonly used communication interface, its GPIO can also be configured as a 1-Wire communication interface, which can read and write the DS2488 on the earphone side, providing great convenience for 1-Wire communication and charging. The SWD interface of the charging box can be connected to the MAX32625PICO downloader, which can update the firmware for the MAX32655 of the charging box and display the battery information on the computer through the virtual serial port. The battery information can also be displayed on the OLED screen on the charging box.


The headset uses a 3.7V 130mAh single-cell lithium battery to power the system, and uses the DS2488 bidirectional 1-Wire bridge to realize data interaction between the headset and the charging box, and at the same time realize the control of the 5V charging power from the charging box. In terms of the controller, the headset also uses the MAX32655 as a microcontroller. The microcontroller uses the UART interface to simulate the 1-Wire timing to read and write control of the DS2488, and also uses the SWD interface to connect the MAX32625PICO downloader to download the program. In terms of the power rail, the headset uses the charger MAX77734 with a 3.3V LDO output to power the microcontroller MAX32655. At the same time, the 3.3V and the 1.8V and 1.2V power generated by the built-in SIMO module of the MAX32655 together form the power rail of the audio codec MAX98050. In terms of power monitoring, the headset also uses the fuel gauge MAX17262 to monitor the battery.


Figure 2 shows the physical picture of the 1-Wire TWS charging box and earphones. The actual size of the charging box is 10.20cm × 5.80cm, and the actual size of the earphones is 10.20cm × 6.50cm. Since this design is a prototype to assist customers in design, testing and research, the size of the actual product can be greatly compressed by streamlining the test points to meet the size requirements of the actual application of TWS earphones.

poYBAGKivaiAJMs2AAPiIJXN5fw228.png

Figure 2. 1-Wire TWS charging box and earphone PCBA physical picture.

1-Wire Data Communication and Power Transfer

In TWS headset applications, it is crucial to use a reliable and convenient method to achieve data communication and energy transmission between the charging box and the headset. Currently, common TWS headsets on the market usually use 3 or more contacts to connect to the charging box to achieve data communication and energy transmission functions. However, too many contacts usually lead to an increase in system cost, which is extremely unfavorable for low-cost wearable product design. In addition, more contacts usually require more space, which is contrary to the small size requirements of TWS headsets. In addition, more contacts tend to increase the possibility of failure. This design uses ADI's proprietary 1-Wire bidirectional bridge DS2488 designed for TWS solutions to achieve energy transmission and data interaction between the headset and the charging box. DS2488 supports the 1-Wire bus protocol and can achieve communication and charging functions with a single wire. Since the system requires an additional contact to connect the ground of the headset and the charging box, the overall solution only needs to use two contacts, which can greatly improve system reliability and reduce size and cost. The block diagram of the 1-Wire communication charging circuit used in this design is shown in Figure 3.

poYBAGKivcuAPULTAABkv7727Zk874.png

Figure 3. 1-Wire communication charging circuit block diagram.

How the DS2488 Works

As shown in Figure 3, the DS2488 is a 1-Wire bidirectional bridge with two 1-Wire communication pins, IOA and IOB, for control by the microcontrollers on both sides, where IOA is controlled by the microcontroller of the charging box and IOB is controlled by the microcontroller of the headset. IOA supports an input voltage of up to 5.5V and supports the transmission of different communication and charging levels on the 1-Wire bus (IOA). As a 1-Wire device, each DS2488 device also has a unique 64-bit ROM ID for user identification and authentication. The DS2488 also has an 8-byte buffer inside that can be read and written by the microcontroller to update the battery information on both sides in real time. In this design, the information stored in the buffer is shown in Table 1.

pYYBAGKivcCANQf5AABrSYd8gmw797.png

Table 1. Information stored in the DS2488 buffer

The TOKEN pin of DS2488 indicates the control status of DS2488: if TOKEN is low, it indicates that the microcontroller of the charging box has obtained the control authority of DS2488; if TOKEN is high, it indicates that the microcontroller on the earphone side has obtained the control authority of DS2488.


The CD/PIOC pin of DS2488 controls whether the charging box charges the earphones: when the voltage on the 1-Wire bus (IOA) is less than 4V, CD/PIOC is in high impedance state, the transistor is turned off, and charging stops; when the voltage on the 1-Wire bus (IOA) is greater than 4V, CD/PIOC is low, the transistor is turned on, and the voltage on the 1-Wire bus (IOA) is directly added to the charger of the earphones, and charging begins. The selection logic of earphone charging and communication is mainly implemented by a MOSFET connected to 5V, and the on and off of the MOSFET is controlled by the microcontroller of the charging box. The use of the charging box and the earphones is mainly divided into the following situations.


The earphones are in the charging case and the lid is open

At this time, the microcontroller of the charging box turns off the MOSFET and obtains the control authority of the DS2488, TOKEN is low, and CD/PIOC is in high impedance state. The charging box reads and writes the internal 8-byte buffer of the DS2488 through IOA, reads the byte information of the earphone battery, and updates the byte information written to the charging box battery. At this time, charging stops and communication is carried out.


The earphones are in the charging case and the lid is closed

At this time, the microcontroller of the charging box turns on the MOSFET, and 5V is directly transmitted to the earphone through the 1-Wire bus (IOA). At this time, TOKEN is high and CD/PIOC is low. The 5V voltage of the charging box is transmitted to the earphone side to charge the lithium battery of the earphone. At the same time, the microcontroller of the earphone obtains the control authority of DS2488, reads and writes the internal 8-byte buffer of DS2488 through IOB, updates the byte information written to the earphone battery, and reads the byte information of the charging box battery. At this time, communication stops and charging is carried out.


The earphones are not in the charging case or the charging case battery is exhausted

At this time, the 1-Wire bus (IOA) is in high impedance, TOKEN is high, and CD/PIOC is in high impedance. At this time, the headset microcontroller obtains the control authority of DS2488, reads and writes the internal 8-byte buffer of DS2488 through IOB, and updates the byte information written into the headset battery.


DS2488 1-Wire Data Communications

As mentioned above, this design uses DS2488 as a bridge between the microcontrollers on both sides of the charging box and the earphones to achieve data interaction between the microcontrollers on both sides. DS2488 supports the typical 1-Wire communication protocol. The timing of the protocol is divided into reset and response timing and read and write timing. The read and write timing is divided into write 0 time slot, write 1 time slot and read time slot, as shown in Figure 4 and Figure 5. For detailed data on the time range of the high and low level stages of each timing, please refer to the DS2488 data sheet.

poYBAGKivdiAP4-jAAA7-PaM0l8249.png

Figure 4. DS2488 1-Wire reset and response timing.

pYYBAGKiveKAC8pHAACO3GAR-xY080.png

Figure 5. DS2488 1-Wire read and write timing.

All 1-Wire devices are composed of state machines, and their state transition diagram is shown in Figure 6. As shown in Figure 4, when the microcontroller sends a reset signal to the DS2488 device, the 1-Wire bus will be pulled down for 48μs to 80μs, and then the bus will be pulled up by the pull-up resistor and released. If a DS2488 is connected to the bus, the DS2488 will respond to the reset signal and pull the 1-Wire bus down again for 6μs to 10μs after the bus is released 48μs. At this time, the microcontroller can detect the level change on the bus, that is, by detecting whether the bus is pulled down again, it can determine whether there is a DS2488 connected to the 1-Wire bus.

[1] [2]
Keywords:1-Wire Reference address:1-Wire TWS Headset Solution Architecture and Design

Previous article:A Brief Discussion on DC Voltage Drift in Class AB Audio Power Amplifier Output
Next article:Detailed introduction of high-power audio amplifier chip WT8673

Recommended ReadingLatest update time:2024-11-16 09:31

Example program to read and write 1-wire EEPROM DS2430 using PIC microcontroller
;-------------------------------------------------------------------- ; ; 1-wire device access ;DS2430 ;memory function ;write scratchpad ;read scratchpad ; ;read memory :  ; resource occupy by ICD2 ; PROM 0x1f00 - 0x1fff ; RAM  0x70,0xf0,0x170,0x1e5~0x1f0 ;-------------------------------------------------------------
[Microcontroller]
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号