Multiple 433Mhz recievers and one transmitter

Hello!

What is the best way to handle the following:

I'd like to have different relay-switches around the house(1), controlling all kind of things. These will be controlled wirelessly(2), from one "command"-unit(3). Also, I'd like each relay-switch to be programmable(4), up against the "command"-unit.

(1) - My idea here, is to use the smallest and possible Arduino, powered by a 9-volt battery, to control the relay-switch.

(2) - As stated, I'd like to control the relay-switches (or Arduino, really) wirelessly. Here, I'm thinking to use 433Mhz transmitters and recievers. As mentioned, the use is indoor, so I figure I can use some fairly cheap units for this. Can you recommend any?

(3) - The "command"-unit will also be an Arduino. Here, size doesn't really matter, so an Uno or Mega will do, I guess? In the end, I'm thinking about handle the relay-switches through the web - PC and smartphone. Do handle this, I figure using a WiFi shield.

(4) - By making it programmable against the "command"-unit, I mean, you press a button on the transmitting-unit, thus making it "learn" a new reciever. After this, you'd press a button on the receiving-unit, making it broadcast its adress, which then will be picked up by the transmitting-unit, which "bonds" the two.

So alright... This is a lot, and it needs to be said, I'm fairly new to Arduino, so much of this can be taken as research.. As a "can this even be done?".

Oh, another thing - As far as I've read, you connect the WiFi shield to the network, by filling out the info, via the WiFi Lib, thus "hard coding" it.
A smart function would be, if you could connect to the Arduino through the WiFi-shield, update its info to the real network, and then make it connect to it. But this I'm thinking is pretty impossible, right?

Anyways - any advice is gladly recieved! Thanks!

  1. Sounds reasonable. Relay will need to be driven through a transistor; I suspect the 9v batteries won;t have acceptable lifetime - those crappy rectangular batteries have utter garbage capacity. It's 6 itty bitty cylindrical batteries in that box.

  2. If you're doing the cheapo OOK transmitters - any transmitter is fine, but get the superhet receivers. Get em on ebay. Any of the cheap transmitters (should cost no more than $1.50 shipped) are good, and any receiver with a crystal on it is okay - I got 5 of the yellow ones with the SOIC-14 IC on them (these are known to work better than the ones that come with the cheap transmitters, which are garbage) and paid $7 shipped for them. They come from ebay, search for "433mhz rf receiver" For the arduino's attached to the relays+receivers, use either a pro mini, or even build your own boards with a 'tiny (I have a tiny85 acting as an rf controlled relay, and will be adding more like it soon).

  3. Uno is fine, though mega might be better depending on how much other stuff you're doing with it. The needs of transmitting are minimal (it's receiving that's hard).

  4. That sounds totally do-able.

I'm not sure if you can do that easily with the VW/RH library that everyone uses for these things.

I wrote my own RF code (see AzzyProjects in my github) , but VW is definitely superior on most measures - it's not that bad, but VW/RH take advantage of things that my take on it doesn't. It works well enough for flinging small packets around though.

This is doable as I myself have done it before.

Simply write a sketch that makes the very first byte in the message to be sent, an ID number. NOT 0! needs to be 1 - 255. Sending a 0 will result in the transmission of the data to end, so anything after the 0 will not be sent.

Anyways.

assigned each number to a name using the #define macro.
#define LivingRoom 1
#define Kitchen 2
#define DinningRoom 3
. . .
and so on.

Now, using something like this to transmit the command

void transmit(char ID, char * MSG)
{
 sprintf(str, "%c:", ID);
 if(strlen(MSG) <= 25) 
 {
   strcat (str, MSG);   
   vw_send((uint8_t *)str, strlen(str));
   vw_wait_tx();
 }
}

And this to receive that command

char * receive(char ID, uint8_t* data)
{
  uint8_t buf[VW_MAX_MESSAGE_LEN];
  uint8_t buflen = VW_MAX_MESSAGE_LEN;
  
  if (vw_get_message(buf, &buflen))
  {
    if(buf[0] == ID)
    {
      for(byte idx = 2; idx < buflen; idx++)
        MSG[idx-2] = buf[idx];

      
      memcpy(data, MSG, strlen(MSG));
      return true;
    }  
  }
  return false;
}

You should be able to do what you want.

Attached is my library that does just that.

VWID.zip (4.47 KB)

You might find that it is more cost effective to buy something like this.

Then you can either replicate the signals transmitted by the control unit, or use your Arduino to electronically 'press' the buttons on the handset via relays/solid state relays/FETs etc.

Wow, this is awesome! Thanks a bunch for all the replies!

#1
Great feedback. I'll look it over and do some more research based on your feedback.

#2
Oh yeah? Then I can get my hopes up alright, if you've already done it. I'll also take a look at your project and get some ideas. Thanks!

#3
Haha, sure, yeah, it proberly would be, although it would take some of the fun out of it :slight_smile: But thanks anyways!