Gyro output, digital mode and ESCs

Started by anwar, May 27, 2010, 06:34:11 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

anwar

Dedicating this thread to Sai, and other serious modelers who want technical discussions ;)  This is meant to simulate discussion, I have done one round of research on this, but would like to hear from others, especially folks who do electronics for a living.

The issue is, what is expected if we put a gyro in digital output mode, and connect an ESC directly to it ?  Most gyros these days  support both analog and digital modes.  What is the difference between these outputs ?  What will happen if an ESC is connected to a gyro set to digital output ?
Hangar : Please see my introduction.
RC India forum and me : About this forum.

RotorZone

Here's my take.

The gyros put out servos pulses at ~50Hz in normal mode.

Digital mode sends pulses at a higher rate - 250Hz and 333Hz seems to be common.

Whether an ESC can work in digital mode is dependent on how the firmware is written. There are many ways a uC in the ESC can capture the pulse. It can poll for the pulse with interleaved code, use and interrupt or use a peripheral to capture it in the background while ESC is busy commutating the motor. Of these the background capture method should be able to deal with faster pulses easily. Other methods might be able to accept faster pulses but will break or start ignoring pulses once the rate increases beyond some amount.

Short answer is that without knowing the firmware, the only way to find out is by experimenting. Behavior of each ESC will be different according to their firmware.

ujjwaana

Rajesh, your tech talk really reminded of Morris Mano and my TAPI driver dev days for Windows...!!

Well take like this .... there are receivers which control digital Servos... so if one can connect ESC to those receivers(don't think they would specially have CH3 analog), whats the difference that those Hi-freq PWM signal comes directly from receivers or thru Gyro!

Anyway Rajesh is correct in all regards... you have to be careful with cheapo ESC...
Futaba 8FG Super | HK-450v2 | FA-22 Raptor |AXN Floater-Jet | FunJet | Black Horse Edge 540 | Amp Master 015 | 2.3M Big Brother

anwar

So that was the big question. I wanted to try setting the gyro to digital mode to drive the quad, and see if the mixers performance improved in digital mode (faster pulses). Usually, if you connect an analog servo to a gyro set to output digital pulses, they tend to heat up and burn over time, as they try to react faster to the signal.

In the case of ESCs, there are no motors that are moving unusually faster unlike in servos, so what is the risk in feeding a digital pulse train to them ? They will just start "sampling" from the higher pulse inputs, and ignore the rest, right ?
Hangar : Please see my introduction.
RC India forum and me : About this forum.

ujjwaana

Take your Watt meter, thermometer and put the theory to test!! having a Turnigy 'Superbrain' ESC would have helped to see the  real throttle:KV response graph - But yes.. you are opening a whole new discussion on 'Digital - ESC' !! didn't  similar discuss take place on other Quad threads on RCgroups etc ?
Futaba 8FG Super | HK-450v2 | FA-22 Raptor |AXN Floater-Jet | FunJet | Black Horse Edge 540 | Amp Master 015 | 2.3M Big Brother

RotorZone

Quote from: ujjwaana on May 27, 2010, 07:14:16 PM
Rajesh, your tech talk really reminded of Morris Mano and my TAPI driver dev days for Windows...!!
Glad to send your memories back to college  ;D

Quote from: ujjwaana on May 27, 2010, 07:14:16 PM
Well take like this .... there are receivers which control digital Servos... so if one can connect ESC to those receivers(don't think they would specially have CH3 analog), whats the difference that those Hi-freq PWM signal comes directly from receivers or thru Gyro!
Educate me if I'm wrong, the only receiver I know of that sends faster pulses is the Airtronics 10ch. It  has a 100Hz rate, double of normal, but still much less than the gyros in digital mode.

Quote from: ujjwaana on May 27, 2010, 07:14:16 PM
Anyway Rajesh is correct in all regards... you have to be careful with cheapo ESC...
Can't really say an expensive ESC will be better in this case. Technically they all meet the 50Hz spec they were given. It is more of how the firmware writer architected the code. It is quite possible that the cheap ESC programmer made the better choice.

Quote from: anwar on May 27, 2010, 08:03:04 PM
In the case of ESCs, there are no motors that are moving unusually faster unlike in servos, so what is the risk in feeding a digital pulse train to them ? They will just start "sampling" from the higher pulse inputs, and ignore the rest, right ?

Ignoring the extra pulses is just one of the possible scenarios. Depending on the code it could also cause issues.

Say the programmer decided to use an interrupt to detect the edges of the pulse. When you dive it at 333Hz, it is getting almost 7 times the number of pulses. The interrupt service routine now uses up 7 times the processing power it was intended to use. If this results in insufficient MIPS left over, there could be problems.

Another problem could be time taken by the ISR. When the interrupt comes, the uC has to stop what it is doing, save all the register in stack, service the ISR, restore the registers and then continue where it left off. This extra latency could just mess up the timing in the main routine.

There is no way to tell unless you know the firmware. You have to experiment and find out.

anwar

Quote from: ujjwaana on May 27, 2010, 08:33:31 PM
Take your Watt meter, thermometer and put the theory to test!!

Quote from: RotorZone on May 27, 2010, 10:31:33 PM
There is no way to tell unless you know the firmware. You have to experiment and find out.

I had done the testing before I started this thread.  In my case, putting the gyros in digital mode did not make any noticeable change in the issue I was trying to solve. 
Hangar : Please see my introduction.
RC India forum and me : About this forum.

RotorZone

Quote from: anwar on May 28, 2010, 12:59:27 AM
I had done the testing before I started this thread.  In my case, putting the gyros in digital mode did not make any noticeable change in the issue I was trying to solve. 

Good, atleast your ESC doesn't get confused with the faster pulses.

Just a hunch, the timing affects the acceleration of motor, might be worth trying other settings. I presume you'd have already turned of soft start. Soft start might not have any affect once the motor is spinning, but you never know.

If the inertia is found to be the limiting factor, you could try reducing the prop dia and increasing the pitch. Efficiency is the price you have to pay for this.

anwar

Hangar : Please see my introduction.
RC India forum and me : About this forum.

iamahuman

Actually, I should not be posting here but I could not resist the temptation.As far as I know,gyros are used for stability control,right?So I guess you  guys might be using them on helis.What other purposes do they serve?
"Chuck Norris once overcharged a lipo. Thank him for the Sun."

SSC LCG Slash 4x4.
JQ THE eCar.

anwar

#10
Gyros can be used anywhere you want to sense movement and use that to control something else.  99% of the use would be stabilization, whether it is a heli tail, or making it easy to hover an airplane or stabilize a quadrotor/tricopter/VTOL, or stabilize a camera mount in arial photography.

Hangar : Please see my introduction.
RC India forum and me : About this forum.