Saturday, November 08, 2008

Media Center / carputer in a IKEA EMU

I found this really cheap main board from Intel: D201GLY2 about half a year ago. My first thoughts were that I could use it as a cheap media center, as a carputer or as a replacement for more complex projects where microcontrollers are involved.

I got 1GB RAM, a hard disk, a PSU, a wireless keyboard+mouse, a USB wifi card and some fans. I bought the cabinet from IKEA: A IKEA EMU box that I cut holes in with a dremel and drilled holes for the mounting screws. The rest was fixed with a hot glue gun. Now I only need a protection grid for the cabinet fan in order to avoid cutting my fingers when moving the box :-(

The reason for choosing the IKEA EMU box was that it was way cheaper than any regular cabinet and the dimensions fitted nicely inside our TV cabinet as well as in an enclosure inside the back of my car.

I have recently tested the computer as a media center, and had no problems running movies with great resolution (up to 1080p with slight skipping). This came as a surprise as the graphical capabilities are not very good. I have skipped using media centers like XBMC, MediaPortal and Elisa as they seem to be way to heavy for the computer to handle.

My future thoughts for the computer is to further test the computer as a carputer for things like playing music and running real time OBDII.



Posted by Picasa

Home made electronic ignition and fuel injection for my 1961 Fiat 600 - part 1

















Ever since I got my 1961 Fiat 600 about three years ago I have been thinking a lot about what I want to do with it. Since I have been quite interested in diy stuff and playing around with microcontrollers for a while I thought that electronic ignition for my car would be a challenging project. I have by the way had quite a few problems with making it run well in all sorts of weather with the old points/distributor+carburetor.

After reading a lot and discussing with colleagues who are heavily involved in racing, motors and all kinds of vehicles I decided not only to make my own ignition system, but also a fuel injection system. This is due to the two systems sharing many of the same sensors and modifications would be made on only a few parts.

Last year I bought a waste spark ignition coil, MAP sensor, EGO/lambda sensor, a trigger wheel and a trigger/hall effect sensor. My colleague Ole Mobeck also started making a new intake manifold to integrate the MAP sensor, a central injector and an air temperature sensor.


I removed the cap to the centrifugal oil filter. The filter is connected to the crank shaft and is the ideal place to mount a trigger wheel. I machined the trigger wheel to fit the lid, so now I only need to mount it to the car and make a fixture for the trigger sensor.

The high power part of the electronic system has been a challenge both since I only have a limited electrical knowledge. It has also been a challenge since I know this is dangerous stuff. The voltage through the secondary coil generates approximately 40kV output and could be lethal.

After trying to make an ignition with different transistors bought from online electronic stores and building a ignition system found on the web my releasing moment happened yesterday: Ole Mobeck cut off his Subaru Legacy ignition module and waste spark coil and gave it to me as a "christmas present".

Today I figured out, while Synna was taking her nap, how to connect the ignition coil from a Subaru Legacy wokshop manual. I tested the ignition module in several steps:


















1. Check to see if gate was normally open or normally closed. If the gate was normally closed the ignition module would send 12V through the transistor when connected. I connected 12V via a blinker relay to OC1, G to GND and made a voltage divider input with a potensiometer with the central lead connected to IB1. I set the voltage to zero before turning it. The blinker relay started when the voltage was over 12V. This means that I need another transistor to turn on the ignition modul with an input from a 5V microprocessor.



2) After finding that I needed 12V for the igniter I wanted to check if I got a spark. I now omitted the voltage divider. I now connected the coil where the blinker relay was, and connected the blinker relay as a safety to the input of the igniter as shown. I connected a spark tester before one of the spark plugs.


















An very tense moment was exchanged for relief and excitement when I saw that I had spark. The test lamp was lighting up and the spark was nice and blue.


The next steps are to connect the ignition to a 555 or a microcontroller and find an okay spark time. In parallel I want to test the trigger wheel and get a nice signal as well as try to finish the fuel manifold.
Posted by Picasa

Thursday, September 25, 2008

Real time accelerometer reading via xbee pro

I am working on a project transferring two axis accelerometer data as fast as possible to a pc via xbee pro. Here is what I have discovered:

  • At high speed the xbee picks up noise from the surrounding 50Hz, 220V.
  • I am able to use 5V for VCC, VREF as well as ADC input.
  • The highest transfer rates can be achieved by setting samples before TX (ATIT) to the maximum of 22 (0x16) and sample rate (ATIR) to 1 (ms). You should in theory be able to send data at 1kHz
  • The interface data is critical to be fast in able to read data fast. Xbee transfers data at 250kbps via RF, but the baud rate can only be set up to 115200 at standard data rates.
  • For non-standard data rates you could only set them via a terminal by using the command ATBD and then the speed. I nearly lost contact with one xbee when setting the data rate to 230400. The data sheet says that xbee should handle data rates up to this speed, but I could not talk to the xbee after setting this. I luckily discovered by trial and error that I could interface the device at 240000 baud, and that the true setting was really 250000 bauds (0x3D090).
  • With everything set to maximum I am able to transfer data at approximately 760kHz.

The xbee pack contains the following:
byte 1: 0x7E, the start byte
byte 2-3: packet size
byte 4: API identifier value
byte 5-6: Sender's address
byte 7: RSSI, Received Signal Strength indicator
byte 8: Broadcast options
byte 9: Number of samples to follow
byte 10-11: Active channels indicator
byte 12-N-1: 10-bit ADC values, sent like this: ADC1-MSB, ADC1-LSB, ADC2-MSB, ADC2-LSB and so on
byte N: Checksum of the values sent: see xbee data sheet

N=12+2*ADCs*ATIT, example: 2 channel accelerometer, ATIT=22 => N=12+2*2*22=100

Monday, September 22, 2008

First impressions of ELM327 (ver 1.2A)

I bought a box for on board diagnostics (OBD) for my car with the striking name of "ELM327 (ver 1.2a)" as mentioned earlier in my blog. Unfortunately I haven't been able to test it until today.

Here are my impressions:
  • The box contains two key components necessary to do on board diagnostics: The very versatile ELM327 chip and the FTDI USB to serial cable. I am unsure if they are original.
  • Most of the software solutions I tested had trouble communicating with my car. I have a Skoda Octavia 2003, and it is not recognized as a car with standard OBD/OBD2/CAN. I will have to test it with a different car to see if it is the car or the ELM box that is causing the problems.
  • The software that can communicate and read sensor data are only able to read them quite slowly. I am unable to speed up the connection by changing the update rate or the baud rate. I am not sure if I could change to a higher speed than 9,6kbauds. Perhaps it could be possible to set them by using AT commands?
  • Many of the interesting sensors like the lambda sensor are missing. I am unsure if there is a problem interpreting the car's ECU or if the ECU is not exposing the data to OBD. I have to read a bit about this.
To sum it up - I am pleased that I can read sensor data but sorry that they are too slow to be useful at the moment

Screen shots:

Charts made for my car

Gauges shown

Posted by Picasa

Thursday, September 11, 2008

How to upgrade XBee via FTDI's TTL-232R USB cable

It is quite convenient to use FTDI's USB cable to communicate with the XBee. Recently I found that I was unable to upgrade the firmware of the XBee via the cable. And without the upgrade I was unable to use the IO features of the XBee. Calling "ATD02" would cause an error. After some frustration I found that the problem stemmed from the missing DTR line of the FTDI cable. The solution to the problem was quite simple: Just pull the DTR of the XBee low by connecting it to GND.

Wednesday, September 10, 2008

Short course in mnemonics


Yesterday I attended a quick intro course in mnemonics which was held for free at NTNU for three hours. The presenter was Oddbjørn By, norwegian memory master and international Grand Master. He has also published books under the title "Memo" which contain his teaching in the subject.

The course lasted for about three hours containing small tricks from how to remember the ten largest countries in the world to how to prepare for speaches and exams. He finished the lecture by memorizing a full deck of cards within 1,5 minutes.

I found the lecture very interesting since I recently read the book "Mind Performance Hacks" (MPH), which contains many mnemonic tricks. What was striking was that most of the techniques preferred in the book was also the ones preferred by Oddbjørn By:

The techinque that By seems to prefer in most cases is the ancient "Journey" system described by Ron Hale-Evans. While the journeys are described as "little journeys" by Hale-Evans, By uses big journeys containing more than ten places to store most of the things he would like to remember. Hale-Evans describe a expanded journey system by Scott Hagwood where objects could be stored in "nooks and crannies" for up to ten spaces in each room, making space for ten times the storage capacity (100 containers).

The second techinque By seems to use a lot is similar to the Dominic system in MPH.

A quick explanation of the Dominic system invented by World Memory Champion Dominic O'Brien: The Dominic system uses the letters OABCDESGHN for each number from zero to nine. By combining two letters you could store numbers from zero to ninetynine. The associations are made by a combination of a person and an action, for instance 26=BS=Britney Spears singing "Hit me baby one more time". You could remember four numbers by mixing one person with another persons action, for instance 6326=SC BS=Santa Claus singing "Hit me baby one more time". If you make the list of hundred persons and actions and remember them, you are able to store numbers up to 9999. You could make a story out of characters and actions to store larger numbers or you could make a big hotel with 100 floors to be able to remember more than 10 000 things. A very powerful system.

By's system for storing large numbers is similar to the Dominic, but the letters for the numbers are OITERSCLAg. The letters have a shape similarity to the numbers and easier to remember because they form something similar to a german word. By uses the system a bit different by making the letters the start of a word, for instance 34=TE=TEst,3435=TETRis etc.

The third method, which By seem to use to some extent is the number shape system, but he seems to use it only to support other systems.

To sum the evening up: By's intro course was very inspiring, showing that everybody is able to remember vast amounts of information. The techinques By finds most efficient are also the ones described as most efficient by other sources. You could remember things faster and more smoothly than just practising and repeating, freeing your brain for other tasks. My inspiration led me to start learning the countries of the world and their capitals. Yesterday was North America, today might be Europe. You never know when that might come handy...

Monday, August 25, 2008

How to make the best out of GTD and mnemonics

I have been a great fan of David Allen's Getting Things Done (GTD) ever since my friend Arnstein introduced it to me over a year ago. I feel that GTD has revolutionized the way I work, making me more efficient and goal oriented and feeling more at ease knowing that all my agreements with others (and myself) are met. That being said I still fill that there is a lot to be improved in ways of implementing Allen's system to my personality - I am making progress every day.





Recently I have been reading "Mind Performance Hacks" by Ron Hale-Evans. It introduces you to plenty of small tricks/hacks on how to improve performance. There are more examples of usable than unusable hacks for me in the book and I think I will try to implement many of them in the near future. I highly recommend reading the book if you find this topic interesting.

Most of the hacks collected in the section "Memory" in "Mind Performance Hacks" are mnemonics (tricks on how to remember things). I find "the Number-Shape system", "Lots of Little Journeys" and "the Dominc System" to be the most interesting and usable ones.



David Allen's GTD is based on the fact that you are unable to store too many things in what he calls "psycic RAM", and thus you should store them in action reminder lists to avoid remember things by yourself. I completely agree that It is totally impossible to remember all things that you should do/want to do in the near and far future, but the problem appears when you actually want to start doing things ("cranking widgets") and your lists are not where you are.

How are you supposed to bring your actions with you in the right context? My solution to this has been and will be to store my action lists on the internet. This solves some of my problems as I have access to the internet at home and work as well as other places. When I want to do several tasks in the same context, for instance doing errands, I write out a list of the things at the context and bring it with me. Others are suggesting making "hipsters", low tech cards with the actions in priority. Both of these techinques works, but it takes time and effort to do.

The other thing I am missing is a system for remembering actions that you are doing on a regular basis. On mondays I do my weekly/montly review and check a random article on wikipedia (another hack). I mainly use outlook to remember this, but I have no ability due to IT security reasons to sync these and other actions to my home. I leap over this problem by only remembering scheduled activities at work.

This is were the mnemonics comes to play. By using mnemonics (for instance the "number shape system") you should be able to remember the context specific activities and the regular activities quite simple. It only takes the effort to find a system that works for you and start using it on a regular basis.