www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [OT] suggestions for a programmable drone on a budget?

reply "Adam D. Ruppe" <destructionator gmail.com> writes:
I've been kinda wanting to build some kind of programmable 
aircraft ever since watching DConf this year and now I'm thinking 
about actually doing it.

What I'm envisioning is something like a quadcopter that we can 
program to follow a pre-set course. Or something. A fun demo 
might be to set it down in the school's gymnasium and set up a 
number of waypoints it should hit autonomously. So nothing 
extraordinarily complex, but cool to do yourself. (My motivation 
here is mostly just cuz I think it would be cool, but the local 
school is considering doing some kind of programming robotics 
thing too and I know a guy with influence on that so I might 
pitch an idea to them as a student competition too)

A ground robot would be nice too, heck that's the kind of thing I 
might be able to build entirely myself with a few motors and an 
arduino or something. But a flying drone just takes the coolness 
factor to the next level.


Have any off you ever thought about this kind of thing before? 
Any suggestions on hardware or other tips to get started? Also, I 
don't want to spend an enormous sum of money so keep budget in 
mind too.
Nov 19 2014
next sibling parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
19-Nov-2014 20:42, Adam D. Ruppe пишет:
 I've been kinda wanting to build some kind of programmable aircraft ever
 since watching DConf this year and now I'm thinking about actually doing
 it.

 What I'm envisioning is something like a quadcopter that we can program
 to follow a pre-set course. Or something. A fun demo might be to set it
 down in the school's gymnasium and set up a number of waypoints it
 should hit autonomously.
Yeah, be prepared to find good big chamber for it. 3 meters tall at least. No ropes or other stuff dangling around! Also catching the thing may prove real hard, so soft floors would be awesome.
 So nothing extraordinarily complex, but cool to
 do yourself. (My motivation here is mostly just cuz I think it would be
 cool, but the local school is considering doing some kind of programming
 robotics thing too and I know a guy with influence on that so I might
 pitch an idea to them as a student competition too)
You could start with some existing flight controller + chassis. The combo is usually notoriously hard to tune, especially for the first time. A good starting option would be to buy a ready to use kit and play with it. Or you can take it all piece-wise with any of OpenHardware/OpenSource flight controllers like e.g. MultiWee. Stuff is actually cheap and abundant on Chinese hobby stores. For instance, controller: http://www.hobbyking.com/hobbyking/store/__31138__Multiwii_and_Megapirate_AIO_Flight_Controller_w_FTDI_ATmega_2560_V2_0.html And (picked randomly) simple but fine chassis: http://www.hobbyking.com/hobbyking/store/__24291__Hobbyking_SK450_Glass_Fiber_Quadcopter_Frame_450mm.html 4 proper DC motors + 4 power drivers for each + 12 or more of propellers (these get wasted real quick at first), lots of extras to wire it all up. Make a good damn big red button to shut it down ;) Then, of course, some remote is in order. Then WiFi/Bluetooth/ZigBee etc. to talk with flight controller and program the thing. Well you see where it goes from here :) In any case even with ready-to-go kit buy some spare LiPo batteries, and then some more. You can't get too many of these. Also buy good, professional charger or you'll risk to see the beauty of LiPo going boom. 15 minutes of flight on one pack is typical number (depends on weight and such of course). Charging a LiPo pack takes an hour at charging rates I'm really not comfortable with (all the extra heat).
 A ground robot would be nice too, heck that's the kind of thing I might
 be able to build entirely myself with a few motors and an arduino or
 something. But a flying drone just takes the coolness factor to the next
 level.
Actually have a quite a bit of experience with land things. Been an technician in a robotics lab. Oh, the cool stuff we did on a tight budget;) We had one project (a competition) with quadrotor, it was kind of cool and fully autonomous. We were inches away from the 1st place but had lost :(
 Have any off you ever thought about this kind of thing before? Any
 suggestions on hardware or other tips to get started? Also, I don't want
 to spend an enormous sum of money so keep budget in mind too.
Sure thing. I'd love to get back to robotics once I have some spare time. In a year or so it seems ;) As for budget the recipe goes - you either spend some more money or some more time. Overall it's not too costly if you don't go fancy with sensors, cameras and other cool extras. -- Dmitry Olshansky
Nov 19 2014
next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 19 November 2014 at 20:26:01 UTC, Dmitry Olshansky 
wrote:
 Yeah, be prepared to find good big chamber for it. 3 meters 
 tall at least. No ropes or other stuff dangling around! Also 
 catching the thing may prove real hard, so soft floors would be 
 awesome.
Hmm, yeah, perhaps we can put mats down on the gym floor too. The alternative for a wide open space would be going outside, and then even a small wind can mess up these light aircraft so I want to keep it inside.
 You could start with some existing flight controller + chassis. 
 The combo is usually notoriously hard to tune, especially for 
 the first time. A good starting option would be to buy a ready 
 to use kit and play with it.

 *snip*
Thanks, this is a huge help!
 As for budget the recipe goes - you either spend some more 
 money or some more time. Overall it's not too costly if you 
 don't go fancy with sensors, cameras and other cool extras.
Indeed. It is looking a lot better than I thought it would though, I expected to be in for several hundred US dollars just to get started! These much lower prices are a relief.
Nov 19 2014
prev sibling parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
19-Nov-2014 23:25, Dmitry Olshansky пишет:
 4 proper DC motors + 4 power drivers for each + 12 or more of propellers
E-hm let me correct myself else it sounds like 16 drivers which is pricy :) 1 driver per motor. Power (or motor) driver is the thing that allows a controller board to adjust power output on a motor and consequently the speed of rotation. -- Dmitry Olshansky
Nov 21 2014
prev sibling next sibling parent reply "Mike" <none none.com> writes:
On Wednesday, 19 November 2014 at 17:42:16 UTC, Adam D. Ruppe 
wrote:

You've marked this OT so I'm assuming you're not motivated to do 
this in D.  If I'm wrong, then it's very much on topic, IMO.

 A ground robot would be nice too, heck that's the kind of thing 
 I might be able to build entirely myself with a few motors and 
 an arduino or something. But a flying drone just takes the 
 coolness factor to the next level.
Totally! Programming the physical world is the coolest programming their is. Limited space, limited memory, limited CPU cycles, limited power, limited budget, high expectations, and infinite possibilities. And very much multidisciplinary.
 Have any off you ever thought about this kind of thing before? 
 Any suggestions on hardware or other tips to get started?
I've obviously thought about it, but it looks less like a reality for me right now. I received a few relevant links from our community here: http://forum.dlang.org/post/lq3jbp$o21$1 digitalmars.com Also, check out http://www.openpilot.org or http://ardupilot.com, if not for their hardware and code, then for their forum and community. I don't participate there myself, but it looks like the perfect place to ask such questions. Mike
Nov 19 2014
parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Wednesday, 19 November 2014 at 23:12:31 UTC, Mike wrote:
 You've marked this OT so I'm assuming you're not motivated to 
 do this in D.  If I'm wrong, then it's very much on topic, IMO.
I probably would use D, but might not due to some external factors. Part of my motivation is doing it in partnership with the local school, and my in preliminary talks with the administration, they weren't enthusiastic about D (I think because their current CS teaching staff - math teachers who have barely done any programming at all picking up an extra class - are unaware of it. But then again, you aren't going to be running a drone on Javascript and Scratch anyway!) Either way though, I'm not too concerned about the software side of it; I'm sure I can figure that out once I get some hardware to play around with and I wasn't sure where to start with that.
 I received a few relevant links from our community here: 
 http://forum.dlang.org/post/lq3jbp$o21$1 digitalmars.com

 Also, check out http://www.openpilot.org or 
 http://ardupilot.com, if not for their hardware and code, then 
 for their forum and community.  I don't participate there 
 myself, but it looks like the perfect place to ask such 
 questions.
Cool, thanks!
Nov 19 2014
parent reply "Mike" <none none.com> writes:
On Wednesday, 19 November 2014 at 23:31:12 UTC, Adam D. Ruppe 
wrote:

 But then again, you aren't going to be running a drone on 
 Javascript and Scratch anyway!)
According to this, Javascript looks feasible: http://www.espruino.com/ Mike
Nov 19 2014
next sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Thursday, 20 November 2014 at 00:08:25 UTC, Mike wrote:
 According to this, Javascript looks feasible:  
 http://www.espruino.com/
wow, apparently scratch might be too! http://s4a.cat/ That's remarkable.
Nov 19 2014
parent "Mike" <none none.com> writes:
On Thursday, 20 November 2014 at 00:47:58 UTC, Adam D. Ruppe 
wrote:
 On Thursday, 20 November 2014 at 00:08:25 UTC, Mike wrote:
 According to this, Javascript looks feasible:  
 http://www.espruino.com/
wow, apparently scratch might be too! http://s4a.cat/
Sigh! I'm so ashamed. Even the toy languages are leaving us behind. Mike
Nov 19 2014
prev sibling next sibling parent Rikki Cattermole <alphaglosined gmail.com> writes:
On 20/11/2014 1:08 p.m., Mike wrote:
 On Wednesday, 19 November 2014 at 23:31:12 UTC, Adam D. Ruppe wrote:

 But then again, you aren't going to be running a drone on Javascript
 and Scratch anyway!)
According to this, Javascript looks feasible: http://www.espruino.com/ Mike
https://developers.google.com/blockly/ *whistles* Can be made to export in any language you want, if you are prepared to write some javascript. Not to mention any kind of block you want, you can create.
Nov 19 2014
prev sibling parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
20-Nov-2014 03:08, Mike пишет:
 On Wednesday, 19 November 2014 at 23:31:12 UTC, Adam D. Ruppe wrote:

 But then again, you aren't going to be running a drone on Javascript
 and Scratch anyway!)
According to this, Javascript looks feasible: http://www.espruino.com/
Well, it's a long shot from full EcmaScript v3. Notably can't extend built-in objects such as Array etc. Interpretation speed is also not satisfying. Then of course the question of extending this interpreter with more low-level drivers is not thrilling (back to C). I guess LUA would be a better due to its minimalism and it wouldn't have to be that crippled. On 1$ 32-bit ARMs it would be a perfect fit, on 8-bit micros may be not so much. In contrast Forth fares way better then others and is able to run remarkably fast on these 8-bit chips. But then you need Forth programmers ;) P.S. We actually used Forth to program the flight controller - an 8-bit micro with ~256Kb (actually used about 40K) of ROM. Interpreter provided nice development cycle where we basically tuned the thing literally on the fly. -- Dmitry Olshansky
Nov 21 2014
prev sibling next sibling parent "Alex Ogheri" <alessandroogheri yahoo.com> writes:
Do you need it for a footbal game ?

/fun mode off



On Wednesday, 19 November 2014 at 17:42:16 UTC, Adam D. Ruppe 
wrote:
 I've been kinda wanting to build some kind of programmable 
 aircraft ever since watching DConf this year and now I'm 
 thinking about actually doing it.

 What I'm envisioning is something like a quadcopter that we can 
 program to follow a pre-set course. Or something. A fun demo 
 might be to set it down in the school's gymnasium and set up a 
 number of waypoints it should hit autonomously. So nothing 
 extraordinarily complex, but cool to do yourself. (My 
 motivation here is mostly just cuz I think it would be cool, 
 but the local school is considering doing some kind of 
 programming robotics thing too and I know a guy with influence 
 on that so I might pitch an idea to them as a student 
 competition too)

 A ground robot would be nice too, heck that's the kind of thing 
 I might be able to build entirely myself with a few motors and 
 an arduino or something. But a flying drone just takes the 
 coolness factor to the next level.


 Have any off you ever thought about this kind of thing before? 
 Any suggestions on hardware or other tips to get started? Also, 
 I don't want to spend an enormous sum of money so keep budget 
 in mind too.
Dec 02 2014
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 11/19/2014 9:42 AM, Adam D. Ruppe wrote:
 A ground robot would be nice too, heck that's the kind of thing I might be able
 to build entirely myself with a few motors and an arduino or something.
I've been trying to turn my cat into a robot, but so far success eludes me.
Dec 02 2014
next sibling parent reply "Brian Schott" <briancschott gmail.com> writes:
On Tuesday, 2 December 2014 at 23:32:04 UTC, Walter Bright wrote:
 I've been trying to turn my cat into a robot, but so far 
 success eludes me.
Sonic and Tails keep destroying your lab?
Dec 02 2014
parent Walter Bright <newshound2 digitalmars.com> writes:
On 12/2/2014 7:50 PM, Brian Schott wrote:
 On Tuesday, 2 December 2014 at 23:32:04 UTC, Walter Bright wrote:
 I've been trying to turn my cat into a robot, but so far success eludes me.
Sonic and Tails keep destroying your lab?
I think the problem is I downloaded Cat 1.1 into its brain. I would try the latest Dog 2.6, but there isn't enough memory for it.
Dec 02 2014
prev sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Tuesday, 2 December 2014 at 23:32:04 UTC, Walter Bright wrote:
 I've been trying to turn my cat into a robot, but so far 
 success eludes me.
I accidentally turned my kitten into a fat cat. It was easy, I just kept the food bowl full for a year. Perhaps the same strategy will work to transform your cat into a robot. Leave a bunch of transistors out each day and let nature take its course.
Dec 02 2014