My Masters project within the Bristol Robotics Laboratory is to design a system of UAVs that can be deployed in groups to co-operatively map the structure of their environment. This is envisaged as an internal environment, however it is expected that the technologies developed may be additionally adapted for external mapping. This series of posts documents key elements of the project.
This post shows the construction of the new airframe being used for development.
My existing quadcopter UAV was not going to be suited to the development work required because:
- There is too little space for sensors and computers.
- What space there is leaves the electronics too exposed.
- The carbon fibre frame is too expensive if it needs to be replaced, and aligning the motors is too time consuming.
In short, I need something cheaper, easier and with greater capacity for sensors and computers!
This is a quadcopter based on two standard 450mm framesets. Two are needed to add another ‘deck’, leaving a spare set of arms for breakages.
The new airframe is based on the following, sourced from HobbyKing unless otherwise specified:
2 x Q450 V3 Glass Fiber Quadcopter Frame 450mm – Integrated PCB Version
1 x Speed Controller. Q Brain 4 x 25A Brushless Quadcopter ESC 2-4S 3A SBEC
1 x SF Props 4pc R/H Rotation (Yellow)
1 x SF Props 4pc Counterclockwise Rotation (Yellow)
4 x Motors. NTM Prop Drive Series 28-26 1100kv / 252w (short shaft version)
4 x Prop mounts. NTM Prop Drive 28 Series Accessory Pack
2 x Batteries. Turnigy nano-tech 2200mah 3S 35~70C Lipo Pack
1 x Pixhawk PX4 (I am using the Hobbyking Pilot32)
1 x Raspberry Pi version 2 (RS Components) + case
1 x Radio TX/Rx – this only needs to be a basic system (but 9 channels for flexibility)
1 x Spacer Set (https://www.kitronik.co.uk/2202-spacer-kit-plastic-spacers.html)
Use decent tools for small hex and cross-head bolts. Also a small amount of drilling will be required – I use a Dremel drill on a vertical stand, but it could also be done ‘by hand’ with care.
Preparing the Body Section:
It can be seen from Fig. 2 that the body section comprises 3 plates. All we are doing is taking a longer plate supplied with a second airframe kit and mounting it on top with some spacers. This will provide a protective sandwich for the Pixhawk and give a completely free top plate for other components that may be needed at a later stage.
Drill the Middle and Top Plates:
We need to drill four holes for the spacers to mount the longer top plate centrally over the middle plate. As we are not using the PCB connections embedded into the plates, it doesn’t matter which way up they go .
Scribe the middle plate to locate the holes. This is shown in Fig 3, also with the final drilled hole. You will need a drill size to accurately to fit your spacer bolts (3.2mm for the Kitronik spacers).
Align the top plate carefully behind the marked out centre plate and tape them securely together. Then drill the four holes through both plates at the same time (Figs 4 and 5).
Fig 6. Attach the spacers to the centre (square) plate. Use 20mm spacers securely fastened through the new holes with short screws (6mm). I also fixed Velcro here as a temporary mount for the Pixhawk.
Fig 7. Attach the spacers to the top plate. Use 8mm spacers, but screw all the way through with the long (12mm) screws. This will allow the top plate to be screwed down onto the centre plate, and easily removed to access the Pixhawk later on.
Fig 8. Don’t screw the two together yet! This just shows how the spacers should be aligned to screw the top plate down to the middle plate. Remember to have a little play to begin with in the top screws.
Add the Arms and Electronics:
Figs 9, 10,11. Attach arms, motors and speed controller. I put some Velcro on top of the bottom plate to help fix the battery, and on the back, some more to help mount the Raspberry Pi later on. Use the small hex bolts supplied to mount the arms.
Fig 10. The 4-way speed controller is a breeze to install compared to the usual separate units. Mounted on the underside with Velcro for a temporary fix. Note wire routing through base plate.
Fig 11. I used the pan head bolts supplied with the airframe kit to mount the motors directly to the arms.
Fig 12. Mount the Pixhawk on the centre plate and secure the wiring. I’m using Velcro right now, but my intention is to suspend a vibration-proof plate between the spacers we mounted on the centre plate earlier. Note… As an old guy, I am used to the most used vehicle on the planet travelling with the white bits at the front and the red bits at the back. So my quads are flown the same way round. However, I have been told that this is the reverse of what many do – so please bear that in mind with my instructions, lest your autopilot become a little confused…
Fig 13. A word on the Telem2 wires. The ground, TX and RX of Telem 2 corresponding to the /dev/ttyS2 port are to be connected to the Raspberry Pi. The other wires, including the 5V line are separated and taped-off safely for now. During development, the Raspberry Pi will be powered separately, so the 5V line is not required (this is different to the instructions on the connecting the two at http://dev.ardupilot.com/wiki/companion-computers/raspberry-pi-via-mavlink/). Why is this important? Because if you power the two separately (maybe from a PC) and then connect the 5V line on Telem 2, there’s a good chance you will fry something or at least try to feed 5V back into your PC USB port. When the quadcopter does need to fly untethered, the supply to both the RPi and Pixhawk will come from the main battery, via the current monitor.
Fig 14. The ESC wires go into Pixhawk sockets Prop 1 -4. Which pins exactly depend on the orientation of the controller under the base plate. Also, don’t forget to check motor directions – just switch any two of the three motor wires to reverse the direction.
Fig 15. The RPi sandwiches neatly between the top and base plates to the rear. Don’t forget to connect it to the Pixhawk (see link above).
Fig 16. Feed the receiver wire through the top plate and mount the receiver and aerial on the front. Then screw the top plate down.
Fig 17,18,19. Job done… at least a lot neater than what it replaced (Fig 20), and it has the RPi on-board…
I shall cover the software for setting up ‘off-board’ control of the Pixhawk from the RPi. There are some excellent examples that have helped me, but it has still proved quite a challenge. Hopefully I can save others some of that effort!
The forum thread for this post is on https://groups.google.com/forum/#!forum/px4users. Please feel free to join, ask questions and contribute.