首先研究CAN總線和SAE J1939協(xié)議,提出一種基于MC9S12HZ256微控制器的總線式汽車數(shù)字儀表解決方案。詳細(xì)介紹SAE J1939協(xié)議的報文幀格式及應(yīng)用層協(xié)議中發(fā)動機(jī)相關(guān)參數(shù)的定義,以及步進(jìn)電機(jī)及其驅(qū)動和車速信號的處理方法。該數(shù)字儀表系統(tǒng)硬件平臺由微處理器和信號采集和信息處理及顯示等模塊組成。軟件設(shè)計部分編程實(shí)現(xiàn)了對CAN總線和各傳感器數(shù)據(jù)的讀取、處理。該系統(tǒng)能夠?qū)崟r反映車輛工況。
Abstract:
In this paper,CAN bus and SAE J1939protocol are researched,and a vehicle digital instrument solution based on MC9S12HZ256MCU is proposed.The message frame format and some engine-related parameters’definition in SAE J1939application layer protocol are introduced in detail.Stepper motor and its driver,the methods of speed signal process-ing are also introduced.The hardware platform of vehicle digital instrument is composed by MCU,signal acquisition mod-ule,and signal processing and displaying module.Data receiving and processing from CAN bus and sensors are accom-plished by programming,and vehicle condition can be reflected in real-time.
針對材料試驗(yàn)機(jī)等設(shè)備中要求測量或控制材料拉伸或壓縮的位移,一般采用光電軸角編碼器檢測位置信號,輸出正交編碼脈沖信號。若采用其他方法檢測位置信號,必然導(dǎo)致電路設(shè)計復(fù)雜,可靠性降低。因此,提出一種基于LS7266R1的電子式萬能材料試驗(yàn)機(jī)設(shè)計方案。給出了試驗(yàn)機(jī)中的控制器工作原理,LS7266R1與單片機(jī)的接口硬件設(shè)計,以及主程序軟件流程圖。巧妙地把力量傳感器,位移傳感器等機(jī)械運(yùn)動狀態(tài)的壓力或拉力以及位置坐標(biāo),變成了電壓信號和電脈沖數(shù)字信號,供A/D測量和LS7266R1計數(shù),從而實(shí)現(xiàn)了獨(dú)立完成材料試驗(yàn)控制或通過PC機(jī)串口命令完成材料試驗(yàn)控制。
Abstract:
Aiming at the requirement that the displacement of the tension and compression always be tested and controlled in the equipement such as material testing machine. The position signal was tested by photoelectric axial angle coder. Therefore, the paper proposes the design of electronic universal testing machine design based on LS7266R1. If the position signal detected by other methods, will inevitably lead to the circuit design complexity, reliability decreased. The work theory of the controller, the hardware interface design between LS7266R1 and single chip, and the flow chart of main program, are presented in this paper. The signal of the compression or tension power and displacement at working, which tested by power sensor and displacement sensor especially, is changed into electric voltage and electric pulse numerical signals. And these signals can be tested by A/D and counted by LS7266R1. Finally the test of the material properties can be controlled by itself, or controlled by the COM command of PC.