9 Ağustos 2010 Pazartesi
LED Bargraph Optical Tachometer
equipment. When I first built this tach back in 1995, it was essential, as there were very few off-the-shelf electric R/C power systems that just worked.At that time, you had to experiment with batteries, speed controls or switches,connectors, and wiring, and a tachometer was a tool to help you measure the Now in 2006, a tachometer is still just as useful. By performing RPM measurements from time to time, problems such as a bad cell in the battery, deteriorating connectors, or damaged motor windings can be detected early before there's a major failure.There are of course many commercially available tachometers for R/C these days, but if you're like me, it's more fun to build your own.The tachometer in this project has the following specifications: Scales: 0-4000, 0-8000, 0-16000, and 0-32000 rpm.
Resolution: 250, 500, 1000, and 2000 rpm.†
Power: 9V alkaline battery or 4xAA 4.8V NiCd/NiMH battery.
Sensor: NPN photo-transistor.
† This is the "raw" resolution. Each LED in the bargraph indicates an interval of this size. In practice (and with practice), the resolution is higher. When an RPM reading is taken that falls between two of the LEDs both LEDs will flicker, and you can interpolate between the two values by the relative amount of time that each LED is on. Q1 is an NPN photo-transistor whose conductivity is determined by the amount of light falling on it. By shining a light through the propeller arc, Q1 sees alternating pulses of light and dark as the propeller turns, which in turn Causes the junction of Q1 to alternate between about 0.7V (light) and 5V (dark).
C3, R4, and R5 remove whatever DC bias appears at the junction of Q1 and R3, and then add back in a 2.5V bias. R6 provides a reference voltage to which this biased pulse train is compared by Z3a, half of an LM393 dual voltage comparator. The sensitivity of comparison is set by R7.
www.stefanv.com/rcstuff/tachometer/schematic.gif
www.stefanv.com/rcstuff/tachometer/t-schematic.gif
Optical tachometer schematic.
CAPTION
Optical tachometer schematic.
The output of the comparator is a TTL compatible pulse train which is fed into Z2a, half of an SN74393 dual 4-bit counter. The outputs of the counter represent a count of the number of pulses seen, modulo 16, since the counter was last reset. These outputs are fed into four of the inputs of Z4, an SN74374 8-bit edge-triggered latch (they are also fed into the four unused inputs just to keep noise from entering the circuit). The latch serves to "capture" the counter outputs at an appropriate time. The corresponding outputs of the latch go to the select inputs of an SN74154 4-line to 16-line decoder. This takes the 4-bit binary value on its inputs, and lowers a single corresponding output, which then drives one of the 16 LEDs
through a 330Ω resistor. All we need now is something to trigger the latch at an appropriate time, and
simultaneously reset the counter. If we want to measure propeller RPM ranging from 0 to 16000, we have to count from 0 to 32000 pulses per minute (assuming a two-bladed propeller). This corresponds to 0 to 533.3
pulses per second. Since the pulse counter can only count from 0 to 15, we can't count for a whole second. In fact we should count for only 1/33.33 seconds (30ms). After that amount of time, with a 16000 rpm input, the counter will have received 16 pulses, which means it will have wrapped back around to zero. At 15999 rpm, it will only have received 15 pulses before 30ms are up. So, for a 0 to 15999 rpm range, we need to capture the counter output and then reset the counter every 30ms (i.e. 33.33 times per second). To do this, we need a 33.33Hz pulse train. Since this tach has three other ranges of 0 to 4000, 0 to 8000, and 0 to 32000 rpm, we also need 8.333, 16.67, and 66.67Hz pulse trains respectively. Z1 is an LM555 timer circuit, configured as an oscillator. R1 sets the pulse rate, and should be adjusted to produce a 133.3Hz output. This output is fed into Z2b, the other half of the dual 4-bit counter, which is being used here as a frequency divider. The QA, QB, QC, and QD outputs will have square waves of 66.67, 33.33, 16.67, and 8.333Hz respectively. S1 selects one of these outputs. C4, D1, and R9 act as a filter, turning the falling edge of the square wave into a single short duration (about 100µs) low-going pulse. This pulse is fed into the inverting input of Z3b, the other half of the dual voltage comparator, which here is just being used as an inverting buffer.
The output is thus a short duration positive pulse. The leading edge of this pulse latches the current RPM pulse counter output into the latch, and then resets the counter. Because the RPM pulse input is not synchronized with the internal pulse train, the number of propeller pulses counted by the counter can vary from one
latching pulse to the next. For a fixed RPM however, this count will always be one of the two values which is on either side of the exact value. In use this manifests itself as two flickering LEDs, with the one corresponding more closely to the correct value being on a larger percentage of the time. For example, if measuring a 20500 rpm propeller with the tachometer set to the 32000 rpm range, the 20000 rpm and 22000 rpm LEDs will both be lit. The 20000 rpm LED will be on 3/4 of the time, and the 22000 rpm LED will be on 1/4 of the time. With practice, you can use this behaviour to interpolate between the two values, effectively increasing the resolution the circuit is best built on a printed circuit board. Refer to my article on the subject,
www.stefanv.com/electronics/etching.htm"
Making Excellent Printed Circuit Boards
Here is the board layout for the tachometer:
www.stefanv.com/rcstuff/tachometer/copper.gif
www.stefanv.com/rcstuff/tachometer/t-copper.gif
Printed circuit board layout. Actual size is 3.3" x2.9" .
Printed circuit board layout. Actual size is 3.3" x2.9" .The diagram below illustrates the component placement on the board.
www.stefanv.com/rcstuff/tachometer/placement.gif"
www.stefanv.com/rcstuff/tachometer/t-placement.gif"
Tachometer component placement.
Begin by installing all the fixed resistors and capacitors. Be sure to orient C5 correctly, with its negative lead closest to the edge of the board. Install D1, with its banded end closest to Z2. Then, install all the jumper wires, of which there are eight. Be sure to install the one that's underneath Z5. For the two long diagonal wires in the top-left quarter of the board, use insulated hook-up wire. Next, install the two trimmer potentiometers, R1 and R6. There are two centre-lead holes for each. Which one to use depends on the configuration of the potentiometer's leads. Also install the integrated circuit sockets at this time, with pin 1 of each socket where shown. Install the sixteen red LEDs next. Each LED will have a flat spot on one side of it. This flat spot should be to the left (i.e. the side that connects to the corresponding resistor). If you plan to power the tach with a 9V battery... Install the 7805 voltage regulator next. The tab of the regulator should be furthest from the edge of the board. You bend the 7805's pins and lay the regulator down if you wish (as long as you used insulated wires for the jumpers). Connect a 9V battery clip to the 9V+ (red) and 9V- (black) terminals. Install a normally-open SPST pushbutton in the red battery lead. If you plan to use a 4.8V NiCd or NiMH battery... Omit the voltage regulator, and connect the battery leads directly the two lower voltage regulator holes. The positive lead connects to the lower hole and the negative lead to the middle hole. As with the 9V installation, install a normally-open SPST pushbutton switch in the positive battery lead. You may also wish to connect a charging jack.
www.stefanv.com/rcstuff/tachometer/photo2.jpg"
www.stefanv.com/rcstuff/tachometer/t-photo2.jpg"
The completed circuit board. My prototype used a 4.8V battery, and thus I omitted the voltage regulator.
The completed circuit board. My prototype used a 4.8V battery, and thus I omitted the voltage regulator.
Install five colour-coded hookup wires to connect between the circuit board and
the range selector switch. Four of the wires connect to the top row of four
holes, and one connects to the bottom row. The other three holes aren't used (they are there if you want to install an 8-pin header to allow the switch to be easily disconnected). Connect the other ends of the wires to the four switch positions and the common contact of a 4-position rotary switch. Connect the phototransistor to the points marked Q1 on the board. The emitter lead connects to the lower hole (ground), and the collector lead to the upper hole (closest to the battery connections). The emitter is the lead closest to the tab on the base of the phototransistor. When I built the prototype, I didn't have a 4-position rotary switch in my parts cabinet. Instead, I used a pair of toggle switches, one DPDT and one SPDT, to create a range selector. In effect, the two switches represent a two-bit binary value which selects one of four ranges. A rough schematic of this arrangement is show below.
www.stefanv.com/rcstuff/tachometer/switches.gif
www.stefanv.com/rcstuff/tachometer/t-switches.gif
Schematic of the alternative binary range selector switch. Schematic of the alternative binary range selector switch. Double check all your work, making sure there are no solder bridges, and that you didn't make a mistake copying the circuit board layout. Check that all the components are in place. If everything looks to be in order, insert all the integrated circuits into their sockets, making sure they're all in the right way around. Set both R1 and R6 to their midpoints, and set the range selector to the 0 to 32000 rpm range. Connect a 9V battery (if you're using a regulator) or 4.8V NiCd or NiMH battery (no regulator) to the power inputs. If you're in a room with incandescent or natural light, the rightmost LED should illuminate, indicating zero rpm. In a room with fluorescent lighting, one or two LEDs should be flickering. Point the phototransistor at a fluorescent light, at close range. I find that compact fluorescents don't flicker enough, so use a traditional fluorescent tube fixture. If you don't get two flickering LEDs, adjust R6 until you do. Then, experiment with the setting of R6 to find the two positions at which the flickering stops, and then set it half way between these two positions. The next step is to calibrate the 555 oscillator to produce a 133.3Hz signal If you have a frequency counter or oscilloscope, the most accurate way to do this is to measure the frequency on pin 3 of the 555, and adjust R1 until it is 133.3Hz. If you don't have the appropriate measuring equipment, all is not lost. Once again, point the phototransistor at a fluorescent light, and adjust R1 until the second and third from the right LEDs are both lit. Then switch to the 0 to 4000 rpm range, and proceed as follows: If you live in a country where the power line frequency is 60Hz (e.g. Canada, USA)... Fine tune R1 until the two leftmost LEDs (indicating 3750 rpm and 3500 rpm) are both flickering, and the leftmost one is on slightly less than half the time. Switch to the 0 to 8000 rpm range, and the left- and right-of-centre LEDs should be lit about 20% and 80% of the time respectively (i.e. between 4000 rpm and 3500 rpm, closer to 3500 rpm). I initially calibrated my tach this way, and on checking it with a frequency counter later, found it was off by only 2% If you live in a country where the power line frequency is 50Hz (e.g. European countries)... Fine tune R1 until only the fourth LED from the left is lit indicating exactly 3000 rpm. You should be able to get the calibration within 1% this way. You can test the calibration by trying the other ranges. On the 0 to 8000 and 0 to 16000 scales, exactly one LED should light. Please keep in mind that this meter reads from right to left. The lowest RPM values are on the right. If you want it to real from left to right like most analog meter movements, you can install the LEDs on the copper side of the board. The calibration notes above assume the LEDs are on the
www.stefanv.com/rcstuff/tachometer/photo3.jpg
www.stefanv.com/rcstuff/tachometer/t-photo3.jpg
Circuit board, battery, and switches installed on the front panel. I installed my tachometer in a 3-3/4" x 4-1/4" x 1-1/4" plastic project case. I drilled a row of holes for the LEDs to protrude through the front panels, and installed the activation pushbutton and range selection switches (see Modifications above) on the front panel too. The circuit board was screwed to two wooden blocks glued to the panel, and the 4x600AA NiCd battery (a spare R/C receiver pack) was held to the panel with double-sided tape. The phototransistor was installed through holes in the top of the case, and enclosed in a brass tube that was painted black inside and out. The label indicates the RPM values corresponding to each LED To aid in reading the tachometer, I created a label that has one column for each LED, and one row for each range. The label is reproduced at right, scaled to 300 dpi. It should be 3.5" wide when printed. To use the tachometer, merely point it at the propeller from behind, looking through the propeller arc. If doing this indoors (electric models only of course), it helps to shine an incandescent light through the propeller from the front. Be sure to turn off all fluorescent lighting when using the tachometer, or it will give erratic readings. The best light source to use is a battery operated flashlight. First and foremost, wear a good pair of safety glasses. Propellers can and do fail or come off the motor shaft. If this happens outdoors, injury is a possibility. Indoors, it's almost a foregone conclusion, as the propeller or pieces of it ricochet off the walls. I've had it happen, but I was lucky, and now I always wear safety glasses. A sticker we had on the wall in my high school's chemistry lab read, "Joe never used to wear his safety glasses. Now, he doesn't need them. If you are working with running motors, make sure they are securely mounted in a test stand from where they cannot escape or even move. If a motor turns in its stand, the propeller could hit the edge of the work bench, in which case it will shatter and send pieces flying. Keep all the wiring out of harm's way. Long power leads hanging loosely near spinning propellers are an accident waiting to happen. Keep leads away from the business end of the motor. Also be careful not to let bare alligator clips contact each other or the motor case. The following table lists all the parts needed. Parts can be ordered from electronic supply houses such as
www.digikey.com/
R1=100kΩ trimmer potentiometer
R2=22kΩ ¼W resistor
R3=10kΩ ¼W resistor
R4, R5=100kΩ ¼W resistor
R6=10kΩ trimmer potentiometer
R7=4.7MΩ ¼W resistor
R8, R9, R10=1kΩ ¼W resistor
R11,R26=330Ω ¼W resistor
C1, C2, C4, C6-C10=0.1µF capacito
C3=22nF capacitor
C5=22µF electrolytic capacitor
D1=1N914 diode
S1=SP4T rotary switch, or 1 each DPDT and SPDT mini toggle switch
Z1=LM555 timer
Z2=SN74393 dual 4-bit counter
Z3=LM393 dual voltage comparator
Z4=SN74373 8-bit edge-triggered latch
Z5=SN74154 4-to-16 line decoder
VR=7805 5V 1A regulator
Q1=PT501 phototransistor
LED1-LED16
T-1 (3mm) red LED, 1.7-1.9V @ 10mA
İzleyiciler
TIMING CALCULATORS FOR THE LM555
TIMING CALCULATORS FOR THE LM555
LED DİRENÇ HESAPLAMA
All LEDs require current limiting, without a current limiting mechanism the LED will usually burn out in under a second. Adding a simple resistor is the easiest way to limit the current. Use the calculator below to find out the value of resistor you require.
For example if you are wanting to power one of our_blank">red LEDs in an automotive application you would see that the typical forward voltage is 2.0 Volts and the maximum continuous forward current is 30mA. Therefore you would enter 14.5, 2.0 and 30 into the Single LED calculation box. After calculating you get 470ohm 1 watt as the result. Here is a that allows you to enter a resistor value and generate the corresponding color code.
Note: For automotive applications use the actual system voltage, not 12 Volts. Most 12 Volt system actually operate at around 14.5 Volts.
Lm317 uygulama devreleri ve detayli bilgiye Buradan ulasabilirsiniz |
LM555 - ASTABLE OSCILLATOR CALCULATOR
NOTE: The leakage currents of electrolytic capacitors will affect the actual output results of the timers. To compensate for leakage it is often better to use a higher value capacitor and lower value resistances in the timer circuits.
LM555 Astable Oscillator Circuit Diagram
The next calculator can find the capacitance needed for a particular output frequency if the values of R1 and R2 are known.
Value Of R1 Ohms | Value Of R2 Ohms |
Frequency Desired Hertz |
| |
|
Hiç yorum yok:
Yorum Gönder