433Mhz module range within Arduino and Raspberry Pi

Hello all !

This is my first post on this forum, thanks you everybody, you have helped me each time.
But this time, I am not able to find a satisfying solution on my own, nor by searching the forum or google...

So, I want to be able to emit and receive (not at the same time) from Raspberry PI in 433 Mhz.

If I try directly connecting 433Mhz module to Raspberry, it works, but the range is very low (only few meters).

So I decided to try with Arduino. And wow, this is a lot better ! I am able to receive the signal from a remote controller at maximum 40 meters, which is far better !

So then, I decided to build a "433Mhz interface based on Arduino" in order to provide a serial interface, where Arduino displays data from the 433Mhz receiver on the serial Tx, and is able to send to 433Mhz emitter from Rx. It works well, but the range is not good at all....It is rougly 2/3 meters maximum.

The question is...why ?!! Do you have any idea ? What can I check to find out why it is not working if I connect the Arduino to the raspberry (I try to power Arduino using another power supplier than the raspberry, with no luck).

The interconnexion is :

5V(+5V and GND) == Arduino =======(serial line, RX, TX and GND)====== Raspberry === 5V (+5V and GND)

Thanks a lot !

The 433 MHz modules are very finicky and for maximum range need good software to generate and decode the signals, noise free power supplies and good antennas (17 cm of vertical wire is OK) on both the receiver and the transmitter modules. The VirtualWire library works well with Arduino.

If you want advice about your particular problem, you will need to do a better job of explaining it and of describing what you have tried.

Hi, thanks a lot for your answer!

I am not the best to explaing things, I am sorry.

I already wired up a 17 cm antenna, and I tried several type of power.

I know the range will never be perfect, but If I connect Arduino to a USB/TTL converter on my laptop, I can reach 30/40 meters of range, so I think both the software I use (RCSwitch library) and the hardware is good...

I think maybe noise is the explanation. How can I avoid too much noise ? Maybe the Raspberry, once connected to the arduino, propagate noise ? How to stop it ?

How many Volts do you have connected to the vcc of ur transmitter on ur rPI ?
edit: there is also a 5v pin on the rPI as i just googled, did you try to power ur transmitter from that in case u used 3.3v ?
For example i have an Arduino and use 9v for transmitting with external power supply,but even 5v are well in our flat directly powered from usb, the handtransmitters i have for poweroutlets even use 12V.
That has a signifcant impact on the range.

greetings

Yaku

Hi,

Maybe I forget to mention that my main issue is about reception and not emission. So, do I have to try 8V for the reception module ?

I will draw the exact schematic of what works and what does not.

Don't hesitate to ask if something is not clear or if you need more details to suggest ideas ^^

I am back with two schematics :



Is it clearer now ?

The Raspberry Pi pins are 3.3V. Did you damage the Pi's RX pin by sending it 5V from the ATMega?

Your ATMega pics don't show any decoupling caps on the chip. You should at least add one status LED output from the ATMega so you have some assurance that it's not resetting frequently.

Hi Chagrin,

The Pins of Rpi are 3.3V, but for Serial port, it is running fine...I used the 5V output to power Arduino, and it seems to work.

When I read the Serial on Raspberry, I can see the Arduino is not resetting continuously because on restart, in the "setup", I do a println 'init', I and would see it in serial output. I can add a LED, but where ? Between +5V and GND ?

What do you call "decoupling caps" ? Capacitors between +5V and Gnd ? I will try and tell you if it is any better.

Is it possible that the RPi generates noise that makes scrambling on the receiver ? How to eliminate this noise ? I will try to put the Arduino as far as I can from the Rpi. I try this tonight and I tell you :slight_smile:

quentind:
The Pins of Rpi are 3.3V, but for Serial port, it is running fine...I used the 5V output to power Arduino, and it seems to work.

I'd still suggest a resistor divider on the Arduino's TX line to bring the 5V down to 3.3V. I just don't want you damaging your Pi.

quentind:
When I read the Serial on Raspberry, I can see the Arduino is not resetting continuously because on restart, in the "setup", I do a println 'init', I and would see it in serial output.

That would be sufficient. I had to ask because I just didn't know if you were checking.

quentind:
What do you call "decoupling caps" ? Capacitors between +5V and Gnd ? I will try and tell you if it is any better.

Yes, between the VCC and GND of any individual piece so if there is any noise coming across your power lines then the cap will help smooth it out. .1uF is the typical starting point and you try to keep the cap as physically close to the device as practical.

So,

I added decoupling caps, but it did not change a lot.

I built the "poor man oscilloscope", and it is working very well, I am surprised! I have the impression to have built new eyes :slight_smile:

This way, I am able to see there is a lot of noise on the Data pin of the receiver. Sometimes, the noise is gone, and I am able to receive signal with a good reception range.

I suppose I have something making noise, but for the moment I can't figure out what...

How can I find where is the problem ?

Hi quentind,

Did you find out what was causing the problem?

I think I've got the same problem.

I have an Arduino mini pro with a 433mhz receiver attached. I connected this to my computer via a usb to serial cable. The two laptops work fine with it (>15 metres), but when connecting it to the Raspberry pi the range is REALLY bad (<1 metre).

I measured the voltage at the 433mhz receiver and it was slightly lower when it was connected to the raspberry pi. I tried to rule this add by adding a voltage booster circuit but it made it worst if anything.

laptop = 4.88v
raspberry pi = 4.3v
raspberry pi using booster circuit = 4.98v

I've not tried an external power supply yet.

Any thoughts on what might be causing the problem?

Thank you in advance!

Those cheap 433 Mhz receivers need 5V to work properly.
There are also 2 types of receiver.
Superhets which have a crystal on the PCB, and Superregens which dont.
The SuperRegens are the cheapest , and also the worst performing, and are the most dependant on exactly 5V.
Their performance degrades rapidly if the supply voltages are higher or lower.
The transmitters will work from 3V to 12 V.

Not all 433Mhz gear is created equally, and nor is the software. Don't presume that the more powerful Raspberry Pi always provides better software than the Arduino. Digging a good clean signal from a 433Mhz Tx to Rx requires clever software usually, not just fiddling with the electronics, though that is very important I agree. The finer detail of getting the Manchester encoding principles working are probably worth studying here as it does highlight that understanding the limitations of the 433Mhz hardware is critical to designing a good software Tx/Rx combo. For some back ground on the vagaries of 433Mhz you might find it relevant to try this Weather Station Software. It highlights the need for clean signal protocols and to sync accurately with the incoming signal.

I apologise if I am wrong, as I am not familiar with the RPi 433MHz libraries so I may be well be speaking out of turn here, but generally speaking the quality of the software is more important for the success of a 433MHz link than the quality of the hardware, especially if you are having problems over those shorter distances.

Attached is a photo of a mono-pole antenna made from TV antenna coax wire that I turned into a dipole by adding and equal length of hook up wire to the shield and bending backwards to create the dipole. And just to contradict all I have said above, I can say that playing with this little 'electronic' experiment was also very beneficial, and highly recommended at either end of Rx or Tx.

Cheers, Rob

Thanks for getting back to me so quickly.

For clarification the 433MHz receiver board is connected to an Arduino. This works fine when connected to my laptop via USB. If I connected the same Arduino circuit to the Raspberry Pi via USB it doesn't work very well at all.

It works well on other computers but not the raspberry pi.

I've also tried boosting to 5V.

Ah thanks for the correction, I was on another track altogether. I think it might worth considering local power supply filtering, buffering and shielding between the Arduino and 433Rx. I suspect the RF from the Pi is well within the sensitive range of the 433Rx, as the clock speed alone is 700MHz so there are bound to be multiples of a half around somewhere which would be 350MHz. Unlike more expensive computers the Pi seems to have escaped the requirement for solid shielding. So putting a small ferrite toroid on the +ve and -ve to the 433Rx, and a 0.01uF ceramic across the same power lines where they connect to the 433Rx PCB will help reduce any "antenna" effect of the Rx433 power lines feeding RF hash in the receiver (this will help reduce direct injection of signal into the Rx's amplifers. The antenna end has tuning to help reduce non-433MHz hash)

The 433Rx's have a simple but effective circuit that has an amplifier on maximum gain until a solid 433MHz signal comes in and then its AGC kicks in, it is able to differentiate the on/off keying waveform (usually around 1MHz). The Rx also tends to center the signal between the hi's and lo's such that it outputs a pretty clean digital signal where the transition point across 'RF center' follows the original signal quite closely (even if there is still noise present in the extremes of the waveform, it is the transition timings that are critical).

Hence the 433Rx probably needs to get a pretty solid 433MHz signal that is going to cut through the Pi's RF 'noise'. Given the 433Rx has an antenna and is supposed to be listening for RF and the Pi is supposed not to be a transmitter, it is probably best to try to shield the RPi with some sort of metallic cage, and try not connecting to anything on the Pi to it first to see what happens. I don't think the shield has to be earthed, as any direct connection to the Pi may allow it to become a radiator as well.

The Arduino's have a 16MHz clock so much less likely to be radiating interfering RF in 433 range.

Sorry a bit long winded but I hope this will give you a few ideas to try. Put the RPi in a cooking pot with the lid on (though not in the oven of course!!, but it does sound appropriate :smiley: ) as a quick test of a shield (wrap Pi in bubble wrap to avoid short circuits). Or get some USB extensions to distance the components apart (RF dies off to the inverse square, so doubling USB leads, quarters the chance of interference).

Cheers, Rob

Just to confirm I did put my pi in a cooking pot! :slight_smile: My wife gave me some very funny looks. Unfortunately there was no significant change, or a tasty desert at the end of it. But it was an excellent thought on the 700mhz processor affecting things!

Distancing the pi from the tx and rx module made no difference either.

I'll try adding the caps and a few other things. If you have any more thoughts, please let me know!

Cheers,
Wayne

Possibly the shield needs to be earthed. A less stressful approach for your wife might be to put the RPi back in its cardboard box (all connected of course) and wrap aluminium foil around it and somehow add a clip to the external al-foil from the earth of the RPi. Have you checked the actual voltages on the power supplies at the 433Rx? Are they being degraded going from RPi to Arduino to 433Rx? I see now you already have bypass caps in your diagram, so maybe the toroid will be worth adding (or just connect the RXs power from batteries eg 6V for the experiment isolating it from any CPU power supply).

I have found using audio editing software Audacity as a el-cheapo storage oscilloscope very handy in debugging 433Rx's. It can allow the digital output from the 433Rx to be viewed, as the target signal comes in. Most of the time the signal will be just white noise, but a regular chirp every time the Tx goes off will allow you to capture the Rx responding. It would be interesting to see what the signal does when close up to the whole RPi set up (ie working) and then view it as it get more unreliable, until no signal. Seeing you are controlling when the signal is produced from the Tx circuit, you could also look to see what is happening when there is apparently no signal. eg the Arduino is trying to sync but maybe just does not get enough to sync and begin data capture...

RX-Sig------->[10k ohms]------*-------------------> Laptop Aux Audio In
                              |
                              ---[1k ohms]-----------
                                                    |
                                                    |
Earth-----------------------------------------------*------> Laptop Audio GND

So not too hard to make a probe for a laptop and then record the necessary blips from the digital out on the Rx and focus in on them with the expanding timeline features.

I have included below some images of traces I have used to explain my weather 433Rx behaviour. So while the 250-500uS modulation of the 433Mhz is above what may be expected of an Audio system, quite useful results are possible. These can be very powerful in tracking a 433Rx behaviour.

This may give a clearer picture of how the performance is degrading if not exactly explaining why it is doing it straight off. If the signal is clean, all the way, it maybe the RPi and Arduino interacting wierdly??

Cheers, Rob

AGC_Starting.png

SOLVED!!!!!!!!!

First of all thank you for all your help.

I connected up an external power supply to the receiver instead of using the power coming from the Raspberry Pi / Arduino. This made an amazing difference to the range.

For the receiver module I was working with 5.5V - 6V seemed to give the best range. Anything below 5V was pathetic.

Particular thanks to Rob for all his help and advice. The cooking pans still me laugh!

SOLVED!!!!!!!!!

Ah very good, so the pans were on the right track, just not the quite right RFI recipe!! So it is not radiated RFI, but travelling on the power lines, hence why the pot did not work.

I suspect the 433Rx's have very little filtering against rogue 400ish Mhz coming along their power supply. Sort of like arriving in the back door- not really expected hence not designed against. I would be keen to know if the ferrite beads could have made a difference. I find it surprising that the Arduino itself in between did not suppress a lot of that just by the sheer weight of the Arduino circuit board and its on board bypassing, ground planes etc. These sort of things Ferrite Beads could be worth a go with one of them in the power supply lead and maybe on in the ground line as well!

There must be a lot of RPi people out there getting marginal 433 performance if this is the case. Your work maybe quite significant for others. Seeing I expect you will not be running on batteries for ever, the ferrite beads may be the long term solution??

Overall good news though, well done, patience pays off. One step closer! :wink:

Rob

Hi Rob - I didn't investigate whether there was interference present, but it wouldn't surprise me.

The most likely factor was too low a voltage. The Pi certainly had lower USB voltage than my laptops did.

Based on this hypothesis I used a variable power supply to drop the voltage below 5V and as soon as I did this the range started degrading rapidly.

I've now got an old nokia charger providing just over 5.5V to the receiver and its working a treat :slight_smile:

Thanks for your help.

Wayne.