
Show HN: The Jankest Autonomous Drone Built and Programmed from Scratch - alexozer
https://github.com/alexozer/jankdrone
======
auto
I love this. I've been a professional dev for almost a decade now, and over
the last couple of years have started migrating toward a blend of hardware and
software/firmware development, and I can't get enough of learning to build
physical things from scratch. I don't often get to iterate in this way at my
job, and rebuild the same thing over and over, so I tend to spend my free time
with projects like this that start out shitty, and you get to take the time to
comb over the details, making constant prototypes.

I started a deep dive in electronic music and synthesizers in the last couple
of months, and have been thoroughly enjoying playing the productions units I
own (Korg Monologue, Elektron Digitakt, Roland JV1080), but have even more so
enjoyed the sort of free form effort of building my own instrument:

[https://imgur.com/a/FZ6GFsI](https://imgur.com/a/FZ6GFsI)

That started out as a nightmare breadboarded voltage controlled oscillator, to
a nicely breadboarded vco, to a rebuild on perf board, and then obviously I
needed a perfboard power supply. But, once I wanted a mixer, I needed +/\-
12v, not just 5v, so that led to a better iteration of the power supply, etc.
It's a rabbit hole, but an immensely educational and fairly inexpensive one. I
figure I'm about 3 months and a couple of YouTube tutorials away from my first
Kicad developed oshpark printed PCB, and I have a ton of ideas for next steps,
and prototypes in flight (CES3340 based VCO, Arduino MIDI control and CV
translation, Lowpass/bandmiss filters, so on and so forth).

Back to the subject of the original post, this totally looks like
Pennsylvania, and if it is and the engineer who built this is in the job
market, and has any interest in working for a smaller, established (20 year)
shop that lives in one of the automotive spaces doing a lot of cool custom
hardware/software development, I'd happily accept a resume.

~~~
StavrosK
Oooh you should learn how to route PCBs, you're going to love both the process
and the result.

~~~
earleybird
Came across this little PCB mill just today:
[https://www.youtube.com/channel/UCX44z-SSL7LzcB4xxgUdHHA](https://www.youtube.com/channel/UCX44z-SSL7LzcB4xxgUdHHA)

~~~
joshvm
I used to make PCBs at home, first using toner transfer and ferric chloride
(never again, impossible to avoid staining everything in your lab), then with
a UV lithography mask (photoresist and a laminator) and an exposure box used
for making stencils. The UV stuff is actually pretty good, you can easily go
down to 0.5mm pitch with some practice. Etching is still a pain, but I started
using a clear etchant (sodium persulfate?) which at least didn't stain
everything. I briefly experimented with laminated and cured solder masks, but
that's also tricky. Never got round to silkscreening, though apparently you
can do it with coloured foils.

Drilling is a pain in the ass. The bits break easily and drilling accurately,
even with a press, is hard. Milling makes this so much easier. Then you need
to think about plated through holes, do you rivet? Do you just put some 30
gauge wire and solder?

Nowadays I find I rarely need to rush boards and Oshpark is so cheap it's
ridiculous. There are cheaper companies (I've yet to try Dirty PCB), but you
get 3 boards, ENIG and really good tolerances for free. Even rush shipping
($20 international fedex) is cheaper than getting it done here in the UK. The
only competitor I've found is Ragworm, and they're both more expensive and you
only get one board with HASL.

Unless you _really_ want a board made now, I would say just get them made for
you. The quality is so much better without spending tons of time. Of course
sometimes you really do want a prototype instantly and if you want to make a
weird shape - perhaps a really long rectangle that would cost a fortune to get
made, it's worth having the kit in your house to do.

On the milling side, I'd be tempted just to buy a Spokeo mill which can
apparently do reasonably good PCB milling. Costs a lot, but at least it'll do
other things as well.

I've recently got access to a lab with some very expensive rapid protoptying
kit (from LPKF), which I'm keen to try out. It can even do 3D PCBs laid onto
plastic components.

~~~
StavrosK
That's what I do as well. I switched to JCLPCB from Dirty PCBs and am pretty
happy, but I was pretty happy with Dirty as well. They give me ten 10x10cm
paneled boards for like $15, and because I design tiny boards I get around 100
of them in the end, which is 99 more than I reasonably need. It's so cheap,
though, that it's not worth doing anything else.

------
walrus01
If you want to build a really cheap drone that can actually do autonomous GPS-
guided stuff, the Kakute F7 can be flashed with Arducopter (Arudpilot), and is
$49 with a power distribution board. Mostly intended for small racing drones,
but can be used for other purposes.

[https://www.getfpv.com/holybro-kakute-f7-aio-flight-
controll...](https://www.getfpv.com/holybro-kakute-f7-aio-flight-
controller.html)

[https://shop.holybro.com/c/kakute-f7_0486](https://shop.holybro.com/c/kakute-f7_0486)

Or you can get the version that combines a four motor ESC in a stack with the
version of the Kakute F7 that doesn't have a built in PDB (power distribution
board), for under $120.

[https://shop.holybro.com/kakute-f7-amp-
tekko32-f3-metal-4in1...](https://shop.holybro.com/kakute-f7-amp-
tekko32-f3-metal-4in1-esc-combo_p1129.html)

other parts needed to complete something: motors, propellers, frame, battery,
video tx (for something like 5.8 GHz band goggles), RC receiver, wiring, ublox
m8n GPS receiver.

want a cheap frame? It'll be heavier than ordering a $45 carbon fiber frame
from banggood or gearbest or aliexpress or such, but you can 3d print one at
the cost of maybe half of a spool of $18 PLA filament:

[https://www.thingiverse.com/thing:261145](https://www.thingiverse.com/thing:261145)

[https://www.thingiverse.com/thing:1206960](https://www.thingiverse.com/thing:1206960)

~~~
djpilot
What is the approximate price range to get everything needed?

~~~
walrus01
absolutely everything, there's some common ground station stuff (your handheld
transmitter, and goggles or 7" LCD monitor + video receiver), that's an
unavoidable upfront cost separate from the aircraft itself. Figure at minimum
$300 to $400 for that.

For a small quadcopter, $400-500 total parts cost, anything below that will
involve a lot of quality compromises.

Take a look at some of the RTF / ready to fly specifications sold by
getfpv.com or helipal.com for examples.

------
massivecali
I've only seen the word written as jank, janky or jankiest. First for jankest.
Where can I view photos of the various physical build attempts?

~~~
alexozer
Yes, my use of jankest is possibly 100% contrived.

Also, I recently added a comment with a photo album if you are interested!

~~~
massivecali
Great! Thanks!

------
shard
For a minute I thought the drone algorithm was somehow running on Scratch, and
I was curious as to how the author had managed to accomplish this feat...

~~~
mrguyorama
You might find his style grating, but Michael Reeves did something related:
[https://www.youtube.com/watch?v=bZDE6I5B9-E](https://www.youtube.com/watch?v=bZDE6I5B9-E)

------
alexozer
Hi, I'm the creator! Thank you all for your thoughtful comments.

Some of you wanted a photo album of the journey; I quickly collected one here
[0]. Apologies for duplicates, no descriptions, and Google.

The full album shows a lot more of the process, but I also linked some quick
highlights / milestones at the end of this comment.

Also, to those who were wondering, I am still in the market for a Summer 2019
internship.

I really ought to have a blog post detailing more of this, but here's a little
backstory anyway. My best friend from high school and I wanted to experiment
with creating our own modular drones, and although we bought a bunch of parts,
we ended up leaving for college before we could do anything. A couple years
later I had some time on my hands, and I decided that I wanted to see whether
or not I could actually build and program a drone myself. For the project, I
tried to focus on writing high quality software while still managing to build
something flyable with my nearly-nonexistent mechanical skills. Even though
much of this project was physical (and electrical), I still largely consider
this a software project, actually.

Physically, my prototypes are something you might laugh at. Zip ties,
styrofoam, and Gorilla tape were my go-to materials for the most part. I
originally started by mounting (read: zip-tying and taping) components to PVC
tubes and metal sheets; combined with the pretty large LiPo battery I bought,
it should have been no wonder that four motors were no match for the weight of
the thing. I later decided to screw together 6 strips of carbon fiber sheet (a
"frame") and add two motors to help assure my drone can actually lift greater
than two inches off the ground at a time. Reworking the flight controller to
work with six motors instead of just two was a fun challenge; I decided to
make the flight controller support an unlimited number of motors in a circle
while I was at it.

Figuring out the optimal wireless technology for the drone was a bit of a
process as well. It was frustrating when I thought I had everything ready for
a test flight, but then slowly realized that, perhaps, I wasn't going to be
able to get away with using Bluetooth LE over non-trivial distances.
Eventually I found a radio module with superb distance and transmission rate;
and after some struggle, I got them working. You can see in the video that I
could control the drone from quite far away!

It took quite a few days of test "flights" to get the drone to fly as well as
it did in the video (if you consider the oscillating nightmare in the video
"flying well"). Even getting the drone to launch two feet in the air,
instantly lose control and backflip, and crash back down on the ground felt
like an AMAZING feat from my perspective; it demonstrated all my systems were
at least online and functional. I slowly increased the hover time of each
attempt by a couple seconds or so, adjusting my controller tuning and
implementation as I went. The flight in the video was nowhere near as
primitive as some of my early experiments, even.

I'm sure I skimped on many details, don't hesitate to ask for more information
on anything.

[0]: Full album:
[https://photos.app.goo.gl/QhSZEyd4DA1r9S9G6](https://photos.app.goo.gl/QhSZEyd4DA1r9S9G6)

First physical prototype:
[https://photos.app.goo.gl/k6km6Hyrkq4FuxkH9](https://photos.app.goo.gl/k6km6Hyrkq4FuxkH9)

Second physical prototype:
[https://photos.app.goo.gl/sL1LjnAgeXrmGvgEA](https://photos.app.goo.gl/sL1LjnAgeXrmGvgEA)

Third physical prototype:
[https://photos.app.goo.gl/bY33peH7RZbXPxyx9](https://photos.app.goo.gl/bY33peH7RZbXPxyx9)

LED strip code testing:
[https://photos.app.goo.gl/wZJJJ4NrFENjpUkHA](https://photos.app.goo.gl/wZJJJ4NrFENjpUkHA)

Custom remote control assembled:
[https://photos.app.goo.gl/z577cVbH59vjW3g56](https://photos.app.goo.gl/z577cVbH59vjW3g56)

Final "boxy" physical prototype:
[https://photos.app.goo.gl/8ESsQidi5Tgsb1mm6](https://photos.app.goo.gl/8ESsQidi5Tgsb1mm6)

~~~
djpilot
How did you get the remote control to work? Looks like you started with an
Xbox controller?

~~~
alexozer
I originally used an Xbox controller as a case, but the hardware was my own.
Eventually I ended up putting everything inside a Raspberry Pi case. Inside I
put a protoboard with an Arduino and a radio module which communicates with
the radio module on the drone. The code for message serialization is custom.

------
hackerews
Blog post on design process please! Would be fun to read about the various
hardware iterations.

------
rkagerer
Is that two chunks of drywall as substrate on one of those drones?

------
Liveanimalcams
I need to do a write up of my FPV hovercraft its also quite janky.

------
plutonorm
Just need to dial in those PID controllers a little more!

------
bibyte
What is the white dot on the video ?

~~~
alexozer
Interesting, I've never noticed that before. I would guess it's a lens
artifact, since it seems to move depending on where the sun is in the frame.

