Sunday, October 26, 2014

Blackout MiniH Quad - Build Log 3

The build.

The first thing I did was grab the frame and try and loose as many screws and bits on the floor as possible.  I was assisted in this by Joss (20 months old and into everything) who was curious what nylon screws tasted like and if they would assist digestion.

After retiring to a more secure location I then did a quick fit build of the frame to see how it all went together.  There are instructions on the Blackout site to follow and it is not rocket science.

I don't have an actual photo from my build but amazingly it looked like the one on the Blackout website:

I didn't tighten anything as at this point I was not sure what order I was going to do things.

Powering up the PDB

Getting power to the power distribution board (PDB) seemed like a good starting point.

I placed the battery on top where just about everyone seems to mount them in the photos, connected the male XT60 connector and tried not to short it out on anything.

I then worked out roughly how long to make the male end of the connector, disconnected it from the battery, trimmed, stripped and tinned the ends.

I then tinned the connections on the PDB with a little help from a trusty flux pen and soldered the connector on.  There are two spare holes in the PDB either side of the power pads and I looped a small cable tie through here and over the leads just to add a little extra security.  It may do nothing but it made me feel better.

Connecting up the battery lights up all the LEDs on the PDB so I could confirm that all was well at that end.

I now also had something bright to chase Joss around the house with while making aeroplane noises which he loved no end.

Motors and ESCs

Now as warned, there is a good bit of hacking involved in this build and it started here.

To reduce weight and make everything fit, the motor wires on the ESC need to be trimmed and the Motor wires also need to be shortened.

On the ESCs I removed the heatshrink and cut the wires off at about 6mm long.  I later re-did these to about 3mm long to give me even more space so please ignore the photo other than for the idea of what was being done.  The three wires were then tinned.
ESC before work

ESC after trimming and tinning but still too long.

I then mounted the motor to work out how much I was going to shorten those leads.

I wanted to put a loop in them for stress relief and found that from the motor to the frame would be about right.  I then cut, trimmed and tinned these three.

Trimmed motor leads

Now since you need two clockwise and two anti-clockwise motors you need a wiring strategy that will prevent you having to re-solder things.  To reverse the rotation of a motor you need to swap any two of the leads between the motor and ESC.

Therefore I laid all the ESCs down the same way opposite their motors and connected two of them up with the wires exactly as the wires lay.

On the other two I simply crossed two of the wires so that I would have two motors that would rotate one way and two that would rotate the other.
ESC and motor wired up - this is a twisted set.
I then applied liquid electrical tape to the joins and finally new 20mm clear heatshrink to protect it all.

Testing the motor rotation part 1
In order to test the motor rotation I needed to get power to the ESC and a signal to the ESC to tell it to spin.

The only way I could think to safely do this (read: without blowing things up) was through the flight controller so it was time to get that side of things ready before I could do anymore.

I did not want to bolt all the motors down and solder the ESCs to the PDB only to have to move everything later on.

This makes part 1 of testing motors really boring as I basically pushed it all to the side and got on with the next part of the build.

Preparing the flight controller

The Naze32 as mentioned previously, comes without all the pins soldered on so you need to get that sorted before anything else.

I could go through and write up what I did but the reality is that I followed this YouTube video and it all just worked.

I have not done a lot of this sort of soldering but safe to say that flux, helping hands to grip things and a nice fine soldering iron are a must.

Baseflight and powering on the FC

With the flight controller ready to go I then needed to power it up so that I could play with the motors though the PC using the Baseflight configuration tool.

Note, Baseflight is being updated all the time so these screen captures are almost definitely out of date so consider this a rough guide only.

Again there are lots of instructions on how to do all this so the short version is that by using Googles Chrome web browser, you can install the Baseflight extension app from here:

This will be used to do all the set up of your Naze32.  There are other options but this is what I used and it works perfectly as far as I can tell.

My PC here is a Windows 7, 64bit workstation which on connection of the USB lead to the FC drew a nice useful blank and could not find or install drivers.

A quick search and I located the correct USB to UART drivers from here:

Plug the Naze32 into the PC with a micro USB cable, fire up the Baseflight app, pick the COM port allocated to the Naze, connect and you are now live and ready to play.

Well, almost ready.  Chances are you will be told that you need to do a firmware update on the Naze32 board before Baseflight will let you set anything up.

Flashing Naze32 Firmware

To access the firmware flasher in Baseflight you first need to click "disconnect" from the PC to get to the welcome window with the firmware flasher button located on the bottom right.  Use the button up the top or just unplug the USB cable.

I just left everything unchecked, clicked on "Load Firmware Online" which goes looking on GitHub for the latest firmware, downloads it and shows you the details once it is ready.

Make sure the Naze32 is plugged in and click "Flash Firmware" to do the job.

A nice green bar at the top when it is done and you are ready to move on.

A quick look around Baseflight

Now your firmware is up to date, click connect and have a look around.

The Naze32 will be powered by the USB connection and you will have a nice graphic showing you the movements the board is making in real time.

There is a lot of good reading out there to understand the evolution of these boards and how the accelerometers and gyros work together to identify what your quad is doing but you can also just look at the pretty pictures and see the output from the "Raw Sensor Data" tab and know that it is magic carved from silicon and unicorn dust.

Go to the "Configuration" tab in Baseflight and you can now select the type of motor layout.  This is a MiniH but the motor layout equates to a QuadX - ie: who cares where the arms are, it is the motor positions that will determine how it is controlled.

When you make changes you need to hit "Save" down on the bottom right.  The board will do a quick reboot and you are good to move on.  Forget to hit save and settings you thought you made, well, won't be.

For now, disconnect and power down your Naze (ie: remove the USB connection)

Testing the motor rotation part 2

So now I had the flight controller hooked up I needed to get power to the motors and see which ones would spin which way so I could lay them out on the quad once and once only.

The first job was to understand how power moves around in this thing.

So the dumb version is as follows;

1) Power from the battery is supplied to all four ESCs via the PDB that makes up part of the frame.

2) The ESCs have a BEC connection which stands for Battery Elimination Circuit.

The BEC does two things, it supplies power to the flight controller and in the case of an RC plane, it would stop power going to the motor as the battery dies so that there is still power to the flight controller & servos so you can make a dead stick landing.

Now in the case of a quad, no power to the motors means you are just dead but that is beside the point.  The BEC is how we power the rest of the systems.

3) The receiver can be powered from the flight controller or from another BEC.  I have opted for just take the power from the flight controller at the moment.

Depending on what other toys you want to put in here like video transmitter for FPV etc, the power distribution options will change.

So that is that but we still need to run the motors so time to get back on track.

Fortunately the power leads for the ESCs have nice little bayonet type connectors on them that also just happen to fit the XT-60 connectors on my battery packs.

To make things safe and to prevent motors from dancing on my table I screwed them all to the frame.

The position was not important as I was going to remove them for the final step of soldering the ESC to the power distribution board anyhow.

Finally, NO PROPS.  They look cool but when you start playing with Baseflight and motors, stuff happens and you don't need props to introduce blood into the system.

Anyhow, I didn't photograph it but trust me when I say, connecting the input side of the ESC directly to the battery (correct polarity please) and then connecting the BEC lead from the ESC to port 1 on the Naze32 (Check your polarity or the magic smoke will escape) will allow you to run that motor using the Baseflight tool.

In the case of the BEC line on my Afro 20A ESC, yellow is the signal line, red is power and brown is ground.  I imagine this is standard but just make sure when you connect it to the Naze, the brown is on the connector closest to the edge of the board and the signal is on the connector furthest from the edge of the board and check again each time you connect and re-connect the motors.

So, Motor 1, connected and ready.

Connect the Naze to your PC with the USB cable and we are ready to go.

Head over to the "Motor Testing" tab and select the "Check" checkbox.

If you move the slider for motor 1, the motor connected to channel 1 on the Naze should now spin up.

Reduce the slider until you can see the direction of rotation or take note of it as it spins to a stop.

Job done.  Mark that motor as CW or CWW.  Power it all down and repeat with motors 2,3 & 4.

Next post, soldering the ESCs and final set up.