sebmillet / RF433recv

Manage receiving codes from 433 Mhz RX device plugged on Arduino
GNU Lesser General Public License v3.0
6 stars 4 forks source link

building Transceiver issue #2

Closed Andy1968T closed 2 years ago

Andy1968T commented 2 years ago

Hi there, great project. Receiver works with your code. Transmitter works with code. However I noticed when connecting Transmitter and receiver at the same time. The receiver code fails to receive data. Concluded that the receiver code does not define the TX pin for output and therefore leaves it floating. Which allows the Transmitter to transmit random bits. I added into the receiver code to define the TX pin as output. Which solved the issue, just thought i would let you and others aware of this, just in case others build a 433 transceiver.

sebmillet commented 2 years ago

Hello

Thanks for feedback, and for your interest in this lib.

When you mention PINs are left floating, are you referring to instructions like: pinMode(PIN_RFINPUT, INPUT); that are indeed left to the caller to take care of, when using RF433recv?

Indeed the RF433send library follows the same logic and requires the library user to execute something like pinMode(PIN_RFOUT, OUTPUT); on his own.

Could you send me the update you've done so I can better vizualise it, or even better, post a pull request?

Thanks, Sébastien Millet

Andy1968T commented 2 years ago

Hi Sebastien, Don't know how to post a pull request.

Below is the code i added to the receive Arduino code example. As when i have the transmitter connected at the same time. Without the added code, i think the 433 transmitter is floating and blocking the receiver. void setup() { pinMode (PIN_RFOUT, OUTPUT); //added to stop the transmitter data pin floating digitalWrite(PIN_RFOUT,LOW); // set low seems to be the best way to silence the transmitter. But it still makes the receiver slightly less sensitive. pinMode(PIN_RFINPUT, INPUT); Serial.begin(115200); Serial.print(F("Waiting for signal\n")); }

The transmitter that i have also has an EN enable pin. But does not work as expected. EN floating, the transmitter is enabled. If i pull it high the transmitter is active. when i pull it low it resets the Arduino. My thinking on this is it's tied to the Vcc of the transmitter. and the way the transmitter needs to be controlled is leave Vcc not connected to Transmitter and enable and disable the transmitter by the EN pin. I am still looking into this. Here is my modules .

https://www.ebay.co.uk/itm/234436585133?_trkparms=amclksrc%3DITM%26aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20160727114228%26meid%3D08eb848769984b559334666d9f500f42%26pid%3D100290%26rk%3D2%26rkt%3D4%26sd%3D182834338726%26itm%3D234436585133%26pmt%3D1%26noa%3D1%26pg%3D2506613%26brand%3DUnbranded&_trksid=p2506613.c100290.m3507 [https://i.ebayimg.com/images/g/w-0AAOSw-kJiFn-e/s-l400.jpg]https://www.ebay.co.uk/itm/234436585133?_trkparms=amclksrc%3DITM%26aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20160727114228%26meid%3D08eb848769984b559334666d9f500f42%26pid%3D100290%26rk%3D2%26rkt%3D4%26sd%3D182834338726%26itm%3D234436585133%26pmt%3D1%26noa%3D1%26pg%3D2506613%26brand%3DUnbranded&_trksid=p2506613.c100290.m3507 1 Set 433Mhz RF Superheterodyne Receiver Transmitter Module Kit With Antenna | eBayhttps://www.ebay.co.uk/itm/234436585133?_trkparms=amclksrc%3DITM%26aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20160727114228%26meid%3D08eb848769984b559334666d9f500f42%26pid%3D100290%26rk%3D2%26rkt%3D4%26sd%3D182834338726%26itm%3D234436585133%26pmt%3D1%26noa%3D1%26pg%3D2506613%26brand%3DUnbranded&_trksid=p2506613.c100290.m3507 Reference Title: 1 Set 433Mhz RF Superheterodyne Receiver Transmitter Module Kit With Antenna For Arduino/ARM/MCU. WL101-341 superheterodyne wireless receiver module is receiving UHF ASK demodulators supporting ASK and OOK modulation. www.ebay.co.uk

Does your code with an esp32? As my design i want to use the Bluetooth to measure heart rate and then control my 4 speed fan that has a 433 keyfob for cooling me while i ride my indoor trainer bike.

https://www.amazon.co.uk/Vacmaster-Cardio54-Control-Cycling-trainers/dp/B08WJ2XST9/ref=sr_1_4?crid=174XSYCKCSQR3&keywords=remote+floor+fan&qid=1650864258&sprefix=remote+for+fan%2Caps%2C86&sr=8-4 Vacmaster Cardio54 - Fitness and Gym Cooling Floor Fan with Remote Control - Powerful and Low Noise 3 Speed Fan - Ideal for Indoor Cycling, Running and HIIT Workouts : Amazon.co.uk: Home & Kitchenhttps://www.amazon.co.uk/Vacmaster-Cardio54-Control-Cycling-trainers/dp/B08WJ2XST9/ref=sr_1_4?crid=174XSYCKCSQR3&keywords=remote+floor+fan&qid=1650864258&sprefix=remote+for+fan%2Caps%2C86&sr=8-4 Shop Vacmaster Cardio54 - Fitness and Gym Cooling Floor Fan with Remote Control - Powerful and Low Noise 3 Speed Fan - Ideal for Indoor Cycling, Running and HIIT Workouts. Free delivery on eligible orders of £20 or more. www.amazon.co.uk

Thanks Andy


From: sebmillet @.> Sent: 24 April 2022 07:49 To: sebmillet/RF433recv @.> Cc: Andy1968T @.>; Author @.> Subject: Re: [sebmillet/RF433recv] building Transceiver issue (Issue #2)

Hello

Thanks for feedback, and for your interest in this lib.

When you mention PINs are left floating, are you referring to instructions like: pinMode(PIN_RFINPUT, INPUT); that are indeed left to the caller to take care of, when using RF433recv?

Indeed the RF433send library follows the same logic and requires the library user to execute something like pinMode(PIN_RFOUT, OUTPUT); on his own.

Could you send me the update you've done so I can better vizualise it, or even better, post a pull request?

Thanks, Sébastien Millet

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsebmillet%2FRF433recv%2Fissues%2F2%23issuecomment-1107765065&data=05%7C01%7C%7Cbce35347b3884702a10d08da25be91c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637863797668318544%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gZazB%2B09yVbD2CmABSOZpUWcKd8nr3%2B66tkFQe6FDFI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEHZADTGHDKIXEDHVVFZBI3VGTVHJANCNFSM5T7XI35A&data=05%7C01%7C%7Cbce35347b3884702a10d08da25be91c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637863797668318544%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YeXlnFor3L8Yqqfyj7Ik2%2BQVrNn8J4YtnsWX3rRIAoM%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

sebmillet commented 2 years ago

Hello the devices you are using are radio frequency 433 MHZ devices, that are plugged to Arduino with 3 PINs, one for ground, one on VCC (+5V) and one for DATA. As DATA needs to trigger interrupts, on an Arduino this limits PINs to D2 (interrupt 0) or D3 (interrupt 1). ESP32 for example has more interrupts capabilities. To respond to your question, indeed the code works on ESP32, according to other feedback I've had (I didn't test it myself though). So ultimately you indeed have to tune the PINs in the correct direction, that is, exactly as you show it: pinMode (PIN_RFOUT, OUTPUT); pinMode(PIN_RFINPUT, INPUT); I'm puzzled that in such circumstances you end up with a floating value. Reg, Seb

sebmillet commented 2 years ago

-

piecyk commented 6 months ago

@Andy1968T did you manage to make it work?

Andy1968T commented 6 months ago

Hi Seb, I have not been using the 433 receiver for a while. Without digging through past projects to see if I had that issue. I can't remember having an issue. As my last project used two RF 433 to receive and do a replay attack. I would suggest using an Esp32 output pin to directly switch on and off the Vcc pin. If that doesn't work . Let me know and I will look back at my code to check how I controlled it. Cheers Andy

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Damian Pieczynski @.> Sent: Sunday, March 31, 2024 8:46:16 PM To: sebmillet/RF433recv @.> Cc: Andy1968T @.>; Mention @.> Subject: Re: [sebmillet/RF433recv] building Transceiver issue (Issue #2)

@Andy1968Thttps://github.com/Andy1968T did you manage to control the fan?

— Reply to this email directly, view it on GitHubhttps://github.com/sebmillet/RF433recv/issues/2#issuecomment-2028887575, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEHZADWSTYJWPB6DZRYS2TLY3BRYRAVCNFSM5T7XI35KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBSHA4DQNZVG42Q. You are receiving this because you were mentioned.Message ID: @.***>