How connect ESP32 to the v2.0.4 Shield

Hi every, I am a newer.

I have Arduino uno and SimpleFOCShield v2.0.4. And they have work.

But I love ESP32 more. And I would like to use NodeMCU-32.

So how to wire the Nodemcu-32 and SimpleFOCShield. I want to a clear digrame in order to make the example work. Thanks.

Hey @xn551,

Connecting the shield to other non arduino uno shaped boards goes somethingl ike this.

  1. You fix a pin arrangement that you like for the PWMs and enable pins - by soldering the pads

  2. You connect exactly those pins on the shield’s header with your esp32 microcontroller
    ESP32 has pwm on all of its pins so there you can choose the ones you like the most

  3. Connect the common ground, one GND pins of the esp32 connect to the gnd pin of the shield

  4. This is already enough to run the openloop examples, so you can test the openloop library examples by providing the esp32 specific pin numbers that you’ve chosen

  5. For the position sensor, probably the best approach is to connect it direcly to the pins of the esp3 to bypass the shield

  6. Once your sensor is connected, you should be ready to run any voltage torque control based application, make sure this works for you

OPTIONAL- Current sensing

  1. Configure with the shields pads the analog pins of your choice and connect exactly those pins to the esp32 analog pins.
  2. Configure uisng the pads that the current sense will have 3.3v logic and then connect the esp32 3.3V pin to the shield’s 3.3V pin
  3. You are ready to go :smiley:
    Test the current sensing examples

So overall you will need:

  • 3 wires connecting esp32 pwm pins and shield pwm pins (chosen using pads)
  • 1 wire for shields enable pin (chosen using pads)
  • 1 wire connecting esp32 gnd and one shiel’s pin gnd
  • your sensor connection - depends of a sensor
  • OPTIONALLY for current sensing
    • 1 wire for connecting esp32’s 3.3V pin and 3.3v pin of the shield
    • 2 wires connecting esp32 analog pins and shields analog pins (chosen using pads)