Support for esp8266

Hey, guys, I want to provide support for esp8266.
A typical esp8266 board is WeMos D1 WiFi UNO R3

If you are interested in the topic ,please post your thoughts.

1 Like

I am so excited to hear this news. As a beginner of simplefoc, I have tried several MCU ( Arduino mega, Arduino nano, ESP32, STM32F103C8T6).
Arduino-series MCU is not the best choice for simplefoc because of their low speed. ESP32 series are quite suited because of their low price and high process speed. However, the ADC accuracy of ADC is a little unsatisfactory.
Today I was unintentionally found the esp8266 WeMos D1 in Taobao, the same interfaces comparing with the Arduino Uno, which means it will be quietly easy to connect with simplefoc broad like Arduino Uno. It’s a very very painful thing for me to use ESP32 connect simplefoc drive broad. Besides, the processor speed of ESP8266 is quite fast comparing with the Arduino series MCU.

Hey @Axe and @Cabbage_White,

If you guys would be interested to contribute to the simplefoc and support the esp8266 that would be awesome :smiley:
At the moment we are not planning to support it, mostly due to the lack of time. But we would love to support you in any way necessary!

I found the ESP8266 only have one ADC interface, which means it cannot be used in the current sense detect, a very bad news. Maybe you have a good idea to solve this problem?
To be honest, the ESP32 is ideal for simplefoc controller (Low price and high process speed). Share you two very good open-source simplefoc project by using esp32 (https://oshwhub.com/zdldcyy; https://github.com/ToanTech/Deng-s-foc-controller)

Hey @Cabbage_White,

yep it seems so.

I dont really think esp8266 is the best possible solution for the simplefoc but I think it would be cool to have it supported. And to enable people to use it at least. I would not do the current sensing with this board but in voltage mode it seems perfectly capable of running one bldc or stepper motor.

ESP32 is the ideal controller I agree 100%. And I hope to spend much more time on this platform in the future.

OK so I’ve quickly gone through the esp8266 implementation of the arduino API https://github.com/esp8266
And maybe it will even work out of the box for BLDCDriver3PWM, StepperDriver2PWM and StepperDriver4PWM.

If someone can test it it would be great :smiley:

The only thing that you might need to add is the high-frequency pwm setting.
Call the analogWriteFreq(25000); //for 25khz somewhere after driver.init()

A post was split to a new topic: Can we use L6234 SENSE1/2 outputs for FOC and avoid using curent sensing amps

Hey Guys,

I’ve added a very simple untested initial support for the esp8266. I’ve made it to compile and with the info in the docs it should be working.
Basically you’d be able to use all drivers except 6pwm and no current sensing.

The support is in the dev branch: