Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart Port #4

Closed
marwand opened this issue Dec 24, 2015 · 2 comments
Closed

Smart Port #4

marwand opened this issue Dec 24, 2015 · 2 comments

Comments

@marwand
Copy link

marwand commented Dec 24, 2015

Hello jcheger,

This is more of a question than an issue and I apologize for contacting you this way. I was wondering if the arduino can read rpm without having the smart port connected. I have an eagle tree brushless rpm sensor and everything is connected according to the diagram provided (except the smart port) and I'm getting no output from the arduino. I suspect that the smart port is needed because of the line [FrskySP FrskySP (10, 11);]. Also, is all the decoding happening through the smart port? Is there any way around it? Finally, can I get more information about the smart port?

Thank you very much & I appreciate your help.

@jcheger
Copy link
Owner

jcheger commented Dec 25, 2015

Hi marwand,

The smartport use a cyclic pull of addresses, which triggers the answer.
But you don't want this.

The EagleTree RPM sensor gives a pulse at every rotation. It is very
basic, as any hall effect or optical sensor does.

Here is some part of code I did write for a simple RPM counter. I've
modified it to print the RPM on serial once per second. I think it will
fit better you needs.

Regards, Jean-Christophe Heger

#define RPM_PIN 2

unsigned long sum = 0;
unsigned long count = 0;

void setup() {
Serial.begin (115200);
pinMode (RPM_PIN, INPUT);
attachInterrupt (0, rpmISR, RISING);
}

void loop() {
float freq;
unsigned int rpm;

delay (1000);
detachInterrupt (0);

freq = (sum) ? ((float) count * 1000000.0 / (float) sum) : 0.0;
rpm = int (freq * 6.0) * 10;
Serial.println (rpm);
sum = 0;
count = 0;

attachInterrupt (0, rpmISR, RISING);
}

void rpmISR () {
static unsigned long last_micros = 0;

if (last_micros) {
sum += micros () - last_micros;
count++;
}

last_micros = micros ();
}

Le 24. 12. 15 12:04, marwand a écrit :

Hello jcheger,

This is more of a question than an issue and I apologize for
contacting you this way I was wondering if the arduino can read rpm
without having the smart port connected I have an eagle tree brushless
rpm sensor and everything is connected according to the diagram
provided (except the smart port) and I'm getting no output from the
arduino I suspect that the smart port is needed because of the line
[FrskySP FrskySP (10, 11);] Also, is all the decoding happening
through the smart port? Is there any way around it? Finally, can I get
more information about the smart port?

Thank you very much & I appreciate your help


Reply to this email directly or view it on GitHub
#4.

@marwand
Copy link
Author

marwand commented Dec 27, 2015

Thanks a lot man. Hope you're enjoying your holidays!

@marwand marwand closed this as completed Dec 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants