How to Read RPM signal from Esc?

I got this working using no additional hardware with ArduCopter 3.3.3 TradHeli. I have a Castle ICE2 so no direct reading from the ESC. I use a Microbeast brushless RPM sensor. Both ESC and Pixhawk logging give the same RPM value. The motor was running at around 90000 electrical RPM…

I noticed that when the motor is OFF, RPM value stays at the late read value. Value changes as soon as the motor is running or if it has beeped (Castle ESC make to motor beep every 30 seconds or so).

By the way, I don’t see RPM_MIN and RPM_MIN_QUAL params on my param list for Copter 3.3.3 TradHeli.

Hope this helps…

IIRC, RPM_MIN and RPM_MIN_QUAL are two params that I added into Master that were part of the RPM measurement improvements I did tied to the internal governor code.

The internal governor code part for tradheli didn’t make it into master yet.

@jpkh @Rob_Lefebvre @rmackay9

Excellent interaction.
I hope the developers interest in this idea to continue to make it a success and added to the new master as well as mission planner .

Best regards.

Hello to all,

This looks great. However to where is the RPM sensor conected to in Pixhawk?

Thanks in advance

I’d like to bump this, since I’m looking for the same answer.

What is the hardware/parameter setup for reading a frequency RPM signal?

Okay, I got this in Plane 3.7.1

I connected a frequency (non-servo) signal with very small low time (1.3%), active-low.
I set BRD_PWM_COUNT to 4.
I set relay 1 setting to -1 (NONE).

The RPM1 signal was readable from Mission Planner (tuning screen) in RPM units.

I’d still like to find out what BRD_PWM_COUT:=7 (3 PWM and 1 Sensing) does.

@Georacer ,

good sound that you read the rpm signal ,

I am still having problem in that ,since I post this topic

I have gas engine with it’s RPM sensor

Could you explain more

where I can connect the RPM signal in the pixhawk ?
what is the parameters that I should set ?
where I can read the RPM in mission planner ?

hope I can do it .

Regards .

Hi @ahmed

Sorry for the late reply.

I connected the signal and ground (not VCC) of the output cable of my engine’s ingition module to Pixhawk’s AUX pin.
I don’t remember exactly which one. It was either 4,5 or 6. I’ll check on Monday when I get to the lab.

I set the parameter BRD_PWM_COUNT.
Also take care not to set any RELAY_PIN* parameters to that pin.

Mission Planner displays the RPM count when you

  1. Click the Tuning box to the bottom of the screen
  2. Double click the black graph area
  3. Tick the rpm1 box from the pop-up menu

If your engine spins (a bit faster than you can spin it by hand), it should display the RPM value in real time.

The documents should be a bit clearer about this procedure.

1 Like

thanks @Georacer

what value you set for BRD_PWM_COUNT. param ?
I will do it tomorrow and tell you if it works ,
still waiting for your info on Monday .

their is no documents for the rpm tools .

regards.

hi @Georacer ,

I did what you said but not working , maybe their is some thing missing ,
Could you send me the parameter file ?

@ahmed

I connected the RPM signal to AUX5 input.

Here is the parameter file
UnATRaP_GPS-working.param (11.1 KB)

1 Like

This method also applies to the traditional helicopter with the rpm sensor output ESC rpm monitoring?

@Georacer

thanks very much I did it yesterday , my connection is like the pic

I use the 3.7.1 firmware
change the BRD_PWM_COUNT to 7 well it effect other PWM
I rotate the motor by hand for test , but the info not update as real time and when I stop the rpm value keep the last read value .

but I did the same thing with my Pixhack ( chines pixhawk ) and it doesn’t work .

I display the info as the pic

any advice to make it work with pixhack ?

regards

I don’t know why Pixhack doesn’t work the same as the Pixhawk. Maybe @proficnc knows something about it? It sounds like a hardware problem, not a software problem.

I don’t have any more information to give you. Perhaps you could contact the development team and ask for more.
Let us know what you find out.

I cant see any reason it would be different, unless its a fault with just your board. there should be no difference here.

1 Like

@proficnc
@Georacer

thanks it works now , but when I stop the motor it keep the last value ,

it’s really nice work ,

now we need to discuss adding other sensors .

After Diagnostics w/ different verified failing configurations of UBECS, X8R, Pixhawk & RCXEL.
Failure is RCEXEL Ignition Module RPM Connector @ AUX5 on PIxhawk Servo Rail connected.
Passed RCXEL LED on Pixhawk RC9 Passthrough w/ RCXEL RPM connector removed from AUX5.

Pixhawk Plane 3.7.1 w/ Both RCXEL RPM & RCXEL RX Connector

Fails RCXEL RPM on Aux5
Fails RCXEL LED on/off on RC9_OUT

Also I was unable to get RPM’s on AUX5 Relay 54 with RCXEL removed from RC9_OUT.

Hi guys. I’d like to homologate the info about setting up motor RPM count into the Pixhawk. There is a bunch of stuff above in old posts but it’s slightly ambiguous and is spread out now.

So to read RPM on mission planner (and to log to dataflash I hope also) we would connect a RPM pulse signal to AUX OUT 5 signal pin, we set RELAY_PIN to -1 to make sure that pin is not used for relay trigger, we set BRD_PWM_COUNT to 4, set RPM_TYPE to 1 leaving the other RPM parameters alone. We add the RPM1 display to the Mission Planner status view. And it should work…
Is that all correct?

If so I’m not reading RPM yet on MP. My pulse source is from a brushless RPM sensor module and gives me a 116.6Hz per 1000rpm out square wave (on a 14 pole motor). On my CRO the signal is reasonably clean.

In the older posts it’s not 100% clear to me if the Pixhawk is expecting a scaled PWM signal of variable duty cycle like a servo signal, or if it’s expecting pulses at a frequency proportional to the RPM, like I’m giving it.
Anybody confirm which is definitely right ?
Regards,
Martin

Hello @sneezy,
I can’t tell you anything more regarding the parameters, apart form the parameter file I have uploaded previously.

I am using the frequency RPM option, not PWM, where there is 1 low edge for every Hz. Essentially, the signal output from the ICE magnet. This is the same signal that one would use to drive a standalone RPM display LED module.

Hi Sneezy,

From what I can see in the code you will need to set:
RPM_TYPE = 2
RPM_PIN = 54
RPM_SCALING = 0.142857

I think you have set it to look for a PWM signal rather than a trigger style signal.