DIY Smart Follow Me Drone With Camera (Arduino Based)

by Imetomi in Circuits > Robots

369492 Views, 1450 Favorites, 0 Comments

DIY Smart Follow Me Drone With Camera (Arduino Based)

DSCN0498.JPG
DSCN0500.JPG

Drones are very popular toys and tools these days. You can find professional and even beginner drones and flying gadgets in the market. I have four drones (quadcopters and hexcopters), because I love everything that flies, but the 200th flight isn't so interesting and starts to be boring, so I decided that I will build my own drone with some extra feutures. I like to program Arduino and design circuits and gadgets so I started to build it. I used the MultiWii flight controller that is based on the ATMega328 chip that is also used in the Arduino UNO, so programming was pretty simple. This drone can be connected to an Android smartphone that sends its GPS data to the drone, that compares to its own GPS signal, then starts to follow phone, so if I move on the street the drone follows me. Of course has many failings yet, because I wasn't able to make a proffesional filming drone, but follows the phone, makes a video and also has a ultrasonic distance sensor to avoid the obstacles in the air. I think this is pretty much features from a homemade drone. As soon as possible I will load up a video about a flight, but it is hard to make good quality records with an always moving drone.

Main Properties

DSCN0505.JPG

The drone is almost fully automatically, you don't have to control it, because follows your phone that is usually in your bike, The ultrasonic sensor helps to bypass trees, buildings and other obstacles and the GPS gives a very accurate position data, but let's see what do we have in total:

  • 1000mAh battery, enough for 16-18 minutes of continous flying
  • ultrasonic sensor to avoid obstacles in the air
  • Bluetooth module to recieve data from the phone
  • Arduino based microcontroller
  • build-in gyroscope
  • regulated maximum height (5 meters)
  • when battery is low automatically lands on the phone (hopefully in your hands)
  • costs about $100 to build
  • can be programmed to anything
  • with the help of the GPS you can send the drone to any coordinates
  • quadcopter desing
  • equipped with a 2MP 720p HQ videocamera
  • weighs 109 grams (3.84 ounces)

So that is all that the first version can do, of course I want to develop it. During the summer I want to hack my bigger drone with this software.

Flight Test Video

DIY Arduino Based Follow Me Drone (Video)

I asked two good friends of me to walk in the front of the drone, while I was under the drone, to save it if falls down. But the test succeeded, and as you can see the drone still is not very stable, but worked. The left guy in a yellow T-shirt held the phone, that transmitted the GPS data. The video quality with this camera is not the best, but I didn't find low weight 1080p cameras.

Gathering Parts and Tools

DSCN0438.JPG
DSCN0371.JPG
DSCN0402.JPG
DSCN0381.JPG
F069OOOIA8WDU78.MEDIUM.jpg

For this project you need some new and unusual parts. I designed from low wieght and recycled parts to reduce the cost, and succeded I got very good materials for the frame. But let's see what we need! I bought the Crius brand of the flight controller from Amazon.com and worked

Tools:

  • Soldering Iron
  • Glue Gun
  • Cutter
  • Wire Cutter
  • Rotary Tool
  • Super Glue
  • Ductape
  • Rubberband

Parts:

Assembe the Propellers

DSCN0410.JPG
DSCN0377.JPG
DSCN0378.JPG
DSCN0379.JPG
DSCN0380.JPG

I bought these proppellers with motors from the Amazon.com for 18 bucks, they are spare parts for the Syma S5X drone, but they seemed useful so I ordered them, and worked fine. You just have to put the motor in its hole, and attach the props to the gearing.

Circuit Schemantic

57698af515be4d27d7000829.jpeg

Always look at the schemantic while working and be careful with the connections.

Soldering Motors to the Driver

DSCN0375.JPG
DSCN0382.JPG
DSCN0395.JPG
DSCN0398.JPG
DSCN0399.JPG
DSCN0400.JPG
L293D_1.jpg

Now you have to solder all cables from the motors to the L293D motor driver IC. Look at the pictures, they say much more, you have to connect black and blue wires to the GND and positive wires to the Outputs 1-4, just like me. The L293D can drive these motors, but I recommend to use some power transistors because this chip cannot handle all the four motors at high power (more than 2 Ampers). After this cut 15 cm straws these will hold the motors in place. I used extra strong straws that I got from a local bakery and cafe. Put these straws gently on the motors's gearings.

Assembling the Frame

DSCN0401.JPG
QUADX_328.jpg
DSCN0403.JPG
DSCN0406.JPG
DSCN0407.JPG
DSCN0409.JPG

Please pain attention on the second picture, that shows how equip the proppelers. Use some hot glue and super glue to suit all four propellers then check the connections. It is very important that the proppelers have to be by the same distance from each other.

Add Wires to the L293D

DSCN0405.JPG
DSCN0427.JPG
DSCN0434.JPG
DSCN0439.JPG

Take four female-female jumper wires and cut the in half. Then solder them to remaining pins of the IC. This will help to connect the pins to the Arduino's I/O pins. Now it is time to build the circuit.

The Circuit

DSCN0442.JPG
DSCN0443.JPG
DSCN0445.JPG

All modules are included with the flight controller kit that I odered, so you just have to connect them together. The Bluetooth goes to the Serial port, the GPS first in the I2C converter then in the I2C port. Now you can equip this on your drone.

Putting the Circuit on the Frame

DSCN0429.JPG
DSCN0446.JPG
DSCN0447.JPG
DSCN0448.JPG
DSCN0450.JPG
DSCN0449.JPG
DSCN0452.JPG

Use some double sided tape and add the GPS first. This sponge-tape holds everything in place, so glue every module one by one on the plastic piece. If you're done with this you can connect the motor driver's pins to the MultiWii.

Connecting the Two Circuits

DSCN0454.JPG
DSCN0455.JPG
DSCN0457.JPG
DSCN0458.JPG
DSCN0456.JPG

The Input pins goes to the D3, D9, D10, D11 the others should be connected to the VCC+ and GND- pins. Schemantic will be uploaded tomorrow.

Battery...

DSCN0459.JPG
DSCN0460.JPG
DSCN0463.JPG
DSCN0464.JPG
DSCN0462.JPG

I used some rubberbands to fix my battery to the bottom of the drone, and holds there pretty strongly. I plugged in and worked, just how I imagined.

The Ultrasonic Sensor

DSCN0461.JPG
DSCN0466.JPG
DSCN0467.JPG
DSCN0469.JPG
DSCN0471.JPG

The sonar sensor is fixed on the drone with a rubberband, and connected to the D7 and D6 pins of the MultiWii controller.

How to Program It?

DSCN0473.JPG
DSCN0474.JPG
DSCN0475.JPG

You have to use a Serial FTDI module to program the chip. The kit also includes the programmer module.

How a GPS Works?

GPS-IIRM.jpg
DSCN0444.JPG

The Global Positioning System (GPS) is a space-based navigation system that provides location and time information in all weather conditions, anywhere on or near the Earth where there is an unobstructed line of sight to four or more GPS satellites. The system provides critical capabilities to military, civil, and commercial users around the world. The United States government created the system, maintains it, and makes it freely accessible to anyone with a GPS receiver. GPS modules typically put out a series of standard strings of information, under something called the National Marine Electronics Association (NMEA) protocol. More information on NMEA standard data strings can be found at this site.

For more information about programming read this: https://www.instructables.com/id/Connecting-GPS-mod...

The Software

download.png
Névtelen2.png
Névtelen.png
Névtelen1.png

I don't know if the software is already uploaded on the chip or not, but here I'll explain what to do. First download the official MultiWii library to your computer. Extraxt the .zip file then open it the MultiWii.ino file. Choose "Arduino/Genuino UNO" and upload it on your board. Now your microcontroller has every functions preinstalled. The gyroscope, the lights, the Bluetooth and even the small LCD (that is not used in this project) is working with the uploaded code. But this code only can be used to test if the modules work perfectly or not. Try to tilt the drone, and you'll see the motors will spin because of the gyrosensor. We have to modifiy the controller's code to follow the phone.

After this you can make your own hacked drone if you can program Arduino or follow my instructions and make it a "follow me" drone.

GitHub link for the software: https://github.com/multiwii/multiwii-firmware

Please visit the official site for more details about the softwares: http://www.multiwii.com/

Modifying the Code

I had to modify the sensors's code and the controller's code that gave prompts to the ATMega328, but now the Bluetooth module gives three GPS coordinates and depending on these the drone moves, so if my phone's x and y coordinates are 46^44'31" and 65^24"13' and the drone's coordinates are 46^14'14" and 65^24"0' then the dron will move in one direction until reaches the phone.

Phone App

I used the SensoDuino app that can be downloaded from here to your smartphone: https://play.google.com/store/apps/details?id=com.... Connect to the drone via Bluetooth and turn on the GPS TX and data logging. Now the phone app is ready.

The Camera

DSCN0476.JPG
DSCN0478.JPG
DSCN0479.JPG

I bought a very cheap chinese 720p keychain camera and had a great quality. I suited on the bottom of the drone with doulble sided tape. This camera was used in many of my projects and always is good to use it, weighs 15 grams and can make a very good video.

Testing...

DSCN0501.JPG
DSCN0492.JPG
DSCN0480.JPG

The drone is still insatble because is not a proffesional project, but works fine . I am very happy with the results. The connection distance was about 8 meters that is more than enough for a drone like this. The video is coming soon and I hope you'll like it. It is not a racing drone, but it's also pretty fast.

Future Plans

I also have a bigger drone and if I can correct the errors in the code I want to use it with that one through WiFi connection with an ESP8266 module. That has bigger rotors and can lift even a GoPro, not like the first version. This drone could be a useful tool while cycling, driving, skiing, swimming or sporting, he always follows you.

Thank You for Watching!

DSCN0414.JPG
F68NJLRINYU1V5Y.jpg

I really hope you liked my Instuctable, and if yes, please give me a kindly vote in the Make It Fly Contest. If you have questions feel free to ask. Don't forget to share and give a heart if you think deserves it. Thanks again for watching!

Cheers, Imetomi