Pages: 1 [2]   Go Down
Author Topic: iS my photoresistor (LDR) too slow ? || tachometer  (Read 3697 times)
0 Members and 1 Guest are viewing this topic.
Washington
Offline Offline
God Member
*****
Karma: 30
Posts: 780
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
100hz is too fast for the Arduino? *shrug*

8500 RPM x 2 slots = 17000 Hz by my calculations.
RPM = rounds per minute
hz = cycles per second
(8500 / 60) * 2 = ~300hz
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!

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6908
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any possibility of affixing a magnet on the rotating part and use a Hall switch? Many cars use hall sensors as optical path can easily be blocked by dirt and dust. I heard that and engine cylinder has a magnet attached to its rotating part and it triggers the spark plug so a Hall sensor near that will likely pick up the rotation speed.
Logged


The Udaho Border
Offline Offline
Newbie
*
Karma: 1
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

100hz is too fast for the Arduino? *shrug*  smiley-roll

After debugging, the aforementioned program was reliably reading a 26,000 rpm signal from a signal generator while updating four display values, polling two inputs without interrupts, and having a compiled size of almost 8K. It started getting flaky at about 28,000 rpm. Ditching use of the string class in favor of character arrays roughly doubled the speed. Not executing every display command on every loop iteration roughly doubled the speed once more while still achieving an approximate 100 Hz refresh rate.
Logged

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


....
    rpm=counts*60000000;//I think You have to divide it by number of rising edges, in your case it is 2
 ....


and nice for this aplication is CNY70 +optical encoder wheel

http://www.x-robotics.com/sensores_ing.htm#Reflexivo CNY70
http://thedenneys.org/pub/robot/encoders/
Logged

Sorry for my english

Pages: 1 [2]   Go Up
Jump to: