0

I'm trying to control a BLHeli ESC (link) controlling a Gemfan motor (Gemfan RT-2205 2300KV - 3-4S - 425W - 1160g) with a Raspberry Pi 3B with a python program which I've written two days ago:

from time import sleep
import pigpio

GPIO.setmode(GPIO.BCM)

pi = pigpio.pi() 

ESC_GPIO = 13
pi.set_servo_pulsewidth(ESC_GPIO, 2000) # Maximum throttle.
sleep(2)
pi.set_servo_pulsewidth(ESC_GPIO, 1000) # Minimum throttle.
sleep(2)

while 1:
     pi.set_servo_pulsewidth(ESC_GPIO, 2000)

Two days ago the program was working fine, the esc was starting with full throttle. But yesterday it suddenly stopped working - the esc only beeps correctly with the configuration (first max throttle and then min throttle) and then just stays silent, doesn't move. Also if i try to move it with the pigs command via bash, it doesn't work.

I also tried several tutorials & forum advice I found on the internet (such as the RPI.GPIo library), but with no effect.

The funny thing is that the ESC still works well with a simple program on Arduino Uno rev. 3 using the arduino built-in Servo library. What can be wrong?

8
  • Are the correct pulses still being sent? If you haven't got an oscilloscope run abyz.co.uk/rpi/pigpio/examples.html#Python_monitor_py in another window.
    – joan
    Commented May 18, 2017 at 18:59
  • Thanks, but what do I compare the readings with? I mean, how do I know the readings are / aren't correct?
    – artus90
    Commented May 18, 2017 at 19:25
  • Run the program and you should see 50 pulses per second at whatever pulsewidth you have set. It will print the GPIO, the level, and the time since the last pulse. For 2000 you would expect 18000 low followed by 2000 high repeatedly.
    – joan
    Commented May 18, 2017 at 19:30
  • Thanks, I'll try it tomorrow and I'll post as soon as I have the results
    – artus90
    Commented May 18, 2017 at 19:37
  • I've a problem: running the monitor.py gives no output, no matter if I send PWM signals or receive them from arduino on gpio. The script runs with no errrors, but the only output is 'tidying up' when i press CTRL+C. Am I doing something wrong?
    – artus90
    Commented May 19, 2017 at 7:51

1 Answer 1

0

The raspberry was fried - the Broadcom chip was hot after boot within a few seconds

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.