![]() |
David Cook ROBOT ROOM™ |
|
| home | projects | contact | copyright & disclaimer | books | links | ||
|
38-kHz IR LED Circuit
|
![]() The first project I posted to Robot Room involved a 74HC00 NAND infrared oscillator. Nine months have passed and I'd learned a lot. The power usage of my original NAND oscillator can be reduced without any loss of drive or functionality:
EVEN BETTER I wrote this web page in March 2001. The circuit presented here is perfectly good for builder the 38 kHz emitter. However, because I get a lot of questions about infrared sensors and detectors, I decided to dedicate two chapters (11 and 12) of my second book, Intermediate Robot Building, to the subject. Therefore, if you'd like more information, including an improved schematic with receivers and detectors, pick up a copy of the book. Usage The oscillator will be used to generate a square wave at a desired frequency. The wave is fed into a transistor that drives an infrared LED on and off very rapidly. Because the emissions are infrared and very fast, neither is visible to the human eye. Inexpensive infrared receiver chips are available at 36 kHz, 38 kHz, and 40 kHz. The receivers are sensitive to oscillations several kilohertz to either side, although reception distance improves with a better signal to start with. If used for object detection, the signal needs to travel the distance to the object, bounce off the object, and then travel the distance back to the receiver. So, distance becomes a factor. Because infrared receivers amplify the signal to improve detection, electrical noise generated from the oscillator can leak into the receiver and trigger a false detection. This isn't a problem for VCRs or most consumer devices as they tend to contain either a transmitter (remote control) or a receiver (CD player), but not both. Therefore, robot transmitter and receiver circuits must be carefully designed and positioned apart to be useful. Robots that chase electrical ghosts, spin in place, or jerk sporadically are initially amusing, but eventually frustrating. The lower the power of the circuit, the more likely it will be lower in noise. Also, liberal use of decoupling capacitors and metal shielding helps a lot. Greater distance between the circuits makes an enormous difference. The Popular 555 The 555 IC is an extremely popular timer. The low-power CMOS versions (TLC555, LMC555, and ICM7555) use less power than the older (555, NE555, LM555) versions and don't require a capacitor on the control pin. Although pin and functionally compatible, the component values differ between the low-power CMOS and older versions. Just for fun, I tested three different manufacturers' CMOS 555 timers. Below are the results at 38 kHz and the prices I paid.
Notice the current usage of for each of these chips is less than one milliamp! Infrared Emitter 555 Schematic A portion of the configuration presented here is similar to an example in the Maxim ICM7555 datasheet. In this circuit, the 555 is used in astable multivibrator mode. |
![]() (Note: An improved circuit with two emitters, two detectors, and two bicolor LED indicators is Figure 11-10 on page 222 of Intermediate Robot Building.) |
![]() Surface Mount Components A very small infrared circuit can be created with surface mount components. The power usage and basic functionality is the same. Theoretically the electrical noise should be reduced since through-hole leads can act as transmitter antennas. A couple of notes:
![]() I create my surface-mount boards at home. It's really not difficult. You should try it! There are a few tricks that help me... Using a toothpick, I place a small dab of silicone adhesive (which I suspect is just caulk in a smaller, more expensive tube) on each location of the board where a surface-mount component is going to be. As far as I can tell, silicone is pretty friendly compared to the usual nasty PCB chemicals. The package indicates the material is stable up to 400 degrees Celsius. The wet viscosity holds components in place but allows for nudging. The thickness is perfect for bridging the space between the board and slightly raised component backs. I then deposit each component using tweezers. After five minutes or so, the components can be soldered without them moving around. If a mistake is discovered, the component can be pulled off easily, as the silicone dries to a pliable, soft, rubbery consistency. With small components, sometimes solder bridges form and sometimes the core flux misses the mark and cold solder balls or joints form. No problem, just place some flux paste in those locations. Reheat the joints with the tip of the soldering iron and they melt to perfection. NAND Oscillator vs. 555 Oscillator In all three of the circuits I've designed over the last year, the oscillator and LED are turned off when the "disable" button is pressed. Because the IR LED is driven by a transistor in all three circuits, the frequency isn't altered by changing the desired brightness (load).
|
|
The cost of the NAND oscillator is lower, by as much as half.
It's also more likely you've got some spare NANDs lying around. The on current used by the 555 is lower -- going as low as 0.4 mA if a 10-kilohm resistor is used to drive the transistor like the NAND circuits do. It's interesting to note that the low quiescent current usage of the NAND chips (as low as 1 uA) is superior to the 555 chips (30 to 100 uA). Perhaps because the NAND isn't doing anything whereas the 555 still has a pair of voltage comparators at work. In all cases, the pull-up resistor accounts for a large portion (50 uA or more) of the disabled power usage. If the circuit is going to connect to a microcontroller or other logic chips, then the pull-up resistor may be discarded. Although current could be reduced further for all three circuits by using a timing capacitor in the picofarad range (rather than 1 nF), the frequency shifts considerably more when touched or even measured. Measuring a few milliamps of current usage is a little silly in a circuit that's going to jam 40 milliamps or more through an infrared LED. I wish I had a way to measure electrical noise, because I suspect the 555-timer chip generates less. Temperature and aging stability haven't been tested. Precision isn't an issue, as infrared receiver chips tend to be very tolerant. Anyway, all three circuits hover within better than 200 Hz of the intended frequency. Which Oscillator Is Better? The 555 circuit uses less power when turned on, but the total power usage of an infrared emitter device easily overshadows any minor power-on savings in the oscillator itself. The NAND solution is cheaper and basically as easy to construct. Obviously my optimized NAND circuit is better than my original NAND circuit. However, I can't say whether my 555 circuit is even better. Since the 555 is specifically designed for timing and since it has been widely adopted, I assume there are benefits that I haven't perceived. Most likely the ability to vary duty cycle and other versatility is the real reason the 555 is so popular. In my quest for an improved circuit, I found yet another off-the-shelf ship that is more capable and requires fewer components for the oscillator than both the 74HC00 and 555. See Chapters 11 and 12 of Intermediate Robot Building. Click here to see all projects... |