На главнуюНаука и техникаПохожее видеоЕще от: Kris Kasprzak

Build a wireless RC unit Arduino - FREE CODE

Оценок: 539 | Просмотров: 51810
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 https://drive.google.com/file/d/0ByEQKtsOckWBLUdHNURKU0szbTg/view?usp=sharing Parts List _______________________________ Arduino https://www.amazon.com/gp/product/B019SXND4O/ref=oh_aui_detailpage_o01_s01?ie=UTF8&psc=1 Antenna https://www.amazon.com/gp/product/B015PSEC32/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 Antenna breakout https://www.amazon.com/gp/product/B00VFNZN8K/ref=oh_aui_detailpage_o00_s01?ie=UTF8&psc=1 360 degree servo https://www.amazon.com/gp/product/B01BRH0S6U/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1 9G servos https://www.amazon.com/gp/product/B015H5AVZG/ref=oh_aui_detailpage_o04_s02?ie=UTF8&psc=1 Links to library _______________________________ https://github.com/maniacbug/RF24 link to rf24 help page http://starter-kit.nettigo.eu/2014/connecting-and-programming-nrf24l01-with-arduino-and-other-boards/ 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
Категория: Наука и техника
Html code for embedding videos on your blog
Текстовые комментарии (77)
Taran72 (4 дня назад)
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.
Taran72 (3 дня назад)
+Kris Kasprzak , ok :)
Kris Kasprzak (3 дня назад)
+Taran72 100K 50k 10K blue lives matter what pot value is anything above a couple K will be fine
Taran72 (3 дня назад)
Ok: looks like it's working, but I don't have a 100k pot but a 50k pot and it's working fine as well. I think I also have an issue with interpherence. Now everything is working 100% exactly as you instructed in the video. Thank you so much!!!
Taran72 (3 дня назад)
+Kris Kasprzak found the error: I made the structure.h file with the arduino ide and not with notepad. for some reason when I re-created the file with notepad, saved it as structure.h and then copied it in the folder structure inside the library it worked (i mean that there are no errors when verifying the code: I still need to upload it but I am sure it's ok. if you don't hear from me it means that all worked! :) )
Kris Kasprzak (3 дня назад)
+Taran72 NO create a structure folder and put the file structure.h into that folder. you must restart Arduino for it to find that lib
Fox Racing (4 месяца назад)
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..
Mhdghozali ali (5 месяцев назад)
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
Kris Kasprzak (5 месяцев назад)
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.
Mhdghozali ali (5 месяцев назад)
Kris Kasprzak thank you sir for your attention. I use servo sg90. for rudder. guess what value is suitable for my servo
Kris Kasprzak (5 месяцев назад)
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.
yatin sanjeev (6 месяцев назад)
Please show me use ir transmitter and receiver to control
Base And Trance (7 месяцев назад)
What range did you get
Base And Trance (7 месяцев назад)
Kris Kasprzak thanks
Kris Kasprzak (7 месяцев назад)
I never really tested the rage more that around 400 feet, but I'm sure it's range is much better.
Ferdinand Ramos (7 месяцев назад)
How can I install 12V dc motor in RC using arduino uno ? Thank you sir.
Toasted Taco (7 месяцев назад)
" 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.
Mhdghozali ali (9 месяцев назад)
Sir I want to try this projeck, and please give me the transmitter source code.
Mhdghozali ali (8 месяцев назад)
Kris Kasprzak Thank you sir was successfully uploaded. Can the 360 ​​servo be replaced with a 12 volt dc motor? Good luck always
Kris Kasprzak (8 месяцев назад)
Yes notepad will work. put in this folder C:\Program Files (x86)\Arduino\libraries (or where ever your Arduino Libraries folder is).
Mhdghozali ali (9 месяцев назад)
Kris Kasprzak Thank's verry much Sir Can file structures be created with notepad like your video? And in which folder is placed the file structure
Kris Kasprzak (9 месяцев назад)
did you create the Structure.h and put it in you Arduino library folder (and restart arduino IDE)?
Mhdghozali ali (9 месяцев назад)
Kris Kasprzak Sir why when I uploaded an error RcPacket does not name a type. Please help
Mhdghozali ali (9 месяцев назад)
Sir Where transmitter source code ?
Aravind Venkatram (10 месяцев назад)
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?
Kris Kasprzak (10 месяцев назад)
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.
FlexPhill (11 месяцев назад)
Hey, is it possible to make this without the big board behind the reciever? For some kind of micro boat?
FlexPhill (11 месяцев назад)
I just sent you an Email.
Kris Kasprzak (11 месяцев назад)
I just sent you a message through YouTube
FlexPhill (11 месяцев назад)
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?
Kris Kasprzak (11 месяцев назад)
You can use an Arduino NANO, works just fine and is 1/4 the size.
Chungchi Chiu (1 год назад)
I cannot find the video of part 2 creating custom Arduino enclosure
4FunRC (1 год назад)
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 (?).
Sal1203 (1 год назад)
How do you know where to put all the wires
Stephanie & John Hamilton (1 год назад)
No matching function for call to 'RF24::write(int)' Wtf did I do wrong?
Kris Kasprzak (1 год назад)
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);
Stephanie & John Hamilton (1 год назад)
One hour spent on this problem not working
Arpith jain (1 год назад)
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
Kris Kasprzak (1 год назад)
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.
chemgreec (1 год назад)
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)
donquixote ajerol (1 месяц назад)
did u post your video?? i would like to see
Kris Kasprzak (1 год назад)
Please post a vid, we would love to see your work.
Ecoplanet Renováveis (1 год назад)
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?
Kris Kasprzak (1 год назад)
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.
muhammad yusuf (1 год назад)
send your email address to me, please,, I wanna ask you...
Stephen Vowles (1 год назад)
Ok worked it out that the Transmitter code is hidden and commented out within the Receiver code. Cheers
Stephen Vowles (1 год назад)
Source code is there for receiver but can't find transmitter code. Am I missing something?
Stephen Vowles (1 год назад)
Thanks Kris. Will let you see my results once I get something working. Cheers once again.
Kris Kasprzak (1 год назад)
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.
Shraddha Patil (1 год назад)
Sir,i want a code to run an ornithopter,cud u plz provide it?
Kevon Kelly (1 год назад)
ould you do a similar project but over wifi? or maybe 3g??
Tatha Mahata (1 год назад)
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
Kris Kasprzak (1 год назад)
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
Shiblee Alam (1 год назад)
Dear Sir, the link for source code does not work, would you be kind enough to increase more input and outputs? Thank you.
Shiblee Alam (1 год назад)
Thank you.
Kris Kasprzak (1 год назад)
Try this link https://drive.google.com/file/d/0ByEQKtsOckWBLUdHNURKU0szbTg/view?usp=sharing
Shiblee Alam (1 год назад)
Thank you very much indeed.
Kris Kasprzak (1 год назад)
sorry about that, i must have accidentally deleted the file. I'll re-post and reply when it's there.
sestoelemento 80 (2 года назад)
can you please post the wiring part and the part list. it was too fast to follow
Kris Kasprzak (2 года назад)
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.
iEmbedded YN_Noy (2 года назад)
if I'm use the general RC: flysky , this project work?
Kris Kasprzak (2 года назад)
not sure, sorry.
7grounds (2 года назад)
great video, basic feature for everything, waiting for the 3d printed transmitter etc
Juris Perkons (2 года назад)
Thank You for sharing Your work!
Kris Kasprzak (2 года назад)
You're very welcome.
asyraaf mohsin (2 года назад)
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
Kris Kasprzak (2 года назад)
I would recommend joining the arduino forum. you can post code and get help by a huge community of people http://forum.arduino.cc/
PauL (2 года назад)
That is a really good project ! Keep up ,you are doing a great work
Kris Kasprzak (2 года назад)
Thanks for watching!

Хотите оставить комментарий?

Присоединитесь к YouTube, или войдите, если вы уже зарегистрированы.