Тёмный

Build a wireless RC unit Arduino - FREE CODE 

Kris Kasprzak
Подписаться 20 тыс.
Просмотров 78 тыс.
50% 1

Build a wireless RC unit for you boats, plans, cars. Communicate up to 1000 meters and control direction and continuous servos. Perfect for controlling boats, planes, cars, and more. Step, parts list, and free source code.
Source code
github.com/KrisKasprzak/Sampl...
Parts List
_______________________________
Arduino
www.amazon.com/gp/product/B01...
Antenna
www.amazon.com/gp/product/B01...
Antenna breakout
www.amazon.com/gp/product/B00...
360 degree servo
www.amazon.com/gp/product/B01...
9G servos
www.amazon.com/gp/product/B01...
Links to library
_______________________________
github.com/maniacbug/RF24
link to rf24 help page
starter-kit.nettigo.eu/2014/co...
pin connections
_______________________________
RECEIVER
Arduino device
Vcc Servo Vcc, breakout board Vcc
Ground Servo ground, breakout board ground
A0
A1
A2
A3
A4
A5
1
2
3
4 Rudder servo control line
5
6 Sail servo control line
7
8
9 CE (UNO only) 40 mega
10 CSN (UNO only) 53 mega
11 MOSI (UNO only) 51 mega
12 MISO (UNO only) 50 mega
13 SCK (UNO only) 52 mega
SDA
SLC
note IRQ is not used
TRANSMITTER
Pin connections
Arduino device
Vcc one leg of 10K pot
Ground common on push buttons, and 10K pot
A0 rudder control, center terminal on 10 K pot
A1
A2
A3
A4
A5
1
2 push button for sail in (other side is to ground)
3
4 push button for sail out (other side is to ground)
5
6
7
8
9 CE (UNO only) 40 mega
10 CSN (UNO only) 53 mega
11 MOSI (UNO only) 51 mega
12 MISO (UNO only) 50 mega
13 SCK (UNO only) 52 mega
SDA
SLC
note IRQ is not used

Наука

Опубликовано:

 

29 июн 2016

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 91   
@7grounds
@7grounds 7 лет назад
great video, basic feature for everything, waiting for the 3d printed transmitter etc
@PauL-rm2mq
@PauL-rm2mq 8 лет назад
That is a really good project ! Keep up ,you are doing a great work
@KrisKasprzak
@KrisKasprzak 8 лет назад
Thanks for watching!
@chungchichiu9779
@chungchichiu9779 6 лет назад
I cannot find the video of part 2 creating custom Arduino enclosure
@kuyaenan_gameplays
@kuyaenan_gameplays 6 лет назад
How can I install 12V dc motor in RC using arduino uno ? Thank you sir.
@yatinsanjeev1824
@yatinsanjeev1824 6 лет назад
Please show me use ir transmitter and receiver to control
@vishalgaikwad3044
@vishalgaikwad3044 5 лет назад
hello sir with this circuit can i add some more motors with more connections.please help me sir
@ITZKDOTK
@ITZKDOTK 7 лет назад
ould you do a similar project but over wifi? or maybe 3g??
@whome7004
@whome7004 4 года назад
Gosh I would like to do this but what do you do when pockets are turned inside out and can't afford to buy the cheapest way
@Sal-jc7wo
@Sal-jc7wo 7 лет назад
How do you know where to put all the wires
@debashishdas4865
@debashishdas4865 4 года назад
Bro can you please upload the circuit diagram of the transmitter and receiver
@Latvian3Dman
@Latvian3Dman 8 лет назад
Thank You for sharing Your work!
@KrisKasprzak
@KrisKasprzak 7 лет назад
You're very welcome.
@aravindvenk
@aravindvenk 6 лет назад
Hi, Would I be able to control more than one servo through more than one joystick with the same tranceiver pair or do I need to add a second tranceiver pair?
@KrisKasprzak
@KrisKasprzak 6 лет назад
You could easily have multiple joy sticks and multiple servos. The transmitter will simply read the position of each joystick within the loop() and send the appropriate positions (with and identifier to drive the appropriate servo). The receiver would receive the positions and identifier and drive the corresponding servo. I'm actually doing this but not with joysticks--I'm using a potentiometer and a switch to control rudder position and sheet position.
@4funrc11
@4funrc11 6 лет назад
Hey! ÷*) Great info! Also, antenna link is no longer valid. You have another? Thx! PS: I don't see the "In my next video..." you spoke of (?).
@OneMediaCenter
@OneMediaCenter 7 лет назад
can this be used for 1 transmitter for 2 separate receivers controlling 2 servos. I need similar thing except 2 servos are far apart from eaxh other. GREAT VIDEO..with lots of supporting documentation
@KrisKasprzak
@KrisKasprzak 7 лет назад
I've not tried this, but i'm 99.9999% sure you can. I would add a parameter to the structure "ID" and set an ID for each receiver. The sender would be something like data.ID=1, data.motor=223, radio.write(&data, sizeof(data)) data.ID=2, data.motor=453, radio.write(&data, sizeof(data)) and so on each receiver would have an if to test it's correct data, something like receiver 1: if data.id = 1 servo.write(data.motor), else do nothing receiver 2: if data.id = 2 servo.write(data.motor), else do nothing and so on
@stephenvowles1326
@stephenvowles1326 7 лет назад
Ok worked it out that the Transmitter code is hidden and commented out within the Receiver code. Cheers
@chemgreec
@chemgreec 7 лет назад
i just build a full rc speed boat with the same parts and I was thinking of making a video but since you made one i dont think i can add anything..it is great pleasure to build everything yourself though(i did the same)
@KrisKasprzak
@KrisKasprzak 7 лет назад
Please post a vid, we would love to see your work.
@firecrackers7667
@firecrackers7667 5 лет назад
did u post your video?? i would like to see
@ecoplanetrenovaveis6827
@ecoplanetrenovaveis6827 7 лет назад
Hi, I'm having problems at the beginning of your code! I would like to try to do what you did, but I got stuck right in the part of having to do something with such a "structure.h". Can you give me a hand and explain what I have to do step-by-step?
@KrisKasprzak
@KrisKasprzak 7 лет назад
there are a few ways to pass data using these transcievers, the easiest was is using a data structure. Basically it's a way to store data kinda like an array, then you only need to pass the array. For example MyStruct.speed = 10, MyStruct.Month = 12, MyStruct.weight = 2.312, then you only need to Send(MyStruct). The key is that the reciever must have knowledge of the same structure. The easiest way to guarantee that is to put the definition of the structure in a file that the transmitter and receiver read. That way both programs use the same structure. in C, that middle files is called a header file (.h). Put the structure definition into a .h file then #include that .h file in both programs. Hope this helps.
@FlexPhill
@FlexPhill 6 лет назад
Hey, is it possible to make this without the big board behind the reciever? For some kind of micro boat?
@KrisKasprzak
@KrisKasprzak 6 лет назад
You can use an Arduino NANO, works just fine and is 1/4 the size.
@FlexPhill
@FlexPhill 6 лет назад
Wow thanks for your fast answer. I am working on a project here in Germany and I need someone with knowledge about that electronics. Would you like to give me your contact mail for a small coorporation?
@KrisKasprzak
@KrisKasprzak 6 лет назад
I just sent you a message through RU-vid
@FlexPhill
@FlexPhill 6 лет назад
I just sent you an Email.
@AnekwongYoddumnern
@AnekwongYoddumnern 7 лет назад
if I'm use the general RC: flysky , this project work?
@KrisKasprzak
@KrisKasprzak 7 лет назад
not sure, sorry.
@S0K0N0MI
@S0K0N0MI 4 года назад
How robust is the radio signal? Does it get drowned out by other radios easily?
@KrisKasprzak
@KrisKasprzak 4 года назад
I've never had any issues, but i'm not in a very congested area
@toastedtaco55
@toastedtaco55 6 лет назад
" radio.read(&data, sizeof(data));" exit status 1 expected primary-expression before ',' token This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
@arpithjain4889
@arpithjain4889 7 лет назад
hello, this was a very nice tutorial... i want to use a gyro sensor instead of the potentiometer to control the servos...is this possible..? if yes...can i hv the code... thanks in advance
@KrisKasprzak
@KrisKasprzak 7 лет назад
I"m sure you could, i don't have any code. The trick will be to not over or under compensate the servos based on gyro sensor position.
@mhdghozaliali6954
@mhdghozaliali6954 6 лет назад
Sir Where transmitter source code ?
@mhdghozaliali6954
@mhdghozaliali6954 6 лет назад
sir i have tried the project and i found the problem on the recevier pulled out the SHIT message and the servo kept spinning. Please help. Thank you very much
@KrisKasprzak
@KrisKasprzak 6 лет назад
Oops on the message...must of been mad when I was debugging operation:) I've fixed that. In reciever code, put a Serial.println(data.Rudd); and another line for Serial.println(data.Sail); and see what the values are. I suspect you are sending a value for sail that will not stop the servo. My servos stop at 90, (see the transmitter code // stop sail data.Sail = 90;). YOu may have to adjust the value. I don't know what servos you are using--so no idea what value will stop them.
@mhdghozaliali6954
@mhdghozaliali6954 6 лет назад
Kris Kasprzak thank you sir for your attention. I use servo sg90. for rudder. guess what value is suitable for my servo
@KrisKasprzak
@KrisKasprzak 6 лет назад
the sg90 is limited to range--makes for good rudder. i use a different servo for sail--one that spins constantly. you will have to play with the values until you find the one that makes it stop--no way I can guess that.
@vpikooorka
@vpikooorka 5 лет назад
Hello, dear friend, help me with how to assemble the receiver and transmitter on the Arduino nano for my nephew, control the radio, the fire truck, for 7-8 channels, control the movement back and forth to the left, to the right, the headlights, the retractable staircase. I have arduino nano 2 pcs. joystick module, 2 pcs. nrf24l01 1 pc. nrf24l01 + pa + lna 1100m NRF24L01 + 1pc. driver l298n mini 4 pcs. Servo 4 pcs. LEDs, toggle switches, i you need a code and a circuit.
@Isotope1213
@Isotope1213 7 лет назад
can you please post the wiring part and the part list. it was too fast to follow
@KrisKasprzak
@KrisKasprzak 7 лет назад
I updated the source code with better pin-outs, parts lists, and links to help pages and libraries. This info is also in the description.
@stephenvowles1326
@stephenvowles1326 7 лет назад
Source code is there for receiver but can't find transmitter code. Am I missing something?
@KrisKasprzak
@KrisKasprzak 7 лет назад
The transmitter code is at the end of the sketch but commented out. Same for the structure definition. When you get your project complete, share the results, i'm sure my subs would like to see more projects in action.
@stephenvowles1326
@stephenvowles1326 7 лет назад
Thanks Kris. Will let you see my results once I get something working. Cheers once again.
@shraddhapatil7466
@shraddhapatil7466 7 лет назад
Sir,i want a code to run an ornithopter,cud u plz provide it?
@rahuljathar4430
@rahuljathar4430 3 года назад
No, you have to work on your projects, by yourself. You can take help from others but can't expect others to do the hard work for you. Good luck. Oh, I see the comment is 4 years old. Hope you have built the ornithopter or whatever you call it. Best wishes
@MrBeelai
@MrBeelai 7 лет назад
Dear Sir, the link for source code does not work, would you be kind enough to increase more input and outputs? Thank you.
@KrisKasprzak
@KrisKasprzak 7 лет назад
sorry about that, i must have accidentally deleted the file. I'll re-post and reply when it's there.
@MrBeelai
@MrBeelai 7 лет назад
Thank you very much indeed.
@KrisKasprzak
@KrisKasprzak 7 лет назад
Try this link drive.google.com/file/d/0ByEQKtsOckWBLUdHNURKU0szbTg/view?usp=sharing
@MrBeelai
@MrBeelai 7 лет назад
Thank you.
@gbhamiltons
@gbhamiltons 7 лет назад
No matching function for call to 'RF24::write(int)' Wtf did I do wrong?
@gbhamiltons
@gbhamiltons 7 лет назад
One hour spent on this problem not working
@KrisKasprzak
@KrisKasprzak 7 лет назад
What's it not doing? Hard to say with only one line provided (and not a line from my example). :: between object and method, not a period? RF24.write(int);
@Taran72
@Taran72 5 лет назад
Great project but I can't add the structure.h file to the library. do I have to zip it first? I can't add it as a zip file: I just tried.
@KrisKasprzak
@KrisKasprzak 5 лет назад
Just create a file called structure.h and add the contents listed in the sketch, then save to a folder in your arduino\library folder called structure. You will have to restart arduino ide to have that new library (the .h file) to be recognized.
@Taran72
@Taran72 5 лет назад
Thank you very much for your reply! I tried that but it didn’t work. I will try again later, maybe I missed something the first time. (I am a beginner) Thank you for creating your channel with all sorts of cool stuff. :)
@KrisKasprzak
@KrisKasprzak 5 лет назад
@@Taran72 Can you be specific as to what doesn't work?
@Taran72
@Taran72 5 лет назад
@@KrisKasprzak , the problem is that the file doesn't' recognize the library. I generated the file and folder as you say but it didn't work. later I will double check everything and let you know. thank you very much for following up. :)
@Taran72
@Taran72 5 лет назад
@@KrisKasprzak , I repeated the installation and now Arduino recognizes the structure.h library on the list but when I check the code I get the error: "Transmitter-RC:1:23: error: structure.h: No such file or directory compilation terminated. exit status 1 structure.h: No such file or directory" I understood that I had to create a "structure" folder and then inside create a "structure.h" folder with inside the structure.h file. that's the only way my Arduino IDE can recognize the file.
@osaberdascoisas6100
@osaberdascoisas6100 4 года назад
Part 2?
@S0K0N0MI
@S0K0N0MI 4 года назад
I dont suppose you still have the source code somewhere?
@KrisKasprzak
@KrisKasprzak 4 года назад
darn, thanks for pointing out the link was dead. I just fixed it, here's the source, note the receiver, transmitter, and struct is all in the same .ino drive.google.com/file/d/14fZkRN5SngMXmuf0ggzWb--xYFgjdd4S/view?usp=sharing
@baseandtrance1110
@baseandtrance1110 6 лет назад
What range did you get
@KrisKasprzak
@KrisKasprzak 6 лет назад
I never really tested the rage more that around 400 feet, but I'm sure it's range is much better.
@baseandtrance1110
@baseandtrance1110 6 лет назад
Kris Kasprzak thanks
@ungku0728
@ungku0728 8 лет назад
hye sir..can i have ypur email for this project? currently i'm trying to convert logitech 3d pro gaming joystick to rc tx for controlling my quad..i would like to seek help for the wiring and circuit..tq sir
@KrisKasprzak
@KrisKasprzak 7 лет назад
I would recommend joining the arduino forum. you can post code and get help by a huge community of people forum.arduino.cc/
@MMM222apna
@MMM222apna 5 лет назад
How many rupees transmitter and reciver
@KrisKasprzak
@KrisKasprzak 5 лет назад
I have seen these things for a few hundred rupees each. I've seen some without antennas for about 70 rupees. Do you have Amazon or Ebay in India? Not sure how you buy stuff over there
@mhdghozaliali6954
@mhdghozaliali6954 6 лет назад
Sir I want to try this projeck, and please give me the transmitter source code.
@KrisKasprzak
@KrisKasprzak 6 лет назад
Mhdghozali ali all the source code is in the download file it's just commented out
@mhdghozaliali6954
@mhdghozaliali6954 6 лет назад
Kris Kasprzak In the code transmitter. Does anyone have to modify or just throw away the * /. Thanks for the response
@KrisKasprzak
@KrisKasprzak 6 лет назад
There are 2 sketches in that file, you will need to keep only the receiver code for the receiver.ino and use ONLY the transmitter code for a second transmitter.ino
@mhdghozaliali6954
@mhdghozaliali6954 6 лет назад
Kris Kasprzak Sir why when I uploaded an error RcPacket does not name a type. Please help
@KrisKasprzak
@KrisKasprzak 6 лет назад
did you create the Structure.h and put it in you Arduino library folder (and restart arduino IDE)?
@FoxRacingGaming
@FoxRacingGaming 6 лет назад
NEVER unplug and plug in wires while the arduino is powered like you did at the end unless you want to short your arduino out..
@edwarddunn2747
@edwarddunn2747 Год назад
Talking to fast for old people please slow down. I
@mohammadwattad1772
@mohammadwattad1772 3 года назад
צאילשך גצשל
Далее
Using Multiple Displays with Arduino FREE CODE
3:25
Просмотров 66 тыс.
HYDRAULIC PRESS VS ARMOR, USA AND RUSSIA
10:16
Просмотров 526 тыс.
Воскресный утренний стрим!
1:00:16
3D Printed Hydrofoil with Sonar
24:20
Просмотров 34 тыс.
RC Electronics for Noobs
5:45
Просмотров 1,7 млн
Arduino + NRF24 simple tutorial and range test
12:37
Просмотров 346 тыс.
Новые iPhone 16 и 16 Pro Max
0:42
Просмотров 2 млн