RPM reading for ESC Castle Edge

Hello everyone, I want to read RPM from ESC Castle which has it own RPM output line (AUX LINE). The signal from this AUX line is PWM but the pattern is not the same as RC PWM. As thier protocol datasheet (link below).
Anyone have experience about this or about reading RPM into pixhawk via I2C/PWM or any communication protocol/method please recommend me how to deal with it Thank you so much !!

link:
http://www.castlecreations.com/castle-link-live

Some info here

1 Like

Thank you so much !! According to your comment, i think i dont have any problem about Arduino - Pixhawk communication via I2C. But i dont know how to read PWM from Aux line using arduino interupt (i can do only basic interrupt to get RC PWM) because the castle PWM protocol is herrible for me.
Would you mind to share arduino code for reading PWM from ESC Castle Aux line or share the similar project from any source? Thank you.

Maybe we are talking about slightly different things. I was using a Castle Creation Edge ESC which had an additional wire coming out of it that could be programmed to do different things. One of the options was a pulse train with frequency proportional to the motor RPM so it was very easy to just read the signal on the arduino and measure the time between two rising edges to get the RPM.

Thank you so much !! I understood your point now.

According to PHOENIX EDGE manual, “The ESC toggles the AUX LINE at every electrical commutation. Divide this number by your number of magnetic pole pairs for mechanical RPM” I’m going to test soon and hope to get the good result as yours.

Do you have any suggestion for me? Can the Aux line connect to Arduino directly without attach “Pull Up Resistor” ?

link:

As far as i remember yes.
fyi, I also compared the calculated RPM from the pulse train with the measured RPM using an optical sensor behind the propeller and found that they matched almost perfectly

1 Like

This is my first post here, so hello everyone!
I have an issue within the same topic. I’m trying to read the CC Phoenix Edge HV RPMs using the auxiliary wire. I did an oscilloscope test and have the frequency of the pulses aprox 935Hz. Motor is KDE700XF-295 no. of poles is 10 (12S10P). The ESC is programmed at governor mode to keep 1200RPM on my rotor, the gearing is 9.333:1, so I should get 9,333*1200=11196 RPM on the motor. How to get this value from the aux wire readings? I guess I’m missing something…

Trying to revive this issue since I cannot find an off-the-shelf solution currently.
I would like to read RPM and other motor data at high rates for logging on pixhawk.
Specifically, I’m looking to connect a Castle Creation ESC to Pixhawk running PX4, using the Castle Serial Link. Any advice on wiring diagrams or sensor drivers for PX4 would be appreciated.

If there is a method to connect the ESC Aux line directly to the pixhawk and collect only RPM, that would be helpful too. This functionality seems to be in Ardupilot, but not PX4 (I want PX4 for many other reasons).

I had a recent question via direct message, so I’m updating here for general awareness. We did find a solution using the Castle Creations Phoenix Edge ESC aux line and the TFRPM01 tachometer module (ThunderFly TFRPM01 Revolution Counter | PX4 User Guide) . The ESC was set to pulse based on RPM, and the TFRPM01 module converted the pulses to RPM and communicated with the Pixhawk via I2C. We followed the TFRPM01 documentation and the Castle Creations documentation for hardware setup. We referenced the PX4 documentation to enable the “rpm” driver (default on startup for some Pixhawks, not others). The recorded RPM on-board the Pixhawk and in post processing filtered the data.
To see some of our research results, you can look at: “Aero-Propulsive Modeling for Propeller Aircraft Using Flight Data” (Aero-Propulsive Modeling for Propeller Aircraft Using Flight Data | AIAA SciTech Forum) and " Flight Test Approach for Modeling and Control Law Validation for Unmanned Aircraft" (AIAA Aerospace Research Central).
Thanks for the interest!

@JGresh, thank you for your update. Unfortunately we cannot see your referenced presentation as we do not have a logging account.

Great suggestion using the TFRPM01 module together with Edge ESC aux line. So we will simplify our design eliminating the ThunderFly optical sensor used with TFRPM01 module.

Our target is to read not only RPM, also motor current and voltage and logging with PX4. Therefore we are looking for a solution using the pass-through mode of Castle Serial Link connected by I2C to PX4. Do you have experience about this too? Thanks.

@JGresh, I was wondering what you found the update rate for the RPM readings to be with the TFRPM01 module.

I am currently trying to read RPM data at a rate of 50 hz. I have tried two RPM Sensors that connect directly to Pixhawk, but they log at 10 hz, which is no better than what my Castle Link ESC logs.

My next option is to try to use the extra AUX Line on my ESC much like you did. Do you have any useful information for me? Thanks.