ドローンver2 REは姿勢制御・遠隔操作プログラム、制御基板、フレームを自作しています。
本機では主に2つの処理が同時に行われています。
遠隔操縦システム
1,マイコン(M5Stamp Pico Mate)からwifiアクセスポイントを立ち上げます。同時にwebサーバーも立ち上げます。
2,PCからマイコンによってつくられたwifiアクセスポイントに接続します。
3,コントローラーをPCと接続し、webサイトからコントローラーの状態を読み取れるようにします。
以上によりコントローラーの状態をドローンに送信し、ドローンの操縦を行うことができます。
また、本機はPCから機体の情報の閲覧変更ができるようにしています。具体的には、フライトデータの閲覧、PIDgainの閲覧、変更などです。
姿勢制御システム
1,加速度、角速度、地磁気センサから算出されたオイラー角(傾き)をマイコンで取得します。
2,取得したオイラー角からPID制御を行い4つのモーターの回転力を算出します。
3,算出した回転力を4つのモータードライバに送信し、それぞれのモーターを回転させます。
以上によりドローンの姿勢を制御し、飛行することができます。
I made Drone ver2 RE's attitude control and remote control program, control board, and frame for this machine.
It has two main processes going on at the same time.
remote control system
1, Start up a wifi access point from the microcontroller (M5Stamp Pico Mate). At the same time, the web server is also started up.
2,Connect the PC to the wifi access point created by the microcontroller.
3, Connect the controller to the PC so that the controller status can be read from the website.
The controller's status is then transmitted to the drone so that the drone can be controlled.
It also allows the user to view and change information about the aircraft from a PC. Specifically, this includes viewing flight data, viewing and changing PIDgain.
Posture control system
1,The microcontroller acquires the Euler angle calculated from acceleration, angular velocity, and geomagnetic sensors.
2,PID control is used to calculate the rotational force of the four motors from the acquired Euler angles.
3, The calculated rotational force is sent to the four motor drivers to rotate each motor.
The above controls the attitude of the drone and allows it to fly.