全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:5154
推到 Plurk!
推到 Facebook!

LCM電子轉數表 DIY

 
conundrum
尊榮會員


發表:893
回覆:1272
積分:643
註冊:2004-01-06

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-11-22 15:46:49 IP:218.175.xxx.xxx 未訂閱
看到坊間的汽車用RPM等轉數顯示器 和抬頭顯示器 十分高價 所以特別po出來DIY方式  類似這種產品 http://dajun.2u.com.tw/DEFIRPM.htm    有興趣的可以試看看 不過最好有修車朋友一旁協助    http://www.eelkevisser.nl/anytacho.htm If you do not have a Opel with a nice Opel display. you can also buy a normal LCD display and use it as a tacho meter: This project is exactly the same as the Tachometer for Opel Display only the output to the display is changed from a Opel display to a normal LCD display.   Make sure the display is compatible with a HD44780 chipset. It can easily be interfaced to PORTB of the PIC16F84 using the 4 bits data bus protocol. In total only 7 datalines are used for the display. That leaves the RB0 free as an interrupt input for the tachosignal. On PORTA a block-wave is generated for testing purposes. The tachometer source for the PIC16F84 can be found here: TTLCD V0.1.zip The schematic shows that the display is connected directly to the PIC 16F84. The display is used in 4 bit mode that means that DB0-DB3 need to be connected to ground. The variable resistor is to change the contrast. The tacho signal is taken from the bobbin, see the Tachometer for Opel Display page for more details on that. I use PORTA to generate some test signals. You will find different RPM values on RA0-RA4. The test signals are not completely stable but are good enough for testing purposes. The test signals are generated during the waiting routines and are not generated while the PIC is busy doing calculations and so on. Therefore the signal comes in bursts, which results in instability. I have not tested this project in a car. And I do not intend to do so either. I have only tested it with the onboard test signals, see photo. However Manuel has build it to be used on his lathe. See: Tacho for a lathe. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> http://www.eelkevisser.nl/tacho.htm

Tachometer for Opel Display

Now, I knew how the Opel display can be interfaced it was time to do something useful with it. So, I wanted to use the display as a tachometer. A microcontroller (PIC16F84) was used to measure the time between two ignition pulses. The signal for the ignition pulses was taken from the low voltage side of the bobbin. (Look out, can still be a 100V or so.) The time was measured in microseconds. Due to interrupt latency and serving multiple interrupts at the same time, the measurement is not accurate at 1 us. I wanted to update the display every quarter of a second. To reduce errors I measure during an interval of about 0.25 seconds. In this interval the time is measured from the first to the last pulse, and the amount of pulses is counted. The number_of_pulses_measured is counted from zero. The formula used to calculate the rpm is: RPM = 30000000 * number_of_pulses_measured / time_from_first_to_last_pulse The 30000000 is actually 30 * 1000000. The 1000000 is because the time is in measured microseconds. I want to show the amount of revolutions per minute (RPM). Therefore, I have to multiply the frequency (=1/time) with 60. However, a 4 cylinder 4 stroke engine ignites twice a revolution so I get 60/2=30. Putting it all together gives the formula. This number is put on the display. The first experiments looked like this: The Opel runs idle at about 930 RPM. At the time I took this photo the engine was still cold and was throttled up a little by the motor management system. Click picture to enlarge. The green wire is hooked up to the low voltage side of the bobbin to measure the ignition pulses. Click picture to enlarge. The green dot shows where I picked up the signal. The green circle shows the original tachometer (TT=toerenteller), which my car does not have. The next picture shows the schematic I used: Click picture to enlarge. Well the design is quite strait forward. The bobbin is connected to pin 1 of the HDR_2 connector with the green wire I installed. A series resistor and two diodes clamp the signal between 0 and 12V. If you clamp the bobbin signal right away without the resistor your engine will not start. Yes, I tested that :-)) Next a RC filter is used to clean the signal. before it is put into the PIC. If you think that connecting a 12V signal to the (5V) PIC gives trouble, then you are wrong. Indeed the signal is 12V but the PIC has internal clamping diodes to the 0 and 5V, which limits the voltage seen by the PIC. The lines SDA, SCL and MRQ are connected by a couple of diodes to the PIC. The diodes make sure that the PIC can only pull the data lines low or let them float. There are pull up resistors located in the Opel display. The PIC gets its power by a 5 volt voltage regulator which is connected to the switched 12V. And it runs at 4 MHz, which makes the duration of one instruction 1 microsecond. The software can be found here: DispV07.zip. It includes the all the source files and a assembled ".hex" file which can be programmed in the PIC16F84 right away. Set the options in your programmer such that the Crystal Oscillator (XT) and the Power Up timer are on. The Watchdog should be off. Code protection does not matter, but I prefer Code protection to be Off, to allow verification of the chip. The software is published under the GPL License so you can do whatever you want with it except sell it. If you redistribute it you have to provide the (altered) source too. I still use the old PIC16F84 and not the newer PIC16F84A, the differences are neglectable. The 12 pin connector is described as follows: Pin # Name Description 1 Permanent 12V Always on 12V, keeps the clock running. 2 Not connected (Temperature) Temperature for TID 3 Ground 0V Ground connected to the chassis 4 Not connected (Temperature) Temperature for TID 5 Accessories 12V when the key is on accessories. The display goes on. 6 Headlights 12V when headlights are on. 7 Dashboard illumination Signal for the strength of the dashboard lights 8 Car-radio on The Radio is on. The date will disappear and make space for the RDS signal 9 SCL Serial Clock 10 MRQ Master Request or something... 11 SDA Serial data from the radio 12 Not connected (Speed) Speed signal for displays with temperature readout. (TID) The 12 pin connector with the name "Car" Is connected to the connector that normally connects to the display. The connector with the name "Opel Display" is connected by a 1 to 1 cable to the display. Like this: After the first experiments were successful, I made a small WCB (Wired Circuit Board). A close up of the WCB showing the wiring. The green wire comes from the bobbin. The gray flat cable goes to the display. The colored wires with protection around it come from the car and were previously connected to the display. Another close up. Building in the tachometer neatly in the dashboard gives the above result! If you decide to build this project too, please let me know what you experience. http://www.eelkevisser.nl/junyent.htm >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 網友大大 請問你的作品,文章等 是否願意貢獻 給於KTOP網站,日後使用於DVD/VCD發售 如果可以請在簽名檔上宣告個人授權 以加速KTOP網站日後DVD/VCD資料的誕生 台灣災難都是事後算帳 無人飛行載具(Unmanned Aerial Vehicle,UAV)為什麼沒大量應用於救災行列 絲絲有2種 .net有很多種 一種治眼睛是MS 另一種治腦筋是Borland
系統時間:2024-07-02 2:08:06
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!