PietroDC
Posts: 9
Joined: Wed Sep 20, 2017 5:25 pm
Contact: Website

My crazy quadcopter / Pi Drone experiment

Wed Sep 20, 2017 9:05 pm

Hi all, i've lost right now a very long text of this thread... Thanks shortcuts! I've closed my browser.. :cry: :cry: :cry:
I try to write it again..

Hi everybody!
I would like to explain you my crazy experiment/project with a RPi:
a Raspberry Drone with Autonomous Guide (from now i think i'll call it RDAG).
Why i want to do that? I'll explain you one day if i'll be able to build it and get it working :lol:
Do you know if there is a similar project i can see/read about?

Let's do the Shopping List
What i already have:
  • 1 x RPi2
  • 1 x RPi3
  • 1 x (classic) 16x2 LCD
  • 1 x SunFounder SF210 210mm DIY Carbon Fiber FPV 4 Axis Racing Quadcopter Kit
  • 5 x HC-SR04 - Ultrasonic Ranging Module
What i've ordered and going to receive:
  • 1 x PowerBoost 1000 Charger
  • 1 x LiPo Battery 3.7v 2500mAh
  • 1 x Pi Camera Board - Night Vision "IR-CUT" (5MP)
  • 1 x Adafruit Ultimate GPS FeatherWing
  • 1 x Adafruit 4 Channel I2C 12-Bit Analogue to Digital Converter (ADC)
  • 1 x Membrane Keypad - 1 x 4
The Project
1) Programming
I would like to code the logic on the RPi with Python and the "control center" in C#, the communication would be made by some socket.. i still don't know.
I'm really newbie in Python but i'm not bad in C#.
2) Power
Motor battery: 3S 11.1V 1300mAH T- Plug Li-Po Battery
Raspberry battery: PowerBoost 1000 Charger + LiPo Battery 3.7v 2500mAh
I want to use the ADC module to keep checked the Motor battery and understand when is time to come back home before the "non return point".
3) Sensors and modules
The Ultrasonic Sensors are going to be used as "proximity sensors" to understand if there is an obstacle near the RDAG;
A camera will record and realtime transmit the video to the "control center";
A GPS module will be used by the Autonomous Guide;

x) Progress
The drone kit is mounted and the NazeFlight32 module is tested. The next step is to enable the motors from the RPi!
Image
Image
(video) Gyro+Acc test

My questions to the community:
1) How do i address I2C modules? How many of them can i connect to one RPi? Do you have a snippet code? [Not answered]
2) What is, for you, the maximum weight the RDAG should have? [Not answered]

I'm really happy to receive feedback, suggestions, advise etc!


---- P.S. ----
The hardware is a test hardware and will be changed if necessary, this is a "point where to start".
To be continued
Last edited by PietroDC on Mon Sep 25, 2017 10:48 pm, edited 5 times in total.

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: My crazy quadcopter / Pi Drone experiment

Thu Sep 21, 2017 6:27 am

google "Raspberry pi I2C" and have a read then if you still have questions ask

aBUGSworstnightmare
Posts: 2044
Joined: Tue Jun 30, 2015 1:35 pm

Re: My crazy quadcopter / Pi Drone experiment

Thu Sep 21, 2017 7:08 am

What about accelerometer/gyro/baro/magnetometer?
your setup will neither fly far nor long. You need to keep an eye on weight as well.
Btw: search for Raspberry Pi drone. There is something here in the forum

PietroDC
Posts: 9
Joined: Wed Sep 20, 2017 5:25 pm
Contact: Website

Re: My crazy quadcopter / Pi Drone experiment

Thu Sep 21, 2017 8:17 am

OutoftheBOTS wrote:
Thu Sep 21, 2017 6:27 am
google "Raspberry pi I2C" and have a read then if you still have questions ask
Will do that asap
aBUGSworstnightmare wrote:
Thu Sep 21, 2017 7:08 am
What about accelerometer/gyro/baro/magnetometer?
your setup will neither fly far nor long. You need to keep an eye on weight as well.
Btw: search for Raspberry Pi drone. There is something here in the forum
The drone kit includes a "flight module" that has an accelerometer and 4 axis gyroscope, I would like to understand if I can use it or I should buy a better module.

About the weight is the first thing I'll check but before a long flight there are so many things to do and I can work on it only in Sunday..

I searched drone in the forum, found 3 very old projects, useful but with old hardware, now there a are many new options to do the same things

PietroDC
Posts: 9
Joined: Wed Sep 20, 2017 5:25 pm
Contact: Website

Re: My crazy quadcopter / Pi Drone experiment

Thu Sep 21, 2017 9:37 pm

Drone kit and Ultrasonic modules arrived! I'm away from home for my job, saturday i'll have a lot of fun :mrgreen:
The "going to order" list is now "ordered and going to receive";
Added question number 2;

Hoagie
Posts: 119
Joined: Sun Sep 23, 2012 7:19 pm

Re: My crazy quadcopter / Pi Drone experiment

Fri Sep 22, 2017 6:29 pm

Hi,

I've played with the HC-SR04 module. it runs from 5V, but the trigger input works fine on the 3.3 from the Pi. The sensor output can be translated to 3.3 with a simple potential divider. They "see" in a cone 15 degrees wide and their distance sensitivity depends on the object they're pointed at. Something soft and sound absorbing can't be detected as far away as a flat hard wall. Also if you're at anything other than a right-angle to a flat wall, the sound bounces off away from the sensor and you may not detect the wall.

There's stuff on my blog (http://www.hoagieshouse.com/blog) about using them with a Pi.

User avatar
Hove
Posts: 1205
Joined: Sun Oct 21, 2012 6:55 pm
Location: Cotswolds, UK
Contact: Website

Re: My crazy quadcopter / Pi Drone experiment

Mon Sep 25, 2017 7:58 am

First, accelerometer + gyro is absolutely critical; without it, all your drone will ever do is flip over and smash itself into the ground. Only once you get that working should you even think about GPS tracking, collision avoidance and all sorts of other things.

Have a look at:

http://blog.pistuffing.co.uk/tag/video/ for my video progress over 5 years
http://pidrone.io for the latest
http://github.com/PiStuffing/Quadcopter for the code

If that doesn't scare you off, then I wish you good luck!
www.pistuffing.co.uk - Raspberry Pi and other stuffing!

PietroDC
Posts: 9
Joined: Wed Sep 20, 2017 5:25 pm
Contact: Website

Re: My crazy quadcopter / Pi Drone experiment

Mon Sep 25, 2017 10:33 pm

Hoagie wrote:
Fri Sep 22, 2017 6:29 pm
Hi,

I've played with the HC-SR04 module. it runs from 5V, but the trigger input works fine on the 3.3 from the Pi. The sensor output can be translated to 3.3 with a simple potential divider. They "see" in a cone 15 degrees wide and their distance sensitivity depends on the object they're pointed at. Something soft and sound absorbing can't be detected as far away as a flat hard wall. Also if you're at anything other than a right-angle to a flat wall, the sound bounces off away from the sensor and you may not detect the wall.

There's stuff on my blog (http://www.hoagieshouse.com/blog) about using them with a Pi.
Thanks! Going to check it, i've made a first test and i'm able to read the distance with a margin of +-0,3cm so is very good, the sensors are going to be mounted on the drone to understand if it is going to touch something and understand to change direction so i'll test a lot the sensors.
Hove wrote:
Mon Sep 25, 2017 7:58 am
First, accelerometer + gyro is absolutely critical; without it, all your drone will ever do is flip over and smash itself into the ground. Only once you get that working should you even think about GPS tracking, collision avoidance and all sorts of other things.

Have a look at:

http://blog.pistuffing.co.uk/tag/video/ for my video progress over 5 years
http://pidrone.io for the latest
http://github.com/PiStuffing/Quadcopter for the code

If that doesn't scare you off, then I wish you good luck!
The mounting of the drone is almost complete, the NazeFlight32 module works fine, i'm adding in the first post a short video of the reading gyro+acc, the next step is to test the aiming of ESCs/motors from the RPi.
Thanks for the links i'll check them!

guysmiley
Posts: 1
Joined: Fri Dec 01, 2017 5:50 pm

Re: My crazy quadcopter / Pi Drone experiment

Fri Dec 01, 2017 5:54 pm

How did this turn out?

We're looking at building a drone from the frame up (3d printing a custom frame) and buying individual components using an rpi. We are very interested to see how things panned out for you and any advice you may have :)

User avatar
Gavinmc42
Posts: 4547
Joined: Wed Aug 28, 2013 3:31 am

Re: My crazy quadcopter / Pi Drone experiment

Sat Dec 02, 2017 3:10 pm

Came across some new tech I had not seen before in the last week of so.

SENtral co-processor for sensor fusion( it does the brain numbing maths) :lol:
https://www.tindie.com/products/onehors ... -solution/
https://www.pnicorp.com/sentral/

https://www.bitcraze.io/flow-breakout/
This has a laser ToF height sensor plus an optical flow sensor, use both to hover in the one spot.
The pixart flow sensor is a low res camera
http://www.pixart.com.tw/product_data.a ... 901MB-TXQT

A similar sensor is the APDS-9500, 60x60 pixels or 30x30 binned plus motion vectors..
Both seem to be SPI masters so a Pi needs to have the SPI slave figured out.
Or an extra micro can be used to interface if it had lots of SPI slave ports then a obstacle avoidance system could be done similar to the DJI Phantom 4.

With multiple VL53L0X these 2m range ToF sensors could be used for indoor position/navigation.
https://www.adafruit.com/product/3317

Not sure what size drone all this would fit on.
Probably need a 250mm if you use Adafruit/bitcraze PCBs and wire them all up to a Zero.
Sub 200mm frame if a smaller all in one PCB was made?
For indoor use it needs to be small and light(less damaging), sub 150mm frame size?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Automation, sensing and robotics”