Drone-Prototyping-Application

A website to be hosted on a raspberry pi for easy of access when prototyping with brushless motors and orientation sensors.

View on GitHub

Drone Prototyping Application

WATCH THIS VIDEO: https://youtu.be/T7Usw2DCu-8

A website to be hosted on a raspberry pi ( raspi ) for ease of access when prototyping brushless motors and orientation sensors.

frontend

About

I created this project to prototype a web interface to interact with hardware like motors and sensors. The hardware required, 3D printed objects, and wiring is not designed for a final flying product, but is only to get started. The main goal of this project is to start on a good foot when building an end product.

Goals

Steps

Hardware Required

Links correspond to what I personally used. However, feel free to mix and match for what you are looking for.

NOTE: Quality 3D printers are expensive so personally I used a craigslist service to have my objects printed and shipped.

CAD Models

Onshape™ Models

Body

Body Sketch
Body

Motor Mount

Motor Mount Sketch
Motor Mount

After Print

physical_1
physical_2

Wiring

NOTE: I am not good with fritzing™ software, use notes as well.

Wiring

NOTE: This is a general representation, soldering may be required to connect wires to sensor, esc, motor, and battery.
NOTE: Breadboard can be disregarded and connections can be made directly between entities

Installation - Raspi Terminal

$ git clone https://github.com/robertIanClarkson/Cube-Interface.git
$ cd Cube-Interface
$ sudo npm install

Running

Raspi Terminal (in ‘Cube-Interface’ directory)

Need ip address of raspi
$ hostname -I
10.0.0.105
Start server
$ make go

On Personal Computer

enter ip address followed by :3000 into web browser(Chrome or Firefox)
10.0.0.105:3000

terminal

Usage

Journal

This Project was started in 2017. I was very new to programming but was able to get the motors running via a terminal menu. I could not produce enough thrust out of the brushless motors and stopped working on the project. In May of 2020, upon Covid-19 I had a surplus of time and a much better understanding of programming and decided to pick the project back up. Ironically using the same parts as in 2017, I was able to create enough thrust by simply putting my 2 7.4v batteries in series, doubling the voltage. However, the motors and propellers I was using where incredibly violent and loud leading me to make a smaller model. This allowed me to prototype at my desk without be too loud (was still pretty loud). After many hours of working on this project it was really starting to come together and I decided to keep this journal as well as pictures and videos.
8/18/2020
Started the first flight code fuctions... need to figure out a good way to do this in OOP. Will probably do some whiteboarding.
Added a frontend slider (0 - 360) to set the desired heading of the phyiscal hardware.
8/17/2020
Added frontend display of offset values set by zeroing the sensor.
Tilt compensation still wonky on compass.
Set up a basic logger for compass readings. We can use logger for logging but also for calibration.
Added cube face colors to cube animation

8/16/2020
Flora LSM9DS0 compass was not working so I switched to an extra LSM303 I had laying around. I did this because...
- it has a more sensitive accelerometer & compass
- it has access to interuppt pins so I can use FIFO registers for super quick data reading
- I dont have a need for a gyroscope at the moment
Basic Compass Working but tilt compensation is wonky
8/14/2020
Connected the live accel data to the 3D cube animation (pitch & roll)
Added zeroing code for accel's XYZ data 
8/13/2020
Added a 3D animated cube to give a visual representation of the orientation of the physical hardware.
8/12/2020
Added error message printout for the frontend. For example, if a sensor fails, the error will be output to the frontend user.
Deleted all post methods as socket.io has proven to be a better option. Especially for sending sensor data quick.
8/11/2020
Worked on both motor speed sliders and the coupled slider be responsive to each other
Made my first draft of the README!!!

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT