tag:blogger.com,1999:blog-4060435813840662690.post6028895322690737053..comments2024-03-07T17:52:06.507+08:00Comments on Arduino Basics: 433 MHz RF module with Arduino Tutorial 3Scott Chttp://www.blogger.com/profile/10071004090415946390noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-4060435813840662690.post-69953687611190124692020-02-28T17:34:02.691+08:002020-02-28T17:34:02.691+08:00I would be interested in your code - feel free to ...I would be interested in your code - feel free to pastebin a link.Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-48956580764047598732020-02-25T21:44:20.360+08:002020-02-25T21:44:20.360+08:00This is wild. Why are you making case statements b...This is wild. Why are you making case statements based on the duration of each high and low segment? This can all be simplified by a simple binary encoding to a bit stream at a certain baud rate. I feel like you are adding a layer of confusion on top of this that is unnecessary. <br /><br />Instead of having to do a bunch of analysis and see what "type" of signal is being sent falls into SH,SL, VLL, ect... you could just find the baud rate and record if it was high or low (1 or 0). This would also make it more robust for other devices as this will only work for this product.Jesse S.https://www.blogger.com/profile/04337157909676961565noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-15379566819024441972019-07-30T14:13:04.196+08:002019-07-30T14:13:04.196+08:00There may be a difference. I cannot remember. I ma...There may be a difference. I cannot remember. I made these tutorials so long ago. What is important is that you understand my intentions and what I was trying to achieve. Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-25095846237335589382019-07-25T06:22:20.506+08:002019-07-25T06:22:20.506+08:00Scott! Gracias por compartir tus conocimientos. Es...Scott! Gracias por compartir tus conocimientos. Estoy leyendo tus tutoriales lejos de casa y sin posibilidad aún de trabajar con el arduino.<br />Te consulto, es posible que el case 2 y case 4 estén invertidos en comparación al tutorial anterior?FERNANDOhttps://www.blogger.com/profile/09447873853257728333noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-48985688860517880522018-05-30T10:23:43.453+08:002018-05-30T10:23:43.453+08:00You would probably have to use a serial print comm...You would probably have to use a serial print command or something.Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-48633163989420589592018-05-10T21:57:24.154+08:002018-05-10T21:57:24.154+08:006Dear :Scott C
Plzz CAn YOu Help ME?
Q: How to Tra...6Dear :Scott C<br />Plzz CAn YOu Help ME?<br />Q: How to Tranmitte signal and Recived In ploter 9600 Veiw signal ?(433 mhz Arduino )pakturkishhttps://www.blogger.com/profile/11338566012717748857noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-66804398601634253232018-01-31T09:34:06.213+08:002018-01-31T09:34:06.213+08:00Hi Scott,
Excellent tutorial and really pleasant t...Hi Scott,<br />Excellent tutorial and really pleasant to follow.<br />I own a Chacon Remote Control (Model: RSL366T). Using Tutorial 2 as a guide, I came to the point that this remote control sends two codes (4 x code1, 4 x code2). Just to let you know if you didn't (but I doubt).<br />The result is really exciting... I'm going to follow Tutorial 4 now.<br />Thanks for the nice work.<br />Claude Snoreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-68143870697272631712017-05-21T15:01:34.610+08:002017-05-21T15:01:34.610+08:00No worries - I am glad you got something out of it...No worries - I am glad you got something out of it.Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-48609727078550756632017-05-21T15:00:54.577+08:002017-05-21T15:00:54.577+08:00Excellent - I am glad this tutorial helped you.Excellent - I am glad this tutorial helped you.Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-43274630100840953902017-05-20T20:03:49.687+08:002017-05-20T20:03:49.687+08:00Thanks again, great tutorial.Thanks again, great tutorial.Anonymoushttps://www.blogger.com/profile/11563845654021573677noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-84736737669139108292017-05-20T20:02:30.099+08:002017-05-20T20:02:30.099+08:00Awesome tutorial thanks a lot for all the effort y...Awesome tutorial thanks a lot for all the effort you made my day.Anonymoushttps://www.blogger.com/profile/11563845654021573677noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-43944765509798225392017-01-03T20:13:08.860+08:002017-01-03T20:13:08.860+08:00Oh, I'm sorry. That s ok ! I'll go to the ...Oh, I'm sorry. That s ok ! I'll go to the forum. Thank you very much !Audio Gamershttps://www.blogger.com/profile/06197858143148651110noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-89972842959899455272017-01-02T22:32:35.735+08:002017-01-02T22:32:35.735+08:00Yes it is possible - but no not the right place to...Yes it is possible - but no not the right place to ask this kind of question. This should be in the forum.Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-66008382320955618912017-01-02T21:52:55.474+08:002017-01-02T21:52:55.474+08:00Hello! I have a doubt. I want to control 6 differe...Hello! I have a doubt. I want to control 6 different color leds with push buttons. Each button, controls an led. And I wanna that it work simultaneously. If I press 3 or more push buttons, the corresponding leds light up. It is possible to do something like this? Thank you. Sorry for my english. Best Regards.Audio Gamershttps://www.blogger.com/profile/06197858143148651110noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-91434605940361413202016-09-15T09:49:59.644+08:002016-09-15T09:49:59.644+08:00Yes - because the receiver has an automatic gain, ...Yes - because the receiver has an automatic gain, it is very prone to interference... unless you are constantly transmitting to it.<br />I also have better success when the remote is closer to receiver.<br /><br />In tutorial 4, it just plays the signal back. A timeDelay of 105 proved to be the ideal timeframe for transmission in my case, I could not think of a reason why it should be different for anyone else... but if it works for you... then hard code the timeDelay as 105 - and work with that. <br />Tutorial 3 was just a brute force method to find out the ideal timeDelay.<br /><br />Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-8344615217525980932016-09-14T22:29:32.671+08:002016-09-14T22:29:32.671+08:00Thanks for your reply Scott, all good answers to w...Thanks for your reply Scott, all good answers to what I was asking. <br /><br />I just tried tutorial 4, and had success. This also included holding down the button however. I seem to have some interference unless I hold the remote close to the receiver and 'over power' them. <br /><br />Anyway, I am quite impressed that tutorial 4 works...now to understand WHY it works!Kevinnoreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-15952263767597061892016-09-14T21:47:51.218+08:002016-09-14T21:47:51.218+08:00Hi Kevin,
I will try to answer your questions as b...Hi Kevin,<br />I will try to answer your questions as best as I can.<br />Response to Q1:<br />You could increment by 1ms, however as mentioned in the tutorial, there was a reasonable window of opportunity for my fan/light (75-135ms)<br />b) If there is a success, repeat the process and count the number of times the LED turns on/off... and work it out from that. There are a few other ways you could do it, like serial monitor or LCD display etc etc...<br />c) This sketch can take a while to run as there is 2second delay between each transmission. But I would say that a timeDelay variable above 300ms is probably as high as you would need to go. Most of the time it is likely to be half that (or less).<br /><br />Answers to Q2:<br />You need to repeat as many times as that of your remote. I would advise you to use a single short press of your remote, as holding the button down is likely to affect the transmission code required. Just play around with the timing of the press until you capture the entire signal. Experiment with pressing the remote early, late and inbetween. <br /><br />Answers to Q3:<br />I think somewhere in this tutorial I got things mixed up, but the code should work... I think I got highs and lows mixed up in a table or something, but the code should work as it is... the name of HIGH or LOW may not make sense however..<br /><br />Answers to Q4:<br />I think if there is a long delay between you starting the sketch and you pressing the remote, it will start with a VLH... and perhaps you missed the reading window of opportunity, and did not capture the entire signal... my advice would be to press the remote earlier (and in some cases, before you start reading). The timing of presses is quite tricky - but once you start experimenting with different times, you will understand what is the remote's code and what is noise. You can ignore any VLH at the start.<br /><br />I hope all of this made sense... feel free to continue this discussion in the ArduinoBasics Forum - see the link/tab at the top of this page.<br />Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-70022259131222117502016-09-14T09:06:42.185+08:002016-09-14T09:06:42.185+08:00Hi Scott,
First off, thank you for a very well wr...Hi Scott,<br /><br />First off, thank you for a very well written and easy to follow tutorial. A great introduction to RF decoding and transmitting.<br /><br />I was unable to get my code to work though, and was wondering if there are a few things to try that could affect the success. My thoughts are,<br /><br />1. TimeDelay, would increasing by 5ms skip the required delay? Such as, would it be better to increase by 1ms?<br /> - If there is a success, how do you recover the correct time, since I do<br /> not see any return or exit from the program. (I included a serial.Print<br /> to monitor it).<br /> - How long would you expect this to run? 1000ms would be ridiculous,<br /> right?<br /><br />2. The number of times the code is transmitted.<br /> - You used 6 times as I understand the pattern in your example was marked<br /> by the red lines 6 times, at each VLH. I observed 10 repetitions, <br /> although I held down my remote button until the receive code had <br /> finished. <br /> - Could experimenting with lower amounts be wise, or if I use 10 and<br /> success requires 6, it would inevitably work? (ie: Does this need to be<br /> the exact number of repeats?)<br /><br />3. I noticed that we received a Low signal first, and then a High, and used this pattern throughout. However in the transmit code (Line 115 to 123), you have written a high signal to be transmitted first followed by the low. Is this correct?<br /><br />4. Lastly, do all codes end with a VLH? Would their be a case where the code begins<br /> with it instead? <br /><br />Your thoughts would be much appreciated. Once again, thank you, and keep up the good work!<br />Kevinnoreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-91256111057089730662016-06-14T07:54:24.752+08:002016-06-14T07:54:24.752+08:00Ok - you have three choices.
Choice 1: Try to fin...Ok - you have three choices. <br />Choice 1: Try to find a place away from the interfering signal. Or find a way to shield the receptor from the source of interference.<br />Choice 2: If possible, choose a different frequency (make sure it is legal within your country). This would require a different module. <br />Choice 3: Try your best to capture the beginning of the signal. And try to find out how long that first section goes above the threshold for. It should be consistent. Then use that information to modify your sketch... so instead of just listening for a change from LOW to HIGH (above the threshold), listen for a start signal length that is exactly x length. If it passes that test, then continue to receive the signal. Otherwise reject, and continue listening.Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-76654895485221460602016-06-14T04:43:16.640+08:002016-06-14T04:43:16.640+08:00Yes... Tutorial 2 (sorry, my fault). Btw : excel...Yes... Tutorial 2 (sorry, my fault). Btw : excellent job, tks !!!Anonymoushttps://www.blogger.com/profile/16941574248800945237noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-47237684025684010772016-06-12T12:03:37.698+08:002016-06-12T12:03:37.698+08:00Hi Andre - which tutorial are you having problems ...Hi Andre - which tutorial are you having problems with?<br />In this tutorial - we use an Arduino to transmit the code to the fan/light. Are you talking about tutorial 2 ? Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-81153786196448640112016-06-11T07:51:37.235+08:002016-06-11T07:51:37.235+08:00Hello Scott,
How to make the program stand by for ...Hello Scott,<br />How to make the program stand by for the remote control sign ? Here, the program triggers even withouth any button pressed. Getting noises...(i guess). I tried to remove the antenna of receptor, but the problem remains. Only i can get the remote control sign pressing the button before the program run.<br />Please help me !!!Anonymoushttps://www.blogger.com/profile/16941574248800945237noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-81987673428738936282016-05-27T13:56:03.886+08:002016-05-27T13:56:03.886+08:00No worries - glad it helped you.No worries - glad it helped you.Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-7063747865795549872016-05-27T13:55:06.564+08:002016-05-27T13:55:06.564+08:00Hi Marino,
Glad you could make good use of this tu...Hi Marino,<br />Glad you could make good use of this tutorial. I wouldn't be so hard on yourself. We have all been there. But yes - a valuable lesson that you unfortunately had to learn the hard way. Now I am sure you will never fall for that trap again :)Scott Chttps://www.blogger.com/profile/10071004090415946390noreply@blogger.comtag:blogger.com,1999:blog-4060435813840662690.post-33523055594708884432016-05-26T23:05:10.427+08:002016-05-26T23:05:10.427+08:00Hi Scott, thank you very much for this tutorial wi...Hi Scott, thank you very much for this tutorial with which I was able to 'convert' an infrared command in a signal to control an RF unit.<br />Since I spent a sleepless night, I wanted to warn the idiots like me that the delay time could change within several sketches, such as those using IrRemote, which waste microseconds!My delay time, for example, was 150 in a standalone demo and 135 in the sketch with IRremote! (sorry for my poor english!)marinonoreply@blogger.com