RC Quadcopter - Page 1
Forum section: electronics / beginners

author: skillz21
author_rank: Frequent Contributor
timestamp: February 05, 2016, 11:35:10 pm
content: I want to make a RC quadcopter with Arduino. I found some videos online about some circuits you can use but I couldn't find them. so if anyone has any suggestions please leave them below. if not I want to use the Arduino, or two of them. one for the controller and one for the device itself. but here is the goal: I want to do it on my own. the problem? I don't have a lot of experience with Arduino. So can you guys help me find somewhere I can learn more about Arduino for free? and if you can, can you find some examples of how to build a quadcopter. I still need to find out what to use as the structure and the hardware. Any help is seriously appreciated.Thanks

author: Skimask
author_rank: Super Contributor
timestamp: February 05, 2016, 11:41:50 pm
content: Google must be broken down under.

author: skillz21
author_rank: Frequent Contributor
timestamp: February 05, 2016, 11:44:13 pm
content: well then can you point out some search terms?

author: JimRemington
author_rank: Regular Contributor
timestamp: February 06, 2016, 12:58:30 am
content: DIYdrones.com has everything.

author: denneyaa
author_rank: Unknown
timestamp: February 06, 2016, 02:37:47 am
content: I have dealt with quads for about 4 years now. It is quite an undertaking to do everything you are planning on just by the shear size of the project. A few suggestions to get you started. Focus on a single area first either frame building, main flight control or accessories. They all have their rabbit holes and can all have time and money commitments.Flight controls I would suggest kk multi copter or multi Wii as they started off with the atmega328.Frames all depends on the size and danger you can deal with. I would suggest a 250 size to get started as they are on the smaller size but can still handle quite a bit.I hope this helps.

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 06, 2016, 04:57:12 am
content: Quote from: skillz21 on February 05, 2016, 11:35:10 pmyou cannot find an arduino? thats the only circuit afaik. the rest is RF receiver, esc, motors and propellers. everything can be bought off-the-shelf...

author: skillz21
author_rank: Frequent Contributor
timestamp: February 06, 2016, 05:10:59 am
content: Quote from: Mechatrommer on February 06, 2016, 04:57:12 amcould you point out what I need and where I could get it?

author: crispy_tofu
author_rank: Super Contributor
timestamp: February 06, 2016, 05:13:39 am
content: Have you checked out HobbyKing for buying quadcopter parts?(no affiliation)

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 06, 2016, 05:21:41 am
content: Quote from: skillz21 on February 06, 2016, 05:10:59 amfeel free...http://www.hobbyking.com/hobbyking/store/RC_PRODUCT_SEARCH.asp?strSearch=quad

author: skillz21
author_rank: Frequent Contributor
timestamp: February 06, 2016, 05:22:38 am
content: here is a question I have always had: if you had the motors connected to motor controllers and the motor controller connected to the Arduino, how would you actually control the speed of rotation. I know how to control the side of rotation but how can you control the speed?

author: crispy_tofu
author_rank: Super Contributor
timestamp: February 06, 2016, 05:41:43 am
content: Quote from: skillz21 on February 06, 2016, 05:22:38 amThis might help:https://en.wikipedia.org/wiki/Electronic_speed_control

author: skillz21
author_rank: Frequent Contributor
timestamp: February 06, 2016, 10:49:10 am
content: Quote from: crispy_tofu on February 06, 2016, 05:41:43 amOk I read the page. it explains ESC modules. I have seen people do this with just the Arduino. CAN the Arduino be used as an ESC? if it can, is there a specialised library to set the speed of a motor? one more question: how do you control the speed of a motor through a motor controller? I know that there are two wires that control the direction of the motor. But how do you control the speed, do you vary the voltage of the control pins of the motor controller. if so, can you use the Arduino to vary the voltage of a pin. (I originally thought you couldn't do that)

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 06, 2016, 04:41:11 pm
content: Quote from: skillz21 on February 06, 2016, 05:22:38 amspeed of rotation is controlled by giving the ESC a PPM pulse, thats easily programmed with arduino, just find any quad controller code. if coding is so hard, buy dedicated flight controller...lmgtfy...http://www.hobbyking.com/hobbyking/store/RC_PRODUCT_SEARCH.asp?strSearch=quad+controllerQuote from: skillz21 on February 06, 2016, 05:22:38 amno! ESC has dedicated motor drivers aka bunches of mosfets, and it also has its own dedicated MCU for BLDC algorithm...

author: skillz21
author_rank: Frequent Contributor
timestamp: February 06, 2016, 09:56:58 pm
content: Quote from: Mechatrommer on February 06, 2016, 04:41:11 pmSo where do you introduce the PPM pulse to? and one more question: isnt it Pulse WIDTH Modulation? Did you do PPM By accident.(Googled it!)

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 07, 2016, 04:52:20 am
content: Quote from: skillz21 on February 06, 2016, 09:56:58 pmthe ESC's input port?Quote from: skillz21 on February 06, 2016, 09:56:58 pmno design is by accident, you need to code it.

author: skillz21
author_rank: Frequent Contributor
timestamp: February 07, 2016, 07:59:08 am
content: Quote from: Mechatrommer on February 07, 2016, 04:52:20 amfirstly i meant how to you introduce it to a motor controller (though i am not going to use one!) there are two pins to control the side of rotation, right? and secondly i have no idea what you are talking about (no design is by accident, you need to code it.) please explain morethanks!

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 07, 2016, 10:20:23 am
content: Quotewrong, only one pin only. be it unipolar ESC (for flying object) or bipolar ESC (for land object like rc car or boat)...Quoteits hard to imagine when you dont have the item, there is wire poking out, just connect it to arduino pin. you'll know when you have one. and if you pay enough attention, in many item shown in the link i provided, you can see the wire in the ESC pic, usually white,reds,black (PPM,V+,GND)Quotewhat are you talking about?Quoteso is it worth the time? or i'm just wasting my time here...

author: skillz21
author_rank: Frequent Contributor
timestamp: February 07, 2016, 10:34:17 am
content: Quote from: Mechatrommer on February 07, 2016, 10:20:23 amit is definitely worth your time! as I said, I'm a beginner and I am very interested, and I am learning

author: Galenbo
author_rank: Super Contributor
timestamp: February 07, 2016, 11:51:37 am
content: Quote from: skillz21 on February 07, 2016, 10:34:17 amBreak your "wanted result" up in parts you understand.It looks like the first step you still have to take is "blink the led"This is done by putting code in the arduino controller.If you want it to blink faster/slower/... your code will have to be different.There are also multiple possibilities to get the same result. Learn all of them.Then learn about input/output and serial communication.Then PWM and interrupts

author: Blackwarrior
author_rank: Unknown
timestamp: February 07, 2016, 10:01:23 pm
content: I agree with Galenbo, learn the basics of the arduino first. Programming a FC for any aircraft is a massive undertaking. I've been flying helicopters and quads for many years now and although it would be an interesting, but lengthy project, it not for the novice.. Much easier to buy a ready made FC like the Naze or similar...

author: hendorog
author_rank: Super Contributor
timestamp: February 07, 2016, 10:40:55 pm
content: This may be of interest - although it is for the psoc 4 and not the Arduino.https://www.element14.com/community/community/design-challenges/smarter-life/blog/2013/10/28/psoc-4-tricopter-smarter-life-challenge-part-1

author: markhing
author_rank: Newbie
timestamp: February 08, 2016, 04:52:58 am
content: Take a look athttp://www.instructables.com/id/Easy-Android-controllable-PC-Interfaceable-Relati/?ALLSTEPSIt shows you how to build a quadcopter (and octocopter) as well as control it with Arduino.

author: skillz21
author_rank: Frequent Contributor
timestamp: February 10, 2016, 04:36:36 am
content: Quote from: Galenbo on February 07, 2016, 11:51:37 amI Know how to blink a led.( I build an led chaser too!) I would say that I know a bit about serial communication. But I DO need to learn about PWM and interrupts. (NO idea what interrupts are, but I'll google it!)

author: Galenbo
author_rank: Super Contributor
timestamp: February 10, 2016, 11:06:37 am
content: Quote from: skillz21 on February 10, 2016, 04:36:36 amThis is exactly what I mean. No offence, but the way you know how to blink a led, is by copy/paste internet text into some software, connect a cable and push the "send" button.The time when I didn't know about interrupts, I considered myself being on level "zero" in the world of microcrontrollers.You will now have to start learning all the other ways to blink that led.-try this: close internet, the books and examples, and write/type your software yourself, from zero, without libraries.-blink 8 leds, all together, but at another frequency.-blink a led at 1HZ, but make sure input from a pushbutton is always immediately sent to rs232.-blink the led at a rate that is received by serial communication.-make a led dimmer with pwm.-Make it blink or dim using interrupts, so less processor performance is used, and other software can run also.After that, you are ready to take another step, and ready for start thinking about measurement and control.

author: LHelge
author_rank: Contributor
timestamp: February 11, 2016, 09:39:13 am
content: Just to give an idea of the work you need to put in. I have a long time project going on to create a flight controller for a multicopter. I've build one revision several years ago and started rev 2 maybe a year ago. Working on several projects at once but I guess I have at least 250 h put into the flightcontroller yet and it's still bodged together breakout boards on a demo board and it hasn't been up in the air yet. I'm guessing my starting point is a little better than yours with a daily work in embedded software developing and a M. Sc. degree in control theory.With that said, I don't think it is impossible, and it's extremely fun and rewarding work so i definitely think you should keep on. It has been done with an Arduino before so it should be possible. One thing though that I would strongly recommend is to use a microcontroller with enough Capture/Compare modules and timers for all your PWM signals. I use a STM32F405 which gladly takes 8 PWM input signals and 8 PWM output signals with barely any CPU load. I've got all those 168 MHz with floating point capability left for sensor fusion and control calculations.

author: skillz21
author_rank: Frequent Contributor
timestamp: February 12, 2016, 10:28:35 am
content: Ok guys, i have so far been mind blown at how much people are willing to help me. OK so i did a bit of research about RF modules they are cool and all but... i would need another arduino (or something similar) for that and that means more code. i was wandering whether i could use a Bluetooth module. is saw a video where someone changed the color of an led by writing in text on an app on their phone. is there any chance that i could do almost the same thing?( not exactly the same.) i want to make like an easier interface (like arrows instead of typing in text.) any app that i could do this with? in my opinion i think this will be much simpler if i could do it(would it not be?). anyway i am looking forward to hearing your advice about this!Thanks!

author: Rerouter
author_rank: Super Contributor
timestamp: February 12, 2016, 10:52:08 am
content: Work on one thing at a time... android phones is another language, but what you would likely have seen is an emulated com port through Bluetooth, after all Bluetooth is just wireless serial that can drop packets,As for one or multiple arduinos, it comes down to how well you write it, No matter how you approach it, you will likely need a form of PID to keep the thing stable, now one thing to know is that the normal uno does not support floating point natively, so its slow to run, there are ways to run approximations much faster, but there is some heavier math behind it,As for your inputs and outputs, like a previous poster said, get familar with the timers and counter peripherals on the micro, and let them do the heavy lifting,My own attempt started on a due, simply because it was much faster,In both cases (uno and due), the IMU and PID didnt fill or overload the single micro, but like many before me, i started to stall out from lack of not seeing immediate results infront of me,I've attached what i had, not sure how much of it is useable as i abandoned it some time ago, but see if any is helpful, pretty sure i went a bit overkill on the self cal,

author: skillz21
author_rank: Frequent Contributor
timestamp: February 12, 2016, 11:31:02 am
content: Quote from: Rerouter on February 12, 2016, 10:52:08 amOK so why cant i just tell the arduino that is controlling the quadcopter to rise up one level when it receiver the serial data through the Bluetooth module?

author: skillz21
author_rank: Frequent Contributor
timestamp: February 12, 2016, 11:39:11 am
content: Wait a sec... Just from memory, is a PWM pulse an ON/OFF pulse(similar to the one generated by a NE555? Or am i just stupid?

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 12, 2016, 12:30:10 pm
content: duh i guess what he meant a flowchart graphic based ide in an android smarphone, is there even a place like that in here?

author: skillz21
author_rank: Frequent Contributor
timestamp: February 12, 2016, 09:04:34 pm
content: Quote from: Mechatrommer on February 12, 2016, 12:30:10 pmexcuse me? I don't understand. so do you mean that I can't get a graphical interface on an android phone? just clarifying my last question, so is a PWM pulse an ON/OFF pulse?

author: bxh
author_rank: Contributor
timestamp: February 12, 2016, 10:23:28 pm
content: When you say you want to do it yourself, to what extent are you referring? Over the past few years I've worked on different components of a typical multicopter, starting with a DIY flight controller electronics and algorithms and moving through to the DIY ESC. I did it all for the experience, and definitely wouldn't recommend it if you just wanted to get something in the air.

author: FreddyVictor
author_rank: Regular Contributor
timestamp: February 12, 2016, 10:27:35 pm
content: if you want to start with simple elctronics, thenthis controlleris effectively an arduino with gyro+accelerometer plus correct pins for ESC's, Receiver etcthis can be programmed using Arduino IDE and flashed the usual way (as Aduino Pro 16MHz 5v)it's call MultiWii and there's alot of code available - not all good tho'it's a good learning exercise and can be made to fly reasonably well.It does have it's limitations which you will find out as you go along

author: Audioguru
author_rank: Super Contributor
timestamp: February 13, 2016, 12:06:04 am
content: I bought a quadcopter for $25.00 and it has 6 gyros and includes the 2.4GHz RF remote controller and Li-Po battery. It flies fine. I does not have a camera.I would not want to spend a couple of years designing and building one.

author: skillz21
author_rank: Frequent Contributor
timestamp: February 13, 2016, 01:35:18 am
content: I did a bit of research on flight controllers, I have been really interested in the Openpilot cc3d. I watched a few videos on it. I saw once where a person had a Taranis to control it. I had a look at it online and it was a bit costly ($50AUS minimum). My budget is around $30. I don't want to go over 35. any info on any flight controllers that I can use that I can buy for under $25?(Including controller, and I think it will take around $5 for the frame. I can make one with an Arduino, but the controller problem...

author: skillz21
author_rank: Frequent Contributor
timestamp: February 13, 2016, 02:03:02 am
content: Quote from: Audioguru on February 13, 2016, 12:06:04 amI have not found any quads for under $40 where i live. anyway, i do not want to buy one. the problem with quadcopters and helicopters that you buy is mainly the battery it rund out pretty fast( I know its only with some of them but with the ones i have bought, its always the same.) anyway the main point of me making this is that i can change the way it works anytime. and also the pleasure of it. i'm going to have to do this->a few times through my build. but in the end it is so cool when you get to fly it and think, i built that!

author: RobertBG
author_rank: Regular Contributor
timestamp: February 13, 2016, 05:24:16 am
content: There's been quite a bit of very good advice so far but I think you dont quite grasp how complex of a scratch build this can beand I'm not trying to be a prick.What I'd suggest is a kit like Flite Test sells for example,choose your parts,get it flying and then reverse engineer it in a sense.Build the ESC's,controller and so on.This way you'll have a flying copter to compare and test each part on along the way and if one task is too much at the time you'll still have the other parts in flight

author: Brumby
author_rank: Unknown
timestamp: February 13, 2016, 05:32:27 am
content: Quote from: skillz21 on February 12, 2016, 09:04:34 pmYes.PWM - Pulse Width Modulation. You just change the 'on' time - like this:And, yes, it's the sort of thing the NE555 can do.

author: FreddyVictor
author_rank: Regular Contributor
timestamp: February 13, 2016, 09:26:56 am
content: Quote from: skillz21 on February 13, 2016, 02:03:02 amyou need to just re-adjust your expectations here, you won't be able to build a quadcopter for $40 or lessthe cost of 4 Electronic Speed controllers (ESCs) plus 4 motors plus frame plus all the other bits'n'pieces (battery, connectors, wire, Tx, Rx) needed will easily blow that budgetmaking your own always costs more ....

author: crispy_tofu
author_rank: Super Contributor
timestamp: February 14, 2016, 02:10:27 am
content: Quote from: FreddyVictor on February 13, 2016, 09:26:56 am+1, you could probably only get toy-grade for that price...

author: Teledog
author_rank: Regular Contributor
timestamp: February 15, 2016, 07:07:36 am
content: Interesting threads..Tried a DIY myself..printed out a quad on the 3D printer, got a controller, motors, ESCs & yada -yada ..Gave up after it spontaneously(?) attacked me... several times ..(and bloody parts to prove it)Know what's fun?A CX-10!!The dog goes crazy for it....won't hurt a flea..AND.. it's only ~$20

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 15, 2016, 07:45:18 am
content: Quote from: Teledog on February 15, 2016, 07:07:36 amprobably because that you bought a crappy controller, be it you code yourself, the quad may kills you, so you know the dirt and dust of building an controller algorithm..

author: Kilrah
author_rank: Unknown
timestamp: February 15, 2016, 09:20:22 am
content: Quote from: skillz21 on February 13, 2016, 01:35:18 amYou're dreaming wildly there.The cheapest you could do is something like using one of the Chinese toys that have open source code that has been written for it:http://www.rcgroups.com/forums/showthread.php?t=2278850Still the quad with its remote will already near or exceed your budget, and you still need to buy the required programming and configuration interfaces, which while cheap will set you back another $10 at least.Any custom build will shoot straight above $100.

author: crispy_tofu
author_rank: Super Contributor
timestamp: February 15, 2016, 09:36:34 am
content: Quote from: Teledog on February 15, 2016, 07:07:36 amOh look, another person who flies the CX-10!

author: Skimask
author_rank: Super Contributor
timestamp: February 22, 2016, 03:02:43 am
content: Quote from: crispy_tofu on January 17, 1970, 08:18:48 pmNever seen one of those before.Just ordered 2.