WizFi360-EVB-PICO based Smart phone controlled micro drone for STEM Education
In proposed project WizFi360-EVB-PICO used as flight controller for micro drone which is controlled over WiFi via Android App.
WIZnet - WizFi360-EVB-Pico
WizFi360 as WiFi Controller and telemetry and RP2040 for Flight Stabilization
WizFi360 EVB PICO based Smartphone controlled Micro Drone for STEM Education
Idea is to develop WizFi360-EVB-Pico based Low Cost, open source, Smartphone controlled Micro Drone flight controller for STEM Education that supports following features:
- Low Cost STEM/STEAM kit that supports multiple flying model configuration.
- Reduce entry barrier cost associated with Aero modelling and Aerodynamics learning.
- Design safe platform for kids and people in surrounding.
- Easy to program and configure with sample codes of every sub modules of flight controller
Demo Video :
Hardware Used :
- WizFi360 EVB Pico : Flight controller firmware running on RP2040 and Control and telemetry over WiFi established with WizFi360 using AT Commands product link
- MT3608 Boost Converter : Convert 3.7 V LIPO voltage to 5V product link
- MPU6050 : 6 Axis IMU for Flight stabilization in auto level mode product link
- 7x20 3.7V 40000RPM coreless DC motor with 55 mm dia Prop (2 CW and 2 CCW) product link
- SI2302 N-Channel Mosfet as coreless motor driver with 1N4148 diode. product link , product link
- 3.7v 300 mAh 20C Lipo battery, any 300-600mAh 3.7V >20C Battery works product link
Schematic / Connection of WizFi360-EVB-PICO Flight controller:
Motor Driver with MT3608 Boost Converter soldered on General purpose PCB.
MPU6050 IMU module soldered on top of WizFi360-EVB-PICO and foam tape used to damp vibration and avoid EMI interference from Boost converter.
Motor prop direction (CW/CCW) and drone orientation with respect to pilot is as follows.
Firmware of Drone is developed on Arduino IDE and Raspberry pi pico package,
Wizfi360 arduino library not used instead UDP communication AP config done using bare AT commands of Wizfi360
Installed Raspberry pi pico board package using following guide..
and download attached codes.. that's it no extra library required...
Following WizFi360 AT Commands used for ,
1. Configure WizFi360 as WiFi Access point
2. Configure UDP Port for Listen incoming control packets from Android Client and Transmit Telemetry to Android Client
AT+RST : Reset WizFi 360
ATE0 : Echo Off
AT+CWMODE=2 : AP Mode enable
AT+CWSAP_CUR="Wizfi360Drone","12345678",5,3,1,0 : Create WizFi360Drone Access point with 12345678 Password and maximum one client connection accept
AT+CIFSR : Check weather Access point created or not and IP Address of WizFi360
AT+CIPSTART="UDP","192.168.36.2",3333,2390,0 : Create UDP Connection with Listen port 2390 and talking port 3333
AT+CIPSEND=3,"192.168.36.2",3333 : Send 3 byte telemetry data (Battery Voltage and RSSI) to Android Client on Port 3333
code sample config AP start UDP server..
Serial2.setTX(4); Serial2.setRX(5); Serial2.begin(115200); delay(1000); Serial2.println("AT+RST"); delay(1000); Serial2.println("AT+CWMODE=2"); delay(400); Serial2.println("AT+CWSAP_CUR=\"Wizfi360Drone\",\"12345678\",5,3,1,0"); delay(2000); Serial2.println("AT+CIFSR"); delay(500); Serial2.println("AT+CIPSTART=\"UDP\",\"192.168.36.2\",2399,2390,0");// delay(1000);
code sample send 3 byte telemetry to android client
Serial2.println("AT+CIPSEND=3,\"192.168.36.2\",2399"); delay(10); Serial2.write(0x01); Serial2.write(rssi); Serial2.write(bat_voltage);
there are two code available in attachment ,
- WIZDRONE_UDP.ino this sketch used to debug android app and drone communication over UDP
- WIZDRONE_MAIN_FLIGHTCONTROL_QUAD : this folder includes sketch for main flightcontroller ino file and required header files
- WIZDRONE_MAIN_FC_Quad.ino - main flightcontroller firmware code, this code loops 250 time in second.
- global_inc.h - this file includes pin definition, PID constants, limits, and other global variables
- pin_setup_control.ino - this file includes initialization of pins , PWMs and functions related to control PWM and pins
- PID.ino - this file includes PID controller related functions
- ibus_rx.h - this file includes AT wrapped functions for config Wizfi360 as AP, and receive UDP control Packets from Android App and send telemetry to Android App. for simplicity UDP packet received from Android app converted to standard ibus limits.
- mpu6050.ino - this file handles all functions related to MPU6050 IMU like init mpu6050 with required accelerometer and gyro ranges, read raw accelerometer and gyro values, compute angle by fusing accelerometer and gyro reading using complimentary filter etc.
Android drone controller App:
Apk file for drone is attached, this app is developed by me and it's in very primitive stage. as its debug mode apk file please allow unknown app source and debug mode in android app.
- full roll, pitch, yaw, throttle control using two thumb pads
- rate low for limited control authority, rate high for experts with full control authority
- mode for throttle on left/right side helpful for left handed and right handed user
- telemetry includes battery voltage and RSSI
- flight timer
- arm/disarm slide button so no chance of accidentally arm drone
- aux channels for future use
Frame for Drone is 3D printed using ABS plastic.. STL file attached for reference. use 30 - 40 percent infill while 3d printing the frame to make the frame light and flexible yet strong enough to survive impact.
Arduino Sample code for UDP Controller and telemetry on WIZFI360 DRONE
WizFi360 Drone FC Schematic
Flight controller board schematic
Main Flight Stabilization Arduino code for WizFi360-EVB-PICO
Frame STL file for 3d print
WizFi360 Drone ABS plastic frame STL file
Android drone controller APK file
Make sure debug mode enabled / unknown source enabled