(PKE)Passive Keyless Entry using Arduino for my car

Hi, i'm new to arduino, i only have 1 year into electronics and staff !

Story:
I have been struggling to make this project for a year, to open my car when I approach it,
and i DID IT using Bluetooth HC06 and my phone
but the bluetooth scan time was big and the unlock delay was big too, the power consumption too, plus the phone bluetooth
Then i used 433mhz module(china) to make a key with 2 lithium ion battery, a regulator, a transmitter, and the arduino(nano), and it worked too, BUT the key consumption was big too and i need to recharge my key constantly.
Others method i didn't tried was to use a better bluetooth module, like RN 42
Or to use 2.4 Ghz low power modules

Then i found this document:

Which explain exactly how to do it, but using pic instead of arduino and this is where my question come from.

Question:
How can i create this block diagram from 0 using arduino as the "brain" ?

Sorry for bump but it reached page 5 X_X

nickgammon:
Don't bump!
[...] Maybe after a couple of days.

I would start by buying some of the parts mentioned in that app note and seeing if you can get them to talk to your Arduino.

They're using PIC chips. They are similar to Arduino chips but the small differences make it impossible to easily copy code from one to the other. The low-power options on the chip are very important, particularly for the keyfob unit.

If I had this wish, then I'd look at conventional RFID tags. They won't have the range that you're used to seeing from LF comms but I consider 10cm to be enough range. There's lots of tutorials on that and lots of cheap hardware.

MorganS:
I would start by buying some of the parts mentioned in that app note and seeing if you can get them to talk to your Arduino.

They're using PIC chips. They are similar to Arduino chips but the small differences make it impossible to easily copy code from one to the other. The low-power options on the chip are very important, particularly for the keyfob unit.

If I had this wish, then I'd look at conventional RFID tags. They won't have the range that you're used to seeing from LF comms but I consider 10cm to be enough range. There's lots of tutorials on that and lots of cheap hardware.

I tried RFID too, but i can't wire through the door + the door is full metal covered

  • is not passive, it's an active sistem. With passive keyfob unit i won't need to press any buttons
    I'll simply walk into the car and do what i want, then leave the car and the car will automatically lock itself

PIC chips costs a lot here, especially those from the document, + i need to buy a programmer too + i also need to learn how to code them ...
And i also took a look into the schematic (from the document) and seems like it's a very complicated one X_X..

RFID doesn't have to go through the door. Mount it in one corner of the windscreen. Put several readers around the car.

There's a lot of good reasons why regular cars don't lock when you walk away. You are creating a significant safety risk by implementing that function. I'm sure there's an SAE standard on this which explains why.

I'm surprised that you can't find an off-the-shelf system at hobby prices. It's a common enough feature in all makes of car these days.

I agree there's no need to use PIC. Arduino or MSP430 can do it, but in all cases there's extra work required by you to keep the keyfob power consumption low enough.

I would pick up the 433 MHz approach you already built again and try to make it waste (much) less energy.
What did you do to reduce the current draw?
What kind of regulator?
Sleep modes?
How often did you send a signal and how long does that take?

lg, couka

I suppose WiFi on your phone is always on.
Then it makes sense to use a WiFi device in your car, like an ESP8266-12.
When in range (<30meter for WiFi), it could unlock the car.
Hardware could be a bare ESP8266-12 with 3.3volt buck converter.
That should only draw ~25mA from our car battery.
Not clever enough (yet) to know if it's possible, or to help you with the code.
Leo..

I'm not sure if this would work either, but the power issues are mostly limited to the keyfob. Why not use an active transmitter in the car to wake up the keyfob, allowing the keyfob to transmit back the code?

couka:
I would pick up the 433 MHz approach you already built again and try to make it waste (much) less energy.
What did you do to reduce the current draw?
What kind of regulator?
Sleep modes?
How often did you send a signal and how long does that take?

lg, couka

Yes, i already have a 433Mhz keyhob BUT it doesn't have any Low frecvency receiver like in the schematic #1, and because of that it always send a message, then sleep 1-2-3-4s then again a message and so on...
I already ordered some high efficienty and low idle current regulators but the problem is that it take a lot of current to send those 433Mhz signals!.
This is why it's recomanded to use a LF device on the vehicle to emit the repeted continuously signal
and then when it's catched by the key, to send the 433Mhz real signal and this way no more current drain from the key

Wawa:
I suppose WiFi on your phone is always on.
Then it makes sense to use a WiFi device in your car, like an ESP8266-12.
When in range (<30meter for WiFi), it could unlock the car.
Hardware could be a bare ESP8266-12 with 3.3volt buck converter.
That should only draw ~25mA from our car battery.
Not clever enough (yet) to know if it's possible, or to help you with the code.
Leo..

25mA is a lot of current for the car considering that the normal current drain is only 12mA

  • i don't keep the wifi on always
  • i'm not the only owner of the car

tinman13kup:
I'm not sure if this would work either, but the power issues are mostly limited to the keyfob. Why not use an active transmitter in the car to wake up the keyfob, allowing the keyfob to transmit back the code?

exactly! this is what the document from the #1 post is telling, but using ONLY PIC's chips and hard to understand circuits for me

tinman13kup:
I'm not sure if this would work either, but the power issues are mostly limited to the keyfob. Why not use an active transmitter in the car to wake up the keyfob, allowing the keyfob to transmit back the code?

I don't think countinous listening for a signal is drawing less current than sending a signal every second or so and sleeping the rest of the time.

Again, I thought the 433MHz approach did already work, just drained the keyfob battery too fast? I would bet that's just due to inefficient programming.

Say sending the signal takes 1ms and 100mA, then 999ms sleeping at 50µA, that would result in an average of ~0.15mA and around 1 month battery life on 120mAh button cells.

lg, couka

couka:
I don't think countinous listening for a signal is drawing less current than sending a signal every second or so and sleeping the rest of the time.

Again, I thought the 433MHz approach did already work, just drained the keyfob battery too fast? I would bet that's just due to inefficient programming.

Say sending the signal takes 1ms and 100mA, then 999ms sleeping at 50µA, that would result in an average of ~0.15mA and around 1 month battery life on 120mAh button cells.

lg, couka

I don't think the sending duration is 1 ms.... I'll do some tests to find out
But still, a low freq detector circuit to take up the ardu is more efficient

couka:
I don't think countinous listening for a signal is drawing less current than sending a signal every second or so and sleeping the rest of the time.

Again, I thought the 433MHz approach did already work, just drained the keyfob battery too fast? I would bet that's just due to inefficient programming.

Say sending the signal takes 1ms and 100mA, then 999ms sleeping at 50µA, that would result in an average of ~0.15mA and around 1 month battery life on 120mAh button cells.

lg, couka

back here with some tests:
You were right, it takes < 1ms to send a signal 0.25ms in average(calculated with 2 millis reports via serial)
But i want the pause between them to be 500ms initial

SO.. I grabbed x2 1000mAh 3.7V batterys in series resulted in 7.4-8.4v 500mAh pack
Then i found a regulator 78lr05

Connected it to the arduino > uploaded this:

#include <VirtualWire.h>
#include "LowPower.h"

const int rfon = 11;
const int transmit_pin = 12;
void setup()
{
  vw_set_tx_pin(transmit_pin);
  vw_set_ptt_inverted(true); // Required for DR3100
  vw_setup(2000);       // Bits per sec
  pinMode(rfon, OUTPUT);
}
void loop()
{
  digitalWrite(rfon, HIGH);
  vw_send("G3o", 3);
  vw_wait_tx(); // Wait until the whole message is gone
  vw_send("G3o", 3);
  vw_wait_tx(); // Wait until the whole message is gone
  digitalWrite(rfon, LOW);
  LowPower.powerDown(SLEEP_500MS, ADC_OFF, BOD_OFF);
}

where rfon means i connected the 433mhz module to pin 11 to power it up when i need it

Then test the signals, received them!
Then conntect the multimeter and see how much current i draw from the battery(before the reg)
Collected 37 values one after another resulted in a 6.592mA drain.. but i'm not 100% sure that i measured it correctly! the values on the multimeter looks like this: https://goo.gl/photos/ciBSbAkz8hepNH137 (video)

I know my regulator is a very inefficient one, maybe you can help me find another one
but still .. 6.6mA means only 75 hours for my KEY ..

prologikus:
I know my regulator is a very inefficient one, maybe you can help me find another one

200uA no-load quiescent current and ~90% efficiency.

Confused. So you're using only the transmitter part of a DR3100 433Mhz tranceiver.
The receiver part will be draining the battery all the time.
A $1 transmitter module uses no power at all, untill it's told to transmit.
No voltage regulator needed for a transmitter either.
Single cell battery, processor with low clock frequency, transmitter module.
Leo..

Wawa:
200uA no-load quiescent current and ~90% efficiency.
https://www.pololu.com/product/2843

Confused. So you're using only the transmitter part of a DR3100 433Mhz tranceiver.
The receiver part will be draining the battery all the time.
A transmitter module uses no power at all, untill it's told to transmit.
No voltage regulator needed for a transmitter either.
Single cell battery, processor with low clock frequency, transmitter module.
Leo..


i found the D24V5F5 module here but it's kind of expensive(7 usd)
and then i found this one, and ordered it MCP1702-5002ET(only 0.8 usd :smiley: ) 2.0 μA Typical Quiescent Current

I didn't know that the module wasn't draining any current but i still want to attach it to the regulator so the power will be the same for every battery voltage level

I didn't understand what are you trying to say with "processor with low clock frequency"
and i'm still confused if i measured the current correctly (#11 post)

I understand from the diagram in post#0 that you want a portable 433Mhz transmitter and a stationary 433Mhz receiver (in the car). The square board on the left in post#13 is the transmitter. It uses no power when not transmitting.
! The picture shows a 315Mhz transmitter (pair) !

Current draw of an MCU (when active) is related to the clock frequency it's running on.
An Arduino running at 8Mhz uses less than one running on 16Mhz.
And the 8Mhz Arduino can run on a single (unregulated) LiPo cell, the 16Mhz one not.
Leo..

Wawa:
I understand from the diagram in post#0 that you want a portable 433Mhz transmitter and a stationary 433Mhz receiver (in the car). The square board on the left in post#13 is the transmitter. It uses no power when not transmitting.
! The picture shows a 315Mhz transmitter (pair) !

Current draw of an MCU (when active) is related to the clock frequency it's running on.
An Arduino running at 8Mhz uses less than one running on 16Mhz.
And the 8Mhz Arduino can run on a single (unregulated) LiPo cell, the 16Mhz one not.
Leo..

Ye but if i lower the voltage, let's say i'll use a 3.3v regulator, the clock will be 8mhz and the receiver arduino will be still on 16Mhz, is this still going to work ? Because i also had a atmega168 and it wasn't working

prologikus:
Ye but if i lower the voltage, let's say i'll use a 3.3v regulator,
the clock will be 8mhz and the receiver arduino will be still on 16Mhz, is this still going to work ?
Because i also had a atmega168 and it wasn't working

The idea is NOT having to use a regulator. But that also depends on what else you have connected to the keyfob. Time to draw a full wiring diagram with all the parts you are going to use.
An Arduino running on an 8Mhz clock will work between ~2.75volt and ~5.5volt.
Never used an 8Mhz Arduino, but it should AFAIK work if you set the IDE for the right board/clock speed.
Leo..

Wawa:
The idea is NOT having to use a regulator. But that also depends on what else you have connected to the keyfob. Time to draw a full wiring diagram with all the parts you are going to use.
An Arduino running on an 8Mhz clock will work between ~2.75volt and ~5.5volt.
Never used an 8Mhz Arduino, but it should AFAIK work if you set the IDE for the right board/clock speed.
Leo..

I'll wait till my 5v and 3.3v quiet regulators come(after 2 days) and then test with the 3v3 one.

The thing is i don't know what to use, i asked for help about what should i use based on the diagram from the first post, an official way of doing passive keyless entry, a efficient one.

But then someone said i can do it efficiently without a Low freq trigger which i don't think it's a good idea NOT to use one...

ps:tnx for your replys!

I'm interested in this project! Any progress?

joshmdy:
I'm interested in this project! Any progress?

Nope, without buying a designed chip for this function it's really hard to do it and it's impossible to do it secured
The best result that i got is with 2 li-poly batterys which least 20 days but was very bulky.
(see video)

Here are some examples of chips built for this function:
Atmel ATA5795C
NXP NCF29A1MHN
MicroChip also integrates passive keyless entry but with more then one chip

Here is the documents for pke by microchip ww1.microchip.com/downloads/en/DeviceDoc/DS-21986A.pdf
And there are many more.
In conclusion, if there was a place where i could buy one of those "one-solution chip" maybe i could build a secured, battery lasting, accurate, pke sistem, but this would take a lot of time since those things are above my knowledge...