sim- / tgy

tgy -- Open Source Firmware for ATmega-based Brushless ESCs
http://0x.ca/tgy/
688 stars 387 forks source link

afro30 esc and turnigy 4822 690kv #22

Open hendrixgr opened 11 years ago

hendrixgr commented 11 years ago

Hi. The turnigy 4822 690kv motor looses sync in flight with the default afro 30 esc. I just flashed one afro30 esc with the newest available binary release 5/2013 (afro_nfet.hex) and now the red led blinks often at low speed and stays off at higher power but sometimes it lights up when i move the throttle rapidly. With the stock firmware the red led stays off all the time even when the motor looses sync. To be honest i haven't tried it in flight because last time i crashed because of motor twitching.

sim- commented 11 years ago

Hello,

Hmm, the version shipped on the AfroESC 30A is actually (the same as) the 2013-05-15 release. There was only a minor optimization fix since then. I don't think there really should be a difference. I wonder why the LED blinking would be any different. Do you have a stock one that is not blinking the LED you can read the firmware off of to make sure something fishy didn't happen at the factory? You can see the Makefile in the source to see examples of using avrdude to read off the firmware (basically "r" instead of "w" in the -U flash command).

The problem might be resolved by adjusting the timing in the latest release. Do you have the ability to build your own release? You could try setting MOTOR_TIMING to a higher value (like 20, in afro_nfet.inc), and/or slightly increase TIMING_OFFSET (to maybe 6 or 12). You'll want a way of testing the result of this scientifically, though. I of course didn't buy that particular motor, but will order it now, and will test with it once it arrives. The best chance of reproducing timing loss is with the load mounted, shortest wires (lowest resistance), strongest battery, and an immediate jump from minimum to maximum power.

Simon-

hendrixgr commented 11 years ago

Hi. I have compiled the latest master branch with avra 1.3.0 and i found that this particular motor needs high advance (25 degrees and lower (1600 instead of 800) PWM frequency. Now it looks like it works fine, see here (post 88) http://www.rcgroups.com/forums/showthread.php?t=1948974&page=6 I also perform some experiments and i found that the timing advance is the crucial parameter and that the pwm frequency is helpin but not as decisive as the advance. Attached is the original hex file i obtained by using the "make read_tgy" command just for safety. Thank you very much for your time and concern. Chris

On 08/24/2013 03:38 AM, Simon Kirby wrote:

Hello,

Hmm, the version shipped on the AfroESC 30A is actually (the same as) the 2013-05-15 release. There was only a minor optimization fix since then. I don't think there really should be a difference. I wonder why the LED blinking would be any different. Do you have a stock one that is not blinking the LED you can read the firmware off of to make sure something fishy didn't happen at the factory? You can see the Makefile in the source to see examples of using avrdude to read off the firmware (basically "r" instead of "w" in the -U flash command).

The problem might be resolved by adjusting the timing in the latest release. Do you have the ability to build your own release? You could try setting MOTOR_TIMING to a higher value (like 20, in afro_nfet.inc), and/or slightly increase TIMING_OFFSET (to maybe 6 or 12). You'll want a way of testing the result of this scientifically, though. I of course didn't buy that particular motor, but will order it now, and will test with it once it arrives. The best chance of reproducing timing loss is with the load mounted, shortest wires (lowest resistance), strongest battery, and an immediate jump from minimum to maximum power.

Simon-

— Reply to this email directly or view it on GitHub https://github.com/sim-/tgy/issues/22#issuecomment-23199345.

owenduffy commented 11 years ago

Chris, a strategy might be to choose an optimal advance for maximum power at reasonable current, and advance for least current at hover or cruise RPM. The new TIMING_OFFSET value Simon mentions allows this optimisation. To calculate the parameters after you have established by test the target advance at max power and hover, try http://vk1od.net/rc/tools/bldca.htm . This combination allows max power without burning battery power with inefficient settings at hover. Owen

hendrixgr commented 11 years ago

I will test fly tommorow in order to record the current consumption and rpm. Thank you very much for the information, i really appreciate your help Owen. Chris

On 08/31/2013 08:51 AM, owenduffy wrote:

Chris, a strategy might be to choose an optimal advance for maximum power at reasonable current, and advance for least current at hover or cruise RPM. The new TIMING_OFFSET value Simon mentions allows this optimisation. To calculate the parameters after you have established by test the target advance at max power and hover, try http://vk1od.net/rc/tools/bldca.htm . This combination allows max power without burning battery power with inefficient settings at hover. Owen

— Reply to this email directly or view it on GitHub https://github.com/sim-/tgy/issues/22#issuecomment-23601147.

sim- commented 11 years ago

Hello :) How did it go?

owenduffy commented 11 years ago

http://www.rcgroups.com/forums/showpost.php?p=26211021&postcount=213

hendrixgr commented 11 years ago

Hi. I couldn't fly it because i teared my ham string muscle badly and i am in bed. From the indoor "flights" i did the only thing i can say is that it looks fine to me, no cut outs. I think that the problem is solved with your fast responce. You know many don't say it but it is very important when the author responds or shows that he is listening. Chris

On 10/02/2013 09:52 AM, Simon Kirby wrote:

Hello :) How did it go?

— Reply to this email directly or view it on GitHub https://github.com/sim-/tgy/issues/22#issuecomment-25516595.

sim- commented 11 years ago

Oh dear! Sorry to hear about that. My brother did something similar a few years ago (wakeboarding incident)...

Glad to hear it does seem to be working, at least! It sounds like some other motors may still not be quite right, and perhaps a regression on some ZMR motors. One should arrive shortly, after which I will determine if it is a good idea to send the update to the factory.

Hopefully I will be able to catch up with all of the other reports on the forums soon. :)

Den100 commented 11 years ago

need esc with 0 timig