Problems with IR Tachometer

Interested in Robotics? Here's the place to be.
Rubi
Posts: 12
Joined: Wed Aug 03, 2005 1:01 am
Location: Vienna
Contact:

Problems with IR Tachometer

Post by Rubi » Wed Aug 03, 2005 2:54 am

Hi<p>Has anyone built the IR Tachometer from the Bill Donofrio Article in the July Servo Magazine ?<p>I have built it, but there are problems.
The circuit starts oscillating and so the readout is corrupted. I could not find any errors on my routing so I suspect there is one in the schema.<p>You can find the circuit here:
http://www.servomagazine.com/media-file ... %20Sch.pdf<p>Any help is apreciated.<p>Cheers
Michael

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Problems with IR Tachometer

Post by rshayes » Thu Aug 04, 2005 12:27 am

The schematic does not show any power supply bypassing. CMOS is a little better in this respect than TTL, but a .1 uF bypass from power to ground close to some of the integrated circuits would probably help. Normal practice with TTL is to do this with short leads on each package. CMOS can probably tolerate a capacitor on every second or third package. The LM324 is an analog part, and should certainly have a local bypass capacitor.<p>This circuit appears to use a 9 volt battery. A large capacitor, in the 10 to 100 uF range (electrolytic), across the battery will reduce the effect of the battery impedance.<p>The LM324 is a quad unit, but only one unit is being used. The gain is set at 1000 using a 10K and 1 meg resistor. Splitting the gain between two or three stages using lower values of feedback resistor would probably be more stable. At the 10 meg level, the circuit will be sensitive to stray capacitances.<p>The display section shows a multiplexed display. However, there does not seem to be any signal which selects which digit is going to be displayed.

Rubi
Posts: 12
Joined: Wed Aug 03, 2005 1:01 am
Location: Vienna
Contact:

Re: Problems with IR Tachometer

Post by Rubi » Thu Aug 04, 2005 3:47 am

Dear Stephen<p>I could get rid of the oscillation using a more stabilized power supply ( a 9V battery ;-).<p>There is another problem though as you mention,
the displayed data is wrong.
Somehow I think there is an error in the connection between the 7 Seg. display and the driver ICs.
The aiming Led flackers ok, but the display displays sometihng compleatly different.<p>Cheers
Michael

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Problems with IR Tachometer

Post by rshayes » Thu Aug 04, 2005 4:42 am

There is a drawing error. The three pins on IC1 (1, 2, and 15) that are shown connected to R8, R9, and R10 are really on IC2. These are the multiplexing signals the determine which digit is being displayed. Note that pins 1 and 2 are shown twice on IC1 but not on IC2.<p>Another problem may be the high value for R14. Ambient light may cause enough photocurrent to saturate the phototransistor.<p>Fresh batteries may have reasonably low impedance. As the battery discharges, the impedance may rise. In transistor radios, this would cause low frequency feedback (motorboating). Most radios used a large electrolytic across the battery to avoid this problem.<p>The inputs of unused sections in an LM324 should be tied to ground with the unused outputs left open circuited. Otherwise, the unused sections disrupt the internal bias circuits, which are commonto all four sections.<p>The parallel connection of L1 and L2 is also not good practice. If they are not well matched and at the same temperature, one of them will conduct more current than the other, resulting in unbalanced light output between them. A series connection would be better. The drive current appears to be about 25 milliamps. This may be more than needed and will reduce the battery life considerably.<p>The peak current in the seven segment displays may also be high. The drive appears to be about 15 milliamps for each segment, for a total of 105 milliamps when 8 is displayed. This may be a bit heavy for a 9 volt battery.

Rubi
Posts: 12
Joined: Wed Aug 03, 2005 1:01 am
Location: Vienna
Contact:

Re: Problems with IR Tachometer

Post by Rubi » Thu Aug 04, 2005 6:21 am

Dear Stephen<p>That makes really sense !!! I will try this out as soon as I am home.
Not only pin 1 and 2 was used twice but also pin 15 (connected to f of the 7seg)! Pin15 has worried me most. This somehow did not look right.
Interesting though, when switching on the unit displays 001 !!!
So I will connect the display to IC2 and hopefully it will work.<p>Cheers
Michael

Rubi
Posts: 12
Joined: Wed Aug 03, 2005 1:01 am
Location: Vienna
Contact:

Re: Problems with IR Tachometer

Post by Rubi » Thu Aug 04, 2005 6:28 am

Dear Stephen<p>You wrote:
"The parallel connection of L1 and L2 is also not good practice. If they are not well matched and at the same temperature, one of them will conduct more current than the other, resulting in unbalanced light output between them. A series connection would be better. "<p>I think that is also an error in the schematic.
The Resistor R11 gets verry verry hot, when L1 and L2 are parallell. I will connect them in series as suggested from you.
Thanks for your valuable input.
When the tacho is working correct after I connect the display to IC2 I would suggest either you or me inform the Servo Magazine about this error.
Unfortunatly there is no email of the author (Bill Donofrio) mentioned in the article.<p>Cheers
Michael

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Problems with IR Tachometer

Post by rshayes » Thu Aug 04, 2005 7:22 am

I must be slipping. With a 9 volt supply, that 220 ohm resistor (R11) will dissipate nearly 1/4 watt with a 9 volt supply. Putting the LEDs in series would drop this to slightly over 1/8 watt. No wonder it gets hot.<p>The current wiuld still be over 20 milliamp. Most modern LEDs are fairly happy with 5 to 10 milliamp currents unless serious optical power is required.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Problems with IR Tachometer

Post by philba » Thu Aug 04, 2005 11:32 pm

wow. what a mess. its pretty clear the editors don't do any sanity checking at all. I haven't seen the article...<p>This circuit is a poster child for why microcontrollers are a god-send to developers. If it were designed using a $2 microcontroller like a PIC 16F628, one could get rid of at least 6 chips and probably more. <p>I'd be very suprised if this circuit isn't really sensitive to ambient light and/or noise with that 1000 gain amp. The weak 100K pull up doesn't help. Does it really need to be that high? That forces some careful engineering. A 6 mV stray would get amplified to 6V and could trigger the 40106. does the article call out some sort of IR filter? I bet he needs the 2 LEDS to overcome ambient conditions.<p>I agree that the ICs and counters especially should get bypass caps. Really careful assembly/layout should be done to make sure the clock section is no where near the amp and phototransistor circuits.<p>One other thing about the counting/display circuit - I think its updating the count every 10 seconds. That seems kind of long. Also, it appears to be counting for 6 seconds and displays digits 2,3 and 4. This circuit is just crying for a micro...<p>Phil

dyarker
Posts: 1749
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: Problems with IR Tachometer

Post by dyarker » Fri Aug 05, 2005 1:31 am

In case the author (Bill Donofrio) happens to see this thread, a couple minor comments about the schematic (maybe customs vary in different countries too).<p>An upside-down ground symbol (like T5 emitter) is an antenna symbol. A sideways ground symbol like C3 negative terminal isn't done.<p>"T" usually is for transformer, a transistor is usually "Q" or "TR".<p>"L" usually is for inductor, all type diodes are usually "D" (including LEDs)((or "LED" for LEDs))<p>Resistor symbol often has 6 "points". (Though I prefer these 9 pointed ones over plain rectangle sometimes used.)<p>Other than that, and technical errors noted by stephen, it is an easy to read drawing.
Dale Y

Rubi
Posts: 12
Joined: Wed Aug 03, 2005 1:01 am
Location: Vienna
Contact:

Re: Problems with IR Tachometer

Post by Rubi » Fri Aug 05, 2005 4:59 am

Dear Stephen thanks a lot for your input,
I think it is working now.<p>During the repair work I found a YAE ( yet another error ;-)
Digit one and three are mixed up.
Pin15 goes to digit three and pin2 to digit one.
After correcting this I get "reasonable" counting.<p>Though it is by no means resistent to stray light as already suspected.<p>But don't be to harsch to Bill, first this is a robotics magazine, second I think he built this many years ago and redraw the schematic from the wire wrapped circuit.<p>Now I will ground the inputs, build a (verry verry) stable supply and add bypass caps as suggested.<p>After all this corrections, my routed pcb looks like the wire wrapped prototype from the author ;-)<p>Cheers
Michael

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Problems with IR Tachometer

Post by rshayes » Fri Aug 05, 2005 8:06 am

I'm glad it is starting to work.<p>You might want to put a little more thought into the stray light problem before making a final version. It may be possible to use feedback to reduce the DC component of the photocurrrent. The schematic shows a photodiode, but the base connection may not be available. Some photodiodes are packaged in a clear TO-92 case with the base lead brought out. Others are in an LED type package with only the collector and emitter brought out.<p>It might be simpler to use red LEDs instead of infrared units. Then you wouldn't need the aiming LED or IC9.<p>There may also be a logic error. IC3 is clocked at a 1 Hz rate, with state 0 opening a gate and state 6 closing it. This will give a 6 second gate. However, the reset pulse for the counter appears to be generated at the start of state 3, which is halfway through the gate period.

Rubi
Posts: 12
Joined: Wed Aug 03, 2005 1:01 am
Location: Vienna
Contact:

Re: Problems with IR Tachometer

Post by Rubi » Sat Aug 06, 2005 6:35 am

Hi Stephen<p>I am not sure if this is an error.
The correct behaviour would be
count 6 seconds and display the
result for 10 seconds.
Which connection of the counter to the
disply unit would be correct in your opinion?<p>Cheers
Michael

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Problems with IR Tachometer

Post by rshayes » Sat Aug 06, 2005 7:32 am

The 4017 is a decade counter. In this case, it is driven with a 1 Hz clock frequency. State 0 appears to open a gate, and state 6 closes it. The gate is open for the duration of states 0, 1, 2, 3, 4, and 5. The gate time is 6 seconds. The count in IC2 will increase during the gate time. At the beginning of state 7, it transfers to the display part of IC2. It would then display for 6 seconds, during states 7, 8, 9, 0, 1, and 2.<p>The odd part is that IC2 appears to be reset at the start of state 3. The reset clears both the counter and the display. This means that the counter in IC2 is reset to zero in the middle of the gate and then counts for only 3 seconds before the gate closes. This would result in the display reading low by a factor of 2.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Problems with IR Tachometer

Post by philba » Sat Aug 06, 2005 12:54 pm

Hmmm, I think it latches when ic3 hits 7 and resets when it gets to 8. <p>It is kind of cute how he's built a state machine with a couple of counters. <p>I wonder about the visible LED approach. It makes sense to not need a guide light but will ambient light make this a problem? I suppose some sort of autocalibration would be good. This thread has gotten my interest piqued in designing a micro based one.<p>Is there any reason not to use the LM324 to build a schmitt trigger (or more generally, a comparator with hysteresis)? I know its not going to be that fast but I'm not sure much speed is needed.<p>[ August 06, 2005: Message edited by: philba ]</p>

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Problems with IR Tachometer

Post by rshayes » Sat Aug 06, 2005 4:10 pm

You are correct.<p>Motorola made an error on the data sheet. One figure shows pin 9 as Q3, another figure shows pin 9 as Q8. The second is probably correct. In this case, the reset occurs at the start of state 8.<p>It looks like the display will indicate 000 for states 8 and 9. The display will indicate an increasing count during states 0, 1, 2, 3, 4, and 5. The display will be stable during states 6 and 7 since the gate is closed. The display time for the full count is only 2 seconds out of 10.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests