Menu

#12 Problem with new audio receiver

closed-fixed
nobody
Hardware (3)
5
2011-07-21
2011-03-24
Anonymous
No

Hi,

I've been using WinLIRC with serial receiver for 4 years. Recently I found that there is a new audio receiver for WinLIRC, when I built and test the audio receiver, I found that it works, but also not working.

I can use IRRecord to create new config file with audio receiver, then WinLIRC can decode IR signal correctly by using audio receiver and new config file.

But WinLIRC fails to decode IR signal when I use audio receiver with any old config file that was created by serial receiver, or when I use serial receiver with any new config that was created by audio receiver.

In order to find out the reason, I throughly read the audio receiver web page again, and I found something suspicious. The output voltage of a typical IR receiver module is 5V when no IR signal is received. The output voltage first drops to 0V when IR signal is fired towards the receiver, then bounces between 5V and 0V, and finally returns to 5V when IR signal is removed. Unlike the waveform diagram shown in audio receiver web page which goes upward first, it should go downward first. I've attached a waveform diagram that was recorded with audio receiver plug into the onboard mic input at the rear of my computer motherboard with VIA VT1708B audio chip. I also tried with onboard Line-in and CD-in, even with a PCI soundcard with C-Media 8738/PCI-6ch-LX audio chip and an external USB soundcard with Crystal CS4228A-KS audio chip, in both Win XP/Sp3 and WIn 7, they all give the same downward waveform.

According to the audio receiver web page, WinLIRC detects the signal at a level slightly over midpoint. With the waveform flipped upside down, not only all the On's and Off's were inverted, the first pulse was also undetected. I think this is the reason why I can't use audio receiver with any old config file that was created by serial receiver, or vise versa. Although the first pulse was undetected, WinLIRC could still read the rest of the inverted pulses, so that new config file can be created and works fine with audio receiver.

To prove my theory, I tested again with a hardware inverter added to audio receiver. Now everything works fine, the waveform goes upward first, new and old config files, audio and serial receiver are now interchangeable.

But this is not the end of my test. When I plug my modified audio receiver to the onboard front mic input of my computer mother, it doesn't work again. Then I check the waveform of front mic input, I found that it goes downward first. I don't know why this is happening, maybe the VIA audio chip already has an inverter built in exclusively for the front mic input, maybe it is done by the VIA audio driver.

Since both upward and downward waveform may be recorded by different audio input, perhaps WinLIRC should add an option to let users to select whether upward of downward waveform is recorded, or let WinLIRC detect it automatically.

Best regards,
Charles Law

Discussion

  • Nobody/Anonymous

     
  • Ian

    Ian - 2011-03-24

    Hi Charles,
    I the receiver I used on the winlirc webpage, it worked fine on this pc ! Desktop pc with I think gigabyte mainboard (onboard sound). I could record configs, use pre-existing configs. But when I tried the receiver on my other pc (shuttle), it worked but it wasn't quite right. For some reason repeats were broken and that meant it wasn't detecting the gap between signals properly. When I used IRGraph to check the waveform, the signal or waveform would come out correct, but then after a period of idle, the signal would go to the max value, which was most odd. I don't really know what was causing this. For my receiver I used power from a usb cable, but I know problems can happen if the voltage varies somewhat on the cable, which can and will happen if other devices draw power.

    As for the gif you attached. It's identical to the results I got, but just yours is pulling the signal towards a negative voltage, and mine a positive. Maybe you are using a different voltage across one of them. I am not sure. Maybe it's just the hardware.

    I could probably put some code in there to detect which way around the voltage was going, and then flip pulse/space in the code.

     
  • Nobody/Anonymous

    Hi,
    Thanks for your reply, and looking forward for new version of WinLIRC that can detect waveform direction automatically.

    In the meantime, in case if someone meets the same problem as I did, I have uploaded the circuit diagram of my modified audio receiver to my web page.
    http://sites.google.com/site/chineseinput/electronics/winlirc/WinLIRC2.gif

    T1, R1 and R2 form a logic inverter. T1 can be any small signal PNP transistor. R1 also acts as volume control to avoid excessive voltage passes toward soundcard. Since it may be dangerous to feed DC signal into audio equipment, I also include a capacitor C1 to my circuit for DC isolation, although soundcard should probably have this capacitor already built in. C1 can be omitted, just connects the wiper (pin 2) of R1 to tip (left) or ring (right) of 3.5mm stereo plug.

    Charles Law

     
  • Ian

    Ian - 2011-07-21
    • status: open --> closed-fixed
     
  • Ian

    Ian - 2011-07-21

    fixed in new version

     

Log in to post a comment.