TUTORIAL: How to set up wireless RF (433Mhz) Transmitter Receiver Module - Arduino Quick Simple
Vložit
- čas přidán 29. 06. 2018
- For those who wish to support the channel, my Patreon account is here: / antonycartwright
This short video shows you how I set up an RF transmitter and receiver on the Arduino. It also explains how to encode/decode a string.
Library: www.airspayce.com/mikem/arduin...
For Maximum Performance, watch this video:
• INVESTIGATING: The Ran... - Jak na to + styl
**important note**
place a 100uF cap between VCC & GND close to the receiver. Any small ripple or noise or small abrupt changes in VCC will be amplified by the RX circuit and will show up as an output transition on the RX pin. This receiver is very sensitive and has poor power supply rejection ( very twitchy to noise on VCC)
W comment
Thank you Antony. I've just started with Arduino and my first simple project is to use this module. I've found lots of detailed coding but no one who has simply explained how to add the code to the library, until I found you. So far I have only installed the library and not set the circuits up but I'm already exited to finally get this far. Thank you John.
For anyone confused why the antenna should be 17,3 cm long ... its because it is approx. 1/4 of the wavelength of the carrier wave which is the optimum antenna length for transmission and recieving.
would it work if i make a spring with that length of wire?
@@f.a3202 Yes, that works too
Gauge?
I came here because I was looking for answers. You answered everything. Best voltage, best antenna arrangement, what about curly ones... All answered in entertaining informative content. Full marks. As a 23 year experienced software engineer your explanation of a const will stick with me forever. Legendary. :)
Thanks for this comment! Xxx
I am using a raspberry pi but I still watched this for information and I wanted to comment that this is one for the better videos as there is no music over the voice (what a pleasant change) and it is also fully explained well
I struggled with this for like 1h but this video help me a lot! Thank you very much ❤
Just to test it for myself, I put those little coil antennas on and got a few feet of distance! Made the length wire antenna you suggested and it's great! Thanks.
Thank you so much for this! I am currently using this module for a school project and I was not able to get it to work as needed until I got to this video.
Do you know what I love about your channel? the content you create is practical and actually informative and useful. Keep it clear and easily understandable, cheers 👍
Thanks Mr Dosage! I try to make it this way. It's difficult running the channel though because some people like different things. It's taken me 18 months to understand what people like. Just under half of my subscribers seem to come here to see what interesting things I get up to - They seem to like quick/snappy/interesting/getting started/informative type videos - They come for interesting/fast/clear info. Just under half seem to use the channel for entertainment purposes - They seem to prefer the long/drawn out/boring/talking/chilling out type videos (The type which I personally don't watch). The remaining subscribers seem to split into another two groups; One group watches/likes all videos regardless of the subject, and the other group watches certain ones in order to pick faults - presumably in order to make themselves feel better... LOL. If you can give me any feedback on this, that would be great!
Antony Cartwright can u start a car for this
This is brilliant, thanks! I acquired 2 sets a few years back but at that time there were no libraries for them, and I had to write my own basic drivers for them, using them like a raw serial link was dodgy at best for me. This will let me get a lot more use out of them.
Very good tutorial, thanks. I ended up using the HT12E and HT12D, encoder and decoder chips, to process the serial data into bytes, check address etc then connected the data busses, xmt and receive to Arduino pins, works well. You commented the code was unnecessarily complicated, with these chips no library is needed just pinmode settings, digital write and read. The decoder chip has a VT pin, valid transmission pin you can monitor in the loop section to see if a transmission is coming in.
He was commenting that the C/C++ syntax for a string constant (const char * ...) seems unnecessarily complicated, rather than the library. The Holtek (HT12E / HT12D) chips seem like a good way of doing it though. I looked into using them years ago but never got around to actually building something with them. If I manage to find them, I'll give it another go.
Good Tutorial. Many thanks !
you can change the communications speed by the way
lower speed = less errors = longer range = longer message time
i tested speeds as low as 25 bits/sec , works but takes forever to send few bytes
For those who use Uno (16Mhz) and mini (8Mhz) like I did, remember to set your uno speed to half. UNO: RH_ASK driver (1000, 11,12,10); Mini RH_ASK driver (2000, 11,12,10);
Great tutorial. Thanks!
Fantastic presentation. cheers
Thanks 🙏 all the best from Angola 🇦🇴
Thanks!
very well put togeather and exsplaining!
I've been looking into making a wireless on/off rocker switch set up for the light bars in my truck. I'm wondering if this type of an rf switch would work to power on and off the lights without running wires into the cab. (Ie. Transmitter in cab receiver under the hood to control more then one like) is it possible to do with these?
Great video! Your long explanation really helps!
Great video, thanks. For a better result I recommend investing some more money in a better receiver called RXB6. The RXB6 is a superheterodyne receiver and has a much better sensitivity and you will get a better range. Don't forget the 173mm antenna on both the transmitter and receiver.
Excellent explanation. I like it. Thanks
I think I may have bought these in error yesterday. Can you send raw data through like a video feed, or even 2 devices on 2 different frequencies to send usb data?
i want to make my own transmitter receiver module with which crystal oscillators to use, i haven't yet found a vid to explain it, that would be cool if you made one
Thank you for this helpful video
Thanks for the explanation, big help 👍👍👍
I'm testing a similar setup, have the transmitter on a nano with 6v and a cheap Baofeng radio with a 433mhz yagi and on a good day with line of sight I can get over 1km reception. I know that's not exactly what you're using but just to add a bit more info to the discussion.
Hi is there a tutorial for that for a beginner?
Is the yagi home made ? Can you provide a link to a drawing or sketches?
12:13
ampersand means 'address of'.
(pointer points to first byte of value.
the function expects a pointer on first variable and expects a pointer on second variable too.
pointer holds an address of memory)
because normal variable used (not a pointer to dynamically allocated memory).
to get something that is like a pointer of from a variable.
we ask for address of that variable , where is it where it stores the value.
You should also be able to use shorter antennas that are equally effective as long as their lengths are exactly 86.5 mm or 43.25 mm (173/2 and 173/4, respectively (42.35 mm ~ 433 Hz).
It works with the regular blink code on the transmitter an your code on the receiver both on pin 13 but your code on the transmitter an receiver doesn't work,I opened the serial monitor an even solidered on antennas but nothing gets transmitted,what could I be doing wrong?
Sir i tried to use this as to make my project but everytime i put another if statement inside the if statement its my led output is not function and also the transmiter send messgae and the receiver accept it and then the led output please help 😭😭😣😣😣😣
So understanding this. I could use a magnetic reed switch to trigger sending say 13579, the other receives it, an if command reads the 13579, triggers a servo. And seeing i could do that once, i could send a seperate message with a second magentic reed switch to send 02468 to send a separate message to trigger the second servo?
literally day 1 of coding for me here
I want to control two stepper motors with joystick and using 433Mhz Rf to make Wireless control.. So how can i change this code to work with my project?
the antenna part is excellent. tnx..
Very nice and briefly defined. can you please tell If I want to use Only Receiver and get to know what my Fan remote is transmitting? I want to control my fan using Arduino but instead of my Fan remote I want to transmit that frequency from Ardunio, how it can be done?
Thank you, Can you make a video using the SRX882 & STX882 V1.3
because they need just 3.6V
Best regards.
Hamza Lee hey, I'll try!!! I have those I think!
Hi Antony, can yo do this link insted of arduino nano, but attiny85? And then is it possible to drive two brushed dc motors back and forward at the same time for drift?
How can I pair other covered rf remote control with this module
you make good quality videos and the very easy to follow and helpful thank you how do you not have 100k scribers
Thanks Nick!
Can you tell me what the current consumption of receiver module when ideal ON but not receiving anything?
is there something I should consider when the transmitter is connected to my arduino mega and my receiver to an esp32?
Hi, i want to use 4 transmitter with one receiver. Do you think it is possible? Any interference problem?
New subscriber always watching yourvideos ❤thanks for sharing
Very very good presentation :)
Thanks!
Can you explain the 433 mhz transmitters and receiver module circuit diagram
Amazing video, but I still can't get either my receiver or transmitter to work at all. Do you have advice for how to test each individually to try and isolate the problem?
Hi Great video!! Hello, anyone knows if its possible to use this 433Mhz receiver to receive commands from Key Garage transmitter?
Does the aerial wire need to be straight or can it bend within the enclosure?
Do you have to have an arduino on both sides? If I wanted a very simple sensor, can I just power the transmitter side and pulse it's data line or does the Tx just not work without the processor?
hi, in the small module i have missing the small coil, only have the bigger one, is it an important missing part?
Great video, but my circuit doesn't seem to be working. Could it be because I'm using a Mega instead of a Nano or Uno?
No...99% not
have you tried to read any sensor values with the arduino mega before? if it works and you can see the value clearly then i think the problem is either in the transmitter or the receiver
can the data become forward and reverse output ? if we want to add an esc or motor
@AntonyCartwright when i download the .zip file from radiohead and follow the directions for putting the library into the sketch, ask_transmitter and ask_reciever dont show up. is this a problem with radiohead or can i fix it somehow?
Good explanation, But at some point the video starts to lag a long way behind the audio., which confused me..
stuartajc you're right. :(
how to multiple RF(433Mhz) Transmitter Receiver module work in one place.beacause when i sent data the receiver end another receiver working that time.have you got some tips??
can you teach the code on how to send sensor data to receiver
Can I read ultrasonic data and send it through this system? and what is the maximum distance with this? I need to know this urgently thank y o
Could you provide links to some transmitters and receivers please ?
Can I give the received to a speaker ?
Hi
How can i send a string that have 24 byte 0&1 by rc switch transmiter
Could this concept be used with the turn signal signal For instance if the turn signal is activated the transmitter will send signal to reciever indicating that the turn signal has been activated ??
Great video, I have a question for transmitter. I don't want a arduino for transmitter and send fixed message for only error exception. For example "Door number 2039 is open". Is there a module you can recommend
ATTINY85?
what to do when there are two transmitter and one receiver ? How to distinguish which one is nearer to the receiver?
Will this work with RFID tag like Key FOB?
how far can the RF range cover in within plain sight and in building?
How much power does the transmitter consume?
Hey, great video..
I m trying bidirectional communication using these sensors.
I have a transmitter and receiver on remote and a transmitter and receiver on robot.
The robot will send the battery voltage to the remote, (only if the voltage is in acceptable limit the remote should work), then the remote will send command to the robot to move (forward backward sideward etc).
I m doing this using arduino nano but bidirectional is not working.
have you tried bidirectional communication, is it working?
@@saulpayan1171 there is an inbuilt example (reliable datagram) with the library which does bidirectional communication. You can try that. I was able to achieve it.
Mine is not working and I got the reciver that is adjustable I think that is the problem but I am not sure???
Hi, Nice video.
I bought some HC12 433mhz transceiver modules that I am hoping to use to link my pc with my drone so I can upload code remotely. Have you done anything link this before, or do u know if it is possible and what level of coding is involved. I am using an arducopter APM flight controller.
Andrew Walsh interesting idea, would love an update on your project!
Can I use a esp32 as transmitter And arduino uno as reciever?
does the reciever know which transmitter to be listening for? ... can one transmitter drive 2 or more recievers by accident for example?
wait so it is data vcc and gnd? I've put vcc on data and data on vcc then. but it still worked. now i tried it like in the video and it still works fine. What is this now, how is it possible?
My transmitter/receiver combo is a four channel 433Mhz setup with a 1527 chipset working just fine as a standalone receiver and transmitter. Hooked up an led to the receiver and had no trouble turning it on and off with the transmitter. When I connect it to the Nano with data pin 0 connected to pin 2 on the Nano, code loaded with no errors, I get no output on the serial monitor. Baud rate is set to 9600 and com port is correct. I'm a bit stumped as to why this is not working for me??? I inserted a Serial.println message after the Serial.begin statement, and that shows up fine too, but nothing else???
Same here. Did you find any resolution?
I am your biggest fan
my transmission is off by a couple hundred is the ant lengh responsable for this? im tryin 2 tx on 433.920 but its 433.681 any ideas? also im using the rc switch lib instead of radiohead at the mo if that helps?
You might have the 315 MHz instead of the 433. To find the right length, use the equation (speed of light) = (frequency)(wavelength), so 3*10^8 = 315000000 * (wavelength). Use whatever frequency you have and solve for wavelength. Then, just keep dividing the wavelength by 2 until you get a reasonable length. In this equation, the wavelength comes to 95 cm, which is a long wire. Divide by 2 a couple of times to get 23.8 cm or even 11.9 cm, which is a good length.Sorry if this is kind of late.
@@brendonlovejoy2376 got 1 of each and read the label its correct label.
Super video!!!!
Nice info, thanks :)
Could you put a larger antenna on the receiver to gain further range , only currently getting about 15m from these
Buy a better receiver like RXB6. More expensive but a lot better. Don't forget the antenna, 173 mm on both transmitter and receiver.
hi
Thank you Antony
I didn't try on Uno but it doesn't worked on esp32
Does anyone know if there is a way to use RF with only one arduino?
What distance does it cover?
hey i dunno why but i got an error with my transmitter
C:\Users\knoxt\AppData\Local\Temp\arduino_modified_sketch_890292\ask_transmitter.pde: In function 'void setup()':
ask_transmitter:16:10: error: 'driver' was not declared in this scope
if (!driver.init())
^
C:\Users\knoxt\AppData\Local\Temp\arduino_modified_sketch_890292\ask_transmitter.pde: In function 'void loop()':
ask_transmitter:28:5: error: 'driver' was not declared in this scope
driver.send((uint8_t *)msg, strlen(msg));
^
exit status 1
'driver' was not declared in this scope
that was the error code
can we use node mcu with this code
Hey I really like your video! Pretty much exactly what I need right now - unfortunately I am very dissatisfied with the audio quality. I'd be happy to help you reduce the clipping, I think you can add another audio track in the youtube studio editor, so I could just send you the edited audio file in same length!
Hey, thanks. Unfortunately, at the time when I was recording those videos, CZcams wasn't paying me enough to warrant buying decent equipment. It was just me making free videos for people. Things are changing now, and so will my equipment. 😀
best video of this type
Thanks!
Can this be done with a raspberry pi 3b?
The receiver board in my weather station has died it operates on 433 mhz and uses an lm358 op amp the same as this board 3 connections ground data and vcc will that receiver board be able to replace mine they look very similar?
The receiver is just a tuned circuit, so there is no reason why it shouldn't work, other than the tuning of the circuit via the variable inductor.
Can i have a copy of your weather station project sir?
Does the circuit have a delay?
im building a high altitude rocket, how can i get the range to 40,000+ feet?
Does it work with a Raspberry pi pico too?
I found a couple of these now in 2021 that I forgot to explore back then. Even says "2008-8" as in the video.
Hello guys i have one question .. is this device enough to make a relay attack on cars?
How can I have 2 of these set up near each other without them interfering with each other?
can I use this set up to test tv, dvd or sat remote controls to see if every button is shooting IR out?
I don't know if you still need an answer, but you can usually test a TV remote control by pointing it at a digital camera, and watching the display / screen on the camera.
Digital cameras see far enough into the infrared to detect the output of most remotes, but it gets displayed as visible light.
Hello Anthony, i have a question. my modules comes without that 3 turn coil on emitor module. Also the receptor module haven't that normal 0,5 W resistor solder on pcb face with smd components. is about that big resistor. i can't see the color to read the value. can u help me with value of that resistor? Thanks a lot !
Use a multimeter! :-)
@@AntonyCartwright yes i know how to use a multimeter and also i know how to read color code but that resistor is missing from receptor module.
@@AntonyCartwright thanks i manage to freeze image and i saw brown -black-green-silver. so 10x100k tolerance +/- 10%
I'm having a hell of a time just getting the receiver tuned. Pretty sure the one I got is just bad out of the box because it doesn't draw any current at all from my bench power supply.
nice one!
Hello,
When i plug my receiver into my arduino , arduino shuts off as if there is a short or something. iIve tested with my other arduino and my other receivers and the same thing happens is this normal?
It's not normal. The chances are that you're pulling too much current. While the Arduino is running, connect the receiver gnd to gnd, then vcc to vcc. Does it still do itm
can you transmit music?
This should work without antennas shouldn't it? And if it does i have a question about why is my printing so slow instead of 0.2 seconds like with yours it takes me 5 seconds or more just to print one.
It's supposed to have an antenna of an extract length, from what I remember. To be honest though, these modules are not very good quality.
I'm working on a project and I need it to input the distance between the 2 arduinos in meters
You can't do that with this equipment. The libraries only tell you about data which has been pulled though, as far as I'm aware. You'd be better off getting GPS modules.