<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on Craig Perry</title><link>https://www.craigjperry.com/blog/</link><description>Recent content in Blog on Craig Perry</description><generator>Hugo</generator><language>en-GB</language><lastBuildDate>Wed, 03 Feb 2016 22:55:00 +0000</lastBuildDate><atom:link href="https://www.craigjperry.com/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Nighthawk 280 Setup Part 1</title><link>https://www.craigjperry.com/blog/nighthawk-280-setup-part-1/</link><pubDate>Wed, 03 Feb 2016 22:55:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/nighthawk-280-setup-part-1/</guid><description>&lt;p&gt;Here&amp;rsquo;s how I setup my &lt;a href="http://blog.oscarliang.net/emax-nighthawk-pro-280-quadcopter/"&gt;EMAX Nighthawk 280 Pro&lt;/a&gt;&#10;with the latest version of &lt;a href="http://cleanflight.com/"&gt;Cleanflight&lt;/a&gt; and &lt;a href="https://github.com/cleanflight/cleanflight/blob/master/docs/PID%20tuning.md"&gt;tuned the PIDs&lt;/a&gt;).&lt;/p&gt;&#10;&lt;h3 id="posts-in-this-series"&gt;Posts In This Series&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="#"&gt;Setting Up Cleanflight&lt;/a&gt; on an EMAX Nighthawk 280 Pro&lt;/li&gt;&#10;&lt;li&gt;Flashing the ESCs with BLHeli and configuring for best performance&lt;/li&gt;&#10;&lt;li&gt;Adding VBAT battery monitoring and a buzzer&lt;/li&gt;&#10;&lt;li&gt;Adding a blackbox data recorder, configuring it, making video overlays &amp;amp; accurately tuning your PIDs&lt;/li&gt;&#10;&lt;li&gt;Adding a MicroMinim OSD (On Screen Display)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="cleanflight"&gt;Cleanflight&lt;/h2&gt;&#10;&lt;p&gt;The EMAX Nighthawk 280 usually comes with the &lt;a href="https://github.com/multiwii/baseflight"&gt;Baseflight&lt;/a&gt;&#10;flight control firmware installed but it&amp;rsquo;s also compatable with the Cleanflight&#10;and &lt;a href="https://github.com/borisbstyle/betaflight"&gt;Betaflight&lt;/a&gt; firmwares.&lt;/p&gt;</description></item><item><title>Pelican Hosting on AppEngine</title><link>https://www.craigjperry.com/blog/pelican-hosting-on-appengine/</link><pubDate>Wed, 13 Jan 2016 20:15:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/pelican-hosting-on-appengine/</guid><description>&lt;p&gt;Google App Engine (GAE) hosting is fast! Here&amp;rsquo;s how i setup my blog using the &lt;a href="http://getpelican.com"&gt;Pelican&lt;/a&gt; static site generator and deployed it on &lt;a href="https://cloud.google.com/appengine/"&gt;Google AppEngine&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="install-pelican--appengine"&gt;Install Pelican &amp;amp; AppEngine&lt;/h2&gt;&#10;&lt;p&gt;First I created an empty git repo. Then i created a Python virtualenv to host Pelican and the AppEngine SDK. This saves polluting my system with particular versions of pelican and appengine since i might want to use other versions in other projects.&lt;/p&gt;</description></item><item><title>My First 3D Design</title><link>https://www.craigjperry.com/blog/my-first-3d-design/</link><pubDate>Sat, 09 Jan 2016 19:41:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/my-first-3d-design/</guid><description>&lt;p&gt;The &lt;a href="http://www.emaxmodel.com/nighthawk-pro-280.html"&gt;EMAX Nighthawk Pro 280&lt;/a&gt;&#10;racing quadcopter has its power distribution &amp;amp; control board&#10;exposed underneath the quad. It is conformally coated but that&amp;rsquo;s&#10;not enough so I designed and 3D printed a protective underplate.&lt;/p&gt;&#10;&lt;h2 id="measuring-up"&gt;Measuring Up&lt;/h2&gt;&#10;&lt;p&gt;I traced the outline of the power distribution board (PDB) on&#10;paper. Then i added some straight lines to make measuring the&#10;odd shape easier.&lt;/p&gt;&#10;&lt;h2 id="openscad"&gt;OpenSCAD&lt;/h2&gt;&#10;&lt;p&gt;I&amp;rsquo;ve been playing with SketchUp, 123Design and OpenSCAD. I chose&#10;the latter here since this job is mostly transferring some&#10;measurements to CAD and adding a couple of small design ideas.&lt;/p&gt;</description></item><item><title>NASA 3D Printed Wrench</title><link>https://www.craigjperry.com/blog/nasa-3d-printed-wrench/</link><pubDate>Sat, 26 Dec 2015 11:26:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/nasa-3d-printed-wrench/</guid><description>&lt;p&gt;To test out my new Lulzbot Mini i printed the&#10;&lt;a href="http://nasa3d.arc.nasa.gov/detail/wrench-mis"&gt;Nasa 3D wrench&lt;/a&gt;.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench1_hu_5d9660b30cbb3714.webp" srcset="https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench1_hu_be08bdc998ba9cf4.webp 720w, https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench1_hu_5d9660b30cbb3714.webp 1440w" sizes="(min-width: 46rem) 42rem, 100vw" width="1440" height="1440" alt="quadrifilar helix antenna" loading="lazy" decoding="async"&gt;&lt;/figure&gt;&lt;p&gt;It ratchets in the clockwise direction only but it prints as&#10;a fully functioning part. It&amp;rsquo;s stronger than the rated 3in-lbs.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench2_hu_a4469da20edd4ec7.webp" srcset="https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench2_hu_968ea3c4007ff3d2.webp 720w, https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench2_hu_a4469da20edd4ec7.webp 1440w" sizes="(min-width: 46rem) 42rem, 100vw" width="1440" height="1440" alt="quadrifilar helix antenna" loading="lazy" decoding="async"&gt;&lt;/figure&gt;&lt;p&gt;It wasn&amp;rsquo;t all plain sailing though, this being my first ever&#10;3D print, it was a good learning curve.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench3_hu_6dbf8d288a10163.webp" srcset="https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench3_hu_6823952b5968a4a6.webp 720w, https://www.craigjperry.com/blog/nasa-3d-printed-wrench/wrench3_hu_6dbf8d288a10163.webp 1440w" sizes="(min-width: 46rem) 42rem, 100vw" width="1440" height="1440" alt="quadrifilar helix antenna" loading="lazy" decoding="async"&gt;&lt;/figure&gt;&lt;p&gt;I didn&amp;rsquo;t fully print all of these, i could tell early on if it&#10;was going to work or not.&lt;/p&gt;</description></item><item><title>Quadrifilar Helix Antenna</title><link>https://www.craigjperry.com/blog/quadrifilar-helix-antenna/</link><pubDate>Sat, 26 Dec 2015 00:27:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/quadrifilar-helix-antenna/</guid><description>&lt;p&gt;I followed Andrew McNeil&amp;rsquo;s design for a 5.8GHz Quadrifilar&#10;Helix Antenna. This was to replace a crappy omni whip antenna&#10;that came with an RC852 video rx.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.craigjperry.com/blog/quadrifilar-helix-antenna/q3_hu_b359b372b1c5dd1d.webp" srcset="https://www.craigjperry.com/blog/quadrifilar-helix-antenna/q3_hu_2bd4acf3cd89d902.webp 720w, https://www.craigjperry.com/blog/quadrifilar-helix-antenna/q3_hu_b359b372b1c5dd1d.webp 1440w" sizes="(min-width: 46rem) 42rem, 100vw" width="1440" height="1330" alt="quadrifilar helix antenna" loading="lazy" decoding="async"&gt;&lt;/figure&gt;&lt;p&gt;I ordered some semi rigid coax from ChinaRF on eBay and I used&#10;some earth wire from some scrap 2C+E i had laying around. I&#10;tried to straighten it as best i could!&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.craigjperry.com/blog/quadrifilar-helix-antenna/q1_hu_d679961c5298de9.webp" srcset="https://www.craigjperry.com/blog/quadrifilar-helix-antenna/q1_hu_1a8592abc73e725e.webp 720w, https://www.craigjperry.com/blog/quadrifilar-helix-antenna/q1_hu_d679961c5298de9.webp 1440w" sizes="(min-width: 46rem) 42rem, 100vw" width="1440" height="1080" alt="quadrifilar helix antenna" loading="lazy" decoding="async"&gt;&lt;/figure&gt;&lt;p&gt;Bending the shape of the lobes was harder than expected. I&#10;posted on reddit and someone suggested using a 3D Printer to&#10;create a jig. One for the future i think!&lt;/p&gt;</description></item><item><title>Quanum Googles v1</title><link>https://www.craigjperry.com/blog/quanum-goggles-v1/</link><pubDate>Fri, 25 Dec 2015 23:41:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/quanum-goggles-v1/</guid><description>&lt;p&gt;Hobby king were doing a deal on Quanum v1 headsets. I figured i could repurpose the&#10;screen if i didn&amp;rsquo;t like them.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://www.craigjperry.com/blog/quanum-goggles-v1/goggles1_hu_47af4165b198dbc8.webp" srcset="https://www.craigjperry.com/blog/quanum-goggles-v1/goggles1_hu_45d149e8c3e296a3.webp 720w, https://www.craigjperry.com/blog/quanum-goggles-v1/goggles1_hu_47af4165b198dbc8.webp 913w" sizes="(min-width: 46rem) 42rem, 100vw" width="913" height="991" alt="quanum goggles" loading="lazy" decoding="async"&gt;&lt;/figure&gt;&lt;p&gt;I&amp;rsquo;m pleased to say they worked out really cheaply!&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;20GBP Quanum v1 from Hobby King&lt;/li&gt;&#10;&lt;li&gt;12GBP RC832 5.8GHz Video Rx from Bang Good&lt;/li&gt;&#10;&lt;li&gt;2GBP GoPro headstrap from eBay&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;To make this setup, I drilled 2 holes in the back of the Quanum screen&amp;rsquo;s rear case&#10;then bolted the RC832 5.8GHz video receiver to it. I moulded a little epoxy putty&#10;around them to make it look like this is the way the product was designed all along.&#10;Instead of the very poor head strap supplied with the Quanums, I used a GoPro head&#10;mount. I eliminated all the cabling except for a short power cord.&lt;/p&gt;</description></item><item><title>HC06 Bluetooth Module</title><link>https://www.craigjperry.com/blog/hc06-bluetooth-module/</link><pubDate>Thu, 17 Dec 2015 01:51:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/hc06-bluetooth-module/</guid><description>&lt;p&gt;The HC06 is the same hardware as HC05 but has fewer features. JY-MCU is written on the rear of HC06&#10;modules.&lt;/p&gt;&#10;&lt;h2 id="connecting-to-the-serial-port"&gt;Connecting To The Serial Port&lt;/h2&gt;&#10;&lt;p&gt;These devices are 3.3v only. The wiring is straightforward:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Serial Adapter&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;HC06&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;3.3v&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Vcc&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Gnd&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Gnd&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Tx&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Rxd&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Rx&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Txd&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;The state pin emits the same pattern as the red led and can be used to detect current status. The&#10;key pin is unused.&lt;/p&gt;</description></item><item><title>CP2102 and Arduino</title><link>https://www.craigjperry.com/blog/cp2102-and-arduino/</link><pubDate>Wed, 16 Dec 2015 21:01:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/cp2102-and-arduino/</guid><description>&lt;p&gt;There are 4 main USB to Serial chips sold on eBay:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Genuine FTDI, rare and most expensive. Has the best drivers.&lt;/li&gt;&#10;&lt;li&gt;Fake FTDI, common and cheap. Shares the best drivers.&lt;/li&gt;&#10;&lt;li&gt;CP2102, common and cheap. Now has good drivers on all platforms&lt;/li&gt;&#10;&lt;li&gt;CH340G, ultra cheap and currently has terrible drivers although it&amp;rsquo;s still quite new so this may change&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;To connect a CP2102 to an Arduino Pro Mini:&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;CP2102&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Arduino&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;5v / 3.3v&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Vcc&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Txd&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Txd&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Rxd&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Rxd&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;GND&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;GND&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;DTR&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;DTR&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;&lt;strong&gt;NB:&lt;/strong&gt; the pinouts are confusing here, i&amp;rsquo;d expect Txd to connect to Rxd and vice versa. Similarly i&amp;rsquo;d&#10;expect DTR to be labelled RTS. The above is correct on my version of the cp2102 but it did cause me&#10;some consternation to find this!&lt;/p&gt;</description></item><item><title>Unbricking FTDI Chips with Vagrant</title><link>https://www.craigjperry.com/blog/unbricking-ftdi-chips-with-vagrant/</link><pubDate>Wed, 16 Dec 2015 20:45:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/unbricking-ftdi-chips-with-vagrant/</guid><description>&lt;p&gt;Some fake FTDI chips had their Product ID reset by old FTDI drivers from 0x6001 to 0x0000 which rendered&#10;them unusable. It&amp;rsquo;s possible to reprogram the Product ID string and the modern FTDI drivers no longer&#10;make this change. I used Vagrant to create a linux virtual machine for this:&lt;/p&gt;&#10;&lt;pre&gt;&lt;code&gt;vagrant init ubuntu/trusty64&#10;vagrant up&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;p&gt;I plugged the FTDI in to my host. I opened the virtualbox GUI and assigned this USB device to the&#10;VM. The required USB drivers are not present in this image, so i added them:&lt;/p&gt;</description></item><item><title>ESP8266 Arduino</title><link>https://www.craigjperry.com/blog/esp8266-arduino/</link><pubDate>Wed, 16 Dec 2015 19:18:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/esp8266-arduino/</guid><description>&lt;h2 id="the-software"&gt;The Software&lt;/h2&gt;&#10;&lt;p&gt;The Arduino environment can be used to program ESP8266 WiFi boards. To configure the Arduino IDE v1.6.5&#10;or newer, go to &lt;em&gt;File -&amp;gt; Preferences&lt;/em&gt; and add the following &lt;em&gt;Additional Boards Manager URL&lt;/em&gt;:&#10;&lt;a href="http://arduino.esp8266.com/stable/package_esp8266com_index.json"&gt;http://arduino.esp8266.com/stable/package_esp8266com_index.json&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Then go to &lt;em&gt;Tools -&amp;gt; Board -&amp;gt; Boards Manager&lt;/em&gt;. Install the latest esp8266 board manager.&lt;/p&gt;&#10;&lt;h3 id="libraries"&gt;Libraries&lt;/h3&gt;&#10;&lt;p&gt;Available libraries include HTTP servers, mDNS / Bonjour &amp;amp; SSDP service discovery alongside&#10;any other Arduino libraries which don&amp;rsquo;t make use of native ATMEL hardware functions.&lt;/p&gt;</description></item><item><title>Hexo with Github Pages</title><link>https://www.craigjperry.com/blog/hexo-with-github-pages/</link><pubDate>Thu, 15 Oct 2015 22:06:00 +0000</pubDate><guid>https://www.craigjperry.com/blog/hexo-with-github-pages/</guid><description>&lt;p&gt;There are 3 steps to configuring the &lt;a href="https://hexo.io/"&gt;hexo&lt;/a&gt; static site generator to use a custom domain while hosting on &lt;a href="https://pages.github.com/"&gt;Github Pages&lt;/a&gt;:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Create A Git Repo&lt;/li&gt;&#10;&lt;li&gt;Configure Hexo&lt;/li&gt;&#10;&lt;li&gt;Configure DNS&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Lastly there&amp;rsquo;s some notes on how to use this setup.&lt;/p&gt;&#10;&lt;h2 id="create-a-git-repo"&gt;Create A Git Repo&lt;/h2&gt;&#10;&lt;p&gt;Create an empty repo named &lt;em&gt;your-github-username.github.io&lt;/em&gt; on the Github site. Next, create a git repository to upload there:&lt;/p&gt;&#10;&lt;pre&gt;&lt;code&gt;[user@host ~]$ git init github-username.github.io&#10;[user@host ~]$ cd github-username.github.io&#10;[user@host github-username.github.io]$ touch .gitignore&#10;[user@host github-username.github.io]$ git add .gitignore&#10;[user@host github-username.github.io]$ git commit 'Initial Commit'&#10;[user@host github-username.github.io]$ git remote add origin ssh://git@github.com:Your-Github-Username/your-github-username.github.io.git&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;p&gt;There will be 2 branches in the repo:&lt;/p&gt;</description></item></channel></rss>