View Full Version : Using a very simple IR receiver/transmitter *now working*
ddhaaron
December 17th, 2002, 10:10 AM
Just curious if anyone has had luck using a very simple IR receiver/transmitter on the serial port, such as the one explained on this page: http://www.veg.nildram.co.uk/remote.htm
I have built two of these and am able to see the IR codes in the serialwatcher program as well as in girder; however, in girder the ir code seems to be broken into chunks rather than one sequence of ascii/hex characters & therefore girder thinks it has received 3 or 4 different commands per keypress and it is difficult to learn events.
I am using codes for a toshiba tv in my universal IR remote (6in1) with the generic serial port by Mark Fiechtner set at 9600 N81
At 9600 baud it seems my remote codes consist of E's & 0's mostly ie 0x000EE00EEEE0EEE00EEE000000 usually 29, 8 bit segments.
Not sure if I should set the fixed length to 29 characters? What is a character 4 bit or 8 bit?
Any other settings that should be set?
I think it would be cool to get this simple interface working as it is simple and very cheap to build. :)
Marsupial
December 17th, 2002, 10:23 AM
this seams interesting - what software do you need as driver?? just a plugin within girder - plain Serial?
did you built the emmiter as well?
A character (byte) is usually 8 bits.
hope this helps.
keep us informed :D
ddhaaron
December 17th, 2002, 10:36 AM
I did build the transmitter & receiver as well. Actually I used a bit of modifications so that everything was powered by the serial port. Seems to work quite well; except that I cannot convince girder/plugin to receive input correctly from the hardware. (see above where I mention one ir command being broken into 3 or 4 commands.)
Anyway, to answer your question, I am using the Mark Fiechtner generic serial plugin with girder.
Hardware,
U1 is a HDSL1001
C1 10uF Cap Electrolytic
C2 100nF Cap
R1 332 ohm resistor
D1 is a Green LED
R2 5ohm resistor
Hardware circuit
DB9 pin 2(RD) is connected to RXD on U1
DB9 pin 3(TX) is connected to TXD on U1
DB9 pin 4(DTR) is connected to anode on D1 and D1 cathode is connected to the positive side of the caps as well as pin 3(VCC) of U1 and through R2 resistor to pin8(LEDA) of U1
DB9 pin 5(GND) is connected to the other side of the caps, pin 1 (ShtDwn) on U1 and pin 5(GND) on U1
Ron
December 17th, 2002, 10:53 AM
I gave the device a quick glance and it seems that Mark's plugin is not the right one for this. The PC needs to do the decoding, and Mark's plugin assumes the decoding is done in the hardware ( It needs deterministic signals ). You might want to try the Igor plugin.
ddhaaron
December 17th, 2002, 02:06 PM
I will try the IGOR plugin although it does not have transmitting capibility or receive on RTS capiblity yet, correct?
Would there not be a way to decode the input from the remote using the scripting built into the recieve option on Mark's generic serial driver?
This would be ideal as Mark Fiechtner generic serial plugin has support for transmitting as well.
Mark F
December 17th, 2002, 02:51 PM
You could certainly try using the modem event scripting but I don't think the thread dispatch timing in Windows will allow very good resolution. Good luck and let us know if it works! :)
ddhaaron
December 18th, 2002, 10:20 PM
Mark,
:D I think I have found a way to get fairly reliable data from the "simple" reciever. Using the "serial watcher program" & applying my algorithem, I have been able to get consistant results with a toshiba TV remote and a pulsar cable remote at 9600 N81 settings by running a script each time a string is received.
:( However, I am having a problem with two error boxes that appear each time my remote transmits. Once I press "ok" to both these boxes the command I pressed on the remote is recognized and everything is 100%
The first error is
"COM error on COM2 = 8 (hex)"
and the second error is
"COM error on COM2 = 18 (hex)"
:-? What do these errors mean?
Other than these messages, I am making great progress decoding the commands. Is there a way to provide a way to turn off these errors in the plugin or is there something on the configuration end already to remove these errors
Mark F
December 19th, 2002, 03:26 AM
0x08 is a framing error.
0x18 is a framing error combined with break detected.
These are RECEIVE errors. One or more of the port properties (baud rate, parity, word size, stop bits - 9600 N81 ) are incorrect for the data presented to the receive pin on the port.
The way to remove these error messages is to correct the port properties you are using to match the incomming data or fix the hardware so it doesn't present the wrong data to the port.
ddhaaron
December 19th, 2002, 08:34 AM
Thanks for the information, I am unsure I will be able to correct the port parameters but I will try. Temperarily I have a work around to use a "no-popup" such as noads to recognize the popup window "serial" and to automatically close it the instant it opens; however, every time it briefly pops up it makes a big noise "beep-beep" which obvisously make it difficult to listen to MP3's for instance while using the remote :(
Mark,
Can you provide a version of your plugin that surpresses the error or allows a "check box" to surpress the error. (ie not reporting on the framing error) As I do not have really any "smart" hardware, I am thinking I will not be able to match the correct parameters each time with different remote protocols; however, with the script I am using with your receive window I am getting very predicatable results and am able to detect the protocol received.
You have made a really great plugin, just would like to have either a slient way or background way to report errors.
Ron
December 19th, 2002, 10:15 AM
The source code to the plugin is available on the developers page *hint hint* ;-)
ddhaaron
December 19th, 2002, 10:39 AM
Great! Thanks.. I did find the modification/hack needed to remove this message box. (simply comment out "// AfxMessageBox(strError);" line 823 in device.cpp) I will try to get this to compile tonight hopefully!
ddhaaron
December 24th, 2002, 10:02 AM
:D
I have this circuit working 100% with a small amount of LUA code doing the translation from the serial port RXD line to girder in Mark Fiechtner. One problem is that my design uses the HDSL1001 ir transciever.
:( Unfortunately this component is made for IRDA 1-2 meter spec. This seems not to be adeqate for the typical > 4 meters my couch is away from the entertainment system. doh!
Any case, I hope to get my hands on a small reciever such as the Vishay TSOP1238 that is designed with a much higher sensitivity. Has anyone had experience with this part or suggest another compact IR receiver module? :-?
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.