View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 12 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Aug 27, 2010 3:39 pm 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
I inherited an upgrade to an older frontend I was using, but the new machine doesn't have any serial ports, and I use a homebrew serial receiver with LIRC.

I bought a standard SIIG PCI card that has one serial and one parallel port, just got it today. Shows up as being detected:
Code:
[gjm@bedroom ~]$ dmesg | grep ttyS
ttyS0: detected caps 00000700 should be 00000100
0000:00:10.0: ttyS0 at I/O 0x9800 (irq = 19) is a 16C950/954
ttyS1: detected caps 00000700 should be 00000100
0000:00:10.0: ttyS1 at I/O 0x9808 (irq = 19) is a 16C950/954


Code:
$ sudo setserial -bg /dev/ttyS*
/dev/ttyS1 at 0x9808 (irq = 19) is a 16950/954


But I can't seem to get LIRC working again. irw doesn't give any output, nor does cat /dev/ttyS1. I altered /etc/systemconfig to have ReceiverSerialPort="ttyS1" with no effect (it was ttyS0 for the old machine).

To add to the confusion, the card has a jumper that allows you to set "serial port power" to 0v (default), 5v, or 12v.

I'm sure it's just something small I'm missing here, but I can't seem to figure it out. Any tips?

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 29, 2010 3:10 pm 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
I did a bit more troubleshooting. I know my homebrew receiver still works; I hooked it up to another desktop with an onboard serial port and tested it, it works without issue.

I noticed that this other desktop gives me +12v/-12v on several pins when I measure with a multimeter. However, the PCI card will only show +5v/-5v on those same pins, irrespective of the jumper setting.

I suspect this is important, as the homebrew receiver uses a 7805 voltage regulator, and thus needs at least about 7 or 8 volts to function.

I then discovered that the 0v/5v/12v jumper on the PCI card seems to only affect pin 9 (Ring Indicator). Rewired my receiver to use that pin for source, but still no luck.

Any thoughts?

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 30, 2010 8:33 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
+12v/-12v logic is the standard for the data pins on a serial port. Sounds like your card is using +5v/-5v logic. That is not standard, but some laptops use it and it works for most serial devices.

If you can show me the schematic of your home brew serial receiver, I can tell you how to modify it to work with your +5v/-5v card. (of course then it will be incompatible with a standard serial port).

Your jumper is just providing a steady source voltage on a single pin, so you can power external circuits with it. It may or may not be useful to you, depending on the schematic of your current receiver.

Your other option is to get a serial port card that actually uses the standard logic signals of +12v/-12v that conforms to the RS-232 standard.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 30, 2010 9:40 am 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
Hi, thanks for the reply. I'm kind of annoyed that the card is using 5v logic, I figured I was buying a real, standard, serial port, but oh well.

I'm using the simple design based on the 7805 voltage regulator seen here.

That page also notes that the circuit produces 0v/5v logic, rather than standard RS-232 levels of -12v to -3v and 3v to 12v. So that may be an issue as well.

What I was thinking was this: I can set the jumper to 5v, and get rid of the 7805 voltage regulator, just using the RI pin as the power source. Then, I was thinking about using a MAX232 IC to convert the TTL logic (0v/5v) to RS-232 levels. I was able to get several of these chips as a free sample from the Texas Instruments website, they are in the mail now.

How does that sound? Or is there a better solution?

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 30, 2010 5:28 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
langelgjm wrote:
That page also notes that the circuit produces 0v/5v logic, rather than standard RS-232 levels of -12v to -3v and 3v to 12v. So that may be an issue as well.
That is very possibly part of the issue. RS232 expects a high to be between 3 and 12V and a low to be between -3 and -12V.

The simple IR receiver you built is using 5V for a high and 0V for a low. 0 Volts is in the no man's land as far as RS232 logic levels go, so it's undefined as to whether the card will recognize it as a valid low or not.

The other problem, as you surmised is with the 7805 regulator. It needs to be fed with at least 7 volts for it to regulate it's output to 5V. So right now it's only getting about 4.3 volts on it's input (5V minus a diode drop of 0.7 volts = 4.3V) so it's output is probably less than 3 volts, which isn't enough to run your IR receiver module.

Since you already tried connecting the 7805 to your jumpered voltage (I assume you used the 12V setting) and it didn't work, That seems to leave only two possibilities.
1) 0V not being recognized as a valid low state by the card
2) Linux is not dealing with your serial port card correctly!

If you have a scope, connect it to ground and pin 1 on the 9 pin connector and see what the highs and lows are when receiving a remote signal. If you don't have a scope, just connect a multimeter to pin 9 and ground and see if the average level changes when receiving a steady remote signal (something like "volume up"). That will tell you if the IR module is doing something at least.

I think your solution of ditching your regulator and using a Max232, all driven from your 5V jumpered source should work fine.

The other way to go is to use the circuit that is posted a little farther down the same page from the one that you built
Quote:
It should be noted that the circuit described above does not fully comply to the RS232 standard as latter demands a voltage swing of at least -3V/3V for the signals. This circuit will provide approximately 0V/5V which the majority of serial ports will also accept. If you have problems with this circuit or want to use it on a serial port that does not provide enough voltage for the regulator, you should use the more advanced circuit http://www.tb-electronic.de/vdr/lirc/lirc_rx.html
This is the circuit that I used and it works fine. Although I did make a few modifications:

1)I put a 10K resistor between IC1 out and the base of T1, instead of the direct connection.
2)Changed R1 to 10K instead of 100K
3)Connected R1 and T2 collector to D1 cathode instead of D1 anode

Your idea with the Max232 is even simpler, I like it.
Keep me posted.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 30, 2010 6:17 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
I do have another idea that you could try with your original receiver. Connect the 7805's input to pin 9 on the 9pin connector, with your jumper set for 5V, not 12V. You can leave D1 in series with it.

Take what ever is connected to pin 5 on the 9pin connector and connect it to pin 3 instead.

This will move your ground reference from 0V on pin 5 to the -5V logic level on pin 3. Now your regulator will be seeing 10V on it's input compared to it's ground pin. So now the output of of IC1 (pin 1 of the 9 pin connector) should swing between -5V for a low and +5 for a high, making them both valid highs and lows.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2010 5:58 am 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
Hm, I like your second idea too. I may end up trying that while I'm waiting for the MAX232 to arrive in the mail. I'll keep you posted, thanks for the very helpful replies!

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2010 11:56 am 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
jzigmyth wrote:
I do have another idea that you could try with your original receiver. Connect the 7805's input to pin 9 on the 9pin connector, with your jumper set for 5V, not 12V. You can leave D1 in series with it.

Take what ever is connected to pin 5 on the 9pin connector and connect it to pin 3 instead.

This will move your ground reference from 0V on pin 5 to the -5V logic level on pin 3. Now your regulator will be seeing 10V on it's input compared to it's ground pin. So now the output of of IC1 (pin 1 of the 9 pin connector) should swing between -5V for a low and +5 for a high, making them both valid highs and lows.


I experimented with this strategy a bit, and it almost seems to work. The IR receiver IC is active low, so it should go down to 0v (-5v relative to computer). I don't have a scope, but I do see the voltage flicker downward on my multimeter when I hold down remote buttons.

However I can't get the pullup resistor to hold the output line at any more than about 2.5v. With the IR receiver IC disconnected, the line will be at just about 5v, as expected. As soon as I connect the IR receiver IC, however, it drops. I've tried various resistor values without much luck. Again, I can see the output voltage dip when I hold buttons on the remote, but I can't tell how low it's going, or whether the high value is being seen as valid by the port.

I also tried doing this with the card jumpered to provide 12v, and had about the same results.

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2010 12:55 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
langelgjm wrote:
However I can't get the pullup resistor to hold the output line at any more than about 2.5v.
The IR module most likely has it's own pullup resistor built in, and it is connected to the supply pin which in your case now is 0V relative to the computer. So your pullup resistor that is connected to +5V is fighting the internal one connected to 0V. Hence the approximate 2.5V output.

This is sort of a hack, but if you have nothing else to do, you could put a diode or two between the module output and R1, the pull up resistor. Cathode towards the module and anode towards R1. Start with one diode.

Each diode will let the pull up resistor pull up another 0.7 volts. So with one diode your high level will now be 3.2V and your low will be -4.3V relative to the computer pin 5. Which should meet spec. Also, maybe putting your jumper to 12V and leaving R1 at 4.7K will give you a faster rise time on the rising edge. (Can you tell I'm starting to shoot in the dark here?) The 12V setting will be ok as long as your 7805 doesn't get hot. Too bad you don't have a cheap scope, then you could tell exactly whats going on.

Careful with making the pullup resistor too few ohms, it could damage the IR module by drawing too much current when trying to pull low. I wouldn't go below 1K on the 5v setting.

Have you tried to see if you can get a mouse to work on this port in Linux? Just to prove that the card is working properly? Actually I wouldn't know how to do that myself, as my Linux skills are limited.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2010 5:15 pm 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
You seem pretty tech savvy, here is a free software oscilloscope that works on windows. It uses the sound card for it's input. I would suggest one of the line-in inputs, not the microphone input.

Caveats:
1) Sound card inputs are generally AC coupled, so you can not measure steady state DC levels. You can, however measure the overall height of rapidly changing signals, like the output of your IR module. You will be able to see if the edges are fairly square etc.

2)The plus and minus 12Volts used in this circuit are no doubt greater than the sound card input can handle. You will need to put a voltage divider on the input of the sound card before connecting it to the circuit. I would think a 10:1 reduction would be sufficient.

3)You also need to calibrate the AC sensitivity with a known peak to peak signal.

http://www.electronics-lab.com/download ... index.html


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 11, 2010 8:57 pm 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
Thanks for the reply about the software oscilloscope, I will have to have a look at it.

Things got put on hold a bit since the academic year has started up again. However, tonight I got the chance to put together a circuit using the MAX232 chip. The circuit works as expected, taking TTL logic from the IR receiver IC and giving me what looks like RS232 logic as output... a steady -8V with no input, and measuring with the meter I see that "drop" (increase) when I hold buttons down on the remote.

However, still no luck with lircd, irw, or mode2.

I managed to find a working serial mouse (confirmed working on Windows, looks like it uses the Microsoft protocol), but I have not been able to get this working on the Linux machine with the serial port card. I don't know if it's just that I'm screwing up the X configuration (can't remember the last time I had to deal with a serial mouse) or if something else is preventing this card from working at all. Anyway, I think maybe I should focus on trying to get the mouse working so that I least know the card works...

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 18, 2010 1:45 pm 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
I started a new thread specifically about the serial port card not working here.

I booted up my old machine and tested the serial mouse configuration in X, worked without issue, so the problem must lie with the card. Also while I had the old machine up I attached my new LIRC serial receiver circuit (based on MAX232) and I was able to get output from mode2 successfully, so fortunately once I get the card issue sorted out at least the new circuit should work.

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu