Hello I am attempting a new project with my Arduino Uno and I need some guidance. I don’t know how to describe it but I want to use RF signals / buttons or keyfobs.
So imagine if you had 3 separate keynobs for your car. Keynob1 would lock or unlock the door and that it. Keynob2 would lock or unlock the trunk and thats it, affecting nothing else. Keynob3 would roll the window up or down, affecting nothing else.
I just want to be able to send 3 seperate RF on/off signals to my Arduino where the Arduino would recognize each signal individually setting a corresponding pin making it HIGH or LOW.
Does anyone have any suggestions on how I would accomplish such a project? Shield suggestions? Keyfob addressing? Etc..
Thank you both for your responses. Security is not an issue what so ever I just used the car as an analogy / visual. But basically you could look at is as if one button on keyfob1 is pressed then the pin that it is addressed to would go HIGH. If the other button on keyfob1 is pressed then that same pin would now go LOW.
Keyfob2 would do the same thing on a different pin. If one button on keyfob2 is pressed then the pin it is addressed to would go HIGH and if another button is pressed then that pin would go LOW.
And so on with keyfob3.
Below is an example of how I think the code might look:
int D1 = 8; //keyfob1
int D2 = 9; //keyfob2
int D3 = 10; //keyfob3
Although the shield and the keyfobs do work together the signals are indistinguishable by the Arduino. So (back to the car analogy) basically all the keyfobs unlock the same door. So although I did pick some hardware, it doesn't look like I picked the right kind or I'm just missing something in the implementation. Overall, I don't think I'll be too worried about the code as much as I'd be on finding some hardware to actually complete the task.
jremington:
You can use a simple 315 MHz receiver and the Arduino RC-Switch library to read a keyfob set to any address.
This looks interesting and I will most likely order this receiver. I still have few questions though. Please bare with me as this is actually my first Arduino project.
Assuming I use the soldering iron to modify the address codes on two of the keyfobs and leave the 3rd keyfob floating, Will I be able to accomplish my task with the 3 keyfobs and just one simple 315 MHZ receiver and the RC-Switch library? or would I need to buy 3 receivers, a breadboard and other accessories?
So far I just have my Arduino hooked to the usb on my laptop and the items I mentioned earlier.
Also I may be fuzzy on the implementation for the code regarding the keyfobs. I'm starting get a sense that
int D1 = 8; //keyfob1
int D2 = 9; //keyfob2
int D3 = 10; //keyfob3
Yes! I was poking around on the Adafruit site, inquiring there as well. I'll give it a try most likely with their products but of course the main concern is that the keyfobs are distinguishable as I will be using them at the same time. I am hoping to work with the keyfobs that I already have. They are all four button but I only really two. I may get some additional Adafruit keyfobs as well just to practice or as a precaution encase I screw up the keyfobs I already have by soldering.
I'll look to make the purchases soon so that accessories will be delivered in the next few days and I can let everyone know if there is progression. Thanks again everyone!
So, here is the up date. I was able to successfully change the addresses of all the keyfobs. I was able to test them with the shield to verify that each one was different. I also purchased the The simple RF L4 Reciever. I chose the latch because I thought it might serve me better for the project I am attempting. I purchased a breadboard and some jumper wires as well. I then made sure to download the Arduino RC-Switch library. To start slow I attempted to just try the Simple Receive Demo with copy paste. After hooking everything up I did not get a response from just the demo. I figured I should try to get that working before moving on.
I initially tried to plug it straight into the Arduino. After nothing happened and thinking I was trying to take the lazy mans way out so I then followed this example. I've attached pictures but the receiver does not seem to recognize the signal from any of the keyfobs with just the given sample code.
The keyfobs you bought from DFRobot will not necessarily work with the Adafruit receivers. There are several different RCSwitch codes used, and while they are similar in overall structure, the timing is different so they are not compatible with each other. The Adafruit remotes will work with the Adafruit receivers.
The RCSwitch library should be able to receive and decode most of the remotes. If it can't decode the DFRobot keyfobs, follow this tutorial to figure out why not. Make sure the receiver you have matches the keyfob frequency.
Edit: the DFRobot site explains that you can change a resistor in the keyfob to get the correct timing. Note that the Adafruit receiver uses the SC2272-T4 decoder.
I am very sorry to say that I have seen that chart and I absolutely have no idea what to do with it. I feel like I am digging myself into a deeper hole. I bought quite a bit of stuff already and I may just get 3 more Adafruit keyfobs if they match try that and call it a day. This hobby of mine is turning into a job.
If you have a friend who knows a bit about electronics and soldering, ask him/her for help. It is pretty simple to change a resistor if you have the basic skills.
But the matching remotes are cheap and save a lot of trouble!
Okay, I just bought the Adafruit two button 315MHz keyfob and I own the matching RF L4 Receiver - 315MHz (Latching). I'm thinking by all accounts these two should pair. I'm pretty sure if I could get a signal transferred between the two I can stop bugging you guys. I think I'll be good from there because at worse I maybe able to stack another shield on top. I have the same set up as before shown in the picture and I am using the sample code form the rc-switch library, but I am not getting any output. I would like to print to the serial monitor, what am I doing wrong?
Have a google at rfm69, Anarduino , moteino, LowPowerLabs - you can have one receiver fed from multiple transmitters with this stuff and there are libraries and examples on line .