logo elektroda
logo elektroda
X
logo elektroda

ESP32 PWM Control Issues with Graupner Speed Profi 40R BEC ESC

prem111 1569 15
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • ADVERTISEMENT
  • #2 18710424
    jrk13
    Level 15  
    How is it connected? I found nothing on the web about the control of this regulator - does it definitely have PWM control? .
    Have you checked the waveform at the output of the ESP with an oscilloscope?
  • #3 18710464
    prem111
    Level 4  
    The signal to the PWM is connected normally, plus and minus, the connection is OK. On a raspberry pi on pwm this controller works without any problem.
  • #4 18710505
    lukaszd82
    Level 31  
    Then fill in the gaps:
    1. wiring diagram
    2. photos of real implementation
    3. full code.
    Well, because if you only load what you have given then it has the right not to work.
    If you are expecting someone's help then you need to make a bit of an effort and provide everything necessary.

    This pin2 is GPIO2 or pin2? You say everything is ok, but it doesn't work. Without a wiring diagram it's hard to say anything.
    The same without full code and check with an oscilloscope what we actually have on the port.

    ESP32 PWM Control Issues with Graupner Speed Profi 40R BEC ESC ESP32 PWM Control Issues with Graupner Speed Profi 40R BEC ESC .
    ESP32 PWM Control Issues with Graupner Speed Profi 40R BEC ESC .

    For example, on this board GPIO2 is connected to the LED on the PCB.
  • ADVERTISEMENT
  • #5 18710526
    prem111
    Level 4  
    Thanks for your reply. I am attaching a diagram of what it looks like. PIN 2 actual pin. When I connect a servo with the same code on it - it works without a problem.

    The code is of course micropython give full:

    [syntax].
    import machine
    import time

    esc = machine.Pin(2)
    pwm = machine.PWM(esc)
    pwm.freq(50)


    while True:
    for i in range(1020):
    pwm.duty(i)
    print(i)
    time.sleep_us(5500)
    [/syntax].

    Zero response...
  • #6 18710535
    lukaszd82
    Level 31  
    micropython - I don't know, so I can't comment.
    Doesn't GND have to be connected?
    What is PIN2?
  • #7 18710543
    prem111
    Level 4  
    According to the diagram of GPIO 2. Plus and minus is from the battery, the regulator is powered correctly.
  • ADVERTISEMENT
  • #8 18710550
    lukaszd82
    Level 31  
    Simple test, hook up an LED instead of the regulator with a suitable resistor, change the fill and see if it works.
    As far as I'm concerned the ground of the ESP and the power supply of the regulator should be connected.
  • #9 18710554
    prem111
    Level 4  
    I connect the servo - and it works.
  • ADVERTISEMENT
  • #10 18710564
    lukaszd82
    Level 31  
    And do you also power the servo as in "your diagram" or directly from the ESP?
  • #11 18710603
    prem111
    Level 4  
    No, I power the servo from the ESP, just now I checked that when I connect it as from the zchemat it does not work. But I don't understand one thing - on the raspberry I had identically connected in the sense from an external power source and it worked ?. Okay, but the regulator is powered by 12v, and in the wire that comes out of the regulator together with the signal (3 wires) goes 3.5v so I can't connect that to the esp either....
  • Helpful post
    #12 18710613
    lukaszd82
    Level 31  
    Connect the ground of the battery from which you are feeding the motor to the ground of the ESP and it should work.
    The regulator and ESP generating the PWM signal should share a common ground.
    Just don't mix up the poles or there will be smoke....
  • #13 18710626
    khoam
    Level 42  
    prem111 wrote:
    and in the wire that comes out of the regulator together with the signal (3 wires) goes 3.5v so I can't connect that to the esp either...
    .
    Up to 3.6v is still safe for the ESP32.
  • #14 18710632
    lukaszd82
    Level 31  
    Maybe you could give us a scan of the documentation for this regulator? because without that it's hard to say anything more. I had the ground connected and not input "some" voltage/supply from the regulator because I don't know what it is.
    Without documentation it's always a risk that you'll burn something.

    I've searched the internet, but so quick no documentation of this wonder.
    And a description/description of this 3pin plug is needed.
  • #16 18710694
    prem111
    Level 4  
    lukaszd82 wrote:
    Connect the ground of the battery from which you are powering the motor to the ground of the ESP and it should work.
    The regulator and ESP generating the PWM signal should share a common ground.
    Just don't mix up the poles or there will be smoke...
    .

    Thanks - it works ! :)

Topic summary

The discussion revolves around issues with controlling a Graupner Speed Profi 40R BEC ESC using PWM signals from an ESP32. The user reports that while the connections are correct and the ESC works with a Raspberry Pi, it fails to respond when controlled by the ESP32. Various suggestions are made, including checking the wiring, ensuring a common ground between the ESP32 and the ESC, and verifying the PWM frequency settings. Ultimately, the user resolves the issue by adjusting the PWM frequency to 1 kHz, leading to successful operation of the ESC.
Summary generated by the language model.
ADVERTISEMENT