I'm pretty new to Arduino and have been doing some research recently to start my first project.
Initially I would like to control a lamp wirelessly via a 5V relay, followed by multiple lights.
I'm thinking to do this via 433Mhz RF Modules.
My main question is about guidance of components really. For example I have 1x Arduino Uno, 1x 5v Relay module, 1x Receiver, 1x transmistter.
Now at the relay on the lamp can I attach the receiver straight to the relay module and get it to work? Or do I need some extra Arduino board at the relay to deal with this ? Eventually I would like to add multiple relays and RF modules around the home.
It depends on the receiver and transmitter. When they have a chip for the protocol (the RF protocol, how the signal is transmitted) and digital outputs and inputs, you can use them without Arduino. When they have almost nothing, you need an Arduino board for the protocol.
Is there alternative devices recommended? Preferably I don't want to be using a full board for each lamp.
You can use those modules quite easily and connect them direct to the Arduino. You will need to use a library - the Virtualwire one works well as is simple (a lot easier to understand than RadioHead). However the receiver modules themselves won't on their own be able to drive anything more than a LED. To drive the relay you'll need a transistor, a diode and a resistor.
It is not a bad thing to use an Arduino board with those. For example a Arduino Pro Mini is very small, but you need an extra usb-serial adapter to upload a sketch to those.
Without Arduino, you might use a 2262 / 2272 remote control.
Many remote switches use that, and the Arduino can receive and sent that protocol with the RCSwitch library. https://code.google.com/p/rc-switch/
But I’m not very happy with the code inside that library and not every remote switch is compatible with that library.
Thanks very much this makes a lot more sense to me now. I’ve got the cheap RF modules anyway for some experiments.
I’ve purchased this, I think it would be a an easier start initially for me as it is a complete module as you say.
One question on this, I understand after reading how to communicate with the cheap RF modules. But how do I communicate with this complete module from the Arduino? Do I take the circuit board out the remote and attach it to the Arduino? DO I need a specific shield/module? If so must I have a separate receiver/transmitter module for each device or can I have one receiver/transmitter on the Arduino that can communicate with all my receiver relays with independent commands?
If you have the modules that include the relay, what do you want the arduino to do? With those modules, when you press the fob button, the receiver relay goes on and so you can switch your light on/off. What extra do you want to achieve?
If you want to connect your arduino to the transmitter fob, then it's a bit fiddly, but it's possible. However, it seems a strange way to go about it.
I don;t want to just switch lights off and on with remotes. I want to hook them up to the Arduino and the internet and do various things. So effectively I want the arduino to be the hub connecting them to the network.
As Ted said:
When I look at the photo, that might be a SC2272 chip. It means that the RCSwitch library can be used, so an Arduino board can used to transmit to that module.
I want to use software and the Arduino to control the items not the fobs.
I read some more and I think I have it summed up now
All you need is a Arduino, a 315/433MHz AM transmitter (find out where to get one or hack your existing remote control) and one or more devices with a SC5262 / SC5272, HX2262 / HX2272, PT2262 / PT2272, EV1527, RT1527, FP1527 or HS1527 chipset. Also supports Intertechno outlets.
So I can either try to hack the remote fob to the Arduino and use RC Switch
Or I can sniff the correct remote code for the inbuild relay/fob I have purchased and use one of the cheap RF transmitters to attach to the Arduino more easily, which will then be able to communicate with the RF relay without the fob?
Forget the fobs - they just add an unnecessary level of complexity. They are great for simple remote control projects but if you want to control them electronically then they are a bit pointless.
Use the cheap units without the relays, and add a relay (or a mosfet) to the arduino. In fact you can add as many relays as you have spare output pins.
Actually, you can drive reed relays direct from the arduino pins (i.e. without needing a transistor) so long as you don't want to switch a heavy load or have too many on at once.
Use the virtualwire library for your code. Lots of people have done this - you will find code all over the place that you can adapt.
Ok thanks, more good info. Sorry to bang on more about this, But I'm aware an Arduino+RF+relay to Arduino+RF+relay will work.
But I don't want to buy an Arduino board for every light I need to control, the Uno is large and costs will spiral. Is there an alternate model which can accomplish this with a cheaper and smaller footprint? I saw a Arduino nano mentioned, is this the best solution adding a nano toe every light I want to control?
Just trying to understand the different ways to approach this.
You don't need a new Arduino for every light or device you want to control.
The Arduino (whether nano, uno or whatever) has 12 pins which can be configured as outputs. You'd need one of them for the receiver, which leaves 11. So you can control 11 devices from a single arduino.
Same for the Arduino which is connected to the transmitter. One of your pins is connected to the transmitter module leaving you 11 pins free. Each one is connected to its own button, the effect of which is to pull the input high (or probably low).
So your transmitter code does this: it sees which button is pressed and then transmits that digit (so if button 1 is pressed, it transmits a "1").
The receiving arduino listens for a transmission and when it gets one, it sends the corresponding digital output high (or low), triggering the relay (so eg when it detects an incoming "1" is sends pin 1 high). You don't really need relay boards or anything fancy like that; if you are not planning to switch a heavy load (though I don't know what you are planning to switch) you can just have the output connected to a cheap reed relay.
This is all really quite simple but I'm not sure whether you have any Arduino experience at all?