Wednesday, 16 April 2014

The Window is finished! (Well, kinda)

On Friday night of last week, I came home to a nice box of goodies sitting on the table, my KK2.1.5 board, some connectors and a small prop balance stand, and after working a little bit on Saturday, Sunday and Monday, I ended up with a functioning octocopter. Here are a couple of pictures of it complete:
 Upside down:
 A closeup of the center:
 And a closeup of the camera mount:
I soldered up a big nasty wiring harness out of 14 gauge wire running up the arms to supply power to the two motors per arm, and some 12 gauge wire running to two XT60 connecters each to allow for a total of 4 batteries to be plugged in at any time. I mounted the electronics and batteries in an old Tupperware container which is screwed to the middle of the frame and which has a bunch of holes drilled thru it for running all the wires, and I mounted the KK board in its foam packaging as recommended by the hobbyking manual; this serves to protect the board, and isolate it from vibrations transfered thru the frame. I also had to extend the ESC wires using a bunch of extentions, splitters and ugly hacking, but it all connects up and works well. As you can see, at the moment I only have two batteries mounted, owing to the fact that I only have 3 un-bulgy LiPo batteries that I trust not to catch fire or explode, but there is room for two more in the container, I only need to drill some more holes for the wires to exit. To fly properly, this thing actually needs four 20C 2.2Ah batteries, not the two that I am currently running because each motor can draw a maximum of 18A of current, and I have 8 of them, roughly equaling 160A total current draw with all the motors maxed out, and right now with my two batteries, they can only deliver 2.2Ah times 20C, a little over 80A of current. Nonetheless, it still does fly, but the flight time is a disapointing 5 or so minutes, and I am not getting full lift (which I calculated to be 9kg with the motors running full out) While I am on the subject of lift and weight, the copter with no batteries weighs approximately 2.6kg, and four of the batteries I am using weigh together about .7kg, so once I get enough to actually fly with 4, the total weight of the octocopter will be less than 3.5kg, leaving quite a bit of payload capacity.
The camera is an Oregon Scientific "ATC mini" action cam that I got on for $40; I used its "tripod adapter"mount and threaded a 1/4in bolt thru some pipe and a tee with half cut off, hose clamped to the frame as a mount. Its simple and sturdy, but transfers a lot of vibration to the camera, and that makes the footage, well, less than perfect. Lastly, I used some red, green, and black electrical tape to indicate orientation, the black stripes is the back side, green is right (starboard) and red is left (port). I have not yet played with the PI values that are tuneable on the KK board, and so while usable, the octocopter is not quite as stable as it should be. Still, the fact that it flies pretty good with stock settings is pretty awesome. I expect it to get much more stable when I properly tweak the PI settings and perhaps the altitude dampining.

So on to what everyone really cares about, the videos of it in action! The first two are good if you get bored quickly, they are short and you see it reletavely close up and doing cool stuff. The middle two are if you want to see a bit of a longer video, and were actually taken first, but they get a little boring. The last two are also slightly boring, they are the footage shot by the ATC mini mounted on the octocopter. Enjoy.
So that is all for now, next up will be getting some more batteries so it can actually get some decent flight time, and an underslung pan/tilt bracket for the camera with some landing gear to keep it out of the ground, and video feed back to the ground as well as a seperate tx/rx combo for someone else to film while I fly, and perhaps after that, AN AIRBORNE PAINTBALL GUN! awwwww yeahhhhhhh. A project is never really finished, but at least the beginning is finished :)

Tuesday, 8 April 2014

PKP (it's alive again)

In my last post about PK, I had completed the motor controller, but had not yet tested it, so I started off by getting out my UNO and writing some test control code for the motor controller:
I got the code all written up, and gave it a test with two multimeters hooked up to the outputs (Unfortunately this video is really dark, it looked lighter when I was taking it)
And hooked it all up and gave it a try (The motor directions are reversed in this video, I fixed that shortly after)
The code running on the UNO during all of these videos is as follows:

#define in1 3
#define pwm1 9
#define f1 5
#define b1 7
#define in2 4
#define pwm2 10
#define f2 6
#define b2 8
void setup()
  // Channel 1:
  // Channel 2:

void loop()
 int p1=pulseIn(in1,HIGH);
 int p2=pulseIn(in2,HIGH);
 int p3=p1+p2-1500;
 int p4=p1-p2+1500;
 p1 = constrain(p3, 1200, 1800);
 p2 = constrain(p4, 1200, 1800);
//============= Channel 1 =============
 if(p1 > 1530)
   int s1=map(p1, 1530, 1800, 255, 0);
 else if(p1 < 1470)
  int s1=map(p1, 1470, 1200, 255, 0);
//============ Channel 2 ==============
 if(p2 > 1530)
   int s2=map(p2, 1530, 1800, 255, 0);
 else if(p2 < 1470)
  int s2=map(p2, 1470, 1200, 255, 0);

For my actual outdoor run, in order to get some footage, I made up a quick little camera bracket for my transmitter, I call it the "forever alone camera mount"

And I also made a little mount for my action cam to mount on PK in place of the paintball gun, since I do not yet have the necessary parts to make it opperational yet.
And with all that set up and working, I went out and drove it around my driveway for a bit (woohoo, my first legitimate run :)) The first video is me filming, and the second is from PK's camera
Well, it works. After I finished driving it around, I stuck it in an outdoor shead, here are a couple op pics of the various parts, and the whole thing as it sits:
Motor controller:
 The whole backside:
 And from the front,
 And side:
Anyway, it runs, which brings a smile to my face :) Onward and upward!!

Monday, 31 March 2014

More Window

Just a little work done, but besides the electronics/battery box in the middle that I have yet to mount, this will probably be all the progress I make untill my KK2.1.5 board comes in the mail. Starting to look like an Octocopter...

Sunday, 30 March 2014

PKP (trials and tribulations of building a homebuilt motor controller, Pt. 2)

When I last posted about PK's motor controller, I had just let the magic smoke out of a MOSFET from a cheap cordless power drill, and ordered 8 of these 60V 30A MOSFETs from sparkfun. Well, a little while later I had a pretty little red box show up, and it was time to get started:
 Also on hand for this project, I had the heatsink from an old computer (already cut in half in this picture)
And the ever faithful relay part of my motor controller
I set to work on the heatsink, planning on drilling and taping 6 holes into it, and cutting it in half so each channel would have three MOSFETs wired in parallel. Well, the heatsink had other plans, and I ended up snapping not one, but two drillbits in seperate holes on the heatsink. At this point I decided that rather than try my luck with the other half of the heatsink and probably end up with the same fate, I would cut off the portions of each heatsink that were ruined, tap the holes, and hope that two MOSFETs in parallel would be enough. Here is a picture of the heatsinks that I ended up with:
I then soldered up a board with 4 MOSFETs plus all of the necessary connecting wires:
And put it all together:
Copious quantities of heat sink compound was used, and I put a cut up chunk of circuit board between the heatsinks to prevent them from shorting out on one another (MOSFETs are different than voltage regulators and the like in that the tab on them is not connected to ground, it is connected to the output, so it is important to isolate the channels from each other) The whole assembly is held together by a couple of zip ties (I love my zip ties :) )
I taped an unused computer fan to the top of the assembly, connected it to the relay block and...
Found out that the MOSFET driver board that I made for the last batch of MOSFETs was dead. So this is the second driver board I have built and then fried, and I am getting a little iritated, but I am this far in already, so I gotta keep going, so I broke out the multimeters, battery and electronics, and prototyped another one,
cut the disfunctional one off of the relay block driver,
and soldered up yet another board:
I (kinda, maybe) learned some lessons from the other two that I fried, and made this one completly removable using 0.1" male and female headers so that if it fries, I can swap in a new one without cutting any wires. I also doubled up on the transistors for each channel, hopefully giving a little bit of redundancy and added a header for the computer fan. I stuck it back on the motor controller and now have a fully functioning motor controller:
The male spade connector is for ground, power is supplied to one of the four relay terminals in the centre of the brick, the heat shrink tub covered two pin connector is both ground pins to be connected to the logic circuit, the four pins are for direction control, and the two left are speed control.
Here is a picture of it mounted on PK:
 The interesting thing about large robots such as PK is that, in contrast to smaller ones, it is not as important where things such as a motor controller or MCU is mounted, and it might change around a lot, so that is probably just a temporary resting place. That said, here are a couple more views of how PK is right now:
Due to not having a lot of time and the fact that my front yard is one big mud puddle while my back yard is still under a bunch of snow, I have not yet tried the motor controller on PK's motors yet, I just hope that the two MOSFETs per channel will stand up to the motors, cause if I let the magic smoke out of these, I might not have the motivation to rebuild the speed control part AGAIN, and I am a little on the broke side to buy a commercial speed controller. The paintball gun isn't quite operational yet, I still need to buy a right angle fitting for the remote line so that it will fit between the end of the gun and the main battery. That's all for now, I hope to try that motor controller out soon.

The Window progresses (just a little)

I will start this off with a picture of the quadcopter that I bought, plus the 4 arms from my disasembled quad, both of which were then totally disasembled to be used in The Window:
I took those completly apart, and was left with this motley collection of 8 motor, ESC, and propeller combos:
The top (or in the second picture, right) four are from my friend's quad, and they have had their power wires extended, I think this might actually be handy for mounting the ESCs, and they all have 3.5mm male bullet connectors on the power leads. I plan to make a nice wiring harness using 12 gauge wire that will have 4 XT60 connectors for power (I only plan on using two batteries at a time, but its nice to have the capibility to use 4 if I would like), and wires running up the arms for power to each of the two ESCs on that arm. I wanted to have nice red and black wiring, but cheapness reared it's ugly head, and I ended up only getting 10 feet of white instead:
I also mounted the motor mounts to the mounting tees, and gave the motors a test fit. The blades seem to have a good amount of clearence between one another, and the spacing seems quite good too, gotta love trigonometry.
 Here is a closeup of the motor mount:
The zip ties hold it in place quite securely. In this picture I have yet to clip the excess from the tie, but that shall happen. Three ties hold each motor in place.

That's all the progress to date, stay tuned for more at some point.

Saturday, 29 March 2014

The Window (beginnings)

Awhile back I made a simple and cheap quadcopter using parts mainly from Hobbyking and the local hardware store, you can read the letsmakerobots writeup I did on it here. A friend of mine also built a similer one using mostly the same parts (we placed one big order with twice the parts needed to make a quad). Fast forward a year or so, and my quadcopter is sitting in parts in a box on my shelf, victim of an upgrade that never quite got finished, and my friend's is also sitting unused on a top shelf. Seeing as the quads were both built with identical electronic parts, and his was also unused, I decided to see if I could buy his off of him, and put the two together to make a octocopter. He conceded, and I was now the proud owner of two disfunctonal quadcopters, plus some extra parts. Step one was to find a suitable octocopter control board that was in my price range and simple enough for me to be able to use. I looked around, and found Hobbyking's KK2.1.5, but more on that in another post. Step 2 was to build a frame, after the sucess I have had with a PVC frame, and the miserable failure I had with a storebought frame, there really wasn't any decision to make. Perhaps later in the future when I become a better multirotor pilot, less prone to crashing, I will invest in a different frame, but for now its 1/2" PVC for me :)

I spent a while with some graph paper, a ruler, and a pencil determining the best frame setup that I could come up with that used only standard pipe fittings,
and after I had sketched a bit I decided on this setup:
With two motors connected to each arm that radiated out of a + fitting, much like my previous quad. A little bit of trigonometry later and I had the legnths of pipe that I would need in order to space everything in a nice octaganal shape, and I also decided to stregnthen the frame a little by connecting the corners to each other, just like this:
I measured and cut all 20 pipe segments, and then faced them and got their legnths perfect on a lathe. 4x 11.85" legnths, 8x 6.5" legnths and 8x 4.25" legnths:
Next up was drilling three holes in the top of each of the 8 motor mount tees for use in fastening down the motors. I found that a very good way to fasten the motors to the frame was by drilling holes in the tee, and affixing the motor to the tee using zip ties. This is a simple, light, easy to repair, and cheap setup, and most importantly, it has a little "give" in it, so if I make an especially hard landing, the zip ties break instead of the motors. I have had that happen several times, and it is much nicer than replacing a motor (my friend decided to screw his motors down, and broke two or three of them in hard landings, I have yet to break one.) This is a picture of my quadcopter's motor mounts, my octocopter will use exactly the same method, except with only 3 zip ties per motor.
Here is all of the pipe and fittings used to make the frame:

And a couple of pictures of the completed frame, it is approximately 3' on diagonal.

 Everywhere that a pipe goes into a pipe fitting, I match drilled a hole and drove a small wood screw into the join to ensure that none of the pipes will pull out or rotate. The frame is very sturdy and has almost no flex. It also happens to look very much like a windowpane, which is where it gets it's name, The Window.
Price: $13
Weight: 1.1 kg
Durability: Dang this thing is durable, it would take a lot to break it, and if it does, parts are cheap and avalible at the local hardware store.
Looks: So apparently some people find this to be important. I have never understood humans. In other words, Dat Pipe :)

Well, that's all for now, updates will come sometime.