This tachometer can be used to measure the RPM (revolutions per minute) of a rotating object. In this project, GreenPAK™ SLG46533V and SLG46140V are used to design an optical contactless tachometer with the use of an infrared sensor. The measurement range of this tachometer is 1 - 9999 rpm, with an accuracy of 0.01% (using a sample clock of 2 MHz for measuring a maximum of 9999), this would give an accuracy of less than 1 rpm at all readings. This design can be modified to suit other requirements such as, changing the sensor sensitivity, changing the distance of measurement from the rotating object, etc.
Transistors Q1, Q2 toggle control between the first two 7 segment displays and Q3, Q4 between the last two 7-segment displays on each half cycle of the internally generated clock in the GreenPAK.
The complete design file is available here. It was created in the GreenPAK Designer software, a part of the Go Configure™ Software Hub.
1. Infrared SensorThe IR sensor consists of an infrared transmitter LED and infrared receiver LED. The two are shielded from each other as shown in Figure 2.
Good sensor design ensures predictable and reliable operation. Here are some important notes:
1. Ensure there are no infrared light leaks between the two LED’s. The receiver should receive only the light reflected from the rotating object where it is aimed.
2. The 220-ohm resistor on the infrared transmitter LED must be properly rated (2W or more). It can generate considerable heat that must be dissipated for safety.
3. The most important part is to set the infrared receiver LED sensitivity. This can be adjusted by varying the resistor of the infrared receiver LED. For this case, it was between 2-4K ohm and it works pretty well at a distance of 5-7 cm from the Fan. Here high resistance means high sensitivity.
For an infrared receiver to receive the light, a reflecting tape is attached to the Fan. When fan-made one revolution the light is reflected from the tape and is received by the receiver LED. The number of times it is received in half-minute will be equivalent to the RPM of the fan (since both rising and falling edges trigger the counters). In order to speed up the process, 8 pieces of tape may be attached to the fan. This helps calculate the RPM with 8x faster timing (i.e. 3.75 sec). The piece of tape must be attached so that the light is properly reflected during each revolution of the fan.
2. GreenPAK Design Code2.1. GreenPAK SLG46533V Sensor CodeThere are two circuits that can be used for the clock: internal oscillator, or crystal oscillator (both files are attached and either can be used). Each circuit consists of a 4.25-sec timer. It generates a 3.75 sec “high” time, and a 0.5 sec “low” time for the “Enable sensor input for counters” signal.
This means the sensor counters remain enabled for 3.75 sec, and for 0.5 sec the 7 segment display remains frozen at the final output.
When an internal oscillator is used, the connections of pin 16 and pin 17 in the schematic are not required. However, for better accuracy over varying ambient temperatures, the crystal oscillator option should be used.
The design can be configured for counting revolutions during a particular time, but the revolution number cannot exceed 9999.
Normally a high is present at Pin 2, and whenever the infrared is reflected back from the tape (8 times every cycle), a momentarily low is observed. The rising and falling edges are both detected and if the 3.75-sec timer is enabled, it is passed on to the first counter block.
2.2. A tradeoff between sample time and accuracyIn order to tradeoff between sample time and accuracy, we can vary the measurement interval of the tachometer (from 3.75 sec). It is due to the fact that some application requires higher accuracy like industrial motors whose rpm needs to be maintained at a fixed speed, based on the present speed inputs.
For these types of applications, a more accurate reading is required which can be obtained by increasing the sample time.
However, some applications are OK with less accuracy but a faster update rate is better, like measuring the rpm of the car engine.
This can be done by varying the time interval of the reading from 3.75 sec time to some higher/lower value. This can be achieved by changing the counter CNT0 and CNT1 values. The display time can be varied by changing the CNT5 and CNT6 values. It must be noted that CNT5 and CNT6 must have the same values.
2.3. Two BCD Counters in SLG46533VThere are two BCD counters implemented in each of the other two GreenPAK SLG46533V, each of them is a countdown counter. The incoming clock signal is from the sensor data (passed during the 3.75 sec time). The counter decrements during every sensor interrupt received. The 2nd counter starts the third counter in the other chip.
This part of the code converts the four-bit BCD code to a seven-segment display. The selection between two 7 segment displays is also made during each cycle of the clock.
All the counters reset at 0101 (equivalent to decimal 10 using negative logic). All the counters also reset when 3.75sec has elapsed. Counter 1 represents the least significant digit and counter 4 represents the most significant digit.
The relation between the first three counters is tabulated below. The first two of them are implemented in one chip and the third one is implemented in another chip.
Table 1 shows how the first two counters start counter 3. The counter 4 increments whenever counter 3 reaches its limit as tabulated below.
This tachometer was tuned by first matching its RPM against a Hall Effect-based tachometer, and the results are well matched up to the tenth digit.
Because the Hall Effect-based tachometer gave false readings at slow fan speeds, this is where this GreenPAK design is superior. The design can also be used to build an RPM measuring instrument based on a rotary encoder.
Comments
Please log in or sign up to comment.