/Open-Source-RKS

Make your own Remote keyless system

Primary LanguageC

Open-Source-RKS

What is a RKS system

RKS as the Remote keyless system. It's a proximity system that is triggered if a key is within a certain distance.
Widely used in modern vehicles. It's very convenient to Entry your car when you have RKS system.
You do not need take out of your key, just walk to your car with the key in your pocket, then you can open the door.



But do you want open the door of your home without take out your keys? Or equipment RKS to your old car?
I've found a solution that every electronic fans can make a RKS system at home in a very cheap price.
An iPhone without any app can be used as a wireless tag
Arduino based Controller can make you to use this system in any application if you like.

You can submit a issue or mail to me if you have any question.

New update: Use your iPhone as a Tag.

iPhone:

When IOS is enabling with continuity service, it will always sending BLE advertising to let other IOS device to know. But the Bluetooth MAC Address is random and changed every 15 minutes.
With my another project, you can decode the random address and determined if this random address belongs to your phone.
https://github.com/fryefryefrye/Decoding-Random-Bluetooth-Address/

Android:

Use "nRF Connect" APP, you can send BLE advertising with custom data.A name can be set in the advertising.

Hardware used:

iPhone; ESP32 Board; Arduino Board; nRF24L01 module

Get IRK of your iPhone

If the IRK of an IOS device is known, the random Bluetooth address can be determined if it belongs to this device.

Use an ESP32 board and download with “iPhone/get_irk” project. It will start a BLE service.

Pay attention on following settings.

Use your iPhone install with “LightBlue” APP, find the “ESP_BLE_SECURITY” service, and connect it, the IRK will be print out.


Receiver / Monitor BLE advertising with nRF24L01

With the help of the following project, we can Monitor BLE advertising with very cheap nRF24L01 module
https://github.com/Pranavgulati/RF24BLE
https://github.com/nRF24/RF24
Install above two library into Arduino.
Fill the IRK into the “iPhone/ReceiverController” project..
Download “iPhone/ReceiverController” project into a Arduino nano board, you can Monitor BLE advertising and determine if the MAC address in the air is belong to your iPhone.

These is only one key function you need to call to check MAC address. Everything needed for this function is in key.h file.You can use it in your other project.
BOOLEAN btm_ble_addr_resolvable(BD_ADDR rpa, esp_bt_octet16_t irk)

You can build the Arduino based BLE Monitor Just connect nRF24L01 module with Arduino follow the table.



When you are OK to this stage, if you are walking to your reciver with your iPhone, the arduino will know you are coming.
And you can write your applaction code. Like close a relay to open a door.

Old version: Released on 2016. Use Independent Wireless Tag.

A very simple wireless Key.

nRF24LE1 module and CR2032 battery are the only thing to make a key for RKS system.
nRF24LE1 is Ultra-low Power Wireless System On-Chip Solution.
An 8051 compatible MCU is attached in it. So one chip is enough.

Arduino based Controller

An Arduino equipment with a nRF24L01 module, can receive the data from the key nearby.
Arduino based Controller is very easy to program, and you can make any application if you wish base on this RKS system.
In This example, a relay will be used as the output.
When key goes close in about 2 meters, the relay closed.
When key goes far away, the relay will be disconnect.
.

How they made?

  • Make the Tag/Key/Transmitter

First you need program the nRF24LE1 use a Programmer.
After that, just connect 2 cables from battery to power on the nRF24LE1 module is OK.
All the needles on the module can be cut to short to fit in the thin case.
.

  • Make the Controller/Receiver

You can build the Arduino based Controller whatever you like. Just connect nRF24L01 module with Arduino follow the table.

PIN NRF24L01 Arduino UNO/NANO Mega1280/2560
1 GND GND GND
2 VCC 3.3V 3.3V
3 CE digIO 7 digIO 7
4 CSN digIO 8 digIO 8
5 SCK digIO 13 digIO 52
6 MOSI digIO 11 digIO 51
7 MISO digIO 12 digIO 50
8 IRQ - -


This is combination I used in debug stage.



The PCB for Controller is on the way, I will update soon.

Technical details

Frequency hopping

The key, as an Active RFID Tag, will transmit its ID and the volt of the battery 3 times every second in 3 different channels.
The Controller, as the receiver, will listening on these 3 different channels, one channel for one second.
This will make the system more anti-interference.

Power Consumption of the Tag


The above picture is Current sampling with a 47 Ohm resistor.

For every time of transmit. Power consumption can be estimated as:
0.7v*47Ohm = 32.9mA
Duration for 0.3ms

Capacity of a CR2032 battery is 200 mAh.
In This example, data was transmit 3 times in every second.
Estimated life days = (200/(32.9*(0.0003/3600)))/3/3600/24 = 281 days

Hardware used in this project

  • Tag/Key/Transmitter

nRF24LE1 module

Reference price € 4.00

Programmer for nRF24LE1

Reference price € 15.00

nRF24LE1 adapter.

Reference price € 5.00

CR2032 battery

Reference price € 1.00

Plastic case of the key

Reference price € 1.00

PCB of the key

Reference price € 1.00
Send the file PCB\Files_for_Factory_made\tag.cam to PCB factory, they can make it for you.
A programmer interface is placed on the PCB, you can also program the nRF24LE1 with this port after the module have been soldered on the PCB.
Or you can use any method you can do to connect the module with battery.

Battery holder in the key

Reference price € 1.00

  • Controller/Receiver

Arduino

Reference price € 5.00

nRF24L01 module

Reference price € 2.00

Integrated PCB of Controller

Reference price € 2.00

Buzz module

Reference price € 1.00

Relay module

Reference price € 1.00

nRF24L01+PA module

Reference price € 4.00
A more powerful nRF24L01+PA module can get longer range and has External antenna interface. It has a compatible interface with nRF24L01 module
But it need more power on 3.3v, so a AMS1117-3.3v can be used to power this module.

DC-DC Converter

Reference price € 1.00
Most of cars, door locking system are using 12v. So a DC-DC Converter is needed here to power the Arduino with 5v.

Video

Draft

After check the ID of the key, it will drive the relay to Unlock the door for you.
When the key is get a little far away, the relay will release and the door will be locked.
You can also equipment with some power system to open the door automatically.