…生活與工作…個人的生活雜記….

紅外線轉發器(IR Repeater)

不必為了搖控器控制不到內部機器的問題傷腦筋

Ref by http://www.cedarnet.org/smartware/Hardware/IR_Repeater/

and

wireless ir repeater

http://www.topdz.com/?p=682

How it Works:

Signal Detection

Much of the work for this circuit is detecting the IR data stream from your remote. And, this is easily done with an IR detector module. The IR data, as it is received, is a modulated signal. This modulation aids the detector in rejecting false IR signals. The modulation frequency varies, but in the case of my remotes, it was about 56 kHz. This makes is easy to reject sunlight, 60 hz lamps, and fast moving kids. And all of this is taken care of by the IR detector module. The IR detector is a pretty sensitive device, and so it has a metal frame that should be connected to your circuit ground. This helps to shield it from picking up stray noise and trying to pass it on through to your equipment as a valid signal. Ideally, if you made a circuit board, it would have a good ground plane and this shield would be attached to that.

Here’s a simplified view of these signals. The first signal shown represents the IR stream being modulated at 56 kHz and sending a binary data stream of 1-0-1-0-1. The IR detector will detect this modulated burst, and produce a demodulated output as shown in the second waveform. Note that the demodulated output is active low (low when the IR is being received). This is shown as it comes out of the IR detector module on pin 1.

Remodulation

From here, let’s skip ahead a moment to the 555 timer. This is wired to act as a gated oscillator. When pin 4 (the /reset input) is high, the oscillator is on and the output is at 56 kHz. The configuration with the very small resistor from pin 7 to pin 8 gives us close to 50% duty cycle, which seems to work best for the IR receivers I tested with. We don’t need to be exact, so this approach works just fine. Unfortunately, the IR detector output is active low, and we now need an active high to control the 555 timer. So, we need the inverter function performed with the first of the two 2N4401 transistors.

Tuning

If you need to tune the frequency of the timer, note on the schematic that you can put a jumper from the base of the 2N4401 to ground, and this will cause the 555 to free run. Now, you can tune the frequency by changing the 89 k resistor (between pin 6 and 7 of the 555), and/or the 100 pF capacitor (from pin 2 of the 555 to ground). But try to keep about a 20:1 ratio (or higher) as I did for the 89k and the 5k, to keep it reasonably close to a 50% duty cycle.

The output signal from the 555 is on pin 3. This is a modulated signal, just like that that shown in the waveform diagram above. From here, it is routed to two places. One is to a visible LED that should be mounted where you can see it when you operate the remote. This lets you know that it saw your button press. Since a 555 timer can sink and source quite a bit of current on pin 3, we only need a current limit resistor. The 180 ohms shown won’t make for a very bright LED, but you don’t really need a distraction do you?

Power Amp

The output from the 555 also goes to our IR emitter via the power driving transistor (also a 2N4401). The 5 k resistor in base drive will set the base current to just under 1 ma. With a gain (hfe) of about 100 in this transistor, this gives us capability for about 100 ma in the collector circuit. With the 5 v supply, minus the 1.6v drop for the IR LED, and about .1 v for the transistor saturation, we have 3.3v across the 39 ohm, for just under 100 ma. The LED is rated to handle that at this duty cycle, and as it turns out this is a good match for the wall wart transformer I had handy.

The IR LED is remote from the rest of the circuit, plugging in via P1. You might note that I kept the 39 ohm resistor in the box for a couple of reasons. First, it was easiest to mount since I had the small perf board in there. Second, and perhaps more importantly, the plug and jack I used is a common type, and will momentarily short out as you insert and remove the plug. If the resistor weren’t in the box, always in that circuit, then you could destroy the drive transistor simply by plugging the circuit in live. While most equipment says you should only connect it while turned off, I prefer to design circuits that withstand the more common usage of connection on the fly. Basically, I like to build things only once!

You can see it in the box and out of the box after assembly. And that about sums it up, so dig around in your junk box and come up with a few parts. Nothing is too critical in the design so with a little persistence, you should be able to make it work. I hope you enjoy building this just like I did!

Parts list

  • IR Receiver module from Radio Shack – $ 3.75
  • IR Emitter (from Radio Shack) – $ 1.50
  • Small box (from Radio Shack) – $ 2.00
  • 78L05 regulator (from Radio Shack) – $ 1.75
  • Scraps of perf-board – junk box
  • 2 x 2N4401 (or 2N2222 or most any other small signal NPN) – junk box
  • Visible LED – junk box
  • 555 Timer IC – junk box
  • Bridge rectifier (or 4 diodes) – junk box
  • J1 and P1 (compatible Jack and Plug) – junk box
  • 6vac 120 ma Power supply matching J2 – junk box
  • Miscellaneous R’s and C’s – junk box
  • Length of speaker cable to hook IR emitter to P1 – junk box
  • Small Infrared filter – junk box, or leave it off. It’s primarily cosmetic anyway

The bottom line is that I spent under $10 for the one in the pictures, but it could have been twenty five or so if I hadn’t had so much junk…

A few key points (and confessions):

  • My (primarily) RCA brand equipment was running at about 56 kHz, not 40. It turned out that once I tuned to 40 kHz, I could run the TV, but not the DVD or the VCR. Retuning to about 56 kHz put me in control of all the components.
  • The original web shared design didn’t work! Did I have incompatible parts? [See more about this below]
  • Not counting my time (which would have put it well over the commercial price point), I have what I want at a very low cost.
  • I’m not going to guarantee the R & C values for the frequency. Some of my junk box parts weren’t labeled very well.

Why didn’t the hobby design work (for me)?

When I built it as described at several web sites, it didn’t work! But it was the starting point for my variation. So, I thank the original authors for that. Here is the original web shared schematic (click for a larger view)

How I made it work –

  1. I read that on the web page that it runs at about 40 kHz. I confess, I had substituted some junk box components, and I didn’t run the calculations on the 555 timer circuit to see if I had 40 kHz. But without a scope, how would I know? The answer was to add more [temporary] circuits to the breadboard. I cascaded a few binary counters to the 555 output pin. Then, I unhooked the 555 reset pin from the detection circuit and grounded it. Now, my 555 was free running. On one of the outputs of the binary counters, I hooked a visible LED. It was blinking. I calculated that I should get one blink every 52.4 seconds on the 2 ^ 21 output. At this frequency, I could stopwatch time it. If I missed by 1/2 second, I’d still be within about 1%, which should be more than good enough. I was at about 30 kHz, so I changed the resistor to get to 40 kHz.
  2. It still didn’t work! I next hooked up the visible LED as shown in the schematic and it was always on! Pin 1 of the IR receiver I bought was high when the detector was covered. So, the circuit was running inverted. I rewired the first transistor into an inverter instead of an emitter follower. I suppose the one the original design used must have been inverted from that logic?
  3. It sort of worked! Ok, another junk box problem. I didn’t have 2N2222, so I substituted 2N4401 Also, I didn’t have 2.2k for the base drive, so I went with a too conservative 10 k. I admit that to discover this I resorted to borrowing a scope (I should buy one someday). With a quick scope check, it was obvious that the IR emitter drive transistor was not saturating, so the IR emitter wasn’t getting much drive. I had dropped the 100 ohm current limit resistor to 39 ohms (now the hfe calculations for the transistor would have been especially helpful).
  4. It worked better… I could control the TV reliably. But the VCR only sometimes responded and the DVD not at all. Back to the scope. This is where I discovered that my remotes were running at about 56 kHz, not 40 kHz. A little more tuning around the 555 and I was good to go. I packaged it into a small case and found an old calculator power supply to run it. Part of that repackaging was an attempt to minimize the original schematic. So, I got rid of one of the transistors, and just used the 555 output to run the visible LED.
  5. At this stage, I was using the transistors I had handy, and did some actual calculations rather than just throwing parts at it.
  6. When packaging, make the IR detector and the visible LED point out the front (but not so the visible LED feeds back into the detector). Put the jacks on the back.

Footnotes:

Confessions:

$10 to $25 This project cost me about $10 because I had a pretty well stocked junk box. It might have cost $20 to $25 if I started completely from scratch. I did discover that you can get 5 resistors from Radio Shack for about $0.50. I think the last time I bought resistors there, they were 2 for $0.25 (that was a very long time ago). I also bought a $9 bag with about 500 assorted resistors (so I can hit the right resistor value more often from now on).

Homemade IR Repeaters:

IR Wired Repeater – the most commonly discovered circuit and description. A locally replicated schematic is available here. This won’t work!

IR Remote Power Amp – hangs on your remote to give you more IR power and uses more batteries. Argh.

IR Remote Repeater – may be ok if stray IR is not a problem.

IR Wired Repeater – another bad design! The receiver may work, but look at the IR Emitter circuit. Pin 3 on a 555 timer is a driven output. In this design, we will current limit the 555 when it drives high for the IR led, and we will simply waste power when it drives low to turn it off. If the IR led (or the 555) survives very long it will be amazing!

Commercial IR Repeaters:

Powermid designed as a room to room system, requires A/C outlet for transmitter and another for the receiver. Accessories available…

ADI ir-X Transceiver is a PC peripheral. I hadn’t thought of that before, and I’m not quite ready to integrate my computer (and its too-loud fan) into the family room.