Loading...
Pages: 1 [2]   Go Down
Author Topic: Frequency Counter Library  (Read 14121 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am new to the site, but I have been programming micros and Arduino for a little time now. I like the code and it works great. I am using it with a variable reluctance sensor and some support circuitry. I wanted to use you code and take the frequency value and output an analog signal in a ratio of the frequency. For example I take the frq from the example and ledBrightness=map(frq,0,fastestFrequency,0,255) but i cannot seem to get a signal out with the analogWrite() command. Does this library mess with the timer that controls the PWM timing of the analogWrite() command?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 228
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Been using the Frequency Measurement Library, it's great. Been using it to measure the speed and RPM on my car. Is there a way of measuring 0 frequency to show 0 speed or 0 RPM at all?

Thanks.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Been using the Frequency Measurement Library, it's great. Been using it to measure the speed and RPM on my car. Is there a way of measuring 0 frequency to show 0 speed or 0 RPM at all?

Thanks.

Just as a heads up, if you are getting your signal from a hall effect sensor you should be able to read zero speed, but from what I have been looking up, most speed sensors are a much cheaper variable reluctance sensor. As I understand it, variable reluctance (VR) sensors do not do well at slow speeds. This code and my VR sensor off of a Borg-Warner T5, for a S-10, cannot go down to 0 rpm. I can only get to 10s or rpm. Hall effect sensor can take true zero speed measurements. Good luck.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 228
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using this:
http://interface.khm.de/index.php/lab/experiments/frequency-measurement-library/

Are we talking about the same library? Is the above library in the link able to detect zero RPM and speed?

This is the hall effect sensor we use:  http://www.digital-speedos.co.uk/hall-effect-speed-sensor-for-drift-gauges-non-magnetic-382-p.asp
Logged

Washington
Offline Offline
God Member
*****
Karma: 22
Posts: 720
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you considered using a light based counter? Shine an IR light at whatever is spinning and fix piece of something shiny to it. Then point an IR detector at it which should detect rotation.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

0
Offline Offline
Full Member
***
Karma: 0
Posts: 228
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How can I do this with a car? Especially the engine rpm?
Logged

Washington
Offline Offline
God Member
*****
Karma: 22
Posts: 720
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How can I do this with a car? Especially the engine rpm?
Maybe you can fix something shiny or use shiny paint on one of the main belts?
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Peoples Republic of Cantabrigia
Offline Offline
God Member
*****
Karma: 6
Posts: 640
Arduino happiness
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Please do not paint belts. The paint may damage the belt (thanks to the enclosed / entrained solvents) and lead to premature cracking. Not only are modern belts very expensive to replace, losing one will usually leave you stranded. Not the best way to impress the missus.

Instead use a hall-effect or optical rig on a sprocket or similar device that does not need physical modification.
Logged

Washington
Offline Offline
God Member
*****
Karma: 22
Posts: 720
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The paint may damage the belt (thanks to the enclosed / entrained solvents) and lead to premature cracking.
Honestly this is not my place to expertise but it would seem there is certain types of paints that would not be a problem.
Quote
Not only are modern belts very expensive to replace, losing one will usually leave you stranded. Not the best way to impress the missus.
Last time I looked, the belts were not all that expensive. But losing one can indeed leave you stranded but alas this is a risk with any type of engine modification.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Peoples Republic of Cantabrigia
Offline Offline
God Member
*****
Karma: 6
Posts: 640
Arduino happiness
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

SmeezeKitty, do as you wish.

All I can tell you is that I had to replace every rubber hose on a diesel engine because some lugnut sprayed them with the same 'Perkins blue' as the rest of the engine. And to do that, we got to lift the engine out of the boat, drain it of all fluids, etc. Not the fastest fix.

Every hose had cracked thanks to this painting treatment. Given how important belts are, I wouldn't mess with them and pick up the desired signal elsewhere.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got this to work well on one sensor, using my Arduino UNO.

But I have not been able to get it to work at all on a Leonardo. [ Serial doesn't even print the 'Frequency Library' line at the start] Have there been major changes to serial for Leonardo?

Another question is, how would I be able to expand this to multiple sensors without using multiple Arduinos?
Logged

Pages: 1 [2]   Go Up
Print
 
Jump to: