Tuesday, December 29, 2009

Sensorless engine rpm counter update

Here are some videos of the rev counter in action. Unfortunately, my effort to modify the display to make it brighter did not work quite well.

The second and third video are the improved display, by changing the pause time between each LED light up. The LED draws power from the PIC microcontroller, thus need to limit the current. They did not turn up very bright. The videos were captured early morning, before sun rise. I wanted to change the circuit and draw the power for the LED from power supply regulator, but it got messy and I damaged the whole thing.

One more thing, the rev counter works best when there is electrical load from the engine such as headlight or rear windscreen demister. Readings are more stable...

My new project is to develop a control system for a pyrolysis reactor. Part of it involves controlling the speed of a DC motor (in this case a cordless drill), without any speed encoder. I also used Selmaware's StampPlotLite software for computer control and data logging... Maybe more on that project later.







Sunday, July 12, 2009

Universal Proportional Integral Derivative Controller


It has been quite a while since my last post. For some reason or another, these 2 months were a bit hectic during the weekends. For the past few weeks the weekends were spent attending the Hajj (Pilgrimage) Crash Course. I am hoping to go for my Hajj this year. More on that later....

I've also put on hold the project on my HUD. I was asked by my colleague to develop a Proportional,Integral and Derivative (PID) controller for an engine test equipment. So that kept me away from the HUD project (will finish the HUD thing later). Then I thought this could also be used for any system that need PID control. This thing will take any 0-5 volt input (you can also make it 0-10 or whatever by putting a voltage divider). Then there is this PID algorithm that will compute the voltage output. The DAC0830 will then output this voltage. You can use to control whatever thing that require voltage output.

Sometimes you need to trick a system by giving false input. For example, you want to tell the engine that the intake manifold pressure is high so that the engine will inject more fuel. You will get more power. This same hardware can also be used. I've developed the source codes for this. You just need to recalibrate the voltage i.e. the actual one and the desired one.

Here are the components needed:

1. PIC 16F877 - 1 (RM27)
2. buttons - 4 units
3. DAC0830LCN - 1 unit (RM10)
4. op amp LF351N - 1 unit
5. 2pole dipswitch -
6. npn transistor C337 - 1 unit
7. relay (automotive type) CMA51-S-12V - 1 unit
8. LCd display
9. resistors
10. capacitors
11. 20MHz crystal
12 some length of wires

Oh ya, you also need the negative voltage supply. I got it from the old PC power supply. See my previous post on using this power supply.

PID source code is here . The hex file is here

Signal modifier code is here .The hex file is here

I don't have the schematics yet. Maybe later....

Sunday, May 3, 2009

not much progress this week


this weekend busy with some wedding receptions. The sensorless rpm meter progress was slow. Still struggling to get the right amount of lag filter into the codes.

The display is also a bit too dim for HUD during the midday. Will try to perfect this thing next week.

Sunday, April 12, 2009

Update of sensorless engine rpm meter


This is the project built onto strip board. It was quite a challenging project. The idea is to display this as a HUD (head up display) on the windscreen of my old kancil. That is what the 7segment LEDs for. I am hoping that the LEDs are bright enough to be projected onto the windscreen.

Haven't soldered the components yet. It took me a few hours just to put the component together.

Can't wait to solder everything and test it. Now I have to run my other errands first .....

Sunday, March 29, 2009

Melayu.....

Melayu Bangsat!?
Isteri kesayangan aku baru beli laptop ni. Pinjam duit aku. Janji nak bayar.
Aku tahu dia ada sikit flair into writing. Aku suruh dia menulis. Buleh dak jadi penulis. Buktikan dulu. Jangan main cakaaaaap je..
Buat dulu satu cerpen atau sajak ke..
Cerita buduh pun tak apa ....
Kalau aku pandai menulis dah lama aku ada novel sendiri. Atau pun koleksi antologi cerpen sendiri.
Ahhh... bukan susah sangat nak menulis ni. It is all about story telling. Cuba buat satu cerita dan tulis seolah-olah kau sedang bercerita. Guna gaya bersembang santai pun boleh. Asal ada flow cukup...
Lantaklah kalau tak berseni pun. Bukannya ramai melayu yang tahu menghargai seni. Tengoklah selera wayang mereka. Atau selera lagu mereka. Ataupun program TV mereka, drama pilihan mereka. Drama murahan dari Indonesia yang langsung tak masuk akal pun boleh diterima. Lagu lempeng hangus pun boleh ada tempat di hati mereka. Lauk masin pun boleh jadi lagu. Menang pertandingan pulak tu. Pertandingan apa? Entah, aku pun tak ingat. Melayu mudah lupa...
Apa lagi boleh dikatakan. Hatta novel picisan pun boleh diusulkan supaya jadi teks untuk sekolah. Memang teruk melayu ni.
Mari kita tengok apa definisi melayu yang diberikan oleh Sweetenham dulu. Apa? Tak kenal siapa Sweetenham? Memang sah jahil melayu nihh. Dulu cikgu aku pernah panggil melayu bangsat!. Ya, melayu ni bangsat! Walaupun cikgu tu sendiri pun melayu. Agaknya dia sorang yang tak bangsat...
Benarkah melayu ni bangsat? Bangsat di tanah air sendiri? Mengemis di bumi warisan sendiri? Mungkin juga.
Berbalik kepada definasi Melayu Sweetenham tadi. Mungkin kita boleh renung dan fikirkan sama ada masih tepat atau tidak setelah lebih seratus tahun berlalu. Beliau mentakrifkan.... Dia mentakrifkan melayu sebagai “....
Aahh... bacalah sendiri di website sabri zain ni.....

Lepas tu nilai sama ada masih relevan atau tidak. Kita boleh saja memilih untuk menuduh En Sweetenham tu bias atau ada agenda tersembunyi. Atau kita boleh juga melihat kajian dia itu secara objektif......

Saturday, March 28, 2009

My latest invention - sensorless engine rpm counter

It has been quite a while since my last post. Been busy with going to work and.... working on my new project.

I had this brilliant idea (so I thought...) of measuring engine speed (rpm) without having to go into the engine bay and meddle with the ignition distributor wiring. As such, I scrapped my plan to work on the 2-axis accelerometer and the odometer estimator and focus on this one instead.

Over the past few weeks I've been figuring out how it should work, it turned out that it was not as easy as I thought. And I was just about to give up when I managed to get it to respond the way I wanted it to.






Currently, it is still on the breadboard and the display is still on my laptop (using Selmaware's StapPlotPro). I plan to get it fixed on vero/strip board and use 4 pieces of 7 segment displays. Will start doing it today if possible.














The good thing about this engine rpm meter is that you do not require any connection except to the cigarette lighter socket for power.







This is the only thing that needs to be connected to your car.... Simple and easy..!!!











I will post more info when I'm done. Not sure whether I will post the schematics and source codes though....

Friday, February 13, 2009

Engine Oxygen Sensor reader







This is just for fun. Another weekend project for the weekend warriors.


For most modern engines, there is air fuel ratio control to ensure efficient operation. Mostly aimed at reducing those harmful gases of the exhaust that destroys the environment. Also, it helps protect the catalyst. Too rich mixture can melt the catalyst.



Items

1. PIC16F676 - (RM8)

2. 7805 power regulator - (RM1)

3. Capacitor (ceramic) -(RM0.3 x 4=RM1.20)

4. Capacitors (e caps) -(RM2)

5. Resistors -(RM0.05x3=RM0.15)

6. KK connector7 way (male and female) and 4 way– (RM5?)

7. IC socket for the PIC16f676 -(RM1)

8. 4MHz crystal - RM(2.50)

9. strip board/vero board -RM(6.50)

10. diode 1N4007 -(RM0.30)



Tools

1. Solder

2. Pic programmer

3. Any compiler for PIC (I use PICBASICPro)

4. Download free Selmaware StampPlotLite

5. USB to Serial (COMport) converter – you can get it from computer stores.


Depending on the engine make, the voltage signal from the oxygen sensor vary. On my TOYOTA it is about 0.1 to 0.8 volts. I think for PROTON also about the same. Actually, what I built was just voltage meter, and plotted the voltage read out on the laptop.





First build the thing. The source codes is here. The source codes is in PICBASICPro. The hex file is here.


The schematics is here.










To connect the 9pin com port to the board – ground to pin5 of the 9pin port, serial out to pin 2 of the 9pin port.


Get the free Selmaware StampPlotLite. http://www.selmaware.com/stampplot/






















Find the wires that leads to the oxygen sensor of the engine. Depending on the sensor type, comes with either 2 or 4 wires. Usually for the 4 wires, the black is ground,the red is 12v and one of the lighter coloured is the signal. First using multimeter. With engine ON, find the one that appears to have fluctuating signal.


Here is an example of the signal from the oxygen sensor. I save the data to excel. Note that there is a lot of noise in the data. I suspect that the noise comes from the poor serial communication ( there is a lot of invalid data coming in). I think that it is due to the inaccuracy of the crystal. Need to change that.


Tuesday, January 27, 2009

digital rpm tachometer untuk kancil

Satu atau dua hari punya projek. Untuk weekend warriors:

Barang2:

1. PIC16F877 - sesuai kerana banyak port, boleh guna untuk LCD display (RM25)
2. 16x2 alphanumeric LCD display (RM27)
3. vero board/stripboard (RM6.50)
4. KK connector 7 pin complete with crimps (male and female connectors)(RM5?)
5. IC socket, 40pin (RM1?)
6. capacitors (E caps) - (RM2)
7. capacitors, ceramic 4 bijik (RM0.3x4=RM1.20)
8. crystal 4MHz (RM2.50)
9. diode 1N4007 - RM0.30 x 2 = RM0.60
10. zener diode (rm0.5x2 =RM1)
11. resistors (0.25Watt) RM 0.05 x 4 =RM0.20)
12. film capacitor - RM0.50
13. potentiometer, variable (untuk LCD contrast control)- RM3.50
14. power regulator, 7805 (RM1.00)
15. some length of wires
16. double sided tape
17. dua batang skru
18. solder
19. bekas ais krim (free, yang ni aku curi wife aku punya bekas kapur tulis. Dia cikgu sekolah)









board dan LCD display setelah disambung







Untuk kancil lama aku, dia punya ignition signal diambil di sini. Perhatikan wayar ungu kecik dalam gambar di bawah tu. Connector kat coil tu ada dua pin. Aku ambik pin yang bawah. Cucuk dengan pin yang selalu orang guna untuk pakai tudung kepala tu, hopefully water prooflah. Wayar tu aku masukkan melalui firewall, dengan cara tebuk satu penutup plastik dekat situ. Kalau boleh tutup lubang tu baik2 sebab tak mau wasap dari kompartment enjin tu masuk ke dalam cabin.
















LCD dalam bekas aiskrim dipasang dekat sisi kiri tempat duduk pemandu. Guna double sided tape pun dah OK. Vero board tu aku letak dalam kotak dan sorok dalam glovebox.

Untuk lebih selamat, elok letak dalam kotak elok2 dan lekatkan di luar glove box. Power regulator tu agak suam2 jugak aku rasa. Biar ada ventilation, lebih baik. Kalau nak letak heat sink pun boleh. Tapi aku tak guna heat sink pun OK. Setakat ni letak dalam glove box saja pun aku dah pakai dekat sebulan. Paling jauh perjalanan setakat ni adalah dalam 200lebih km (dari Tronoh ke Nilai) dalam tiga jam.

lagi satu, LCD display tu elok letakkan jauh dari matahari. Nanti padam pulak dia.

















Ni ada video rpm tachometer setelah siap semuanya.




Source code boleh didapati di sini . Tapi dalam PICBASICPro. Kalau nak migrate ke bahasa lain pun tak susah. Bahasa PICBASICPro ni mudah, very high level mnemonic. Kalu nak Hex file dia ada di sini.


Schematics di sini dalam bitmap format.
















Next projek aku nak cuba fikirkan macam mana nak dapatkan odometer/tripmeter pulak. Untuk makluman, kereta buruk ni pakai cable untuk odometer dia. Jadi, tak ada electrical signal (digital atau analog). Ada dua pilihan: 1. hack dashboard meter tu, 2. Guna clever trick dengan rpm dan inertia measurement (guna dual axis accelerometer, tapi mahal sikitlah)