Hello, I am doing a drone project for school and was wondering if it is feasible to use a MPU 6050 accelerometer/gyroscope along with my HM10 Bluetooth module to control the drone. I have seen many projects online use this MPU 6050 component, but they almost always use a radio transmitter to control the drone, usually the FS-iA10B. https://www.flysky-cn.com/ia10b-canshu
I have been using the bluetooth module connected to an app on my phone called Dabble that allows me to control the speed of ESCs/motors. The electronics work fine, but I have no sensors of any kind so the drone is unbalanced and does not fly straight up. So my question is, can the bluetooth and MPU sensor work together? What would the software side of that look like? Would it even be possible for me to code these things to work together in harmony or is there some sort of software I would have to use?
Many thanks.
Just my point of view, here. IF you wrote the current software you are using, then yes, all you mention is possible, given enough time and effort and available testing equipment. If you made the current software by copy and paste, then I very much doubt you will be able to accomplish what you are proposing.
My current code is really really simple, it is basically just getting input from the Dabble application to control the throttle:
#include <Servo.h> //Servo library
#include <Dabble.h> //Dabble library for bluetooth connection
#define INCLUDE_GAMEPAD_MODULE //Includes Dabble Gamepad module
#define CUSTOM_SETTINGS
Servo ESC1; //define the 4 motors
Servo ESC2;
Servo ESC3;
Servo ESC4;
int Speed; //create a variable for speed of motors
void setup() {
Dabble.begin(9600); //Set the baud rate for the HM10 to 9600
ESC1.attach(11); //Set the motors to their corresponding pins on the arduino
ESC2.attach(12);
ESC3.attach(9);
ESC4.attach(10);
}
void loop() {
Dabble.processInput(); //Refresh information from the Dabble application
Speed = GamePad.getRadius(); //Get a value from the Dabble application corresponding to the distance of the joystick from center (0 to 7)
Speed = map(Speed, 0, 7, 0, 180); //translate the value from the Dabble application (0 to 7) into the "language" of the motors (0 to 180)
ESC1.write(Speed); //Set the motors to the new speed
ESC2.write(Speed);
ESC3.write(Speed);
ESC4.write(Speed);
}
It has no controls yet, currently my goal is just to get this thing off of the ground.
bluetooth has very limited range - see Bluetooth Range esimator LoRa has a good range but like any radio depends on environment, transmitter power, antennas, etc