Shop OBEX P1 Docs P2 Docs Learn Events
Controlling ESC with Propeller — Parallax Forums

Controlling ESC with Propeller

hylee101001hylee101001 Posts: 48
edited 2015-06-05 12:21 in Propeller 1
I'm controlling 6 ESCs by generating PWM from 6 pins. Like this: https://youtu.be/dpBC2phplTM It abruptly stops as I increase thrust; say, it stops like about 70 % of max thrust. But, if I only increase one motor, the motor's RPM can go higher than 70%. I was wondering why this happens. I first thought the battery matters, but it can't be; battery is 12,000 amh 30C (360A) and ESC's max amp is 20amp, so 6 of them counts for 120A.

So, it would be helpful if someone can verify my second speculation. Does propeller (ASC) need higher voltage(or amp) to support PWM for 6 pins? Does ESC signal receiver somehow absorbs power from propeller chip? (because I'm only powering the chip with usb)

Thanks for reading

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-06-04 21:29
    I'd go back to the battery hypothesis and the wiring that branches from the battery to the six ESCs. I'm powering two ESCs at 20A from a 7Ah battery, and they're totally happy with the Prop's 3.3V output level. They do not require much input current from the Prop pins to operate, so they are not draining the Prop in any way.

    -Phil
  • hylee101001hylee101001 Posts: 48
    edited 2015-06-04 21:52
    Thanks. I Agree. Hmm, but I was confused when I saw the spin ide yells that the chip is not found when I pressed F10 to restart the chip right after the ESCs stopped. Can this remind you any? If it's just battery, the chip didn't have to be lost.
  • StefanL38StefanL38 Posts: 2,292
    edited 2015-06-05 00:01
    Hylee ,

    Which code do you use to create the ESC-input-signal? Servo32 V9?

    do you have an oscilloscope to watch the signal or at least a digital multimeter which can measure frequency and duty-cycle?
    six 20A ESC sounds like a bigger project. In my Opinion to buy such a mutlimeter would be a good investion

    I mean something like this
    http://www.amazon.com/UNI-T-Digital-Multimeter-Frequency-Resistance/dp/B00AW6SHNO/ref=sr_1_7?ie=UTF8&qid=1433487542&sr=8-7&keywords=uni-T+multimeter

    Specs
    ...
    Frequency : 10Hz/100Hz/1kHz/10kHz/100kHz/1MHz/10MHz ; ±(0.5%+3)
    Duty cycle : 0.1% ~ 99.9%


    this no propeller-chip found issue:
    If the propeller-chip is booting up is there a certain moment where the prop-chip will not respond to the IDE?
    Or will hitting F10 ALWAYS start new booting regardless of what the prop-chip is doing?

    best regards

    Stefan
  • Mark_TMark_T Posts: 1,981
    edited 2015-06-05 03:26
    How is everything wired? In particular the grounds.
  • kwinnkwinn Posts: 8,697
    edited 2015-06-05 05:29
    Could it be a cumulative effect of 6 high current pulses creating enough noise to reset the propeller? Do all the pwm outputs start at the same time?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-06-05 07:45
    Thanks. I Agree. Hmm, but I was confused when I saw the spin ide yells that the chip is not found when I pressed F10 to restart the chip right after the ESCs stopped. Can this remind you any? If it's just battery, the chip didn't have to be lost.

    One reason for this that I have found is that if the Prop is transmitting a lot of data back to the PC, even if it's garbage, it will clog up the USB FIFO which then upsets the timing of the boot handshake etc. Of course the Prop gets the reset pulse but anything it sends back has to get into the long queue until the IDE gives up. On systems that are locked up like this I ground the SDA line of the EEPROM long enough which might require a second F10 before it responds.
  • hylee101001hylee101001 Posts: 48
    edited 2015-06-05 08:22
    OMG. I don't know why I'm way too stupid to find out a reason. And you are all right. Thanks

    1. I made my own PWM generating object which turned out to be as stupid as me. The pointer of pulse value is somehow doesn't work well. - need to find out soon.

    2. I could have used Servo32 library - but I just wanted to have fun with the code :)

    3. Regarding the "not found chip", Peter's reasoning makes sense to me. It was nothing to do with "voltage or amp" of the chip.
  • PublisonPublison Posts: 12,366
    edited 2015-06-05 09:07
    OMG. I don't know why I'm way too stupid to find out a reason. And you are all right. Thanks

    1. I made my own PWM generating object which turned out to be as stupid as me. The pointer of pulse value is somehow doesn't work well. - need to find out soon.

    2. I could have used Servo32 library - but I just wanted to have fun with the code :)

    3. Regarding the "not found chip", Peter's reasoning makes sense to me. It was nothing to do with "voltage or amp" of the chip.

    So is it solved?

    If you post your code, it would help to solve the problem if you have not already solved it.
  • hylee101001hylee101001 Posts: 48
    edited 2015-06-05 12:21
    Yes it is solved. The error was not even because of the pointers. I used a quad and changed to hexa. So, the duty cycle's period was set for quad but not updated for hexa which needs longer period. So, when I use "waitcnt(value)", system time is larger than the value and it waited forever. That's why whole PWM cog stopped.

    Thanks.
Sign In or Register to comment.