gbeevans.com

Connecting an Flytrex Core To HK APM 2.7

I have been a Flytrex user for coming up on about a year now. Ever since I brought my first quad(Phantom 2V+) I recently decided I wanted to build one from scratch. For the controller I went with the APM. Because I will still be flying my Phantom I want all my missions to be in one place so I brought another flytrex core to go with my APM quad.

However when I tried to hook it all up nothing would fit. The APM cable sold by Flytrex would just not work. I soon found out that the APM cable sold works with the 3DR GPS and not the HK APM GPS package.

Undeterred I figured out that it is not too difficult to modify the cable to work with one caveat.

First Step

Cut the 3 wires going to the Flytrex Core plug. Give yourself enough cable length.

Wiring

Now remember that caveat I mentioned above. Well here it is. The power wires are reversed from how everyone else does it. The black wire is + and the red wire is -. Fortunately the HK APM has good Reverse Polarity Protection so my quad was saved.

The remaining blue wire is the Flytrex RX wire and this needs to be attached to the corresponding TX wire on the GPS module.

On the HK APM the TX wire is the Green one or Pin 3

It's up to you on how you connect all the wires.

The way I did it was to cut the TX cable on my GPS cable and splice in the cable. You could also remove the wire from the plug and undo the crimp and re-crimp it with the Flytrex RX wire.

Rather than splice the GND and VCC wires I soldered a header plug(like a Servo or ESC plug) on to the 2 flytrex power wires(remember these are reversed) and plugged it directly into the power terminals in the A0 - A11 or inputs(See Below) terminals on the APM.

Hopefully this helps someone out. The reverse polarity was a particularly annoying thing to find out.

Tags: Flytrex, APM, APM 2.7, Quadcopter Comment

MOSFET Breakout

Files

Files can be found at https://github.com/geocom/MOSFET-Breakout

About

I needed a simple breakout board for a MOSFET that includes the bias resistor. I also included a LED indicator.

I have open sourced the design and you can order a set your self at OSHPark.com here.

Licence

These files are provided as is in the public domain. I accept no responsibility for how they are used.

Parts

  • 1x 1206 Resistor 1.5k OHM (Optional) @ 5v
  • 1x 0603 Low Current LED(Optional)
  • 1x RFP12N10L MOSFET
  • 1x 1206 Resistor 1M OHM
Tags: MOSFET, Electronics Comment

3D Printing With A Raspberry Pi.

At the start of the year I made the decision to buy a DiamondMind 3D Printer. It was a kit set that that took me a few weeks(Mostly Because I Had Other Things On) to get fully working.

In the early days I decided that leaving my main computer sitting next to it for the many many hours that it took to print was not really something that I wanted to do.

Stand Up Repetier Server

I started to have a look around and see what was available.

Repetier Server was one of the first that I found. So I pulled out a 256MB Raspberry Pi flashed a 16GB SD Card with Raspbian Pi and started the task of installing Repetier Server on it.

It was not the most difficult thing I have done but there where a few steps missing to get it fully up and running.

I soon figured out that it was an issue with the permissions that where set up on the files that needed to be moved in to there pre required spaces. I have since done another install of Repetier Server onto another 512MB Raspberry Pi and can confirm that building Repetier Server your self removes these issues.

I liked Repetier Server a lot. It was simple enough to get up and running and had an nice easy to use layout.

The only real downsides where;

  • There is no Camera Capture Software baked in
  • It to me has the Y Axis arrows around the wrong way and from time to time I would hit the wrong button and crash my lil purple cart into a wall.

Fixing these issues

Well that was an interesting proposition. The Y-Axis problem was not really a major issue even if it may look like i'm throwing my toys out of the cot over it.

The Camera issue was something that I felt could be addressed inside Repetier but would be a pain as not everyone is going to be using Repetier server on a Raspberry Pi and as such calling raspstil would not work.

So as such I decided to make a simple web page that would show you the most recent picture from the camera.

I figured to get this working it was a case of writing up a shell script, along with some javascript and HTML. The Shell Script would take care of the photo capture and create a simlink that could be followed by apache to serve the image out. The javascript was needed to reload the image being shown.

This took a few hours to get going fully.

Version 1

Version 1 was simple at best but it worked like a champ. However it had some major caveats.

  • X Y Z Axises and temperature sill had to be found by going into Repetier Server meaning that you needed to have more than one window open at a time to view both at the same time.
  • Photo's taken where massive. They where fine over on the local network. Even on Wi-Fi it worked well. Over the internet was a different story.
  • Photos where stored on the Raspberry Pi which meant you had to delete them from time to time.

Version 1.1

Knowing some of the draw backs with version 1 I set out to fix the one that was causing the most amount of issues(for me). The XYZ Axis and Temp Viewing on the same page issue.

This took a bit of work and some heavy amount of reverse engineering Repetier Server.

After some digging around the Repetier Server front end I managed to find the hooks that it was using to display these values.

Once I found these hooks it was relatively easy to get it working on my computer. But broke as soon as apache tried to serve the html script.

Slightly annoyed and perplex as to why it stopped working as soon as it hit apache I did some more searching.

Soon I found out what was causing the issues. I was dealing with cross site scripting. Because the files that where being called resided on port 8080 and I was running on port 80 on the same server it blocked the ajax calls.

Some more digging and tinkering with reverse proxy on apache it worked.

<Location /printserver> ProxyPass http://localhost:8080/ ProxyPassReverse http://localhost:8080/ </Location>

Where To Now

I bet you would like to know.

In a few weeks I will be posting another article much like this one going over where I am going to go with this.

If you want to subscribe to get these as soon as they come out click here

Tags: 3D Printer, Development, HTML, Javascript, Shell, Raspberry Pi Comment

About.

Welcome.

gbeevans.com is run by Geoff Evans.

Geoff also runs Geo Com Ltd who build and run web sites web apps etc.

In my off time I build/tinker with Arduino, Raspberry Pi, Beaglebone etc. I have made and minted may custom PCB's.

Over the years I have been involved with many stage productions both on stage, back stage, and sometimes on the very rear occasion front of house. In 2008 I won the AMI Showdown Award for sound design in ACG Senior College's Production of "The Player Project"

Depending on when I find time I will post here most likely about the above subjects. You can get me most of the times by the links below. I monitor Twitter but frequent posting will be rare.

Where To Find Me
Twitter: GeoCom
Facebook: gbeevans
YouTube: gbeevans
GitHub: geocom
GeekZone: geocom
Work: Geo Com Ltd