22. ledna 2004, 00.00 | Read about unique modification of Tatra 613 car and installation of a PowerMac G4 with LCD display into the car. The built-in Power Mac G4 supports GPS navigation, audio and video playback as well as processing of telematics data, internet access etc. The article contains very useful guides for authors of similar modifications. [Pouze anglicky]
[Note from editor: this is first and only English article on our server - it's translation of article published in June 2003 with some updates. Feel free to ask your questions in discussion on the end of article.]
Českou verzi článku můžete nalézt
zde.
Few words about Tatra
Although not as known as many other car manufacturers, Tatra is actually the second oldest automobile company in the world (with only Daimler being older). It was established in 19th century and throughout the years came with many innovations, that helped to change many things in the industry. Just one example, probably quite surprising: the famous VW Beetle was "inspired" by certain streamline Tatra cars (V570, T97) so much, that Volkswagen had to pay few millions of D-Marks to Tatra as a compensation for patent violations. During 1930 and 1940, Tatra created several amazing cars, like T77, T87, T97 and trucks like T111. After the communist revolution in 1948, Tatra specialized mostly in truck production and the passenger cars were only manufactured in very limited numbers to be used by ruling elite. T603 was produced between 1958 and 1975 and the T613 (designed by Vignale) was produced between 1974 and 1996.
I must admit, I have loved Tatra's since I was a little boy. My father used to work as chaffeur for one of local bosses and I spent a lot of time on the rear seat of a T603 when I was three or four years old. Later, as a student I owned one of T603s myself. For few years I move to more practical cars for few years (Honda Civic and Volvo 480 to be exact), but what my Dutch friends call a Tatra-virus was still deep inside me. So when I stared to work in Holland and needed a comfortable car for almost-monthly trips to Czech republic, Tatra was very high on my list of choices. After two or three months I found one in good condition and I did not hesitate a minute.
My car is one of later T613s, produced in summer 1993 for Frankfurt auto show (and not actually used much after that). It is a T613-4Mi Long version (M=power steering, i=multi-point injection, long = wheelbase 3150mm instead of standard 3000mm). A sedan, larger than Mercedes Benz S-Klasse, with 3.5 litre V8 air cooled engine (200HP, 300 NM), mounted above the rear axle. It was originally an "Elektronik" version, which means all the controls were fully digital with several computers (including one for voice output) and parts communicating with each other using CAN-bus. (Hi, Volvo guys, your S80 was by far not the first one, would you correct your advertising materials please?) This equipment was later removed (by factory) and replaced by more traditional standard wiring, but at the moment I have decided to buy it, I was already sure that a computer must come back. And so it did - I started to work on my installation in summer 2002 and by Christmas, I had a working installation.
Why?
The basic two reasons that led me to the installation of the computer were the replacement of CD changer by an MP3 player and a navigation solution, based on Route 66 application. I am pretty sure anyone who needs to make 1000 km trips every month or has ever been lost in Copenhagen can understand these two reasons :-) During the installation, I also added some more functions (communication with engine controller, on-board micrcontroller for basic telemetric data). Of course I could simply buy a head unit that supports MP3 playback and a dedicated navigation hardware. However I was not very excited about the prospect of spending several thousands euro for a dedicated hardware and then wait for the manufacturer to release the maps I needed (Czech republic in particular). Use of standard computer gives me much more freedom in the configuration of the system and potential upgrades - both software and hardware.
First time in the Tatra - still in the original case (although without all the plastic)
The first idea was to use an LCD iMac, and built it into the original dashboard. The base unit was supposed to be placed within the dashboard and the display with its holder outside. This idea had two basic flaws: iMac's 15" screen is really a bit too big for dashboard and its parameters are not good enough for use in full daylight (not to mention direct sunlight).
The software running in the car for the first time
OK, so no iMac. The second alternative was a separate LCD display, built into the original dashboard and connected to a computer (either a PowerMac or a PowerBook), that could be placed under front seats or behind the dashboard. At this time, I also came with idea of another screen, that would allow rear seat passengers to watch movies or play games. This eliminated the PowerBook (since it cannot easily handle two external screens). So I purchased an old PowerMac G4/450MHz and a industrial 6.5" LCD screen, that has contrast and temperature range, which are both necessary for in-car use. The native resolution of this LCD is 640x480 pixels, but its controller can interpolate various other resolutions. I have chosen 800x600 pixels, which is the minimal resolution, required by Route 66.
Detail of dashboard LCD mount
The PowerMac is currently equipped with two graphic cards and waiting for the additional 12 or 15" screen for the rear seat passengers. The secondary display will be usable without interference with the primary LCD in the dashboards.
PowerMac (motherboard to be exact) being built into its case
At first, I used two separate IDE hard disks in the installation. The first one (6GB) was used for system and basic applications, the other one (60GB) for other applications (just Route66 alone needs some 4GB), movies, MP3 files etc. I also planned the installation of DVD drive into the middle console, but later, I have decided not to use it. The quality of DivX/MPEG movies seems to be sufficient and the prospect of DVDs lying all around the car did not really appeal to me.
Dashboard installation
Very soon I realized, that the original dashboard of my Tatra was not really good enough for fixed mount of the 6.5" LCD and a retractable screen would also bring quite a few problems. I have therefore decided to re-build the whole dashboard from scratch. This also allowed me to replace original gauges, which were not really hi-tech (almost unreadable at night for example). During the design phase, I was inspired mainly with the dashboard of newer Tatra - 700-I and in some aspects also dashboards of older Saab's.
The motherboard on its final place
The placement of the computer also had to be re-considered. Space below the front seats was not big enough for a PowerMac, so I had to abandon this idea and start thinking about how to install the computer into the trunk. Of course I wanted to take least possible trunk space for the computer. First option was to install the computer in front corner of the trunk, into a special case above one of the batteries (my Tatra uses two 6V/140Ah batteries connected into series). Such case would however not be very easy to manufacture and also cabling would have to be much more complicated. In the end, I decided to install the computer into a rectangular case, attached to rear wall of the trunk.
Cabling and case mount
The case construction was not without problems either. Two most important issues were the heat and condensing water, that could both affect the function of the computer. The main heat source in older PowerMac models are certainly hard disks. Parts that are most vulnerable to condensing humidity are the motherboard and the PCI cards. Based on this knowledge, I have decided to separate these two parts of the system. The motherboard is installed in a separate fiberglass case and the hard disks are on a console next to this case. First I wanted to completely seal the motherboard case, but later I found this was not really a good idea, particularly due to the changes in temperature and the air volume inside the case. To fix this, I have installed two Gore-Tex valves on the case. These valves are used in automotive industry to allow air circulation in the headlight units while keeping the water on the outside. I did not take any special measures for CPU cooling, although it is mounted in a closed space with minimal air circulation. The G4/450MHz processor is known for its low cooling requirements and I decided to wait and see before fixing something, that might not even need any fixing.
Final appearance of the motherboard case
This concept has later proved to be right. Even in 35° C days during last summer and the computer running for 15 hours, I never had problems with CPU temperature and the hard disks also did not suffer any damage (even on the roads in Czech republic and Slovakia, that are not always up to civilized standards).
Final result - a complete PowerMac G4 in the T613
Power
To power the computer, I use a commercial ATX power supply, that works with input voltage between 9 and 16V. The maximum rated power is only 100W, which is much less than the 250W of the original 220V power supply. However, the original power supply was designed for a workstation, full of disks and PCI cards, which is certainly not my case. The only problem I have experienced so far is the 5V output of the power supply, that is not capable of providing enough current for all of my USB devices. This problem is very easy to address by using an USB hub powered by special 5V power source. Very wide range of the input voltages ensures the power source is able to power the computer even when cranking up the engine (in that situation the input voltage drops to about 10V).
PowerMac G4 running from battery for the first time
The power source is controlled by Power-On signal from the motherboard and its idle current is about 100mA. Accidental draining of the battery is therefore no issue, since this current is comparable to idle current of other devices in the car (alarm, engine controller).
Although the final solution is simple and reliable, the power supply was probably the biggest problem I encountered during the whole installation. The very first idea was to use an UPS without internal battery, connected to the car's installation. This idea has cost me two UPS units, whose transistors have burned ;-) Even 300W UPS was not able to handle the current surge that occurs when the computer starts up. The second idea was an inverter and the original 220V power supply. This almost worked. "Almost" because there was a 50Hz noise on the audio output of the computer, that I could not manage to eliminate. Fortunately the third idea - the 12V ATX power supply did work perfectly.
Original 220V and new 12V ATX power supply
With earlier versions of Mac OS X, I used to put the computer to sleep at the end of the day, instead of turning it off to reduce the start-up time. Unfortunately, system 10.2.4 has brought an end to that. As of this system version, older G4s cannot be put to sleep and therefore I have no choice but to turn the computer off and accept longer start-up time (about 1 minute 20 seconds from pushing the PowerMate to GUI on the screen).
Peripherals & controls
There are several basic concepts of how the computer can be controlled - most of them can be implemented using standard USB peripherals. Many people use touch screens in similar installations. Although I also considered this option in the beginning, I have rejected it pretty early, because having to watch the screen does in my opinion lead to loss of concentration whilst driving. Instead I have decided to use controls, whose position is fixed and which can be used without watching the screen.
Temperature sensors (below), RS485-RS232 (left) and RS232-USB (right) converters
The key control element is Griffin Technology's PowerMate rotating controller, which is not only used for controlling the software, but also for starting up the computer. Auxiliary functions can be controlled by several buttons in the dashboard. When not driving, all functions of the computer can be controlled using an infrared keyboard with built-in trackpoint, that emulates a mouse. Rear-seat passengers can control the movie player and some other functions with another infrared device - Keyspan's Digital Media Remote controller.
Two USB connectors are located on the middle console and allow ad-hoc connection of other USB devices if required (typically keyboard and a mouse).
Tests of the temperature reading software module (and fridge cooling element)
Except for above named control devices, the installation consist of Bluetooth module, five digital thermometers, GPS receiver and a on-board microcontroller, connected to car's engine and a distance counter on the gearbox. This controller has been built for me by my friend Tomáš Struziak and the schematics can be found here: http://aek4470.finalnet.cz/html/palpoc.htm
Middle part of the dashboard with PowerMate and LCD - temporary buttons below LCD
Garmin's GPS II+ receiver is an old veteran, that does not have many amazing features of its younger successors, but does have a very good receiving part and a serial port output, which is all I need. Basically any NMEA-compatible GPS receiver could be used in ist place. Currently the car software only works with NMEA protocol (which is ASCII based), although it could be modified for faster Garmin protocol. I have selected the simple NMEA protocol, because the higher speed of Garmin protocol was not worth the more complicated implementation for me. The main receiver of the GPS data is of course the Route66 application.
The sound output of the PowerMac is connected to Sony head unit, that is in turn connected to two amplifiers and total of 8 speakers and a subwoofer. There is also another sound output via an USB adapter, that provides rear seat passengers with headphone jacks, allowing them to choose different sound than played through main speakers.
An overall look into the interior
Tatra has it's own Ethernet network, with small 8 port switch under the rear seats and total of 4 outlets in the armrest and the middle console. If a passenger has a laptop computer, he/she can connect to the network to access data on car's hard disk or share the PowerMac's internet connection. The PowerMac is also equipped with an AirPort card, that can be used for connection to Wi-Fi networks wherever available. This possibility is mainly used for smaller updates and software/data download from my home network or for internet connection at places with public hot-spots (such as selected Shell fuel stations).
Software upload via ethernet plug in the rear armrest
On places without Wi-Fi coverage, the computer uses a GPRS telephone over Bluetooth interface for internet connection. Of course the speed is significantly lower, but still sufficient for traffic situation and weather data update or e-mail check. Last summer this feature saved me and my company quite a lot of trouble (and money) when I was able to solve a potentially very serious problem from a parking place on a highway in the middle of Germany.
Software
Computer uses both standard and custom applications. Basically I tried to use standard applications whenever possible. The custom applications mostly only provide simplified user interface to standard applications and some car-specific functions (like display of the vehicle data - speed, consumption etc.).
The main application itself, called simply Tatra.app does not actually do anything related to the car functions. Instead it is a host application, that provides services for plug-ins/bundles. Each of these bundles can then implement one or several functions. The main applications loads the bundles, runs their code and handles the i/o operations for them.
All the custom software is written in Cocoa. The main application was designed and written by Ondra Čada, I have used this opportunity to learn Objective C from him and later written most of the plug-ins.
The main application runs in full screen mode and hides the standard menu bar, as well as the dock.
The screen is divided into several parts. On the top of the screen, there is a space for what we call a "compass module". The middle and biggest part contains 8 slots, each of which can be used by modules to display information and user interface elements. The bottom bar provides space, in which modules can display icons.
When the applications starts, it loads all installed modules. All loaded modules become active at once. There are several basic types of modules:
1. GUI-less modules. These are mostly used to receive information from external devices (GPS receiver, on-board microcontroller). This information is then processed and broadcasted to other modules (thru Cocoa notification system, for which the application provides several services). Although these modules have no GUI and cannot be displayed in the slots, they can still display pop-up alert windows and icons.
2. "Normal" modules. They are always active, have GUI, that can be displayed in one of slots. Typically these modules are subscribed to notifications sent by "source" modules, process and display the broadcasted data. Typical examples of these modules are current speed, current consumption or fuel status module.
3. "multi-instance" modules are very similar to "normal" modules, except for the fact, that more copies of each can exist. A typical examples of such modules are stop watches, distance counters, average speed modules etc. For example if two distance counters exist, one can be used to count total trip distance, the other one can be used to count distance between fill-up stops.
One of the night software development sessions
User can select which modules will be installed in eight slots of the main window. Even a module, that is not currently displayed or has no user interface in any slot can display urgent messages or status information, using either icons or pop-up windows. The main application also provides the modules with ability to speak messages (thru Apple's text to speech technology). Spoken feedback allows user to work with the computer even without looking at the screen.
Some modules can be "activated" - this means made responsive to the user's commands. Following picture shows an MP3 player module. In the normal state, the module displays information about track currently being played. In the "active" state, the module displays a dialog box, which allows user to pause the playback and select the track and playlist to be played. All these functions are controllable by the PowerMate rotating controller.
A module can optionally have a special "setup" part, which is available thru main application in its "setup" mode. Unlike the main window and activated modules, it cannot be controlled by PowerMate, but requuires standard keyboard and mouse input. Since this mode is not supposed to be used whilst driving, the need of mouse and keyboard is not considered a problem. Next picture shows the setup mode for a temperature module.
The application uses OS X's defaults system to store information about current configuration (ie. which module is placed in each slot, what track is currently being played etc.). This allows the applicaton to "remember" the setup and restore the recent state after it has started up.
List of the modules I currently use:
- current speed
- current consumption
- fuel status (consumed from last fill-up, remaining, range)
- fuel counter (resettable, multi-instance)
- distance counter (total)
- distance counter (resettable, multi-instance)
- stop watch (resettable, multi-instance)
- countdown (multi-instance)
- vehicle data input (GUI-less, reads data from on-board systems)
- temperature module (internal CPU temperature and sensors in car)
- MP3 player (controls iTunes using AppleScript)
- System (switching between apps, turning power off, night display mode)
Block scheme - click for large view
Navigation
Navigation is handled by Route 66 (currently Route 66 Europe 2004 Professional to be exact). Although this application was certainly written to be planning rather than navigation software, it does the job well. The database of Europe is really good, there is support for NMEA GPS devices and last, but not least can receive information about current traffic situation over internet TMC servers (available for UK, Benelux, Germany and Italy). On the other hand, Route 66 is not easy to control with simplified controllers (does not use hotkeys, that are easy to emulate), the displayed map is also less clear to read than map in specialized navigation hardware and the worst problem is that Route 66 only displays the map "north up", while most navigation systems work with "track up" display, which is more logical and gives the driver much better overview of current situation ahead. With "north up" map display, driver must constantly pay attention to the direction, indicated by little arrow and make necessary mental calculations (when driving south, right turns are left on the screen and vice versa).
Movie player
To allow video playback on the rear monitor, I have decided to develop another application just for this purpose, since for several reasons, implementing a movie player as a module in the main application would cause some problems. For example I would not be easily able to re-route the audio output to a separate speakers or headphones.
Like the main application, my movie player is also written in Cocoa, also runs in full screen mode and uses simple user interface, controllable either by PowerMate controller or infrared remote controller. It can display the main window on any connected screen, so it can be used on the primary screen in the dashboard as well as on the secondary rear screen.
Since it uses the standard NSMovieView user interface element, the application can play movies in all formats, supported by QuickTime. It only provides basic playback functions. Choose a movie, play it, pause it.
Future plans
At this time (winter 2003/2004) I am working on integration of GPS/GSM hardware module, that also has several I/O lines and an one-wire bus. This device can extend functionality of car alarm, allow me to control the independent gas heating remotely with an SMS message, report the position of the car in case of problems etc. By the way - anyone knows how to replace standard loginwindow application in OS X with my own one?
[You can add your questions or comments below.
Add new comment = Přidat nový
Show all comments = Zobrazit vše
Reply (when comments are shown) = Odpovědet
]