-->
Page 1 of 4

wiflier (ESP8266-driven quadcopter) (wip)

PostPosted: Fri Jun 12, 2015 11:42 am
by cnlohr
Though I have done some initial motor testing, and I'm having some reliability problems when motors are going... aaaand haven't finished an actual control loop, I have made a pretty good stab at making my esp8266-driven quadcopter, complete with LSM9DS1 IMU, a barometer and an AVR motor driver, ADC, etc.

I'm also working more and more on my generic ESP8266 stack which includes net flashing (like the OTA upgrades, but using the legacy memory map which I prefer) UDP + HTTP command interface, generic HTTP server, bit-banged I2C engine, and a few other tidbits here and there.

I've got a picture of what I have so far and an extensive readme (And code) here:

https://github.com/cnlohr/wiflier/

I'm up for getting feedback, though some of the things I think I am gonna stick with for the time being are:
(1) GCC
(2) The official esp_iot_sdk.
(3) Actually using C, instead of trying to build it on some other framework.

Re: wiflier (ESP8266-driven quadcopter) (wip)

PostPosted: Fri Jun 12, 2015 2:37 pm
by reaper7
impressive!

Re: wiflier (ESP8266-driven quadcopter) (wip)

PostPosted: Sat Jun 13, 2015 4:15 am
by Squonk
Impressive work!

I was thinking of replacing my Hubsan H107C control board by a custom made board based on the ESP8266, but I maybe too late on this one :D

I just started browsing your code, but maybe some direct questions will get me up to speed faster:
  • what is the sensor value refresh rate? It looks like it is 166.67 Hz
  • I see the PID loop, but I don't see any sensor Fusion algorithm, do you have one yet?

Re: wiflier (ESP8266-driven quadcopter) (wip)

PostPosted: Sat Jun 13, 2015 5:19 am
by cnlohr
None of that. Sadly, none of those algorithms interest me. I was able to get some brief, shakey flight a couple feet up tonight using nothing other than integrating the gyro. On the current rev of the board I have in my copter right now, though I am getting a lot of bogus data on some of the readings from the LSM9DS1 :(.

*EDIT* I have had to modify my board here and there, like I found out I /really do/ need pull up resistors on my I2C and can't rely on the pullups on the AVR + ESP to save me in a high noise environment. Additionally, I had to short the reset line on the AVR to 5V. Somehow it was getting triggered. I've driven motors before, but sheeeeeesh this is insanely noisy!

Yes, 166 Hz... but not even fixed at that. Sometimes it causes wonky behavior to make it absolutely fixed to that, not sure why right now. So I just set a flag saying to handle it when it can.

I think I am going to separate myself from any kind of sensor fusion and close loop stuff if I can so I can work on things that are actually cool like making a webgl interface using websockets! Or, getting even more confusing and running JSLinux inside the browser with the ports mapped back to the ESP :twisted: .

Sadly, I won't be able to put hardly any time at all toward this over the next two weeks.