-2

I am using ESP8266 (NODEMCU 3.0 or something) to make a quadcopter. Ive connected ardu pro mini to RC receiver so I am reading PPM values from it. Pro mini sends data with tx to ESP8266. ESP reads it with software serial with 115200 baudrate. I am communicating with MPU9255 (Waveshire) via I2C either.

My problem is that I cant fully controll my brushless motors. When I was using arduino instead of ESP8266, servo library was the best and reliable. But ESP's servo library is different, since its not AVR, and problems occurs. First of the servo library didnt want to work on most frequencies. I mean default is 50Hz (20000uS) and in this state ESC of motors did armed but unfortunatelly when changes was fast and short (1250-> 1370 -> 1250) it did miss that change like nothing happnd... This makes my D value in PID controller useless... Sometimes on 100Hz freq all was working fine, but sometimes not... When Ive started to use analogWrite only 500Hz was working fine, rest of freq didnt want to arm ESCs.

PS. I am using 3.3V to 5V converter for PPM/PWM pins so I am sure that the signal is fine for ESCs. PS2. I dont have any osciloscope unfortunately.

  • Okay, mpu and motors were out of sync (motors refresh rate was at 2kHz in loop..., while mpu - 100Hz)... But still going below 100Hz in servo.h wont arm ESC :/. – Kamil Słotwiński Jun 18 '18 at 10:32

1 Answers1

0

The ESP82266 present on your module is a RF transceiver integrated circuit that can handle WiFi communication, both configured as a slave to a microcontroller such as the ones present on various Arduino boards, or as a standalone chip by having it's on-board Tensilica L106 32-bit processor programmed via an external SPI flash memory. If used as a slave, the communication between, for example, an Arduino an the ESP82266 can be done using different protocols such as SPI / SDIO or I2C / UART interfaces. Googling a comprehensive Tensilica L106 user guide on the internet doesn't seem an easy task, and it looks as if some people have already failed to find it. If you're seeking to add Wi-Fi capabilities to your quadcopter the solution I suggest is having the Arduino take control over the servos, motors, etc. and hand off messages via SPI to your ESP82266 module. If this isn't the answer you are looking for, please try to be clearer about it, maybe find someone to do as an English translator for you.

However, if this is what you're concerned about, and you would like to use the ESP82266 module as as standalone solution, please link its built-in processor datasheet and the relevant parts of the quadcopters code that might need debugging.

  • Unfortunately I am not communicating with ESP8266 VIA wi-fi or bluetooth. I bought ESP8266 mostly because of advantage over AVR. 32-bit processor and 80MHz frequency, small size and low price. The problem is that it does not have enough pins so I am using arduino pro mini to handle PPM signal from the RC receiver. I convert those PPM values and send via uart to esp8266. ESP is generating PWM/PPM signal so it can controls engines. Unfortunately those signals are unreadable at some frequencies (for example PPM from servo.h lib is fine at 100Hz but fails for 400Hz same goes for default PWM lib). – Kamil Słotwiński Jul 08 '18 at 20:15
  • I guess your best bets would be getting a comprehensive ESP8266 datasheet or sticking with a different MCU! – Juan Manuel López Manzano Jul 08 '18 at 22:09