CN102955437A - Bus expansion module of engineering machinery vehicle and bus data processing method - Google Patents
Bus expansion module of engineering machinery vehicle and bus data processing method Download PDFInfo
- Publication number
- CN102955437A CN102955437A CN2011102355796A CN201110235579A CN102955437A CN 102955437 A CN102955437 A CN 102955437A CN 2011102355796 A CN2011102355796 A CN 2011102355796A CN 201110235579 A CN201110235579 A CN 201110235579A CN 102955437 A CN102955437 A CN 102955437A
- Authority
- CN
- China
- Prior art keywords
- bus
- circuit
- chip microcomputer
- output
- signal
- 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
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
The invention discloses a bus expansion module of an engineering machinery vehicle and a bus data processing method, relates to the field of engineering machinery and aims to solve the problems that an existing controller is expensive, large in size and high in workload of wiring and routing and the number of points cannot meet the requirements in the prior art. The bus expansion module comprises a single-chip microcomputer, a voltage stabilizing power source module, an ID (identity)and Baud rate setting circuit, a DI (discrete input) circuit, an AI (analog input) circuit, a DO (discrete output) circuit and a CAN (controller area network) bus communication circuit, wherein the voltage stabilizing power source module, the ID and Baud rate setting circuit, the DI circuit, the AI circuit, the DO circuit and the CAN bus communication unit are respectively connected with the single-chip microcomputer. The bus data processing method includes interrupting a starting timer 0; monitoring data on a bus in a main program, outputting corresponding control signals by the bus expansion module when information controlling the output of the bus expansion module exists; acquiring DI signals and AI signals in an interruption program of the timer 0, processing the signals and transmitting at the preset intervals. An electrical system of the vehicle is simplified, wiring and routing workload is alleviated, space is saved and equipment cost is reduced.
Description
Technical field
The present invention relates to engineering machinery field, particularly relate to the method for a kind of engineering machinery vehicle CAN bus extender module and processing bus data.
Background technology
In current engineering machinery vehicle industry, for to security, comfortableness, convenience, low public hazards, cheaply requirement, various electronic control systems are developed.Because the requirement that the data type that signal post uses between these systems reaches reliability is not quite similar, situation about being made of multiple bus is a lot, and the quantity of wire harness also increases thereupon.Reduce the quantity of wire harness for adaptation, the needs that carry out the high-speed communication of mass data by a plurality of LAN, Germany electric merchant Bosch developed the CAN communication protocol towards automobile in 1986.Now high-performance and the reliability of CAN are admitted, and are widely used in the various aspects such as engineering machinery.
Engineering machinery vehicle, for example: beam car aims at Construction of Railway Passenger-Dedicated Line development, is used for the case beam is transported to the station of setting a roof beam in place from precasting yard, and cooperates with Bridge Erector and to finish the operation of setting a roof beam in place accordingly, belongs to the large walking engineering machinery of dead weight capacity.The pilothouse of beam car is human pilot commander and the cabin of handling whole equipment availability, and its function shows that mainly by its inner switch and operating rod that is used for controlling various functions the pilot lamp of various states and hummer consist of.Signal in the beam car pilothouse is comprised of switching value input DI, voltage-type analog input AI and switching value output DO.Switching value input DI is used to indicate vehicle and should works in which kind of state, and analog input AI is used for gathering the position of bearing circle and pedal, and switching value output DO is used for the output of state of a control pilot lamp or warning honeybee life device.These signals all will import in the vehicle-mounted master controller by the CAN bus, finished by vehicle-mounted master controller the logical and algorithm of car load is controlled.The at present collection of cab signal all is by each signal being accessed on the controller, being gathered and pass through the method for CAN bus and Vehicle Controller communication by this controller with transmission.
And aforementioned for gather and the controller of signal transmission to be generally German IFM company model be the controller of CR0020, have following shortcoming:
1. the controller of prior art use is expensive.
2. the controller volume that uses of prior art is large, and wiring, cabling workload are large.
3. the counting of controller of prior art use can not be satisfied request for utilization.
Summary of the invention
The invention provides a kind of engineering machinery vehicle CAN bus extender module and process the method for bus data, expensive in order to solve the controller that prior art uses, volume is large, and wiring, cabling workload are large, and count and can not satisfy the problem of request for utilization.
Engineering machinery vehicle CAN bus extender module of the present invention comprises: single-chip microcomputer, and the power module of voltage regulation that links to each other respectively with described single-chip microcomputer, ID, dial special rate initialization circuit, DI input circuit, AI input circuit, DO output circuit and CAN bus communication circuit; Wherein, Single-chip Controlling power module of voltage regulation, ID, group special rate initialization circuit, DI input circuit, AI input circuit, the work of DO output circuit and CAN bus communication circuit; Power module of voltage regulation is used for providing stable voltage; ID, dial special rate initialization circuit, the ID when being used for setting described expansion module and carrying out the CAN bus communication and dial special rate; The DI input circuit is used for the switching value input signal is inputted to single-chip microcomputer; The AI input circuit is used for the analog input signal is inputted to single-chip microcomputer; The DO output circuit is used for the switching value output signal output with single-chip microcomputer; The CAN bus communication circuit is used for the switching value input signal after single-chip microcomputer is processed and analog input signal are uploaded to outside vehicle-mounted master controller; And the control signal that receives outside vehicle-mounted master controller, and be transmitted to single-chip microcomputer and be treated to switching value output signal.
Further, also comprise: the serial communication module that links to each other with described single-chip microcomputer; Serial communication module is used for finishing the communication between single-chip microcomputer and the outer computer, and downloads and the debugging Single Chip Microcomputer (SCM) program.
Further, the external reset pin of single-chip microcomputer is used for the monitoring supply voltage, when supply voltage is lower than the detection threshold voltage of electrify restoration circuit, and reseting logic circuit; When supply voltage during again more than or equal to the detection threshold voltage of reset circuit, postpone the clock of default value after, electrification reset finishes.
Further, serial communication module comprises: the 5th light emitting diode, and the 5th current-limiting resistance links to each other with the status pin of single-chip microcomputer by the 5th light emitting diode; External unit is controlled periodically output low level of described single-chip microcomputer by status pin, gets light on and off to control the 5th light emitting diode.
Further, the peripheral equipment control single-chip microcomputer periodically logic of output low level comprises: open the first timer interrupt function outside the circulation of single-chip microcomputer master routine, when first timer interrupts, to the State-output negate of single-chip microcomputer status pin.
Further, power module of voltage regulation comprises: the power management monolithic integrated optical circuit, and this circuit comprises the first pin at least, the second pin and the 4th pin; Voltage is via the first pin input of power management monolithic integrated optical circuit; Exported by the second pin after the step-down; The 4th pin gathers the output voltage values of the second pin and feeds back to the power management monolithic integrated optical circuit; The management monolithic integrated optical circuit is adjusted the output voltage of the second pin according to the described magnitude of voltage of feedback, make its stable output.Power module of voltage regulation also comprises: the first electric capacity and the tenth electric capacity are used for the voltage waveform of stable input, output as energy-storage travelling wave tube; Wherein, the positive pole of the first electric capacity connects the first pin of described power management monolithic integrated optical circuit; The positive pole of the tenth electric capacity connects the second pin of described power management monolithic integrated optical circuit by the first filter inductance, and the 4th pin of described power management monolithic integrated optical circuit; The tenth capacitances in series the first filter inductance and the first schottky diode; The first schottky diode is used for the electric current afterflow, and cooperatively interacts with the first filter inductance, exports with burning voltage.Power module of voltage regulation also comprises: whether working properly the first current-limiting resistance and the 6th light emitting diode with the tenth capacitances in series are used to indicate power supply.
Further, ID, group special rate initialization circuit comprise: at least 3 bus ID toggle switchs can arrange 8 kinds of bus ID at least through combination; And at least 2 buses dial special rate toggle switch, through combination 4 kinds of buses can be set at least and dial special rate.By described ID, group special rate initialization circuit, the logic of used ID and group special rate comprises the steps: to read bus ID toggle switch state when setting the CAN bus communication, according to the combination of bus ID toggle switch, determines bus ID; Read the special rate toggle switch state of dialling, the combination of dialling special rate toggle switch according to bus determines to dial special rate; According to above-mentioned definite bus ID and bus ID and group special rate of group special rate initialization CAN bus.
Further, the DI input circuit comprises at least 2 road DI input, and wherein arbitrary road DI input comprises one 2 connectors and photoelectric coupling signal isolator spare; Described 2 connectors are used for introducing the cab signal input; Photoelectric coupling signal isolator spare is used for onboard system signal and the isolation of Single Chip Microcomputer (SCM) system signal.The course of work of arbitrary road DI input comprises: when described 2 connectors have the cab signal input, and the positive pole of photoelectric coupling signal isolator spare and the lumination of light emitting diode between negative pole, the emitter and collector conducting, making single-chip microcomputer is the low level input; When described 2 connectors do not have the cab signal input, the not conducting of emitter and collector of photoelectric coupling signal isolator spare, making single-chip microcomputer is the high level input.
Further, single-chip microcomputer is built-in with at least 8 tunnel 10 high-speed ADC converters, and wherein arbitrary road is set to the ADC conversion, to finish described AI input circuit the analog input signal is inputted to single-chip microcomputer.
Further, the DO output circuit adopts the mode of control output negative pole.The DO output circuit comprises: single-chip microcomputer DO pin is connected and is connected with the base stage of the first triode behind the 3rd resistance, and is connected with system power supply behind the 22 pull-up resistor of connecting; The emitter of the first triode is connected to the ground, and collector is connected and is connected with the first pin of DO output connector behind the 4th current-limiting resistance; The normality of the first pin of DO output connector is vacant state, when single-chip microcomputer DO pin output high level, by on draw the 22 resistance to open the base stage of the first triode, its collector and emitter conducting is with the first pin output low level of control DO output connector.
Further, adopt the complete electrical isolation of high speed photo coupling between CAN bus communication circuit and the vehicle-mounted master controller; The power supply of optocoupler two terminal circuits is isolated in the lump.The CAN bus communication circuit comprises: power isolation module, bus controller, bus transceiver and high speed photo coupling isolation; Wherein, high speed photo coupling is isolated receipts and the signalling electrical isolation with single-chip microcomputer and bus transceiver, and the power supply of optocoupler two terminal circuits is isolated in the lump; The power supply of single-chip microcomputer provides by power module of voltage regulation, and the power supply of CAN bus communication circuit provides by described power isolation module.
Further, bus extender module comprises monitoring and the processing procedure of bus data: opening timing device 0 interrupts; Data in the master routine on the monitoring bus when the information of the described bus extender module output of control occurring, transfer to single-chip microcomputer via the CAN bus communication circuit, and are exported by Micro Controller Unit (MCU) driving DO output circuit; In timer 0 interrupt routine, single-chip microcomputer gathers the DI signal of DI input circuit and the AI signal of AI input circuit, and the signal that gathers is processed into the data layout that can send on the CAN bus, the duration default at the interval sends once by the CAN bus communication circuit.Before opening timing device 0 interrupts, also comprise: system initialization; Initialization mould/number conversion function; Initialization CAN bus.
CAN bus extender module of the present invention is processed the method for bus data, comprises the following steps: that opening timing device 0 interrupts; Data in the master routine on the monitoring bus when the information of control bus expansion module output occurring, are exported corresponding control signal by bus extender module; In timer 0 interrupt routine, gather DI signal and AI signal, and the signal that gathers is processed into the data layout that can send on the CAN bus, the duration default at the interval sends once.
Further, before opening timing device 0 interrupts, also comprise the steps: system initialization; Initialization mould/number conversion function; Initialization CAN bus.
Specially for engineering machinery vehicle, especially the function of beam car pilothouse and characteristics and the beam car pilothouse CAN bus extender module developed, equally can the settling signal collection output and the function by CAN bus and vehicle-mounted master controller communication, and compare with using existing controller, simplified vehicle electrical systems, reduced wiring and cabling workload, saved the space, greatly reduced equipment cost.
Description of drawings
Fig. 1 is the CAN bus extender module structural representation in the embodiment of the invention;
Fig. 2-1 is the serial communication module circuit diagram in the embodiment of the invention;
Fig. 2-2 is the circuit diagram of the single-chip microcomputer external reset pin RST part in the embodiment of the invention;
Fig. 3 is the status indicator lamp workflow diagram in the embodiment of the invention;
Fig. 4 is the power module of voltage regulation circuit diagram in the embodiment of the invention;
Fig. 5 is the logical diagram of setting ID in the embodiment of the invention and dialling special rate;
Fig. 6 is the process flow diagram of setting ID in the embodiment of the invention and dialling special rate;
Fig. 7 is the circuit diagram of DI input circuit in the embodiment of the invention;
Fig. 8 is the internal circuit diagram of TLP521-4 in the embodiment of the invention;
Fig. 9 is the circuit diagram of DO output circuit in the embodiment of the invention;
Figure 10-1 is the circuit diagram of bus controller MCP2515 in the embodiment of the invention;
Figure 10-2 is the circuit diagram of bus transceiver TJA1050 in the embodiment of the invention;
Figure 10-3 is the circuit diagram of a 6N137 in the embodiment of the invention;
Figure 10-4 is the circuit diagram of another 6N137 in the embodiment of the invention;
Figure 10-5 is the circuit diagram of the power isolation module B0505S that the CAN bus communication circuit carries in the embodiment of the invention;
Figure 11 is the overall software flow pattern in the embodiment of the invention;
Figure 12 is the overall software flow refinement figure in the embodiment of the invention;
Figure 13 is the method flow diagram that the CAN bus extender module is processed bus data in the embodiment of the invention.
Embodiment
Based on prior art, the inventor finds engineering machinery vehicle after deliberation, and especially the element in the beam car pilothouse is main mainly with discrete component, and wiring cabling workload is large.If the information of these elements will be introduced on CAN (the Controller Area NetWork of the controller local area network) bus, also need the controller of special ordering price costliness to be used for gathering and communication, increased equipment cost.Gather control signal if design a kind of beam car pilothouse CAN bus extender module, and by CAN bus and vehicle-mounted master controller communication, will reach the purpose of simplifying vehicle electrical systems, reduction wiring and cabling amount, saving space, reducing cost.
The inventor also finds engineering machinery vehicle after deliberation, and especially the signal in the beam car pilothouse is exported DO (Digital Output) by a large amount of switching value input DI (Digital Input), a small amount of voltage-type analog input AI (Analog Input) and a small amount of switching value and formed.Switching value input DI is used to indicate vehicle and should works in which kind of state, and analog input AI is used for gathering the position of bearing circle and pedal, and switching value output DO is used for the output of state of a control pilot lamp or warning honeybee life device.These signals all will import in the vehicle-mounted master controller by the CAN bus, finished by vehicle-mounted master controller the logical and algorithm of car load is controlled.The at present collection of cab signal and transmission all are by each signal being accessed on the controller (being generally German IFM company model is the controller of CR0020), are gathered and method by CAN bus and Vehicle Controller communication by this controller.And this controller is expensive, and only does work such as switch acquisition, analog acquisition, switching value output with controller, rather seems and wastes one's talent on a petty job.Therefore, the inventor is for the function of beam car pilothouse and characteristics and the beam car pilothouse CAN bus extender module of developing, equally can the settling signal collection output and the function by CAN bus and vehicle-mounted master controller communication, and compare with above-mentioned existing controller, the price of beam car pilothouse CAN bus extender module reduces greatly, has saved equipment cost.
The beam car pilothouse CAN bus extender module that the embodiment of the invention provides is for beam car cab signal characteristics, be a large amount of switching value inputs, a small amount of analog input and a small amount of switching value output, monoblock modules can be in the input of vehicle-mounted CAN bus network expansion 16 way switch amounts, 2 road analog inputs, the output of 1 way switch amount, 0.02 second state upgrades once, available toggle switch arranges 8 kinds of CAN bus ID and 4 kinds of CAN bus baud rates.Referring to shown in Figure 1, the control section of beam car pilothouse CAN bus extender module is single-chip microcomputer 11, specifically can adopt high speed, low-power consumption, superpower jamproof 8051 single-chip microcomputer STC12C5A60S2 of new generation, it is the core of whole expansion module, be responsible for control serial communication module 12, power module of voltage regulation 13, ID, group special rate initialization circuit 14, DI input circuit 15, AI input circuit 16, DO output circuit 17 and CAN bus communication circuit 18, and settling signal collection, data are processed and with vehicle-mounted master controller CAN bus communication.Further, power module of voltage regulation 13 is used for providing stable voltage.ID, dial special rate initialization circuit 14, the ID when being used for setting described expansion module and carrying out the CAN bus communication and dial special rate.DI input circuit 15 is used for the switching value input signal is inputted to single-chip microcomputer.AI input circuit 16 is used for the analog input signal is inputted to single-chip microcomputer.DO output circuit 17 is used for the switching value output signal output with single-chip microcomputer.CAN bus communication circuit 18 is used for the switching value input signal after single-chip microcomputer is processed and analog input signal are uploaded to outside vehicle-mounted master controller; And the control signal that receives outside vehicle-mounted master controller, and be transmitted to single-chip microcomputer and be treated to switching value output signal.Serial communication module 12 is used for finishing the communication between single-chip microcomputer and the outer computer, and downloads and the debugging Single Chip Microcomputer (SCM) program.
The circuit of power module of voltage regulation 13 as shown in Figure 4.Power module of voltage regulation 13 comprises the power management monolithic integrated optical circuit, it specifically can be the LM2596 regulator, it is voltage-dropping type power management monolithic integrated optical circuit, this circuit can be exported the drive current of 3A, have simultaneously good linearity and load regulation characteristic, at least comprise the first pin 1, the second pin 2 and the 4th pin 4.With it vehicle-mounted 24V power supply is converted to the 5V power supply to single-chip microcomputer 11 system power supplies.Embedded control system needs a stable operating voltage ability reliably working, the conventional power source custom adopts linear voltage-stabilizing device to do voltage transitions, but this linear regulative mode has very large thermal loss at work, work efficiency only is 30%~50%, in addition work under bad environment more easily makes the stability variation of embedded control system.The regulator part is then worked in the mode of complete conducting or shutoff, during work or be that large electric current flows through, or is to end fully, and therefore, the power consumption of switching power supply is extremely low, and average work efficiency can reach 70%~90%.Wide input voltage range is to 5V~45V, and voltage is via pin 1 input of LM2596, and the output voltage according to the voltage-regulation pin 2 of feedback pin 4 makes it be stabilized in 5V ± 4% output.Power module of voltage regulation comprises that also the first electric capacity E1, the tenth electric capacity E10 are as energy-storage travelling wave tube, the voltage waveform that is used for stable input, output, the first filter inductance L1 that connects suppresses the power supply high frequency interference, the first schottky diode D1 is as fly-wheel diode, cooperatively interact with L1, guarantee 5V stable DC Voltage-output.Whether working properly the first current-limiting resistance R1 the 6th light emitting diode D6 that connects is used to indicate power supply.
ID, group special rate initialization circuit 14 its functions are the ID when carrying out the CAN bus communication by toggle switch setting expansion module and dial special rate.When switch cut out, single-chip microcomputer 11 pins were drawn by resistance in series and are high level, and behind the switch closure, pin and ground conducting become the low level input.ID, group special rate initialization circuit 14 comprise: at least 3 bus ID toggle switchs can arrange 8 kinds of bus ID at least through combination; And at least 2 buses dial special rate toggle switch, through combination 4 kinds of buses can be set at least and dial special rate.Used ID and the logic of dialling special rate comprise the steps: S201, read bus ID toggle switch state referring to shown in Figure 5 by ID, when dialling special rate initialization circuit 14 and setting the CAN bus communication, according to the combination of bus ID toggle switch, determine bus ID; S202, read the special rate toggle switch state of dialling, the combination of dialling special rate toggle switch according to bus determines to dial special rate; S203, according to above-mentioned definite bus ID with dial the bus ID of special rate initialization CAN bus and dial special rate.More specifically can be referring to shown in Figure 6,3 bus ID toggle switch combinations can be 000 to 111, and the bus ID that determines can be 0x51 to 0x58; 2 buses are dialled special rate toggle switch combination and be can be 00 to 11, and the special rate of dialling of determining can be 100,125,250 and 500.
DO output circuit 17 be switching value output circuit as shown in Figure 9.The output of single-chip microcomputer 11 can not be used for driving vehicle-mounted 24V control signal, so utilize high frequency miniwatt NPN triode 9011 (i.e. the first triode T1 among the figure) switch amount signal to amplify.Mode safer, power consumption control output negative pole still less that circuit adopts, 1 pin of J2 is vacant state at ordinary times, when the DO of single-chip microcomputer 11 pin output high level, open the base stage of triode 9011 by the effect of the 22 pull-up resistor R22, collector 1 pin of triode 9011 and emitter 3 pin conductings, the 1 pin output low level of control J2.More specifically, the DO pin of single-chip microcomputer 11 is connected and is connected with the base stage 2 of triode 9011 after the 3rd resistance R 3, and is connected with system power supply behind the R22 that connects; The emitter of triode 9011 is connected to the ground, and collector is connected and is connected with the first pin of DO output connector (being J2) behind the 4th current-limiting resistance R4; The normality of the first pin of DO output connector is vacant state, when single-chip microcomputer DO pin output high level, and the base stage of opening triode 9011 by R22, its collector and emitter conducting is with the first pin output low level of control DO output connector.
By CAN bus communication circuit 18, carry out the circuit of CAN bus communication between CAN bus extender module of the present invention and vehicle-mounted master controller, its function is that the input signal that will be aggregated into uploads in the vehicle-mounted master controller by the CAN bus, and receive the control signal of vehicle-mounted master controller, be converted into the output of output circuit.The CAN bus communication circuit generally includes bus controller, bus transceiver and high speed photo coupling and isolates three parts.
More specifically, bus controller can referring to shown in Figure 10-1, cooperate external circuit to consist of take the MCP2515 chip as main.Single-chip microcomputer CAN_C pin is as the chip selection signal of bus controller MCP2515 (U7).Pin CAN_INT receives the input port that bus data interrupts as single-chip microcomputer.Pin CAN_SI, CAN_SO and CAN_SCK are arranged under the SPI pattern by software and work, as address/data and the SPI clock cable of single-chip microcomputer and MCP2515 communication.
Bus transceiver can referring to shown in Figure 10-2, cooperate external circuit to consist of take the TJA1050 chip as main.Two the 30pF electric capacity (C5, C6) that are connected between the CANH of TJA1050 (U8) and CANL pin and the ground; be used for filtering the high frequency interference on the CAN bus; two diodes (D9, D10) that are connected between CANH and CANL pin and the ground shield when bus voltage generation transition is disturbed.
The high speed photo coupling isolation can use high speed photo coupling chip 6N137 to cooperate external circuit to consist of.Two 6N137 (U9, U10) are respectively referring to shown in Figure 10-3, the 10-4, receipts and the complete electrical isolation of signaling with single-chip microcomputer and bus transceiver, the power supply of optocoupler two terminal circuits is also kept apart, the power supply of single-chip microcomputer provides by power module of voltage regulation, the power supply of CAN bus communication circuit 18 provides by the power isolation module B0505S (U11) of self band, can be referring to shown in Figure 10-5, this can strengthen the anti-lightning ability of vehicle-mounted CAN bus communication circuit.
The overall software flow of beam car pilothouse CAN bus extender module comprises the following steps: as shown in figure 11
S301, opening timing device 0 interrupt.
Data in S302, the master routine on the monitoring bus when the information of the described bus extender module output of control occurring, transfer to single-chip microcomputer via CAN bus communication circuit 18, and drive 17 outputs of DO output circuit by single-chip microcomputer 11.
In S303, timer 0 interrupt routine, single-chip microcomputer 11 gathers the DI signal of DI input circuit 15 and the AI signal of AI input circuit 16, and with after the signal processing that gathers, the duration default at the interval sends by CAN bus communication circuit 18.
Need to prove, above-mentioned steps S302 and S303 are parallel step, and step S301 is the preposition step of step S303.
More specifically, referring to shown in Figure 12, above-mentioned software flow can further comprise the following steps:
S401, system initialization.
S402, initialization ADC (mould/number conversion function).
S403, according to toggle switch initialization CAN bus ID and baud rate are set.
S404, initialization timing device 0 and opening timing device 0 interrupt, and change simultaneously step S405 and S408 over to.
Data on S405, the monitoring bus when the information of the described bus extender module output of control occurring, change step S406. over to
S406, judge whether module output if so, then to change step S407 over to; Otherwise, change over to and return step S405.
S407, transfer to via CAN bus communication circuit 18 and to state single-chip microcomputer 11, and drive 17 outputs of DO output circuits by single-chip microcomputer 11.
When S408, timer 0 interruption, change step S409. over to
S409, single-chip microcomputer 11 gather the DI signal of DI input circuit 15 and the AI signal of AI input circuit 16, described signal are processed into the data layout that can send on the CAN bus, or/and described signal packing is processed.
S410, judge whether transmitting time arrives, described transmitting time is the duration of fixed intervals.If so, then change step S411 over to; Otherwise, return step 409.
S411, send a secondary data by CAN bus communication circuit 18.
Data in the above-mentioned master routine on the continuous monitoring bus when occurring the information of control beam car pilothouse CAN bus extender module output on the bus, drive DO output circuit 16 and export.In the master routine operation, timer 0 interrupt routine is processed the DI, the AI signal that collect also in continuous operation, and per 0.02 second to the bus transmission once.Effectively solved monitoring bus information and to the problem of the two tasks in parallel of bus sending information by this kind mode.
The present invention also provides the method for processing bus data with the corresponding a kind of CAN bus extender module of CAN bus extender module, referring to shown in Figure 13, comprises the steps: in specific embodiment
S501 opening timing device 0 interrupts.
Data in S502, the master routine on the monitoring bus when the information of control bus expansion module output occurring, are exported corresponding control signal by bus extender module.
In S503, timer 0 interrupt routine, gather DI signal and AI signal, and with after the signal processing that gathers, the duration default at the interval sends.
Need to prove, above-mentioned steps S502 and S503 are parallel step, and step S501 is the preposition step of step S503.
More specifically other method embodiment comprises the following steps:
System initialization.
Initialization mould/number conversion function.
Initialization CAN bus.
Opening timing device 0 interrupts.
Data in the master routine on the monitoring bus when the information of control bus expansion module output occurring, are exported corresponding control signal by bus extender module.
In timer 0 interrupt routine, gather DI signal and AI signal, and with after the signal processing that gathers, the duration default at the interval sends.Specifically described signal can be processed into the data layout that can send on the CAN bus, the duration default at the interval sends once; Or/and, described signal packing is processed, and the default duration in every interval sends once.
Data in the above-mentioned master routine on the continuous monitoring bus when occurring the information of control beam car pilothouse CAN bus extender module output on the bus, are exported corresponding control signal.In the master routine operation, timer 0 interrupt routine is processed the DI, the AI signal that collect also in continuous operation, and per 0.02 second to the bus transmission once.Effectively solved monitoring bus information and to the problem of the two tasks in parallel of bus sending information by this kind mode.
To sum up, there is following advantage in the present invention with respect to prior art:
1. prior art is used German import barrier device collection signal, and a CR0020 controller price is 8000 yuan, needs in the pilothouse with two, and the optical controller cost just needs 16000 yuan.And this module separate unit is pressed 52 road DI that this routine beam car needs less than 70 yuan, 4 road DO, and 4 road AI signals, namely enough with 4 modules, 280 yuan altogether of costs.As seen the great disparity that differs of both costs.
2. the controller volume of prior art use is large, can only unify to be placed in the electrical control cubicles of pilothouse, electrical control cubicles is in the back of driver's chair, will be with the element signal access electrical control cubicles that is positioned on the front panel, wiring, cabling workload are large, also cause the equipment electrical system complicated, and taken a lot of spaces.And this beam car pilothouse CAN bus extender module volume is little, it can be hidden in nearby in the pilothouse in the set of signals Anywhere, panel below for example, gathered element signal after, by two CAN buses signal is guided to equipment Anywhere again.
3. the controller that uses of prior art mainly is to design as the hydraulic pressure PWM proportioning valve that uses in the control engineering plant equipment, and its pwm signal can reach the output current of 4A by regulating the dutycycle maximum, and this is that other controllers can not be compared.And we only gather DI, AI signal with it, rather waste one's talent on a petty job.And this controller count can not be best the request for utilization of satisfying, take this beam car as example, need 52 road DI, 4 road DO, 4 road AI, and present used CR0020 controller just in time be in count with one inadequate, and with two situations that a lot of left points are arranged.Although also can replace with the controller of other brands, for example: the controller of Siemens, DI, DO can expand a lot, but sort controller belongs to industrial controller, does not have CAN bus (the CAN bus is used for vehicle-mounted, engineering mechanical device mostly, and IFM belongs to the engineering mechanical device nonshared control unit) on it, if use and also will install bus conversion module additional, electrical system is complicated, increased the trouble spot, reduced the reliability of product.But and CAN bus extender module practical requirement of the present invention.
4. the controller of prior art has very high computing velocity and superpower processing power, and do not need complicated control program in this controller at present, only need with it signals collecting, pass through again the CAN bus transfer in other controllers, in other controllers, carry out programmed algorithm control, such as: steer arithmetic control, the control of driving walking algorithm etc., this resource to this controller is a kind of waste.CAN bus extender module of the present invention has been saved the budget processing section, and can reach equal or more excellent effect.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.
Claims (21)
1. an engineering machinery vehicle CAN bus extender module is characterized in that, comprising: single-chip microcomputer, and the power module of voltage regulation that links to each other respectively with described single-chip microcomputer, ID, dial special rate initialization circuit, DI input circuit, the AI input circuit, DO output circuit and CAN bus communication circuit;
Wherein, Single-chip Controlling power module of voltage regulation, ID, group special rate initialization circuit, DI input circuit, AI input circuit, the work of DO output circuit and CAN bus communication circuit;
Power module of voltage regulation is used for providing stable voltage;
ID, dial special rate initialization circuit, the ID when being used for setting described expansion module and carrying out the CAN bus communication and dial special rate;
The DI input circuit is used for the switching value input signal is inputted to single-chip microcomputer;
The AI input circuit is used for the analog input signal is inputted to single-chip microcomputer;
The DO output circuit is used for the switching value output signal output with single-chip microcomputer;
The CAN bus communication circuit is used for the switching value input signal after single-chip microcomputer is processed and analog input signal are uploaded to outside vehicle-mounted master controller; And the control signal that receives outside vehicle-mounted master controller, and be transmitted to single-chip microcomputer and be treated to switching value output signal.
2. bus extender module as claimed in claim 1 is characterized in that, also comprises: the serial communication module that links to each other with described single-chip microcomputer;
Serial communication module is used for finishing the communication between single-chip microcomputer and the outer computer, and downloads and the debugging Single Chip Microcomputer (SCM) program.
3. bus extender module as claimed in claim 1 is characterized in that, the external reset pin of described single-chip microcomputer is used for the monitoring supply voltage, when supply voltage is lower than the detection threshold voltage of electrify restoration circuit, and reseting logic circuit; When supply voltage during again more than or equal to the detection threshold voltage of reset circuit, postpone the clock of default value after, electrification reset finishes.
4. bus extender module as claimed in claim 1 is characterized in that, described serial communication module comprises: the 5th light emitting diode, and the 5th current-limiting resistance links to each other with the status pin of single-chip microcomputer by the 5th light emitting diode;
External unit is controlled periodically output low level of described single-chip microcomputer by status pin, gets light on and off to control the 5th light emitting diode.
5. bus extender module as claimed in claim 4, it is characterized in that, the described peripheral equipment control single-chip microcomputer periodically logic of output low level comprises: open the first timer interrupt function outside the circulation of single-chip microcomputer master routine, when first timer interrupts, to the State-output negate of single-chip microcomputer status pin.
6. bus extender module as claimed in claim 1 is characterized in that, described power module of voltage regulation comprises: the power management monolithic integrated optical circuit, and this circuit comprises the first pin at least, the second pin and the 4th pin;
Voltage is via the first pin input of power management monolithic integrated optical circuit; Exported by the second pin after the step-down; The 4th pin gathers the output voltage values of the second pin and feeds back to the power management monolithic integrated optical circuit; The management monolithic integrated optical circuit is adjusted the output voltage of the second pin according to the described magnitude of voltage of feedback, make its stable output.
7. bus extender module as claimed in claim 6 is characterized in that, described power module of voltage regulation also comprises: the first electric capacity and the tenth electric capacity are used for the voltage waveform of stable input, output as energy-storage travelling wave tube;
Wherein, the positive pole of the first electric capacity connects the first pin of described power management monolithic integrated optical circuit;
The positive pole of the tenth electric capacity connects the second pin of described power management monolithic integrated optical circuit by the first filter inductance, and the 4th pin of described power management monolithic integrated optical circuit;
The tenth capacitances in series the first filter inductance and the first schottky diode; The first schottky diode is used for the electric current afterflow, and cooperatively interacts with the first filter inductance, exports with burning voltage.
8. bus extender module as claimed in claim 7 is characterized in that, described power module of voltage regulation also comprises: whether working properly the first current-limiting resistance and the 6th light emitting diode with the tenth capacitances in series are used to indicate power supply.
9. bus extender module as claimed in claim 1 is characterized in that, described ID, group special rate initialization circuit comprise: at least 3 bus ID toggle switchs can arrange 8 kinds of bus ID at least through combination; And at least 2 buses dial special rate toggle switch, through combination 4 kinds of buses can be set at least and dial special rate.
10. bus extender module as claimed in claim 9 is characterized in that, by described ID, group special rate initialization circuit, the logic of used ID and group special rate comprises the steps: when setting the CAN bus communication
Read bus ID toggle switch state, according to the combination of bus ID toggle switch, determine bus ID;
Read the special rate toggle switch state of dialling, the combination of dialling special rate toggle switch according to bus determines to dial special rate;
According to above-mentioned definite bus ID and bus ID and group special rate of group special rate initialization CAN bus.
11. bus extender module as claimed in claim 1 is characterized in that, described DI input circuit comprises at least 2 road DI input, and wherein arbitrary road DI input comprises one 2 connectors and photoelectric coupling signal isolator spare;
Described 2 connectors are used for introducing the cab signal input;
Photoelectric coupling signal isolator spare is used for onboard system signal and the isolation of Single Chip Microcomputer (SCM) system signal.
12. bus extender module as claimed in claim 11 is characterized in that, the course of work of described arbitrary road DI input comprises:
When described 2 connectors have the cab signal input, the positive pole of photoelectric coupling signal isolator spare and the lumination of light emitting diode between negative pole, the emitter and collector conducting, making single-chip microcomputer is the low level input; When described 2 connectors do not have the cab signal input, the not conducting of emitter and collector of photoelectric coupling signal isolator spare, making single-chip microcomputer is the high level input.
13. bus extender module as claimed in claim 1, it is characterized in that, described single-chip microcomputer is built-in with at least 8 tunnel 10 high-speed ADC converters, and wherein arbitrary road is set to the ADC conversion, to finish described AI input circuit the analog input signal is inputted to single-chip microcomputer.
14. bus extender module as claimed in claim 1 is characterized in that, described DO output circuit adopts the mode of control output negative pole.
15. bus extender module as claimed in claim 14 is characterized in that, described DO output circuit comprises:
Single-chip microcomputer DO pin is connected and is connected with the base stage of the first triode behind the 3rd resistance, and is connected with system power supply behind the 22 pull-up resistor of connecting; The emitter of the first triode is connected to the ground, and collector is connected and is connected with the first pin of DO output connector behind the 4th current-limiting resistance;
The normality of the first pin of DO output connector is vacant state, when single-chip microcomputer DO pin output high level, by on draw the 22 resistance to open the base stage of the first triode, its collector and emitter conducting is with the first pin output low level of control DO output connector.
16. bus extender module as claimed in claim 1 is characterized in that, adopts the complete electrical isolation of high speed photo coupling between described CAN bus communication circuit and the vehicle-mounted master controller; The power supply of optocoupler two terminal circuits is isolated in the lump.
17. bus extender module as claimed in claim 16 is characterized in that, described CAN bus communication circuit comprises: power isolation module, bus controller, bus transceiver and high speed photo coupling isolation;
Wherein, high speed photo coupling is isolated receipts and the signalling electrical isolation with single-chip microcomputer and bus transceiver, and the power supply of optocoupler two terminal circuits is isolated in the lump; The power supply of single-chip microcomputer provides by power module of voltage regulation, and the power supply of CAN bus communication circuit provides by described power isolation module.
18. bus extender module as claimed in claim 1 is characterized in that, described bus extender module comprises monitoring and the processing procedure of bus data:
Opening timing device 0 interrupts;
Data in the master routine on the monitoring bus when the information of the described bus extender module output of control occurring, transfer to single-chip microcomputer via the CAN bus communication circuit, and are exported by Micro Controller Unit (MCU) driving DO output circuit;
In timer 0 interrupt routine, single-chip microcomputer gathers the DI signal of DI input circuit and the AI signal of AI input circuit, and the described signal that will gather is processed into the data layout that can send on the CAN bus, and the duration default at the interval sends once by the CAN bus communication circuit.
19. bus extender module as claimed in claim 18 is characterized in that, before opening timing device 0 interrupts, also comprises:
System initialization;
Initialization mould/number conversion function;
Initialization CAN bus.
20. a CAN bus extender module is processed the method for bus data, it is characterized in that, comprises the following steps:
Opening timing device 0 interrupts;
Data in the master routine on the monitoring bus when the information of control bus expansion module output occurring, are exported corresponding control signal by bus extender module;
In timer 0 interrupt routine, gather DI signal and AI signal, and the described signal that will gather is processed into the data layout that can send on the CAN bus, and the duration of presetting at the interval sends.
21. process as claimed in claim 20 the method for bus data, it is characterized in that, before opening timing device 0 interrupts, also comprise the steps:
System initialization;
Initialization mould/number conversion function;
Initialization CAN bus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102355796A CN102955437A (en) | 2011-08-17 | 2011-08-17 | Bus expansion module of engineering machinery vehicle and bus data processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102355796A CN102955437A (en) | 2011-08-17 | 2011-08-17 | Bus expansion module of engineering machinery vehicle and bus data processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102955437A true CN102955437A (en) | 2013-03-06 |
Family
ID=47764366
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011102355796A Pending CN102955437A (en) | 2011-08-17 | 2011-08-17 | Bus expansion module of engineering machinery vehicle and bus data processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102955437A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108803420A (en) * | 2018-06-02 | 2018-11-13 | 新乡市光明电器有限公司 | Military mobile unit collection control circuit |
JP2019029972A (en) * | 2017-08-03 | 2019-02-21 | コベルコ建機株式会社 | Communication control device |
CN110673059A (en) * | 2019-11-04 | 2020-01-10 | 成都四为电子信息股份有限公司 | Wireless lighting monitoring and electric measuring device |
CN112737699A (en) * | 2019-10-28 | 2021-04-30 | 尼得科驱动专家有限公司 | Current splitter for a LIN bus system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5987621A (en) * | 1997-04-25 | 1999-11-16 | Emc Corporation | Hardware and software failover services for a file server |
WO2000077584A1 (en) * | 1999-06-11 | 2000-12-21 | Honeywell Limited | Method and system for remotely monitoring time variant data |
CN101100073A (en) * | 2007-04-16 | 2008-01-09 | 周玉成 | Artificial board production line formaldehyde concentration online monitoring system |
CN201230327Y (en) * | 2008-05-30 | 2009-04-29 | 天津理工大学 | DeviceNet field bus I/O communication apparatus based on multiple data triggering modes |
CN101738963A (en) * | 2009-12-07 | 2010-06-16 | 浙江大学 | Vehicle-mounted engineering machinery remote wireless data collection and monitoring system and method |
CN101783741A (en) * | 2010-03-03 | 2010-07-21 | 天津理工大学 | CANopen field bus input/output device with short-circuit protection and self-diagnosis function |
CN202221526U (en) * | 2011-08-17 | 2012-05-16 | 秦皇岛天业通联重工股份有限公司 | Engineering machine vehicle bus extensive module |
-
2011
- 2011-08-17 CN CN2011102355796A patent/CN102955437A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5987621A (en) * | 1997-04-25 | 1999-11-16 | Emc Corporation | Hardware and software failover services for a file server |
WO2000077584A1 (en) * | 1999-06-11 | 2000-12-21 | Honeywell Limited | Method and system for remotely monitoring time variant data |
CN101100073A (en) * | 2007-04-16 | 2008-01-09 | 周玉成 | Artificial board production line formaldehyde concentration online monitoring system |
CN201230327Y (en) * | 2008-05-30 | 2009-04-29 | 天津理工大学 | DeviceNet field bus I/O communication apparatus based on multiple data triggering modes |
CN101738963A (en) * | 2009-12-07 | 2010-06-16 | 浙江大学 | Vehicle-mounted engineering machinery remote wireless data collection and monitoring system and method |
CN101783741A (en) * | 2010-03-03 | 2010-07-21 | 天津理工大学 | CANopen field bus input/output device with short-circuit protection and self-diagnosis function |
CN202221526U (en) * | 2011-08-17 | 2012-05-16 | 秦皇岛天业通联重工股份有限公司 | Engineering machine vehicle bus extensive module |
Non-Patent Citations (4)
Title |
---|
张弘: ""基于CAN总线的信号采集与处理模块研究"", 《中国优秀硕士学位论文全文数据库•信息科技辑》 * |
张弘: "基于CAN总线的信号采集与处理模块研究", 《中国优秀硕士学位论文全文数据库•信息科技辑》 * |
李貌 等: "MCP2515在CAN总线系统智能节点的应用", 《电气自动化》 * |
沈冬祥 等: "工程设备CAN总线控制系统设计", 《微计算机信息》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019029972A (en) * | 2017-08-03 | 2019-02-21 | コベルコ建機株式会社 | Communication control device |
CN108803420A (en) * | 2018-06-02 | 2018-11-13 | 新乡市光明电器有限公司 | Military mobile unit collection control circuit |
CN108803420B (en) * | 2018-06-02 | 2024-05-10 | 新乡市光明电器有限公司 | Centralized control circuit for military vehicle-mounted equipment |
CN112737699A (en) * | 2019-10-28 | 2021-04-30 | 尼得科驱动专家有限公司 | Current splitter for a LIN bus system |
CN110673059A (en) * | 2019-11-04 | 2020-01-10 | 成都四为电子信息股份有限公司 | Wireless lighting monitoring and electric measuring device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN202221526U (en) | Engineering machine vehicle bus extensive module | |
CN201341031Y (en) | Intelligent charging network system of electric automobile | |
CN201371945Y (en) | Electric steering engine controller based on FPGA | |
CN101811484B (en) | Finished-automobile integrated control system for micro electric vehicle | |
CN206664500U (en) | A kind of whole pure electric vehicle complex control system | |
CN101339432B (en) | Finished automobile controller monitoring system and its implementing method | |
CN109398133A (en) | A kind of electric car charging cluster and its power automatic distributing system | |
CN2858417Y (en) | Vehicle control unit for hybrid power system | |
CN201114146Y (en) | Tandem type mixing power automobile control system | |
CN107128159A (en) | A kind of New-energy electric vehicle power assembly | |
CN102955437A (en) | Bus expansion module of engineering machinery vehicle and bus data processing method | |
CN204340934U (en) | A kind of new-energy automobile entire car controller | |
CN102673424A (en) | Weak-current power supply system for power control unit (PCU) of electric automobile | |
CN203727307U (en) | Battery electric vehicle control module | |
CN205544406U (en) | But direct current that multiple gun was exported simultaneously fills electric pile | |
CN103692920B (en) | A kind of network-controlled scheme supporting the multiple charge mode of battery-driven car | |
CN212403230U (en) | Diesel engine monorail crane electric control system based on CAN bus | |
CN201262707Y (en) | Monitoring system for entire car controller | |
CN111847250A (en) | Diesel engine monorail crane electric control system based on CAN bus | |
CN201761453U (en) | Configurable control module of passenger vehicle body control system | |
CN201685771U (en) | Hybrid power control system with CAN bus | |
CN202219736U (en) | Controller for pure electric automobile | |
CN103359106B (en) | New forms of energy whole car controller of hybrid electric car and analog signal output method thereof | |
CN201872630U (en) | Integrated manipulator of electric automobile | |
CN207000365U (en) | A kind of remote control of new-energy automobile |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C41 | Transfer of patent application or patent right or utility model | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20160520 Address after: 066004 No. 3 Tianshan Road, Qinhuangdao economic and Technological Development Zone, Hebei, China Applicant after: QINHUANGDAO TIANYE TOLIAN HEAVY INDUSTRY CO., LTD. Address before: No. 3 Tianshan Road, Qinhuangdao economic and Technological Development Zone, Hebei, China Applicant before: Qinhuangdao Tianye Tolian Heavy Industry Co., Ltd. |
|
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130306 |
|
RJ01 | Rejection of invention patent application after publication |