alex52:
@DrAzzy Hm interesting, it worked well with these ones with a 12V power supply as I said... I might try this one later
@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)