Is it possible to have 315 and 433 at the same time?

#1

I want to connect both 315MHz and 433Mhz transmit and receive modules to a ESP8266 with OpenMQTTGateway and have them working on both bands at the same time. But after checking the source code I found that seems like the RF module need to occupy two special pins rather than any. Is there a way so that I can do both? Thanks for answering!

#2

Well I discovered that I can change the pin assigning. However after I tried using a 315 module to connect to the two receiving pin one after another, I found that the data output is quite random (usually publishes on 433ToMQTT topic, sometimes on 315ToMQTT). I searched a little bit and discovered that this is due to a centralized interrupt callback and the MCU cannot decide which pin triggered it. Until now I would give up and use only one frequency.

#3

Hello,

You are not the first to ask for this function, maybe whe should analyse this PR :

#4

Thanks for your reply. Seems like it must be used with SparkIO Core, I might try to modify a standalone version of the library although the code seem a little bit complex.

#5

OK I slightly modified the library to use it without Spark. It does allow to listen to multiple receivers, but you can only achieve that by stating multiple enableReceive() rather than instantiate more than one RCSwitch otherwise the ESP8266 would crash at any time. I made the example sketch to work and tested with my modules and transmitters. Now the only thing to do seems to be to add something like ZgatewayRFMulti.ino so that only one instance of RCSwitch is used to do the job.

#6

This seems very interesting. Thanks for the researchs. Indeed maybe we should remove ZgatewayRF315, keep only RF one and adapt it to handle both frequencies with the same instance of RCSwitch.

#7

Successfully modified the source code to adapt for two RF modules (just a quick and dirty hack for two input and output, not extensible) and passed test on breadboard. Available here. I have already made a custom PCB (clicking will open Chinese version of EasyEDA) for it, after receiving it I will do more real-life testing.

1 Like