Git Product home page Git Product logo

espplane's Introduction

WARNING | THIS IS A WORK IN PROGRESS!

This proyect is barely tested.

2020-8-27 - Link to the first test video:
photo

ESP8266 Plane

Sorry for my english, i'm learning.

The Idea

The idea is a simple wifi plane, controlled whit a Phone using a Touch Screen or a Bluetooth Joystick and a ESP8266

idea

Hardware

Controller Part List:

  • Wemos D1 Mini
  • Wemos Motor Shield
  • Wemos Battery Shield
  • 100k resitor
  • 500 mAh 1c 3.7v lipo battery
  • Phone or PC
  • Bluetooth Joystick (im using a Swich Pro Controller)
  • USB to USB Micro Cable (charging and upload the program)
  • Cable and conectors.

photo photo

Plane Part List:

  • 2mm Foamboard
  • 1mm Balsa wood
  • 2 Small servos
  • 2 Small plane motors
  • 2 Rubber Bands (for the wing)
  • 2 bamboo sticks or 2 brochete sticks or 4 toothpicks
  • Steel Wire

photo

Tools list:

  • Soldering Iron and lead
  • Hot Glue Gun and Sticks
  • Cutter
  • Superglue

Diagram

diagrams diagrams

Wemos Motor Shield

Wemos Motor Shield V2 dont need changes.

Wemos Motor Shield V1 needs soldering.

photo

Also, you need improve stability flashing new firmware, for dat you need a USB TTL Programer, and connect the motor shield to a PC

photo

Then you need execute the flash commands for linux

    cd /tmp
    sudo apt install stm32flash
    wget https://cdn.hackaday.io/files/18439788894176/motor_shield.bin
    stm32flash /dev/ttyUSB0
    stm32flash -k /dev/ttyUSB0
    stm32flash -f -v -w motor_shield.bin /dev/ttyUSB0

For mac or windows see link

Install Firmware to ESP8266

  1. Install CH340G Serial Driver - Windows - Mac - Included in linux
  2. Install Visual Studio Code - Download
  3. Install Plataform IO - Instructions
  4. Download Repository
    photo
  5. Copy configuration.example to src/configuration.h and set the wifi configuration (see firmware configuration)
  6. Connect Wemos D1 Mini USB
  7. Build and Upload the code
    photo

Firmware Configuration

Edit src/configuration.h

WIFI_MODE:

  • JOIN: Join a existing Access Point
  • AP: Create a password protected Access Point
  • OPENAP: Create a open Access Point

WIFI_NAME: Name of the Wifi Network
WIFI_PASS: Password of the Wifi Network (not used in OPENAP)

Example:

    #define WIFI_MODE           "AP"     
    #define WIFI_NAME           "PLANE"      
    #define WIFI_PASS           "12345678"  

MAP Servo to ESP8266 OUTPUT

    #define SERVO1_PIN          14  // Wemos D5  
    #define SERVO2_PIN          12  // Wemos D6
    #define SERVO3_PIN          13  // Wemos D7
    #define SERVO4_PIN          15  // Wemos D8

photo

Control

The control is a Webpage, can go full screen and is resposibe.

Horizontal Control
photo

Vertical Control
photo

Javascript Configuration

Websocker URL

    config.websocketUrl = 'ws://' + location.hostname + ':81/';

If you use and external web or a proxt, you can specify the IP and port manually.

    config.websocketUrl = 'ws://192.168.0.191:81/'

GamePad Axis Feedback configuration

    config.gamepadAxis12FeedbackStyle = 'PowerStick';   
    config.gamepadAxis34FeedbackStyle = 'Square';           

Options: Circular - Square - PowerStick

photo photo photo

Gamepad Trim buttoms Mapping:

    config.gamepadPanel1TopTrimPlus = 'button_15'; 
    config.gamepadPanel1TopTrimMinus = 'button_14';  
    config.gamepadPanel1BottomTrimPlus = 'button_12';  
    config.gamepadPanel1BottomTrimMinus = 'button_13'; 
    config.gamepadPanel3TopTrimPlus = 'button_1';  
    config.gamepadPanel3TopTrimMinus = 'button_2';  
    config.gamepadPanel3BottomTrimPlus = 'button_3'; 
    config.gamepadPanel3BottomTrimMinus = 'button_0'; 

To test you gamepad buttons you can use this link

photo

Wifi Signal Telemetry Style:

    config.telemetryWifiSignalStyle = 'Percentual';  

Options: Percentual - dBm
photo photo

Links : Wifi Singal Streng Explained

Plane control type

    config.panel1type = 'DifferentialThrust';   
    config.panel3type = 'PitchYaw';

Options: PitchYaw - Thrust - ThrustRoll - DifferentialThrust

  • PitchYaw: Horizontal Sevo Pitch - Vertical Servo Yaw
  • Thrust: Vertical motor intensity
  • ThrustRoll: Horizontal Sevo Roll - Vertical motor intensity
  • DifferentialThrust: Vertical motor intensity - Horizontal Motor proportion (Only 2 motors)

photo
photo

Plane Motor Quantity

1 or 2 motors supported

    config.motorQuantity = 1;

Motor plane location

You can invert the motor location in software.

    config.motorRigth = 1; 
    config.motorLeft = 2;

Options: 1 or 2

Motor rotation

    config.motor1orientation = "CounterClockwise";    
    config.motor2orientation = "CounterClockwise"; 

Options: Clockwise - CounterClockwise

Servo max angle value

    config.servo1maxValue = 180;
    config.servo2maxValue = 180;
    config.servo3maxValue = 180;
    config.servo4maxValue = 180;

Servo function

    config.pitchServoNumber = 1;  
    config.rollServoNumber = 2;     
    config.yawServoNumber = 3;

Libraries

Javascript

For joypad interaction joypad.js (MIT Licensed)

For touchscreen controls nipplejs (MIT Licensed)

Arduino

For WebSockets (GNU LGPL)

For Json (MIT Licensed)

For WEMOS Motor Shield

License

All libraries have his own license, my code and documentation is MIT Licensed.

espplane's People

Contributors

diegovazquez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.