[go: up one dir, main page]

CN116319658A - Multi-address identification method and communication system - Google Patents

Multi-address identification method and communication system Download PDF

Info

Publication number
CN116319658A
CN116319658A CN202310300516.7A CN202310300516A CN116319658A CN 116319658 A CN116319658 A CN 116319658A CN 202310300516 A CN202310300516 A CN 202310300516A CN 116319658 A CN116319658 A CN 116319658A
Authority
CN
China
Prior art keywords
resistor
square wave
communication
capacitor
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310300516.7A
Other languages
Chinese (zh)
Inventor
陈玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Topband Co Ltd
Original Assignee
Shenzhen Topband Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Topband Co Ltd filed Critical Shenzhen Topband Co Ltd
Priority to CN202310300516.7A priority Critical patent/CN116319658A/en
Publication of CN116319658A publication Critical patent/CN116319658A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application provides a multi-address identification method and a communication system, wherein the method is based on a 555 circuit and comprises the following steps: the method comprises the steps that address pre-stored tables of a plurality of communication slaves are preset in a communication bus; setting the resistance value of the resistor or the capacitance value of the capacitor of each communication slave access 555 circuit; the 555 circuit outputs square waves corresponding to the resistor or the capacitor; acquiring high-level time or square wave period of the square wave, and finding out the address of the corresponding communication slave machine on the address pre-storing table according to the high-level time or square wave period; the method and the device can identify the addresses of a plurality of communication slaves, and can ensure the precision so that the communication bus can accurately give instructions to the communication slaves.

Description

多地址识别方法和通信系统Multi-address identification method and communication system

技术领域technical field

本申请涉及通信技术领域,尤其涉及一种多地址识别方法和一种通信系统。The present application relates to the technical field of communication, in particular to a multi-address identification method and a communication system.

背景技术Background technique

换电柜是用于接收电池(如电瓶车电池)、并进行充电的一类设备,目前,换电柜的柜控通信架构只能通过给每个电池分配专门的硬件接口来确定电池在柜内的地址,而无法将所有的电池统一挂在同一个总线网络(如CAN、485等)进行组网通信,这样,需要使用大量的硬件接口来与插入柜内的电池进行通信,会使得换电柜及与其匹配的电池的制造成本极其昂贵,且会使得换电柜的柜控通信架构变得复杂、不易维护。The power exchange cabinet is a type of equipment used to receive batteries (such as battery car batteries) and charge them. At present, the cabinet control communication architecture of the power exchange cabinet can only determine whether the battery is in the cabinet by assigning a dedicated hardware interface to each battery. addresses, but it is impossible to hang all the batteries on the same bus network (such as CAN, 485, etc.) The manufacturing cost of the cabinet and the matching battery is extremely expensive, and it will make the cabinet control communication architecture of the power exchange cabinet complicated and difficult to maintain.

发明内容Contents of the invention

本申请的目的在于提供一种多地址识别方法和一种通信系统,本申请可以识别多个通信从机的地址,并且能够保证精度,以便通信总线准确对通信从机下达指令。The purpose of this application is to provide a multi-address identification method and a communication system. This application can identify the addresses of multiple communication slaves, and can ensure accuracy, so that the communication bus can accurately issue instructions to the communication slaves.

为此,第一方面,本申请实施例提供了一种多地址识别方法,基于555电路,其包括以下步骤:To this end, in the first aspect, the embodiment of the present application provides a multi-address identification method based on a 555 circuit, which includes the following steps:

S1、在通信总线内部预设有多个通信从机的地址预存表;S1. The address pre-storage table of multiple communication slaves is preset inside the communication bus;

S2、设定每个所述通信从机接入所述555电路的电阻的电阻值或电容的电容值;S2. Setting the resistance value of each of the communication slaves connected to the 555 circuit or the capacitance value of the capacitor;

S3、所述555电路对应于所述电阻或所述电容输出方波;S3. The 555 circuit outputs a square wave corresponding to the resistor or the capacitor;

S4、获取所述方波的高电平时间或者方波周期,并且根据所述高电平时间或者所述方波周期,在所述地址预存表上找到对应的所述通信从机的地址。S4. Obtain the high level time or square wave period of the square wave, and find the corresponding communication slave address in the address pre-storage table according to the high level time or the square wave period.

本申请在第二方面还提供了一种通信系统,基于如第一方面所述的多地址识别方法,所述通信系统包括换电柜和多个电池;所述换电柜配置为所述通信总线,所述电池配置为所述通信从机。The present application also provides a communication system in the second aspect, based on the multi-address identification method as described in the first aspect, the communication system includes a power exchange cabinet and a plurality of batteries; the power exchange cabinet is configured for the communication bus, and the battery is configured as the communication slave.

本申请提出了一种多地址识别方法和一种通信系统,与现有技术相比,其有益效果在于:This application proposes a multi-address identification method and a communication system. Compared with the prior art, the beneficial effects are:

本方法预先在通信总线内部设置具有多个通信从机地址的地址预存表,并且设定每个通信从机接入555电路的电阻的电阻值或电容的电容值,随后根据555电路对应于电阻或电容输出的方波的高电平时间或者方波周期,在地址预存表上找到对应的通信从机的地址;因此,本方法可以免去设置大量的硬件接口,可以节省成本,并且能够保证精度、识别多个通信从机的地址,以便通信总线对通信从机下达指令。This method pre-sets an address pre-storage table with multiple communication slave addresses inside the communication bus, and sets the resistance value of the resistance or the capacitance value of the capacitor connected to the 555 circuit for each communication slave, and then corresponds to the resistance value according to the 555 circuit. or the high level time or square wave period of the square wave output by the capacitor, find the address of the corresponding communication slave on the address pre-stored table; therefore, this method can save a lot of hardware interfaces, save costs, and ensure Accuracy, identifying the addresses of multiple communication slaves, so that the communication bus can issue instructions to the communication slaves.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。另外,在附图中,相同的部件使用相同的附图标记,且附图并未按照实际的比例绘制。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work. In addition, in the drawings, the same reference numerals are used for the same components, and the drawings are not drawn in actual scale.

图1是本方法的将第一电阻作为通信从机接入555电路的电阻的电路图;Fig. 1 is the circuit diagram of the resistance that the first resistance is inserted into 555 circuit as communication slave of this method;

图2是本方法的将第二电阻作为通信从机接入555电路的电阻的电路图;Fig. 2 is the circuit diagram of the resistance that the second resistance is inserted into 555 circuit as communication slave of this method;

图3是本方法的将第一电容作为通信从机接入555电路的电容的电路图;Fig. 3 is the circuit diagram of the capacitance that the first capacitance is inserted into the 555 circuit as the communication slave of this method;

附图标记说明:Explanation of reference signs:

1、第一电阻;2、第二电阻;3、第一电容;4、脉冲发生器;5、供电电压。1. The first resistor; 2. The second resistor; 3. The first capacitor; 4. The pulse generator; 5. The supply voltage.

具体实施方式Detailed ways

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present application.

本申请实施例在第一方面提出了一种多地址识别方法,基于555电路,包括以下步骤:The embodiment of the present application proposes a multi-address identification method based on the 555 circuit in the first aspect, including the following steps:

S1、在通信总线内部预设有多个通信从机的地址预存表;S1. The address pre-storage table of multiple communication slaves is preset inside the communication bus;

S2、设定每个通信从机接入555电路的电阻的电阻值或电容的电容值;S2, setting the resistance value of the resistor or the capacitance value of the capacitor connected to the 555 circuit for each communication slave;

S3、555电路对应于电阻或电容输出方波;S3, 555 circuit corresponds to the resistance or capacitance output square wave;

S4、获取方波的高电平时间或者方波周期,并且根据高电平时间或者方波周期,在地址预存表上找到对应的通信从机的地址。S4. Obtain the high level time or the square wave period of the square wave, and find the address of the corresponding communication slave in the address pre-storage table according to the high level time or the square wave period.

基于上述技术方案,本方法预先在通信总线内部设置具有多个通信从机地址的地址预存表,并且设定每个通信从机接入555电路的电阻的电阻值或电容的电容值,随后根据555电路对应于电阻或电容输出的方波的高电平时间或者方波周期,在地址预存表上找到对应的通信从机的地址;因此,本方法可以免去设置大量的硬件接口,可以节省成本,并且能够保证精度、识别多个通信从机的地址,以便通信总线对通信从机下达指令。Based on the above technical solution, this method pre-sets an address pre-storage table with multiple communication slave addresses inside the communication bus, and sets the resistance value of the resistance or the capacitance value of the capacitor connected to the 555 circuit for each communication slave, and then according to The 555 circuit corresponds to the high-level time or the square wave period of the square wave output by the resistor or capacitor, and finds the address of the corresponding communication slave in the address pre-stored table; therefore, this method can save a large number of hardware interfaces and save cost, and can ensure accuracy and identify the addresses of multiple communication slaves, so that the communication bus can issue instructions to the communication slaves.

本申请利用了555电路的一项器件参数,输出数字信号,来解读通信总线与通信从机的地址对应关系,这样大大降低了识别地址的难度和减少硬件接口的数量。This application uses a device parameter of the 555 circuit to output a digital signal to interpret the correspondence between the address of the communication bus and the communication slave, which greatly reduces the difficulty of identifying the address and reduces the number of hardware interfaces.

555电路即指555时基电路,555IC可用于创建自由运行的非稳态振荡器,以连续产生方波脉冲,以产生一个非常稳定的555振荡器电路,用于产生高精度的自由运行波形,其输出频率可以通过外部连接的RC振荡电路进行调整,并且,此RC振荡电路仅由两个电阻和一个电容组成;于此,本申请所使用的555电路包括第一电阻1、第二电阻2、第一电容3、脉冲发生器4和供电电压5,第一电阻1的电源输入端与供电电压5电连接、电源输出端分别与第二电阻2的电源输入端以及与脉冲发生器4电连接,第二电阻2的电源输出端与第一电容3的电源输入端以及与脉冲发生器4电连接,第一电容3的另一端接地;因此,在本申请中,第一电阻1或第二电阻2配置为通信从机接入555电路的电阻,或者,第一电容3配置为通信从机接入555电路的电容。The 555 circuit refers to the 555 time base circuit. The 555 IC can be used to create a free-running astable oscillator to continuously generate square wave pulses to produce a very stable 555 oscillator circuit for generating high-precision free-running waveforms. Its output frequency can be adjusted by an externally connected RC oscillating circuit, and this RC oscillating circuit is only composed of two resistors and a capacitor; here, the 555 circuit used in this application includes a first resistor 1, a second resistor 2 , the first capacitor 3, the pulse generator 4 and the power supply voltage 5, the power input end of the first resistance 1 is electrically connected with the power supply voltage 5, the power output end is respectively connected with the power input end of the second resistance 2 and the pulse generator 4 connected, the power output end of the second resistor 2 is electrically connected to the power input end of the first capacitor 3 and the pulse generator 4, and the other end of the first capacitor 3 is grounded; therefore, in this application, the first resistor 1 or the first capacitor 3 The second resistor 2 is configured as a resistor connected to the 555 circuit by the communication slave, or the first capacitor 3 is configured as a capacitor connected to the 555 circuit by the communication slave.

于此,请参阅附图1-附图3,本方法还包括以下步骤:Here, please refer to accompanying drawing 1-accompanying drawing 3, this method also comprises the following steps:

S41、当第一电阻1配置为通信从机接入555电路的电阻时,555电路对应于第一电阻1输出第一方波,通信总线获取第一方波的高电平时间,并对应在地址预存表上找到通信从机的地址;S41. When the first resistor 1 is configured as the resistor connected to the 555 circuit by the communication slave, the 555 circuit outputs the first square wave corresponding to the first resistor 1, and the communication bus obtains the high level time of the first square wave, and corresponds to Find the address of the communication slave on the address pre-storage table;

S42、当第二电阻2配置为通信从机接入555电路的电阻时,555电路对应于第二电阻2输出第二方波,通信总线获取第二方波的方波周期,并对应在地址预存表上找到通信从机的地址;S42. When the second resistance 2 is configured as the resistance connected to the 555 circuit by the communication slave, the 555 circuit outputs the second square wave corresponding to the second resistance 2, and the communication bus obtains the square wave period of the second square wave, and corresponds to the address Find the address of the communication slave on the pre-stored table;

S43、当第一电容3配置为通信从机接入555电路的电容时,555电路对应于第一电容3输出第三方波,通信总线获取第三方波的方波周期,并对应在地址预存表上找到通信从机的地址。S43. When the first capacitor 3 is configured as a communication slave connected to the capacitor of the 555 circuit, the 555 circuit outputs a third-party wave corresponding to the first capacitor 3, and the communication bus obtains the square wave cycle of the third-party wave, and correspondingly stores it in the address pre-stored table Find the address of the communication slave on the

通过调节第一电阻1的电阻值可以调节高电平占空比,第一电阻1与555电路的引脚3输出方波的高电平占空比存在线性关系,同样地,通过调节第二电阻2的电阻值和第一电容3的电容值可以调节输出方波的周期,第二电阻2和第一电容3均与555电路的引脚3输出的方波的周期存在线性关系。By adjusting the resistance value of the first resistor 1, the high-level duty cycle can be adjusted. There is a linear relationship between the first resistor 1 and the high-level duty cycle of the square wave output by pin 3 of the 555 circuit. Similarly, by adjusting the second The resistance value of the resistor 2 and the capacitance value of the first capacitor 3 can adjust the period of the output square wave, and both the second resistor 2 and the first capacitor 3 have a linear relationship with the period of the square wave output by the pin 3 of the 555 circuit.

并且,在555电路中,引脚2和引脚6连接在一起,允许电路重新连接在每个周期触发自身,使其作为自由振荡器运行,在每个周期期间,第一电容3通过两个定时电阻(第一电阻1和第二电阻2)充电,但仅通过一个定时电阻即第二电阻2放电;第一电容3充电至2/3Vcc(上限比较器极限)由0.693(R1+R2)*C组合确定,并将其自身放电至1/3Vcc(下限比较器极限),由0.693(R2*C)组合确定(其中,0.693是RC振荡电路的常数,这里就不再进行解释,R1为第一电阻1的电阻值,R2为第二电阻2的电阻值,C为第一电容3的电容值),这导致输出波形的电压近似等于Vcc-1.5V,其输出“ON”和“OFF”时间周期由电容和电阻组合确定;因此,输出一个充电和放电所需的时间如下:And, in the 555 circuit, pin 2 and pin 6 are connected together, allowing the circuit to reconnect to trigger itself on each cycle, making it run as a free oscillator, during each cycle, the first capacitor 3 passes two The timing resistor (the first resistor 1 and the second resistor 2) is charged, but only one timing resistor, the second resistor 2, is discharged; the first capacitor 3 is charged to 2/3Vcc (upper comparator limit) by 0.693 (R1+R2) *C combination is determined, and discharges itself to 1/3Vcc (lower limit comparator limit), which is determined by 0.693 (R2*C) combination (wherein, 0.693 is a constant of the RC oscillator circuit, which will not be explained here, and R1 is The resistance value of the first resistor 1, R2 is the resistance value of the second resistor 2, and C is the capacitance value of the first capacitor 3), which causes the voltage of the output waveform to be approximately equal to Vcc-1.5V, and its output "ON" and "OFF ” The time period is determined by the capacitor and resistor combination; therefore, the time required to charge and discharge an output is as follows:

555振荡器充电时间如下:The 555 oscillator charging time is as follows:

t1=0.693(R1+R2)*C;t1=0.693(R1+R2)*C;

555振荡器放电时间如下:The 555 oscillator discharge time is as follows:

t2=0.693(R2*C);t2=0.693(R2*C);

因此,方波周期的计算公式为:Therefore, the formula for calculating the period of a square wave is:

T=t1+t2=0.693(R1+2R2)*CT=t1+t2=0.693(R1+2R2)*C

如,选用R1=1kΩ、R2=2kΩ、C=10uF时,555振荡器充电时间为21ms,555振荡器放电时间为14ms,即此时的高电平时间为21ms、方波周期为35ms。For example, when R1=1kΩ, R2=2kΩ, and C=10uF are selected, the charging time of the 555 oscillator is 21ms, and the discharging time of the 555 oscillator is 14ms, that is, the high level time at this time is 21ms, and the square wave period is 35ms.

于此,为了保证不同的通信从机的地址对应不同的高电平时间或者方波周期,并且为了保证精度,本申请优选了多个通信从机的第一电阻1的电阻值等差递增;或者,多个通信从机的第二电阻2的电阻值等差递增;或者,多个通信从机的第一电容3的电容值等差递增。Here, in order to ensure that the addresses of different communication slaves correspond to different high-level times or square wave periods, and in order to ensure accuracy, this application preferably increases the resistance value of the first resistor 1 of multiple communication slaves in equal increments; Or, the resistance values of the second resistors 2 of the plurality of communication slaves increase incrementally; or, the capacitance values of the first capacitors 3 of the plurality of communication slaves increase incrementally.

在一些实施例中,本申请可以选用第一电阻1、第二电阻2或第一电容3作为通信从机接入555电路的电阻或电容,也可以选择部分通信从机选用第一电阻1作为接入555电路的电阻、部分通信从机选用第二电阻2或第一电容3作为接入555电路的电阻或电容。In some embodiments, the application can choose the first resistor 1, the second resistor 2 or the first capacitor 3 as the resistor or capacitor for the communication slave to connect to the 555 circuit, or select the first resistor 1 for some communication slaves. The resistor connected to the 555 circuit, and some communication slaves select the second resistor 2 or the first capacitor 3 as the resistor or capacitor connected to the 555 circuit.

可选地,选用5V供电电压,C1为定值100uf、R2为定值5kΩ,R1为唯一变量值,则R1与输出波形的高电平时间的关系如表1所示:Optionally, a 5V power supply voltage is selected, C1 is a fixed value of 100uf, R2 is a fixed value of 5kΩ, and R1 is the only variable value, then the relationship between R1 and the high level time of the output waveform is shown in Table 1:

从机地址slave address R1(kΩ)R1(kΩ) 输出波形周期(ms)Output waveform period (ms) 输出波形高电平(ms)Output waveform high level (ms) 00 11 267267 200200 11 22 408408 273273 22 33 540540 340340 33 44 680680 410410 44 55 815815 475475 55 66 960960 550550 66 77 11001100 625625 77 88 12401240 690690 88 99 13701370 755755

表1Table 1

可选地,选用5V供电电压,C1为定值100uf、R1为定值2kΩ,R2为唯一变量值,则R2与输出波形的周期的关系如表2所示:Optionally, a 5V power supply voltage is selected, C1 is a fixed value of 100uf, R1 is a fixed value of 2kΩ, and R2 is a unique variable value, then the relationship between R2 and the period of the output waveform is shown in Table 2:

从机地址slave address R2(kΩ)R2(kΩ) 输出波形周期(ms)Output waveform period (ms) 输出波形高电平(ms)Output waveform high level (ms) 00 11 750750 405405 11 22 815815 480480 22 33 890890 550550 33 44 955955 615615 44 55 10201020 685685 55 66 10901090 755755 66 77 11601160 825825 77 88 12301230 895895 88 99 13001300 965965

表2Table 2

可选地,选用5V供电电压,R1为定值2kΩ、R2为定值5kΩ,C1为唯一变量值,则C1与输出波形的周期的关系如表3所示:Optionally, a 5V power supply voltage is selected, R1 is a fixed value of 2kΩ, R2 is a fixed value of 5kΩ, and C1 is the only variable value, then the relationship between C1 and the period of the output waveform is shown in Table 3:

Figure BDA0004145068580000051
Figure BDA0004145068580000051

Figure BDA0004145068580000061
Figure BDA0004145068580000061

表3table 3

由此表中可得出,R1与输出方波的高电平时间、R2与输出方波的周期、C1与输出方波的周期均为线性关系。It can be concluded from this table that the relationship between R1 and the high-level time of the output square wave, R2 and the period of the output square wave, and C1 and the period of the output square wave are all linear.

由于第一电阻1或第二电阻2的电阻值受环境温度影响大,于此,为了保证精度,以使得通信从机的地址能够与对应方波的高电平时间或者方波周期相对应,本申请设定通信从机的地址为与其对应的方波的高电平时间或者方波周期的数值的(90%-110%),或者,可以这样理解,通信从机某号机的地址如1号机的地址为与其对应的方波的高电平时间或者方波周期的数值的(90%-110%),如:上述的高电平时间21ms,其所对应的通信从机的地址为18.9-23.1,本申请也可选用其他的数值范围,以便根据通信从机的数量,精细划分出通信从机的地址,以使得通信总线能够准确获取通信从机地址,并下发指令。Since the resistance value of the first resistor 1 or the second resistor 2 is greatly affected by the ambient temperature, in order to ensure the accuracy, the address of the communication slave can correspond to the high level time of the corresponding square wave or the period of the square wave, This application sets the address of the communication slave as the value (90%-110%) of the high level time of the corresponding square wave or the square wave period, or, it can be understood that the address of a certain number of communication slave is as follows: The address of machine No. 1 is the high level time of the corresponding square wave or the value of the square wave period (90%-110%), such as: the above high level time is 21ms, and the address of the corresponding communication slave 18.9-23.1, this application can also choose other numerical ranges, so as to finely divide the address of the communication slave according to the number of communication slaves, so that the communication bus can accurately obtain the address of the communication slave and issue instructions.

具体地,通信从机内设有第一电阻1、第二电阻2或第一电容3,并且通信从机通过外接接头接入通信总线内,以使得第一电阻1、第二电阻2或者第一电容3接入555电路。Specifically, the communication slave is provided with a first resistor 1, a second resistor 2 or a first capacitor 3, and the communication slave is connected to the communication bus through an external joint, so that the first resistor 1, the second resistor 2 or the first capacitor A capacitor 3 is connected to the 555 circuit.

在本申请中,获取方波的高电平时间包括以下步骤:In this application, obtaining the high level time of the square wave includes the following steps:

S31、通信从机根据io口的一次上升沿中断和一次下降沿中断,获取方波的高电平时间;S31. The communication slave obtains the high level time of the square wave according to a rising edge interrupt and a falling edge interrupt of the io port;

S32、获取方波的方波周期包括以下步骤:S32, obtaining the square wave period of the square wave includes the following steps:

通信从机根据io口的两次上升沿中断,获取方波的方波周期。The communication slave obtains the square wave cycle of the square wave according to the two rising edge interrupts of the io port.

并且,通信从机通过io口的输入边沿中断和定时器的中断计时功能或者定时器的捕获功能,来获取高电平时间或者方波周期,以保证所获取的高电平时间或者方波周期的准确性。Moreover, the communication slave obtains the high-level time or square wave period through the input edge interrupt of the io port and the interrupt timing function of the timer or the capture function of the timer, so as to ensure the obtained high-level time or square wave period accuracy.

本申请实施例在第二方面还提出了一种通信系统,基于如第一方面的多地址识别方法,通信系统包括换电柜和多个电池;换电柜配置为通信总线,电池配置为通信从机;并且,555电路包括第一电阻1、第二电阻2和第一电容3;换电柜上设置有多个充电舱,第一电阻1、第二电阻2或第一电容3设置于充电舱内,并且电池可拆卸连接于充电舱内、而与第一电阻1、第二电阻2或者第一电容3电连接;在换电柜中应用了上述的多地址识别方法,不会由于换电柜内温度升高而影响识别精度,并且能够有效地识别每个充电舱的地址,给插入充电舱内的电池充电,以及在电池充满电时充电舱内自动断电。The embodiment of the present application also proposes a communication system in the second aspect. Based on the multi-address identification method as in the first aspect, the communication system includes a power exchange cabinet and multiple batteries; the power exchange cabinet is configured as a communication bus, and the battery is configured as a communication bus. Slave; and, the 555 circuit includes a first resistor 1, a second resistor 2 and a first capacitor 3; a plurality of charging compartments are arranged on the power exchange cabinet, and the first resistor 1, the second resistor 2 or the first capacitor 3 are set for charging cabin, and the battery is detachably connected to the charging cabin, and electrically connected to the first resistor 1, the second resistor 2 or the first capacitor 3; The temperature rise in the electric cabinet affects the recognition accuracy, and can effectively identify the address of each charging compartment, charge the battery inserted into the charging compartment, and automatically power off in the charging compartment when the battery is fully charged.

应当指出,在说明书中提到的“一个实施例”、“实施例”、“示例性实施例”、“一些实施例”等表示所述的实施例可以包括特定特征、结构或特性,但未必每个实施例都包括该特定特征、结构或特性。此外,这样的短语未必是指同一实施例。此外,在结合实施例描述特定特征、结构或特性时,结合明确或未明确描述的其他实施例实现这样的特征、结构或特性处于本领域技术人员的知识范围之内。It should be noted that references in the specification to "one embodiment," "an embodiment," "exemplary embodiment," "some embodiments," etc. mean that the described embodiments may include particular features, structures, or characteristics, but not necessarily Each embodiment includes that particular feature, structure or characteristic. Furthermore, such phrases are not necessarily referring to the same embodiment. Furthermore, where a particular feature, structure, or characteristic is described in conjunction with an embodiment, it is within the purview of those skilled in the art to implement such feature, structure, or characteristic in conjunction with other embodiments that are explicitly or not explicitly described.

应当容易地理解,应当按照最宽的方式解释本公开中的“在……上”、“在……以上”和“在……之上”,以使得“在……上”不仅意味着“直接处于某物上”,还包括“在某物上”且其间具有中间特征或层的含义,并且“在……以上”或者“在……之上”不仅包括“在某物以上”或“之上”的含义,还可以包括“在某物以上”或“之上”且其间没有中间特征或层(即,直接处于某物上)的含义。It should be readily understood that "on", "above" and "over" in this disclosure should be interpreted in the broadest manner such that "on" means not only " directly on something", also includes the meaning of "on something" with intermediate features or layers in between, and "above" or "over" not only includes "on something" or " The meaning of "over" may also include the meaning of "above" or "over" without intervening features or layers (ie, directly on something).

此外,文中为了便于说明可以使用空间相对术语,例如,“下面”、“以下”、“下方”、“以上”、“上方”等,以描述一个元件或特征相对于其他元件或特征的如图所示的关系。空间相对术语意在包含除了附图所示的取向之外的处于使用或操作中的器件的不同取向。装置可以具有其他取向(旋转90度或者处于其他取向上),并且文中使用的空间相对描述词可以同样被相应地解释。In addition, spatially relative terms, such as "below", "below", "below", "above", "above", etc., may be used herein for convenience of description to describe the position of one element or feature with respect to other elements or features. the relationship shown. Spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. The device may be otherwise oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly.

需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relative terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these No such actual relationship or order exists between entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present application. scope.

Claims (10)

1. The multi-address identification method is based on a 555 circuit and is characterized by comprising the following steps of:
the method comprises the steps that address pre-stored tables of a plurality of communication slaves are preset in a communication bus;
setting a resistance value of a resistor or a capacitance value of a capacitor of each communication slave machine connected into the 555 circuit;
the 555 circuit outputs a square wave corresponding to the resistor or the capacitor;
and acquiring the high level time or the square wave period of the square wave, and finding out the address of the corresponding communication slave machine on the address pre-stored table according to the high level time or the square wave period.
2. The multi-address identification method of claim 1, wherein the 555 circuit comprises a first resistor, a second resistor, a first capacitor, a pulse generator and a power supply voltage, wherein a power input end of the first resistor is electrically connected with the power supply voltage, a power output end of the first resistor is respectively electrically connected with a power input end of the second resistor and the pulse generator, a power output end of the second resistor is electrically connected with a power input end of the first capacitor and the pulse generator, and the other end of the first capacitor is grounded;
wherein either the first resistor or the second resistor is configured as the resistor to which the communication slave accesses the 555 circuit;
alternatively, the first capacitor is configured to be accessed by the communication slave to the capacitor of the 555 circuit.
3. The multi-address identification method of claim 2, further comprising the steps of:
when the first resistor is configured as the resistor of the 555 circuit, the 555 circuit outputs a first square wave corresponding to the first resistor, and the communication bus acquires the high level time of the first square wave and finds the address of the communication slave on the address pre-storing table correspondingly;
when the second resistor is configured as the resistor of the 555 circuit, the 555 circuit outputs a second square wave corresponding to the second resistor, and the communication bus acquires the square wave period of the second square wave and finds the address of the communication slave on the address pre-storing table;
when the first capacitor is configured as the capacitor of the 555 circuit, the 555 circuit outputs a third square wave corresponding to the first capacitor, and the communication bus acquires the square wave period of the third square wave and finds the address of the communication slave on the address pre-storing table.
4. The multi-address identification method of claim 2, further comprising the steps of:
the resistance value of the first resistor of the communication slaves increases progressively;
or, the second resistors of the communication slaves are increased in equal difference;
alternatively, the capacitance values of the first capacitances of the plurality of communication slaves are equally increased.
5. The method of claim 4, wherein the address of the communication slave is (90% -110%) of the value of the high level time or square wave period of the square wave corresponding thereto.
6. The multi-address recognition method according to claim 2, wherein the communication slave is provided with the first resistor, the second resistor or the first capacitor, and the communication slave is connected into the communication bus through an external connector, so that the first resistor, the second resistor or the first capacitor is connected into the 555 circuit.
7. The multi-address recognition method according to claim 1, wherein the step of obtaining the high level time of the square wave comprises the steps of:
the communication slave acquires the high level time of the square wave according to the primary rising edge interruption and the primary falling edge interruption of the io port;
the square wave period of the square wave is obtained by the following steps:
and the communication slave machine acquires the square wave period of the square wave according to the two rising edge interruption of the io port.
8. The multi-address recognition method according to claim 7, wherein the communication slave acquires the high level time or the square wave period through an input edge interrupt of an io port and an interrupt timing function of a timer or a capture function of a timer.
9. A communication system based on the multi-address identification method according to any one of claims 1-8, characterized in that the communication system comprises a battery-change cabinet and a plurality of batteries;
the battery changing cabinet is configured to be the communication bus, and the battery is configured to be the communication slave.
10. The communication system of claim 9, wherein the 555 circuit comprises the first resistor, the second resistor, and the first capacitor;
the battery replacing cabinet is provided with a plurality of charging cabins, the first resistor, the second resistor or the first capacitor is arranged in the charging cabins, and the battery is detachably connected in the charging cabins and electrically connected with the first resistor, the second resistor or the first capacitor.
CN202310300516.7A 2023-03-16 2023-03-16 Multi-address identification method and communication system Pending CN116319658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310300516.7A CN116319658A (en) 2023-03-16 2023-03-16 Multi-address identification method and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310300516.7A CN116319658A (en) 2023-03-16 2023-03-16 Multi-address identification method and communication system

Publications (1)

Publication Number Publication Date
CN116319658A true CN116319658A (en) 2023-06-23

Family

ID=86779633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310300516.7A Pending CN116319658A (en) 2023-03-16 2023-03-16 Multi-address identification method and communication system

Country Status (1)

Country Link
CN (1) CN116319658A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1612689A1 (en) * 2004-06-30 2006-01-04 Siemens Aktiengesellschaft Identification of slots in a bus system
CN110809068A (en) * 2019-11-12 2020-02-18 苏州工业园区天和仪器有限公司 Novel address distribution circuit
CN112148648A (en) * 2020-08-28 2020-12-29 小犇(苏州)新能源科技有限公司 Automatic address assignment system and method in battery replacement cabinet charging module
CN113301181A (en) * 2021-05-19 2021-08-24 漳州科华技术有限责任公司 Parallel machine address identification system and cabinet
CN114461561A (en) * 2022-01-28 2022-05-10 华为数字能源技术有限公司 Address determination method, address adaptation table generation method and battery replacement cabinet

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1612689A1 (en) * 2004-06-30 2006-01-04 Siemens Aktiengesellschaft Identification of slots in a bus system
CN110809068A (en) * 2019-11-12 2020-02-18 苏州工业园区天和仪器有限公司 Novel address distribution circuit
CN112148648A (en) * 2020-08-28 2020-12-29 小犇(苏州)新能源科技有限公司 Automatic address assignment system and method in battery replacement cabinet charging module
CN113301181A (en) * 2021-05-19 2021-08-24 漳州科华技术有限责任公司 Parallel machine address identification system and cabinet
CN114461561A (en) * 2022-01-28 2022-05-10 华为数字能源技术有限公司 Address determination method, address adaptation table generation method and battery replacement cabinet

Similar Documents

Publication Publication Date Title
US9153984B2 (en) Charging device
US20140365695A1 (en) Electronic device with multifunctional universal serial bus port
US7825670B2 (en) Capacitance measuring apparatus for capacitor
US7710099B2 (en) Power control apparatus for motherboard
US10209730B2 (en) Serial bus apparatus with controller circuit and related uses
CN207529652U (en) A kind of blood analyser and its buzzer volume adjustment driving circuit
CN109690948A (en) Method and apparatus for low-power relaxor
CN109270369B (en) Daughter board identification module of battery management system and number processing method
CN102385009B (en) Capacitance measuring device and method thereof
CN116319658A (en) Multi-address identification method and communication system
CN105652743B (en) The method and device of Interface Controller
CN110879314A (en) Capacitance measuring method, capacitance measuring system, electronic device, and storage medium
WO2024198856A1 (en) Capacitive equivalent circuit and electronic device
CN107248846A (en) Biasing circuit, clock circuit, chip and electronic equipment
US9728988B2 (en) Charging circuit for USB port
US8872521B2 (en) Electrical parameter detection device for peripheral component interconnect devices
US20130111231A1 (en) Control circuit for power supply of memory
CN109756191B (en) Low-power-consumption crystal oscillator circuit with pseudo-differential structure
CN108631377B (en) Power-on control circuit and mobile power supply device using the same
CN211426731U (en) Ripple generating device and detecting system
US9000850B2 (en) Method and apparatus for self-calibrating driving capability and resistance of on-die termination
CN106022270A (en) Fingerprint detection circuit and apparatus
TWI642261B (en) Accelerated discharge circuit and method thereof
CN204258627U (en) A kind of adjustable decompression converting circuit
US9083268B2 (en) Controlling circuit for fan

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination