What if my car could notice my arrival, unlock the doors and allow the start of the engine as I approach it. No keys. Just by being there, just like if it knew me, something like KITT that made me wonder so many times when I was a kid….
Where do I start? To replace the usual keys, the RFID technology seemed a good choice by being a contactless identification system, no need to bother with batteries in the key and it could be very small and cheap allowing me to use it in an armlet. The RFID technology seemed a very interesting and clever system by having the communication and power transmission on the same antenna/coupler. So what better way to learn about something than making a project around it?
I also had to have a way to start the engine, because if I don’t need the usual key to unlock the doors I should not need one to start the engine. It would have to be a push button and what about a push button on the gear lever like the Mercedes SLR?
From a previous project I had already installed in the car, a CAN BUS network of two micro controllers, one that reads the velocity and RPM of the engine and another that receives the RPM data and controls the RPM tachometer. So I thought to add the push button to this RPM tachometer controller. It would also have a kill switch like the ones on the fighter jets and a relay to start the engine when I pressed the button on the gear leaver.
It seemed like a good idea to divide the project in two parts, one as a proof of concept based in a pre-done RFID receiver (the ID-20) and another that put my skills to a test by designing the antenna and the main circuit by using a TRF7960 chip.
The overall system is based on three modules, the one that reads the RFID tag and lock/unlock the doors (blue in fig.1), the one that controls the start button (in red) and the one that reads the RPM and velocity of the car (in yellow).
This 1988 2.0D 190 Mercedes has a kind of electronic fear, as it doesn’t come with much electronics. It has just a metal heart that doesn’t stop and all the control seems to be always related to some mechanical parts turning and engaging on each other. Very few parts are electronic related so I believe that this poor car has been waiting for me to bring it into the era of electronics, allowing me to start messing it with my circuits. The best part is that it will always start the engine regardless my code errors or sparkling short circuits. Thanks good old 190.
As I previously mentioned, the first part of the project was based on the ID-20 125 kHz reader with a built-in antenna. It is a good way to start feeling the potential of the RFID but somehow it seems that all the fun is inside that black block.
So I decided to start using the 13.56 MHz TRF7960 chip from TI and went from a 4×4 cm black square to a 5×5 mm tiny one with the need of designing the entire circuit around it as well as the reader antenna. The challenge began… and the fun too.
The circuit dimensions and components were based on the chip’s evolution board designed by TI. A big “thank you” to them for giving so many information and app notes on the chip. All the info and help can be found in TI’s website and forum.
Soldering this QFN at home with no microscope was a bit hard and some TRF7960 gave their life as I was developing my hot air soldering techniques. Here are the version 1.0 (fig. 2 and 3) and version 2.0 (fig. 4) of the PCB.
Fig. 3 – Version 1.0
It was designed to be used in a breadboard. The difference between the two versions is the trace length of the output signal to the antenna. Greater amplitude on the output signal to the antenna is gained by having a shorter path.
The C code for the interface between the PIC18F4585 and the TRF7960 was not so hard to accomplish but the fine-tuning of the antenna got most of the time. The 50 Ω matching circuit is hard to get right and for the first versions of the circuits, the amplitude of the output signal wasn’t enough to power and communicate with the TAG. Without a network analyser the solution that I came across was to make small changes in the values of the components in the 50 Ω matching circuit and observe the amplitude change on the output wave at the antenna. Finally I got 14.2 Vpp that results in a 6 cm reading range with an antenna separated from the main circuit with a SMA cable. The antenna has 7×3 cm and was based on the HF Antenna Cookbook from TI.
The final module is the combination of two circuits, one with the TRF7960 circuit and the lock/unlock doors circuit and another circuit with the microcontroller, the CAN and the sockets for the communications with the CANBUS. This last one was called the BENZBOARD. The idea behind it was based on a breadboard as every modification on a circuit required a new microcontroller. With this one I can leave the microcontroller and CAN, and rework the rest. So every microcontroller in the car has this BENZBOARD.
And this is the final version of the TRF7960 board (fig. 7 and 8).
The push button and the central locking system
When powered on, the first thing that the module with the push-button will do is ask the CAN BUS if the TAG was identified, otherwise the push button will not start the engine. It is the main security feature of the system as it would be very vulnerable if the push button directly started the engine.
The rest is straightforward, as the microcontroller will close a relay when the button is pressed and the engine will start. Not as straightforward was the stoppage of the engine, since this is done via a vacuum pump connected to the diesel injector pump. This is accomplished by the microcontroller that closes an electro valve.
Mentioning the vacuum pump, the central locking system of the 190D Mercedes is powered via a bus of vacuum. To lock the doors the vacuum pump will be actuated and pulling all the locks on each door. It seems a bit odd and if any part of the system has an obstruction, the timing of closing doors will not be the same on every one. That is the odd sound eared in the video when the doors are locked and unlocked.
Velocity and RPM readout
The first electronic module installed in the car was a RPM and velocity sensor reader. The RPM sensor came from a 2.5D 190D Mercedes that is a simple Hall effect sensor at the engine flywheel teeth.
The velocity acquisition came from a home-made rotation counter, with a acrylic circle, a LED and a LDR on the velocity transmission from the gear box.
Conclusions and future work
Overall the project was a success. I have learned a lot and had a great fun tearing the car part, designing, soldering and programing.
The system is working and apart from some bugs that I have found, it is a practical to use on a daily bases.
The main drawback is that I still have to get the TAG on the side mirror to unlock the doors. The initial idea was to get near the car and it would unlock the doors. The next step will be to try to implement some bigger and powerful antennas on each side of the car. This should improve the range of identification, from 6 cm at the side mirror to at lest 1 or 2 m.
With this system I get the advantage of having a waterproof key (the TAG) in my wetsuit each time I go surfing, because with the old metal key, losing the way to get into the car was always a very vivid picture.