RF Transmitter and Receiver WRL-10535 and WRL-10533

I bought a couple of pairs of 433 modules from Electrodragon ($1.90/pair rx/tx) and they are functioning well as temp monitors for my little greenhouse in the garage... Very Well @ 50 meters. I like buying things that just work... without a major production to find out "How to Make them Work"

Doc

Ok, now I am thoroughly confused.

I tried plugging the tx pin (virtual wire tx not the serial tx) from the 2560 into the rx pin (virtual wire rx not the serial rx), and it's sporadic at best. This is completely eliminating the transmitter and receiver. Sometimes vw_have_message will return true, but then vw_get_message doesn't actually get anything. Then ever once in a while it will print out that it got something, and it looks like the hex is the correct hex for hello, but it's not getting it everytime. Over a hard wire connection that just doesn't make any sense.

This is the code I'm testing with right now:

Transmitter:

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);	  // Debugging only
    Serial.println("setup");

    // Initialise the IO and ISR
    //vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);	 // Bits per sec
}

void loop()
{
    const char *msg = "hello";

    digitalWrite(13, true); // Flash a light to show transmitting
    vw_send((uint8_t *)msg, strlen(msg));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
    delay(200);
}

receiver:

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);	  // Debugging only
    Serial.println("setup");

    //vw_set_ptt_inverted(true); // Required for DR3100
    // Initialise the IO and ISR
    vw_set_rx_pin(2);
    vw_setup(2000);
    vw_rx_start();       // Start the receiver PLL running
}

void loop()
{
    //Serial.println("waiting....");
    //vw_wait_rx();
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_have_message()) Serial.println("Have a message");
    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
	int i;

        digitalWrite(13, true); // Flash a light to show received good message
	// Message with a good checksum received, dump it.
	Serial.print("Got: ");
	
	for (i = 0; i < buflen; i++)
	{
	    Serial.print(buf[i], HEX);
	    Serial.print(" ");
	}
	Serial.println("");
   }
}

....sigh

EDIT:
Ok... all of my problems may have something to do with power levels. I've been using a 9volt battery to power the transmit arduino (2560). Everything seemed to be working fine with it the led blinked and everything so I didn't think anything of it. But out of desperation I changed batteries, and suddenly with the hardwire every single message is going through. So maybe the battery was to weak and it wasn't sending a strong enough signal down the wire? I'm going to try again with a wall wart plug later when I get time to put one together to see if I can get the actual transmitter to work off that.

Thanks for all the help guys. Looks like my problem was simply power issues all along. Plugged a wall wart into the 2560 with the tranmitter hooked up, the uno into my computers USB with the receiver hooked up and walla, hello in hex is coming through.

Stupid batteries =p That does not bode well for me planning to use batteries in the devices that will be doing the transmitting!

EDIT:

Well it's mostly working. Even with a 13cm piece of wire plugged into them for an antenna I can't separate them more than a couple inches without loosing all the data.

Guess that is a sign that I have a lot of interference in this area or something.

Yes, 9V battery not the greatest for Arduino. 1/2 the capacity wasted as heat just going thru the regulator.
Using a switching regulator such as this to make 5V and then powering the 5V at the header pin is better.

R-78Exx-0.5 DC-DC.pdf (70.3 KB)

I made a remote control, uses 8 MHz Promini running direct from 3.7V LiPo connected to Vcc line (bypasses regulator).
Keypress creates interrupt, wakes up uC from power down sleep mode, it reads the keypress using the Keypad.h library, sends it out via virtualwire, goes back into powerdown sleep mode.
Uses MAX1811 to charge the battery from a 5V source, like a USB port, but I have a 5V wallwart that powers the receiver, I just move the cord over when I want to charge it. Both have panelmount 5.5/2.1 barrel jacks.
http://www.parts-express.com/pe/showdetl.cfm?Partnumber=090-479

or PCB mount if that's your design
http://www.dipmicro.com/store/KLDX-0202-A

wallwarts
http://www.dipmicro.com/store/DCA-0510
http://www.dipmicro.com/store/DCA-0520

Alrighty then... that is odd.

Trying to figure out why I can't get any range out of it, I removed the transmitter from the 2560 board while it's running, the uno continue to receive the hello message..... Unplug the 2560 the messages stop, plug it back in they start again. So apparently even without the transmitter plugged in, the 2560 is putting out enough signal for the receiver to pick it up at close range with no transmitter at all???

Yep, I'm dumbfounded. This has got to be one of the most annoying pieces of electronics I have worked with yet.

I can not get more than a 2 inch range out of these things with a 13 cm antenna. Removing the antenna has a very small impact on performance. It doesn't increase the range, just helps more of the signals get through at the max range of 2 inches!

At this 2 inches, the receiver will pick up the message from the other arduino board somehow with no transmitter plugged in. Although with the transmitter plugged in, it picks up the message a lot more consistently.

I'm almost ready to throw these things in the trash :0

EDIT:

Ok scratch that. Looks like I've got at least one bad receiver. Swapped out the receiver with my 2nd receiver and now I'm receiving messages from one end of the house to the other (about 20 meters). It was missing some signals at that range but it was picking up at least 3 in 5.

steven6282:
Ok scratch that. Looks like I've got at least one bad receiver. Swapped out the receiver with my 2nd receiver and now I'm receiving messages from one end of the house to the other (about 20 meters). It was missing some signals at that range but it was picking up at least 3 in 5.

That's more like it but you shouldn't stick to that 13 cm antenna. 13 cm is for 434MHz.
The wavelength at 315 MHz is 95.2 cm so a 1/4 wavelength antenna would have to be around 24 cm.

perhof:

steven6282:
Ok scratch that. Looks like I've got at least one bad receiver. Swapped out the receiver with my 2nd receiver and now I'm receiving messages from one end of the house to the other (about 20 meters). It was missing some signals at that range but it was picking up at least 3 in 5.

That's more like it but you shouldn't stick to that 13 cm antenna. 13 cm is for 434MHz.
The wavelength at 315 MHz is 95.2 cm so a 1/4 wavelength antenna would have to be around 24 cm.

I never new antenna lengths had anything to do with it. I only used 13cm because I read that somewhere, don't remember where. Probably the sparkfun comments on the 434mhz version of the transmitter or something.

13cm is really to long for what I'm doing, 24 cm would be bordering on ludicrous lol :slight_smile: Not unless I can coil it inside a project box and only have a small part sticking out, but that seems like it would defeat the purpose of an antenna.

People say this is a commonly used frequency in alarm systems and such but I don't recall ever seeing anything with a 24 cm antenna sticking out of it, so how do they achieve it? Like I said if I can coil it around inside the project box I can probably get by, even with 24cm. The question then is should it be a bare piece of wire, a rubber insulated piece of wire, or something else entirely? Is one type of wire / gauge of wire better than others if wire is ok to use? For the project I'm using this in, getting a message through to the receiver is important, but my overall project size needs to remain somewhat small and inconspicuous.

17cm is for 434 MHz.

315 MHz ~1.5ft,
1/4 of that, ~11cm, should work well

CrossRoads:
17cm is for 434 MHz.

Right, it should be 17. My bad.
I've also read 13 in some guides but it should be 17 for 434MHz and that's what I'm using.

315 MHz ~1.5ft,
1/4 of that, ~11cm, should work well

What is 11cm? 1/8 wavelength?
Guess it should work too.

Experiment a bit. Try 11-12 cm and route it around inside your enclosure and try 24 cm and make more loops. It doesn't necessarily have to stick out.
Maybe it has to if you use a metal enclosure.

Any piece of wire should do. I've used thick single core copper without plastic insulation, thin single core jumper wire with insulation, a multi core wire with insulation from an ethernet cable (there are eight of these in each cable) and that worked fine too. I don't know what's best in theory.

The alarm devices you're mentioning are probably using coil antennas or pcb loop antennas which are a bit harder to get right.
Maybe someone here can tell what dimensions you would need for that.

What kind of range are you aiming for?

I just have 30 guage wirewrap wire, sits loose on my enclosure.

perhof:

CrossRoads:
17cm is for 434 MHz.

Right, it should be 17. My bad.
I've also read 13 in some guides but it should be 17 for 434MHz and that's what I'm using.

315 MHz ~1.5ft,
1/4 of that, ~11cm, should work well

What is 11cm? 1/8 wavelength?
Guess it should work too.

Experiment a bit. Try 11-12 cm and route it around inside your enclosure and try 24 cm and make more loops. It doesn't necessarily have to stick out.
Maybe it has to if you use a metal enclosure.

Any piece of wire should do. I've used thick single core copper without plastic insulation, thin single core jumper wire with insulation, a multi core wire with insulation from an ethernet cable (there are eight of these in each cable) and that worked fine too. I don't know what's best in theory.

The alarm devices you're mentioning are probably using coil antennas or pcb loop antennas which are a bit harder to get right.
Maybe someone here can tell what dimensions you would need for that.

What kind of range are you aiming for?

Worse case scenario about 15 meters, but mostly within 10 meters.

I'm still playing with stuff just testing and prototyping right now. Got some transceivers to try out next if I can figure out how to wire them. They just use a bit more power which I'm not crazy about since I'm trying to keep these things low enough to run off batteries for a good amount of time.

Worse case scenario about 15 meters, but mostly within 10 meters.

I'd say you should reach 15 meters no matter what kind of wire and which of the antenna lengths you select as long as it's a length that matches the frequency.
Selecting any other length might not help.

I'm still playing with stuff just testing and prototyping right now. Got some transceivers to try out next if I can figure out how to wire them. They just use a bit more power which I'm not crazy about since I'm trying to keep these things low enough to run off batteries for a good amount of time.

What's the application if i may ask?

perhof:
What's the application if i may ask?

Wireless sensors for an alarm system.

I just found these on sparkfun:

How the heck do you solder something like that? It's really cheap and a 2.4ghz transceiver should have a lot less interference problems, and the power usage is between the rf transmitters and the transceivers I currently have (RFM12B-S2 Wireless Transceiver - 434MHz - WRL-09582 - SparkFun Electronics)

Does it require anything else to work? The description mentions something about works great with a 16mhz crystal, does it require that though?

Do you know for sure that the device is getting 5V? Those little devices usually just work. They worked well for me when I actually made the things before I retired. Clean 5V and Ground, the antenna wires should be about 7" or about 18CM and either vertical or horizontal doesn't matter as long as both are the same way. You might get lucky there as it is possible to decrease the interfering signal by changing antenna polarization, theoretically by a factor of 10, Practically about 1/3.

Doc

You buy it on a board instead:

http://iteadstudio.com/store/index.php?main_page=product_info&cPath=7&products_id=53

CrossRoads:
You buy it on a board instead:

SparkFun Transceiver Breakout - nRF24L01+ - WRL-00691 - SparkFun Electronics

http://iteadstudio.com/store/index.php?main_page=product_info&cPath=7&products_id=53

Lol thanks, I actually found the board version on sparkfun after I posted that, but wasn't going to pay 20 dollars for it on a board, however $5.50, that I can probably swing :slight_smile:

9V's batteries are horrible... High Cost/Low Current.

You would do well to buy a $15-$20 radio control 9.6V rechargeable (usually comes with a charger too).