RF module

hello, i have an RF module shown in link
http://www.ebay.com/itm/180929068100?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
and a remote
http://www.ebay.com/itm/280917755375?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

i want to use the remote to transmit and arduino to receive.
i used this code

    /* FILE:    MX05V_433MHZ_MODULE_HCMODU0007_RECEIVE_EXAMPLE.pde
       DATE:    03/03/13
       VERSION: 0.1
       AUTHOR:  Andrew Davies

    This is an example of how to use the 433MHz wireless reciever module
    (HCMODU0007) which is the Rx part of the tranmitter and reciver module pair.
    This example makes use of the VirtualWire library written by Mike McCauley.
    This sketch in intended to be used with the Tx example code to recive analogue
    input data sent from the transmitting Arduino. The received data is then output
    to the UART.

    Rx MODULE CONNECTIONS:

    PIN  DESCRIPTION      ARDUINO PIN
    1    GND              GND
    2    RX DATA          D2
    3    RX DATA          N/A
    4    VCC (5V)         VCC


    You may copy, alter and reuse this code in any way you like, but please leave
    reference to HobbyComponents.com in your comments if you redistribute this code.

    THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS LTD MAKES NO WARRANTIES, WHETHER
    EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
    HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
    INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
    REASON WHATSOEVER.
    */


    /*Include the VirtualWire library */
    #include <VirtualWire.h>

    /* Digital IO pin that will be used for receiving data from the receiver */
    const int RX_DIO_Pin = 2;

    void setup()
    {
        pinMode(13, OUTPUT);
        Serial.begin(9600);

        /* Initialises the DIO pin used to receive data from the Rx module */
        vw_set_rx_pin(RX_DIO_Pin);
       
        /* Receive at 2000 bits per second */
        vw_setup(2000);
       
        /* Enable the receiver */
        vw_rx_start();
    }

    /* Main program */
    void loop()
    {
      /* Set the receive buffer size to 2 bytes */
      uint8_t Buffer_Size = 2;
     
      /* Holds the recived data */
      unsigned int Data;
     
      /* The receive buffer */
      uint8_t RxBuffer[Buffer_Size];

        /* Has a message been received? */
        if (vw_get_message(RxBuffer, &Buffer_Size)) // Non-blocking
        {
            /* If so, then turn on the LED connected to DIO 13
               to indicate this */
            digitalWrite(13, HIGH);
       
            /* Store the received high and low byte data */
            Data = RxBuffer[0] << 8 | RxBuffer[1];

            /* Output this data to the UART */
       Serial.print("Analogue pin A0: ");
            Serial.println(Data);
       
            /* Turn off the LED on pin 13 to indicate that the
               data has now been received */
            digitalWrite(13, LOW);
        }
    }

but when i press ay button on remote, nothing happens. can any one help me with this? thanks a bunch!

You say nothing happens.

Does the led ON THE REMOTE light up?

Several questions spring to mind ...

Are you sure the device which you have (315Mhz) is pin compatible with the device (433MHz) the code was written for? - in other words is the Arduino code making the receiver work properly?

The receiver seems to be made to pair with a specific transmitter. I have a pair of 2.4GHz transceivers and there is a lot of "magic" going on in the background to enable them to extract sensible data from all the radio noise. They have to be set up as a pair or they won't work - but I don't think that precludes them working with a different brand of 2.4Ghz transceiver provided both of them are set up to communicate with each other.

What does the transmitter send? Is it compatible with the receiver? Maybe your receiver has to have special settings to make sense of the transmitter's output.

...R

Hi, firstly led on remote does light up. And my two RF is 315. The sketch that I took, the person used a 433 .. Does the sketch matter? I mean of cuz it does, but which part of the sketch determines its frequency ? Do you guys have any sketch I can try out with? Zhank you!

Need to know more about the remote.
What exactly does it send when you press a button.
The sketch seems to be designed for a particular type of transmitter.

hello, i am not sure about the remote actually. all i know is that it transmits at 315 M and i was hoping the arduino RF of similar frequency could detect it..does it work that way?

It might pay to unscrew the back cover of the remote and make sure it's not just a battery and a LED wired via a switch :wink:

You may also see a serial number or similar on the transmitting chip of the remote that leads you to a datasheet, etc.

It might pay to unscrew the back cover of the remote and make sure it's not just a battery and a LED wired via a switch

haha good point, will do that! thanks

ok i opened it! phew not just a bat and LED! the number is QY112/PC/LM
the IC is Hs2260A

Earlier today I composed a reply to this post, but I must never have posted it ...

The sketch does not determine the frequency but it will have been written with a particular piece of hardware in mind. You need to make sure that the connections on your hardware are compatible. You also need to make sure that the sketch sends appropriate commands to your hardware in case there are differences between it and the device the sketch was written for.

Almost certainly the transmitter sends a coded signal and your receiver will need to be able to understand that. From your initial experience it seems probable that it doesn't. Unless you can get access to the product datasheets for your receiver and for the transmitter it may be very difficult to figure out what's going on. Even then it may not be a simple task to get them to work together.

You would probably be better to get things working with the transmitter that is recommended for your receiver. You may even find ready-made Arduino code for the pair.

...R

DMond:
Hi, firstly led on remote does light up. And my two RF is 315. The sketch that I took, the person used a 433 .. Does the sketch matter? I mean of cuz it does, but which part of the sketch determines its frequency ? Do you guys have any sketch I can try out with? Zhank you!

alright, thanks again so much for your reply! i guess its time to do some code hunting on google!

Hi
HS2260 is the same as PT2260. It is an encoder and you need a decoder HS2272 or PT2272. Look for datasheet PT2260 and PT2272.
Mikael

The data format for the hs2260 encoders and decoders is well documented and there are some Arduino libraries
that can possibly decode them.
Have a look at the RC switch libraries.
Unfortunately, whilst the data format is standardised, the data rate is not and varies between suppliers.
You will have to measure the data rate somehow.
Its easy if you have a CRO.

hi, thanks for the reply. i was told about the CRO method, but unfortunately i do not have one or cannot get my hands on one at the moment. im still looking for appropriate sketches for the project =) thanks