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)

Friday, November 21, 2008

How to make use of old PC power supply






I have 3 of those old power supply. At least 2 of them still works.Here is how to make use of the thing for power supply for other purposes.

This power supply has 5volts, 3volts, 11 (or 12?) volts and -11volts power. This is nice for electronics projects. For example, some IC's like the DAC requires negative voltage. It is available here without having to buy negative voltage generator.

Best of all, electronics dedicated power supplies costs at least RM100 or usually more. But in this case it is much cheaper. RM50?

The trouble is when you simply hookup this power supply to the 230volt supply,it will not work. Here is the trick that would make it work.

The black wire is ground. Using a multimeter, check each connectors and you'll find at least one wire with 3V and one with 5 V.

Most of the wires are red, black or orange. The other colours are one each.

Using 1kohm resistor, connect the 3V line to the other wires (not the red or black)one by one while monitoring the voltage across the black and redwire. Best to try connect the unique colour wires first to the 3 volt line. When you register 5 volts(or 12volts) across the black and red wires,the power supply unit is ready to go.

In my case, the 3 volt wire is green, and need to be connected to white wire for the power supply to work. Now I am off to do some projects..

Tuesday, November 11, 2008

Racial Relation

Baru-baru ini Negara digegarkan dengan tuntutan untuk kesamarataan antara kaum. Ini diikuti oleh tuntutan balas untuk ketuanan Melayu dan memperthankan perlembagaan Negara. Buat kesekian kalinya artikel 153 perlembagaan itu disentuh banyak pihak. Mujurlah ada Raja-Raja Melayu yang bersuara menegur rakyat agar tidak berlebihan dalam membincangkan isu yang tentunya amat sensitive ini. Peranan Raja yang beginilah yang akan mengangkat martabat institusi raja di Negara ini. Selepas teguran Baginda, nampaknya tiada siapa yang berani menyentuh isu ini lagi.

Namun aku rasa perkara ini perlu terus dibincangkan tetapi secara tertib dan objektif. Aku boleh faham dengan ketidakpuasan hati masyarakat bukan melayu terhadap ‘preferential treatment’ terhadap kaum melayu. Kalau kita lihat generasi baru bukan Melayu mereka bukan sahaja merupakan anak kelahiran Negara ini, tetapi yang entah telah beberapa generasi lahir di sini . Yang mereka tahu inilah satu-satunya tanah tumpah darah mereka. Dan disinilah juga kasih merreka akan tertumpah. Walaupun mungkin ada segilintir yang terlampau kecewa dan mahu berhijrah, tapiaku rasa lebih ramai yang akan setia dengan Negara ini. Sebahagian besarnya tidak pernah pun menjejakkan kaki ke tanah asal nenek moyang mereka itu.

Apabila mereka rasa mereka telah dilayan sebagai rakyat kelas kedua, tentunya ini akan menimbulkan rasa tidak puashati. Namun apakah benar wujud layanan kelas kedua ini? Ini perlu kepada penilaian yang objektif. Apakah falsafah yang mendasari ‘preferential treatment”ini? Kenapakah dasar ini menyebabkan rasa layanan kelas kedua ini wujud? Apakah dasar ini yang perlu dipersalahkan atau perlaksanaannya?

Aku seorang Melayu. Walaupun mungkin ada yang pernah menyangka aku mamak restoran MegahMaju di Nilai ini. Namun aku Melayu.. Sebagai Melayu aku juga ingin supaya bangsa aku mampu bersaing dengan yang lain.Aku juga tidak mahu melihat bangsa aku selamanya bergantung kepada preferential treatment ini. Aku malu kalau jadi melayu yang tidak kompetitif dalam segala bidang. Aku mahu satu hari bangsa Malaysia ini bersaing atas dasar merit. Siapa kuat bekerja dia dapat. Inilah utopia nya. Siapa kuat bekerja dia dapat. Tapi benarkah begitu? Apakah realitinya? Itu nanti kita bincangkan lain kali….. This is me thinking aloud. Kalau ada sesiapa yang membaca dan ingin turut “thinking aloud’ dipersilakan……