So in the last blog, I talked about selecting the ESC, motor, battery, and propellers for your frame. In this blog, I’ll talk about the control side of the hardware and some other miscellaneous things that you should know as a drone creator and pilot. Link to video (watch the video before the blog, at least the first 5 minutes).
Stuff you gon’ need:
1)Mini Pro (5V, 16MHz)
Q. Would a 3.3V 8MHz version work?
A. No. Not if you’re following my tutorial.
Q. Will an Arduino Uno work?
A. Yes, but it will result in a bigger flight controller which kinda goes against our main motto (less is more).
Q. Will it work with a nano?
A. I guess it would.
Q. Will it work if my mini pro is red/green in color/was manufactured by some 3rd party?
2) Dot board/ Zero PCB / Puff board
Q. How do I cut the dot board into the desired dimensions?
A. Use a marker to draw out the dimensions on the dot board, make sure the lines pass through the holes (the holes are the weak spots). Remember that the dot board is made of an amorphous solid (irregular molecular structure) so it can’t just be snapped into 2 pieces. Use a cutter to make multiple deep cuts on the lines (that pass through the holes).
Once you’ve made 8-10 passes, apply a gentle force to try and snap the desired dot board region off of the main(parent) board piece. It should come off pretty easily.
Q. Which side do I solder on?
A. The shiny one (seriously).
3) Female header rail, mail header rail(preferably in white, red and black to represent the signal, Vcc, and ground.
Q. Why is the female header called so/the male header called so?
A. Look at the particular header(male or female), look inside your pants, consider your gender, do the math.
4)Jumper wires (Female to Female type). Vcc, signal and ground jumpers (3 pin connectors/servo connectors).
5) Soldering Iron, Solder wire, flux(if you’re a pussy).
6)The hardware from the previous blog (ESC’s, frame, motors, battery, propellers etc)
7)Transmitter and receiver, preferably flysky Fs-i6.
Q. Can I use XYZ transmitter and receiver for this?
A. Yes, as long as it has at least 5 channels and you know which channel is sending what data.
Q. Can I use my scratch-built Transmitter-receiver for this? The receiver puts out the data in according to UART protocol
A. Yes but then you’d have to change the information reception part in the code. Do it at your own risk.
8)Needle nose pliers.
9) Double Sided Tape.
So here’s a diagram showing the connections (not the best handwriting, I know).
Here’s a pic of the underside of the dot board (after soldering ).
The multiple vertical shorts are the shorts between the female header rail pins and the male (signal) header rail pins. You need pins from GND to 9 on the right side and pins Vcc to 10 on the other side. place the headers on the dot board accordingly.
Short together all the Vcc pins. Short the Vcc rail of one side to the other side. Short the Vcc pin (the signal pin which would be connected to Vcc of the mini pro) with the Vcc rail.
Do the same for the ground pins (short ground rail with GND signal pin).
The mini pro should have all the signal pins on the underside except the A4 and A5.
Here’s a pic of the top side after doing the basic wiring. I passed the wiring for the mpu6050 from under the mini pro in order to make the build cleaner and a bit more resilient against vibrations
Don’t forget to short the A1 to Vcc! The pin A1 is supposed to read battery voltage and trigger auto-landing if it detects that the voltage has dropped below a certain value. You may implement this by using a voltage divider, but it’s just gonna make this entire process a bit more complex (because you may be using a 4s and not a 3s Li-po). So if you want, you can connect A1 to a potential divider (5V->full battery voltage) but I like to keep the feature disabled by default.
That’s it! your flight controller is ready!
Connecting the flight controller to the peripherals (esc’s and receiver).
Before we do any connections, we must first place the double sided tape on to the frame to hold the flight controller in its place. Align the Y-axis of the MPU-6050 exactly with the “front direction” convention that you wish to follow. I keep the white part as the front and the red part as the rear end for djif450. This is the opposite of the standard convention. To me it is inconsequential (bite me).
Follow the first image in this blog for the connections.
Front left esc -> pin 3
Front right esc -> pin 4
Back left esc -> pin 5
Back right esc -> pin 6
Roll channel -> pin 8
Throttle channel-> pin 9
Pitch channel -> pin 10
Yaw channel -> pin 11
Aux channel -> pin 12
Ultrasonic sensor ->pin A0
A4 (SDA) -> SDA of mpu6050
A5 (SCL) -> SCL of mpu6050
Note: try passing the wires through the slots/holes in the frame as much as possible. This has 3 benefits:
1) The build looks cleaner. A clean build is easier to debug and honestly feels so much better to look at.
2) Wires stay in their place/don’t move around too much because of the friction in between them and the slots/holes.
3) It keeps the wires clear of the propellers.
Observe how all the receiver and sensor wires come in from the front slot while all the ESC wires come in from the rear slot.
TRANSMITTER RECEIVER :
I prefer a flysky fs – i6. You need to set either channel 5 or 6 to work with switch C (3 position switch). To do this, Long press the ‘OK’ button, go into Functions Setup, go to Aux Channels and using the up-down button change the switch that corresponds to either channel 5 or 6 to switch C.
Another thing you need to do is to make sure the channels are according to the following picture. To get to this point, long press ‘OK’, go to System Setup and then go to stick mode.
LANDING GEAR :
Believe it or not, the landing gear makes a world of difference for a first-time pilot. If you can’t control it, just let it drop(keep the pitch and roll sticks centered and slowly reduce the throttle) and the landing gear will take the impact, protecting the important stuff.
Another reason for using the landing gear is if you want any sensors on the underside of the frame. The landing gears give you plenty of room to fit ultrasonic sensors, cameras for shooting or simply for optical flow ( The next build will use an STM32 controller and will use optical flow sensors for position control).
The 3-D printed part to hold the ultrasonic sensor :
3-D printing is a great tool for engineers. It gives you the freedom to create custom parts so you don’t have to worry about how you’ll fit a particular sensor in your build.
AANND, last but not the least, if you’re a cheapskate like me, you probably bought cheap ass motors. A bit of warning. These cheap as motors come with magnets that aren’t glued on to the bell(the bell is the outer can which rotates in an outrunner brushless motor) . Wait, how are they holding on then? They’re magnets, the bell is ferromagnetic, so they hold on because of magnetism. However, we’re not worried about them coming out of their slots, we’re worried about them sliding out of their slots, something that will happen when a lot of wind gushes through the motor’s air vents.
Do yourself a favour and apply some superglue on the magnets. You don’t need to take the magnets out, just put a few drops of the super glue at the inside edge of the bell, making sure that the magnets can’t slide out of the can.
If you don’t do this, what might happen is that the magnets will slowly slide downwards and eventually start making contact with the static bottom plate of the motor. This will cause a build up of heat and if you’ve cleared your high school physics with flying colors you’d know that excess heat deteriorates the magnetic strength of a permanent magnet. Therefore your motor would not remain as efficient (By the way, this is one of the reasons why one must replace the motors on their machine at least once a year).
To do this, you’ll have to remove the e-clip at the bottom of the motor. My suggestion is that you use a needle nose plier to do this. Its worth all the money(its actually really cheap).
Once removed, pull the bell away from the bottom plate. You should be left with something like this :
Just pour the superglue wherever the magnet meets the bell.
So I guess that about does it for this post! I’ll see you guys in the next one!