Embark on an exciting journey into the realm of micro-sized flight by making a miniature brushed Arduino FPV drone from scratch. Ideal for the tech-savvy person seeking an engaging challenge, this project ingeniously combines readily available Arduino-compatible modules with a custom motor driver board, all housed in a frame made out of popsicle sticks.
In this blog, weâre putting together a little camera drone thatâs configured with MultiWii software and is seamlessly controlled through a DIY transmitter thatâs also Arduino-based, making this a fully Arduino-operated drone. Join me as we delve into the intricacies of DIY drone building, finding out what it takes to assemble a compact yet powerful mini quadcopter that promises minutes on end of FPV racing.
Now comes the wiring of the coreless motors.
We'll begin by first securing the wires with zip ties which also serve as the droneâs feet/landing gear when facing down.
Letâs connect the motor wires directly to each corresponding flyback diode according to the diagram which you can find linked below. The flyback diodes we added earlier that the motors connect to protect the transistors from receiving back EMF currents which could result in frying them as they are sensitive components.
Each motorâs negative wire (blue or black) connects to a MOSFETâs Drain pin or diodeâs Anode pin and positive wire (red or white) connects to a diodeâs Cathode pin. With a power supply connected to the driverâs supply wires, we can run a quick test to see that each motor runs when pulling the transistors high via applying a voltage of 3.3V to each driver signal wire.
To install our droneâs radio communication module (NRF24L01) which receives data from the transmitter, weâll begin by desoldering its pins and replacing them for thin wires to both reduce weight and save on space, allowing it to be firmly seated in the frame.
Desoldering its pins is as straightforward as having the module held up by a set of helping hands and using a pair of pliers to pluck one pin at a time while applying heat to the corresponding solder pad above.
With the pins removed, weâll instead solder colored wires for power, ground, and data to help recognize each wire sticking out when the moduleâs header is covered.
The radio transceiver can be superglued or simply inserted with a tight fit in the cut out area at the rear of the frame.
You read that right! Weâre making a DIY flight controller for the drone based on an Arduino board and Motion sensor neatly put together in a compact form factor.
Weâll make the flight controller using an Arduino Pro Mini Microcontroller board (3.3V 8mHz version) paired up with the MPU6050 Gyro + Accelerometer motion sensor to determine the drone's orientation in flight. We'll mount and connect it to the Arduino using only a 2-pin header for two-wire (SDA & SCL - I2C) communication and a couple more wires for power. As the motion sensor works with voltage ranges between 3.3V and 5V, itâs recommended to power it directly from the LiPo battery for a consistent power supply.
To prevent the motor driverâs motor-induced EMF currents from affecting sensitive electronics on the flight controller, weâll cut a sheet of copper or aluminum foil to sit between the flight controller and the motor driver. Letâs ensure this copper sheet is cut to the approximate size of the Arduino Pro Mini and have it taped up with clear tape to prevent short circuits from happening. Weâll scrape a little tape off on an edge and solder a wire for GND. This shield is then glued to the underside of the Pro Mini with a few dabbles of superglue and the grounding wire is then soldered to one of the Pro Miniâs GND pins. Now we have an EMF protective shield for the drone.
Without the shield or sufficient spacing (2+ cm gap - not viable for a tiny drone), the drone is prone to get issues when starting up its motors, causing the Arduino to reset from conflicting induced currents.
Against wires shorting during programming, we'll patch up the radio module's pins with hot glue before sliding in our flight controller which gets secured with a dabble of superglue at the module's crystal oscillator for support.
Now, let's finish off installing modules by securing a 5V passive buzzer (Lilypad buzzer desoldered from PCB) with superglue right under the front of the drone so it can indicate its status and the switching of modes via sound. The buzzerâs marked plus (+) pin is wired to the Arduinoâs digital pin 8 and the minus (-) pin to GND.
Let's solder a JST connector with wires to the RAW pad (Voltage-In) and GND pad for the battery to power the flight controller.
We'll continue with the wiring of the motor driver and radio transceiver. Starting with wiring the radio module to get powered from the MPU6050âs 3.3V regulator as it has filtering capacitors which works in perfectly reducing the need of additional capacitors. Then, we'll wire the motor driverâs power input wires from the rails we soldered earlier to the power input solder pads where the battery is connected to.
Then, we should have diverted wires going out to the right for driving the motors and wires out at the left of the drone for the radio module's SPI data connection. The NRF24L01âs CE and CSN wires are soldered to Arduino pins 7 and 10, MOSI and MISO to pins 11 and 12, and SCK to pin 13. Google ânrf24l01 pinoutâ to understand which connections on the radio module Iâm referring to or simply follow the diagram.
Weâll then give the FC control of the motors by soldering the motor driverâs four signal wires colored Orange, Blue, Green, & Purple to Arduino pins 6, 9, 5, & 3 - following that order.
Letâs be sure to keep these connections as short as possible while using thin wires (30-gauge electrical wire).
Now, letâs install the drone's FPV camera - a 3-gram, 600TVL resolution First-Person-View (FPV) camera with a built-in video transmitter. Weâll clip off its connector and install the camera in the front of the drone secured with superglue.
The camera should be wired and fed directly from the battery's power (Cameraâs voltage input - 3.3-5.5V).
Next, let's close up the drone with its popsicle stick wooden cover.
To assemble and finish the cover piece, letâs secure the JST battery connector with its pins through the two holes made earlier and have the power wires soldered to the pins through the other side while keeping in mind the right wire polarity.
To mount the battery onto the cover piece, instead of velcro straps, we'll secure a piece of a larger rubber band to hold the battery strapped to the top of the drone. After that, we can finally close things up by super gluing it to the 4 posts.
For the propellers, we're using 4-bladed types. The propellers can be two-bladed, but should measure no more than 32mm in diameter for this drone to avoid hitting onboard components. Once mounted with attention to how the blades are oriented, the motors with their propellers of appropriate directions should turn in such a way pushing air downward.
To program the drone, we'll need this module called an FTDI or USB to Serial converter for which we'll make a bridging connector so it can connect to the Arduino Pro Mini in the drone (See product link above).
The bridging connector consists of a 6-pin female header wired to a 4-pin male header for TX, RX, VCC, and GND pins which connects into the back of the drone as seen in the image.
When connected to the drone, the FTDI should have its 3.3-5V jumper for power unplugged - the only source of power to the drone should be from its battery.
The drone will run on a vastly complex yet versatile Arduino code based on a multicopter software called MultiWii with multiple tabs to manage every onboard drone feature including many other modules that are not used in this drone and overall configuration.
With the drone connected to our PC via the FTDI converter, we can open the code with all of its tabs in the file (code is linked below). Credits go to Electronoobs on YouTube for the adapted MultiWii drone code - https://www.youtube.com/watch?v=J0x4ChjUS00&t=961s
In this guide, we will not dive deep into how the code works nor how to set up every pin configuration as this has already been done for you. Assuming you've followed my exact drone wiring, we don't need to change anything related to hardware in the droneâs code. However you'll most likely need to swap around a pair or two of radio channel values if your transmitter's joystick movements appear reversed in the configurator. This can be done in the âNRF24_RX.cppâ tab on lines 84 through 90. In case you want to change the radio transceiverâs CE & CSN pins, go to line 17 in this same tab.
Another change you may need to make is to swap the yaw direction if your drone appears to steer the opposite way. This can be done in âconfig.hâ on line 229 by swapping the yaw direction value from â1â to â-1â or vice versa. âConfig.hâ also contains so many other configuration parameters for your drone that youâll have to explore yourself. Read the startup message in the first code tab âMultiWii_RF24â to know where other important parameters can be changed in the code.
To upload the code to our drone, let's first go to âToolsâ and make sure we have the Arduino Pro Mini board selected along with its corresponding processor with matching voltage rating, and your boardâs COM port. For a firm data connection, itâs best to hold down the programming connector and hit upload. Just when it reaches the uploading stage, we need to immediately press the Arduino's reset button once and see that it begins uploading code to the board via the writing and reading responses in the terminal.
Before we configure the drone in MultiWii, let's have a closer look at the transmitter which will allow us to control it.
I made this 3D printed Arduino transmitter based on the one seen in a YouTube video from the channel âEmiloStuffâ, using his transmitter enclosure 3D design with some of my own modifications and added parts such as the two toggle switches, charging port, and voltage divider for monitoring it's voltage to know when its battery is going low. You can find the free modified enclosure design linked below.
Materials and parts required for Transmitter:
(x1) Arduino Nano - https://amzn.to/4d6qae3
(x1) NRF24L01 (Long Antenna) Transceiver - https://amzn.to/4aIzRxI
(x1) 16x2 LCD With I2C - https://amzn.to/3Qcvweh
(x2) Joystick Module - https://amzn.to/3vZFwAC
(x2) Toggle Switch (3-pin) - https://amzn.to/3W5n6cc
(x1) Potentiometer (100KΩ) - https://amzn.to/3W8MHBg (Optional)
(x2) 10KΩ resistor (for voltage divider) - https://amzn.to/4dbpAfs
(x1) Power Switch - https://amzn.to/3Qc9oAz
(x1) Battery (7.4V 2S) - https://amzn.to/3xF4pSq
(x1) Power Connector - https://amzn.to/4d7fig7
(x1) Charging connector - https://amzn.to/447L08U
Wire (24AWG) - https://amzn.to/3Wdn9D3
Matte PLA (BLACK) 3D Printer Filament - https://amzn.to/3Q8fhyE
Matte PLA (DARK GREY) 3D Printer Filament - https://amzn.to/446MXT4
(x5) M3 Bolts For Enclosure - https://amzn.to/3xH2BbH
(x5) M3 Threaded Inserts For Enclosure - https://amzn.to/3Ub1p87
See the transmitterâs build video by EmiloStuff here: https://www.youtube.com/watch?v=I6TKGMbHcfo&t=68s
When building our transmitter, including the two toggle switches is important as they will be configured later for arming/disarming the drone and toggling the beeper alarm.
The transmitterâs code that's specifically for controlling our drone can also be found linked below and within it, you'll see where to adjust pin definitions based on your hardware.
Once we have our transmitter, we can open the multirotor configurator software called MultiWii through opening its folder and selecting the version of this software that corresponds to our computer's operating system. Once the program file is opened, it should look like the image above.
MultiWii Download: https://drive.google.com/drive/folders/1FDGVwqqgIWO65fI4nNMl2QGHQnegKBIJ?usp=sharing
Let's connect to our drone by opening the corresponding COM port itâs on and hitting âStartâ. Once connected, we should see the drone icon appear at the bottom right and how the software interprets the drone's orientation.
With the transmitter turned on, if all works with the connection, each joystick movement should come up on the software. This is a good time to check that our transmitters sent joystick values are displayed accordingly with Roll, Pitch, and Yaw centered and throttle at 0.
Above is where we select switch channels for toggling modes and initiating the drone. Well tick a "high" level box on AUX1 for arming the drone and tick the same box on AUX2 for activating the beeper alarm to know the drone's whereabouts through hearing. After that, let's click âWRITEâ and then âREADâ to save those changes. Now, when flicking on the arm switch, the drone should allow for its motors to spin up when increasing the throttle. Also, the buzzer should beep when the corresponding switch is flicked.
Before we go out and fly, while the drone is connected to our computer, letâs quickly go through some very basic PID tuning in MultiWii to smoothen out any potential pitch and roll oscillations.
We need to gradually lower the âRollâ and âPitchâ values on the P column of the P-I-D until those oscillations disappear. I got good results at 2.2 and even better stability at 1.6 on both the pitch and roll. However, this value may vary from drone to drone and itâs much better to play around with these values yourself to see what works best for your hardware.
Under the PIDs, we can reduce the drone's sensitivity and reactiveness to joystick inputs by lowering the RATE and raising the EXPO value to get a smoother-looking curve on the graph which results in a less reactive drone as it tends to be super sensitive by default.
Once again, we need to hit âWRITEâ and then âREADâ to save those changes.
To view the FPV video feed, weâll need a set of 5.8ghz FPV goggles/headset (see product link above), we should see the drone's FPV video feed displayed live when connected to the powered drone.
Pairing is as simple as turning on both the drone and goggles, matching the cameraâs channel by pressing the âAuto Searchâ button on top of the headset to connect with the camera. When successfully paired up, we should see the droneâs live video feed displayed.
Recording video is possible on such a headset if it has a built-in DVR. Most of these cheaper FPV headsets contain a micro SD card slot at the top for storing recorded videos. We can make a recording by pressing the record button on top to start and stop while confirming the monitorâs recording status through looking at whether thereâs a blinking red dot on screen.
To fly the drone, letâs first choose a suitable battery for it.
We can use any 20C or higher 150-250mAh LiPo cell (3.7V) that weighs no more than 7 grams and simply plugs into the connector on top, turning on the drone. To balance it, we can slide the battery either way depending on how it tends to veer off in flight. All up, the drone comes in at 30 grams. With a thrust to weight ratio of about 2 to 1, it is light enough to be considered a "light wind" flier according to the drone thrust scale chart - https://www.halfchrome.com/wp-content/uploads/2017/07/Thrust-Scale.png
To get set up with the drone, you simply power it on while lying on a flat surface, turn on the transmitter, followed by calibrating the drone's gyro with the following joystick movements - left stick pointed to bottom left corner and right joystick pointed down at the same time. After waiting for around 20 seconds for the gyro to fully calibrate - you can flip the arm switch to unlock the drone and the sky is yours!
If youâre inexperienced with flying drones, Iâd suggest you watch some YouTube tutorials on learning the stick movements or try flying an existing non-FPV toy/brand drone that is more beginner-friendly for learning the controls.
From my personal experience in making this little drone, I went through a heap of struggle and misunderstanding before I managed to get it flying. I faced issues such as the drone not having enough power to lift off, the Arduino kept resetting - preventing throttling up, and out-of-sync motors divided in diagonal pairs causing aggressive pitch/roll wobble.
Below, I list the things I tried that worked and didnât work to counter the issues mentioned above as well as some tips and other measures you can take note on to get your own Arduino drone off the ground.
Troubleshooting that didnât work:
Using weak motors (6g of thrust) of lower RPM that were all designed to spin only one way, not containing the counter direction pair - Preventing the drone from getting lift.Adding filtering capacitors at motor leads and power inputs of Pro Mini, NRF24L01, and MPU6050 - Did not stop the drone from resetting.Connecting motor driver signal wires to Arduinoâs PWM pins through resistors - Did not stop the drone from resetting.Changing the hardware and software PWM frequency from 500Hz to a higher value in the code in hope of running the motors smoothly to reduce electrical noise - Did not stop the drone from resetting.Relying solely on perfectly stable landing gear to eliminate Pitch and Roll wobble - Did not stop the drone from wobbling off in the air.
Troubleshooting that worked:
Using 60,000 RPM coreless motors (14g or thrust) with Clockwise and Counter-clockwise rotating pairs - Gave sufficient thrust for liftoffPlacing a grounded copper/aluminum shield between sensitive electronics and motor driver - Stopped the drone from resetting and allowed for motors to spin up.Lowering P column in the PID values for Pitch and Roll - Smoothened the out-of-sync diagonal motor sequence and allowed for steady flight.
Troubleshooting Tips:
Use powerful coreless motors with higher RPM and bidirectional pairsShield flight controller with copper/aluminum foil beneath or give sufficient spacing (spacing may only be practical with bigger drones)Raise or lower P column PID values for Pitch and Roll. If the drone wobbles fast, lower the value. If it wobbles slowly, raise the value. Keep adjusting incrementally until itâs flying stable.Add a 10 microfarad capacitor to power inputs of the NRF24L01 if thereâs no radio connection.Do a diode test on transistors (MOSFETs) if one or more motors donât seem to work properly. Replace a MOSFET if necessary.
Key Takeaways:
- Construct the drone's frame from popsicle sticks using provided blueprints or purchase a 3D-printed frame for added convenience. Following the frame blueprint, parts can even be cut out from flattened PVC pipe.
- Assemble a custom motor driver board with purchased or salvaged components to safely drive the coreless motors without damaging the microcontroller.
- Select and install coreless motors that provide sufficient thrust for stable flight, ensuring proper spinning direction and propeller orientation.
- Keep the droneâs weight to a minimum by selecting the smallest form factor of battery with 150-250mAh current capacity, sizing down or choosing modules that are as small as possible - every gram counts.
- Wire the drone's components meticulously, including the radio transceiver, flight controller, and FPV camera, to ensure seamless operation.
- Program the drone using MultiWii software, adjusting PID values for smooth flight and configuring transmitter controls for arming and mode switching.
- Troubleshoot common issues such as Arduino resetting, insufficient lift, and motor synchronization, employing strategies like shielding sensitive electronics and adjusting PID values.
Conclusion
Taking on the fun challenge of building a miniature DIY FPV drone controlled entirely by Arduino hardware has been an exhilarating and rewarding experience. From crafting the frame out of scrap parts such as popsicle sticks to meticulously wiring each component and fine-tuning the flight characteristics, this project has offered a wealth of learning opportunities and challenges for us makers
Through the integration of readily available Arduino-compatible modules and custom motor driver boards, we've created a compact and powerful mini quadcopter capable of delivering thrilling FPV racing experiences right in the comfort of our living rooms.
As we've navigated through the intricacies of DIY drone building, we've learned valuable lessons in electronics assembly, coding, and troubleshooting. From selecting the right components to tuning PID values and configuring transmitter controls, every step has contributed to our growth as makers.
While challenges such as Arduino resetting and motor synchronization may have tested our resolve, they've also provided valuable insights and opportunities for experimentation. Through perseverance and ingenuity, we've overcome these obstacles and emerged with a deeper understanding of drone technology and its applications.
In conclusion, building a miniature DIY FPV Drone controlled entirely by Arduino hardware is not just about creating a flying machine - it's for the experience-filled learning and the fun of being able to say youâve built your own flying drone. As we take to the skies with our custom-built drone, we carry with us the knowledge and experience gained from this project, ready to tackle new challenges and push the boundaries of DIY!
To see the video tutorial and how the drone flies, watch my YouTube video embedded at the top.