External Power Supply on RF 315/433 MHz Transmitter-receiver Module

Hi guys, I've managed to set up the radio frequency connexion following this guide : http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/?ALLSTEPS

However, the distance between the transmitter and the receipter is poor : ~25 meters

So I wanted to try to power the transmitter with an external supply of 12V (currently the transmitter is powered by the arduino board 5V). I used and external supply : AC ADAPTER - OUTPUT : 12V 6A
I've connected it to the transmitter pin VCC and pin Ground, the pin data is connected to the pin number 12 of the board. It didn't work like that, the transmitter didn't transmit anything.

I tried something else, I ve used the wiring like that but I ve added a cable from the ground of the power supply to the ground of the Arduino, and it WORKED! But I'm note sure why and if it's correct to do like that.

Do you guys have an explanation ?

Many thanks in advance !

alex52:
Hi guys, I've managed to set up the radio frequency connexion following this guide : http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/?ALLSTEPS

However, the distance between the transmitter and the receipter is poor : ~25 meters

So I wanted to try to power the transmitter with an external supply of 12V (currently the transmitter is powered by the arduino board 5V). I used and external supply : AC ADAPTER - OUTPUT : 12V 6A
I've connected it to the transmitter pin VCC and pin Ground, the pin data is connected to the pin number 12 of the board. It didn't work like that, the transmitter didn't transmit anything.

I tried something else, I ve used the wiring like that but I ve added a cable from the ground of the power supply to the ground of the Arduino, and it WORKED! But I'm note sure why and if it's correct to do like that.

Do you guys have an explanation ?

Many thanks in advance !

So are you saying that initially you used just one wire to connect to the Arduino? That cannot possibly work, as you learnt. There always needs to be two wires, with a potential difference, (voltage), between them, so the ground connection is absolutely necessary. Also it sounds like, luckily for you, the transmitter's data input pin is TTL level, meaning it only needs 0.6V to 1.5V to switch it. (Less than 5V, anyway.) If it was CMOS level, you'd need >6V, (half the 12V supply), for the transmitter input to switch, and the 5V from the Arduino wouldn't quite cut it. (Then you wouldn't have made your wondrous discovery. :wink: )

edit: Did you buy some PT2262 and PT2272 chips as recommended in the 'instructable'? I use them very often. They're a very good way to avoid interference from noise on the same wavelength to prevent false-triggering. If you're looking for a source, do a search on "UTSource". They have them in stock and sell them at very reasonable prices. The PT2272 comes in a number of versions, from 0 data to, (I think it's) 5 data bits. They have an address range of up to 312 potential addresses, (531441), depending on the version.

Thanks for the explanation ! Yes initially I tried with just the data pin connected to the transmitter. The ground & VCC of the transmitter were connected to the power supply only. I just tried it outside with no obstacle, it worked up to 200 meters ! :slight_smile:

alex52:
Thanks for the explanation ! Yes initially I tried with just the data pin connected to the transmitter. The ground & VCC of the transmitter were connected to the power supply only. I just tried it outside with no obstacle, it worked up to 200 meters ! :slight_smile:

I just added some more info to my last post that you might want to read. And yes, the range can be very good on a 12V supply. I get a comfortable 20 metres, even straight through a solid steel garage door. I haven't tested to see exactly what the maximum range is under these conditions, but they're very reliable and never miss a beat. (This uses the PT2262/PT2272 pair, too.)

I didn't even know about the PT2262/PT2272 so I didn't use this, I directly used the trasmitter powered with a 12V power supply and the transmitter powered by the Arduino Uno. I'll have a look into that. I will use this in open air (about 100m), so I think it should be ok like that.

alex52:
I didn't even know about the PT2262/PT2272 so I didn't use this, I directly used the trasmitter powered with a 12V power supply and the transmitter powered by the Arduino Uno. I'll have a look into that. I will use this in open air (about 100m), so I think it should be ok like that.

The 'instructable' mentioned the PT2262 and PT2272. You mustn't have read it thoroughly.

And without some form of coding, you will get false triggering from time to time. (Not mentioned in the 'instructable' - he only refers to them as a way to add security, which is also true.

Instead of using the PT2262/PT2272 pair, you can use codes generated by your Arduino (if you have a second Arduino to decode the received signal). Also, you can use the serial hardware port, or a software port, but you need to set the baud rate very low. Depending on the RF transmitters/receivers, about 2400 baud should work fine. The spec sheet usually mentions minimum and maximum data rates.

Edit: I use mine for an alarm system, to activate and deactivate, so both noise rejection and security are issues.

Do you mean that it will be false-triggered by some signal I send or by other signals from other devices ?
This will be put in place in a farm, so there shouldn't be other signals like in a city where we have many other devices.

Tell me if I'm wrong ?

alex52:
Do you mean that it will be false-triggered by some signal I send or by other signals from other devices ?
This will be put in place in a farm, so there shouldn't be other signals like in a city where we have many other devices.
Tell me if I'm wrong ?

I meant other devices and general RF noise. On a farm, you'll probably be OK as long as there are absolutely no other devices there using that frequency. If anything else at all generates 315MHz/433MHz, (you haven't said which of the two bands your devices operate in, it's either 315MHz or 433MHZ, not both), your unit could false-trigger.
Also. if you ever introduce another device into the vicinity which is in the same band, your receiver will be prone to false-triggering.

You say "on a farm". If it's operated within range of the farm house, there's a good chance of false-triggering, from other devices in the house. Possibly wireless mouse or keyboard, wireless doorbell, some wireless remote-controls, wirelss alarm systems, wireless PIR detectors and a number of other things I can't think of.
It's fairly standard to use an encoded signal.

Thanks for your help OldSteve!

I'll follow your advise and have a look at the PT2262/PT2272 pair :slight_smile:

alex52:
Thanks for your help OldSteve!

I'll follow your advise and have a look at the PT2262/PT2272 pair :slight_smile:

It provides a degree of safety, just in case there is any RF noise that might interfere. (Or if there might be some in the future, if you make other RF gadgets.)

Those receivers are GARBAGE.

I recently conducted a test using an Arduino as sender and receiver. The range with those cheap green transmitters was nothing short of abysmal, with or without an antenna. I did not see range exceeding 100' (this is with 3.3v on transmit and receiver, since the project was for battery operation) - while with the $2 each RXB-12 receiver (and the same cheapo green transmitter, both with a quarter wavelength wire, clipped from an old network cable, as an antenna), under the same conditions, got me 1250'. Best of all, they're direct plug-and-play replacement for the crappy green ones.

EBay search for RXB-12

@DrAzzy Hm interesting, it worked well with these ones with a 12V power supply as I said... I might try this one later :slight_smile:

@OldSteve One last question, I'm still a bit confused about this encoder/decoder, I'm using an arduino for the transmitter and an arduino for the receiver. The transmitter send a number for example "1" and if the receiver detect the number "1' then it activates something. So do I really need to encode ? How the receiver can be activated by something else except if it receive the data "1" from another transmitter ?

RECEIVER CODE:

#include <VirtualWire.h>

void setup() {
vw_set_ptt_inverted(true); // Required for DR3100
vw_set_rx_pin(12);
vw_setup(4000); // Bits per sec
pinMode(13, OUTPUT);

vw_rx_start(); // Start the receiver PLL running
}

void loop() {
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;

if (vw_get_message(buf, &buflen)) // Non-blocking
{
if(buf[0]=='1') {
digitalWrite(13,1);
}
if(buf[0]=='0') {
digitalWrite(13,0);
}
}
}

alex52:
@DrAzzy Hm interesting, it worked well with these ones with a 12V power supply as I said... I might try this one later :slight_smile:

While there certainly are better transmitters and receivers available, the power output of this particular transmitter is proportional to the power supply voltage. As such, it's not surprising that you get more range with a 12 Volt supply than DrAzzy got with 3.3 Volts, so it may be sufficient for your needs.

@OldSteve One last question, I'm still a bit confused about this encoder/decoder, I'm using an arduino for the transmitter and an arduino for the receiver. The transmitter send a number for example "1" and if the receiver detect the number "1' then it activates something. So do I really need to encode ? How the receiver can be activated by something else except if it receive the data "1" from another transmitter ?

The VirtualWire library software adds some amount of encoding/decoding. This should be sufficient so that your software doesn't see random noise. It may see someone else's transmission if they are using VirtualWire or a similar protocol layer. You could protect yourself from this by sending some unique stream of characters that you detect in your software. For example, instead of just sending the data "1", send the data "Alex's chicken coop: 1" and reject messages that don't have the proper header string before the data of interest.

alex52:
@DrAzzy Hm interesting, it worked well with these ones with a 12V power supply as I said... I might try this one later :slight_smile:

@OldSteve One last question, I'm still a bit confused about this encoder/decoder, I'm using an arduino for the transmitter and an arduino for the receiver. The transmitter send a number for example "1" and if the receiver detect the number "1' then it activates something. So do I really need to encode ? How the receiver can be activated by something else except if it receive the data "1" from another transmitter ?

RECEIVER CODE:

If you're sending data, you're fine and don't need the encoders/decoders, as MrMark says. That's what I was talking about when I said this in post #5:-

you can use codes generated by your Arduino (if you have a second Arduino to decode the received signal)

Of course, the codes can be any modulated data, but the best thing is to send a unique qualifier, so that in the future you can add more devices in the vicinity and they won't interfere with each other. They can't transmit at the same moment, but that is rare.

When using my higher quality APC220 transceivers I send the data a number of times to avoid this, and use qualifiers like "PIR1", "PIR2", "ALM1" etc, followed by the data bytes. The PC only reacts if it first received a valid qualifier. It sounds an alarm, unique to either the dual PIR alarm system (workshop) or the other alarm system (house), and writes a log file listing date, time and which PIR unit or alarm was triggered. I also have a standalone receiver on my bedside table that responds with a simple alarm and a flashing red/blue LED for when the PC isn't turned on.
I thought you were sending an unmodulated carrier. (My simpler 433MHz transmitters/receivers that I use for on/off control use the encoder/decoder chips because there is no micro used.)

@DrAzzy, as mentioned by MrMark, with a 12V supply most of these little 315MHz and 433MHz modules work surprisingly well. At 5V they perform pretty poorly though, and I wouldn't even consider powering the transmitter from 3.3V as you did. No wonder you had poor performance.
The datasheets say 3-12V, but don't mention range at 3V, which is proportional to supply voltage. For my on/off transmitters using the encoder/decoder chips, I use a 23A 12V battery for power, with power only connected to the battery when I press the transmit button, so even a tiny 12V battery lasts for many months. (No Arduino to complicate things)

The data sheets for those cheap 433 Mhz transmitter / receivers are a bit confusing.
The 3 - 12 V spec applies to the Transmitter only.
The receiver needs 5V regulated and the super regen receivers (the ones without a crystal) are the most critical , voltage wise.

mauried:
The data sheets for those cheap 433 Mhz transmitter / receivers are a bit confusing.
The 3 - 12 V spec applies to the Transmitter only.
The receiver needs 5V regulated and the super regen receivers (the ones without a crystal) are the most critical , voltage wise.

What's confusing? The datasheet does clearly say 3-12V for transmitter and 5V for receiver. (4.9V-5.1V in my datasheet)

I only mentioned powering the transmitter with 12V. I used 5V on my receivers, which suited the PIC chips that I used to control this system. (And the usual Arduino setup, of course, but I hadn't started using Arduinos when I built the alarm systems.)

But you raise a good point that I overlooked - DrAzzy used 3.3V on both ends. :frowning:

One last question, I'm using the cheap moisture sensor YL-69. It will be plugged on the arduino board of the receiver, it will send data every hour to a database. However, I know that this sensor get damage easily, so I want to power it only when I read the data (when it will send the data every hour). Do you have an easy way to do that ? I need to use a digital pin right ?

OldSteve:
What's confusing? The datasheet does clearly say 3-12V for transmitter and 5V for receiver. (4.9V-5.1V in my datasheet)

I only mentioned powering the transmitter with 12V. I used 5V on my receivers, which suited the PIC chips that I used to control this system. (And the usual Arduino setup, of course, but I hadn't started using Arduinos when I built the alarm systems.)

But you raise a good point that I overlooked - DrAzzy used 3.3V on both ends. :frowning:

Not even, in some tests :wink:
I got >800' (LoS) with 2.1v on the transmitter! (one of the cheap green transmitters, too - with a good receiver, ofc)

DrAzzy:
Not even, in some tests :wink:
I got >800' (LoS) with 2.1v on the transmitter! (one of the cheap green transmitters, too - with a good receiver, ofc)

Wow, that's not bad. I've never gone lower than 5V with a transmitter, and as mentioned, usually 12V for extra oomph.

Actually, apart from for very simple stuff like remote control, I usually use the APC220 modules that I mentioned. A lot more expensive, but they're more reliable, support serial baud rates up to 115200, RF TX rates to 19200, (on-board buffer), and most importantly, the frequency is firmware-configurable, allowing multi-channel use. Pretty handy.

alex52:
One last question, I'm using the cheap moisture sensor YL-69. It will be plugged on the arduino board of the receiver, it will send data every hour to a database. However, I know that this sensor get damage easily, so I want to power it only when I read the data (when it will send the data every hour). Do you have an easy way to do that ? I need to use a digital pin right ?

I doubt if simply leaving the moisture sensor powered will damage it.

Still, if you want to intermittantly power it from the Arduino, it shouldn't be too hard. How much current does it use? If 20mA to 30mA or less, you could connect an Arduino analog pin directly to it's Vcc, then just use digitalWrite(pin,1) to turn on the sensor. (digitalWrite(pin,0) to turn it off, of course.

Do you have a link to the sensor module's datasheet?