LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Parallel port interface on linux (https://www.linuxquestions.org/questions/linux-hardware-18/parallel-port-interface-on-linux-443592/)

brave_heart7725 05-10-2006 04:43 PM

Parallel port interface on linux
 
I had developed a program in C under linux to read/write from parallel port, and it works as it sends and recieves signals trough the data pins, i had developed a circuit interface to control such devices at home by making a circuit for leds, relays and actuators, till now it's really great..but the problem is how to connect a smoke detector to the parallel port throguh an appropriate interface circuitry ???? the detector works at 24 Volt C....and the parallel port accepts only 5 Volts DC.....anyone can help me by that? provide me the appropriate circuit interface between the prallel port and the smoke detector ?

I'm ready to help in C programming under linux and anything else..just ask me .

my email is tamer_cd@yahoo.com


Yours;

Tamer Qeba'i

Wim Sturkenboom 05-11-2006 07:56 AM

The safest way is probably something with an opto-coupler. Search http://www.epanorama.net/circuits/parallel_output.html for the word 4N33 and you will find a picture. The left hand side can be connected to the smoke detector, the plus at the right hand side to an input-pin on the parallel port and the min to the GND.

You might have to recalculate the 1k resistor, change it to i.e. 4k7 (as 24V is about 5 times as much as 5V, we increase the resistor by the same factor).

I think one additional resistor as well as a stabilized 5V DC power supply is required as the input pins of the parallel port might not have pullup resistors. Connect the GND of the power supply to the min at the right hand side of the 4N33. Connect the additional resistor between the plus of the power supply and the plus at the right hand side of the 4N33. A value of 4k7 to 10k will do; do not go below 1k5.

PS Not nice to say, but I don't take resposibility if you blow up something

weibullguy 05-11-2006 10:13 AM

It depends on what you are trying to do. The circuit in Wim Sturkenboom's link may or may not work. If you use that circuit in the wrong application, you will release the encapsulated smoke. Not that it means much, but I am an electrical engineer (only mentioned in a failed attempt to provide some credibility). So...

Are you trying to use the parallel port to control the smoke detector (e.g., turn it on/off)?

Are you trying to "read" information from the smoke detector into the parallel port (e.g., remotely sense a smoke condition)?

Are you trying to transfer data both direction (e.g., remotely sense a fault condition and turn off the faulty detector)?

brave_heart7725 05-12-2006 03:41 PM

Thanx for helping me in that.....but i'm trying to get a signal from the smoke detector when it detects a smoke, then i give a signal to an alarm device and relays..i have done that part..but the problem with it is how to connect the soke detector...i hope i'm not waisting your time by my request..but please supply me a sketch for the circuit....i'll be greatefully thanking you dear friends.

Yours;

Tamer

weibullguy 05-12-2006 04:49 PM

If I understand correctly, you're trying to use the computer:

1. To "read" the smoke detector looking for a positive smoke condition.

2. To actuate an alarm and relays when a positive smoke condition is detected.

You have solved the second part of the problem and are able to actuate the alarm/relays. You need a solution to the first part. The smoke detector you are using provides a 24VDC output when smoke is detected. This is the signal you wish to "read."

Do you have a schematic or sketch of the circuitry (including the smoke detector) you currently have? This would be helpful in answering your question.

brave_heart7725 05-18-2006 07:37 PM

Dear AROW;

Thanx alot for your reply
That is exactly what i meant...i had simulated the signal of the smoke detector as a switch, but now i'm going to get the real signal from the detector to be read, i have no circuit for that, the smoke detector has 4 blugin.....L1 L2 L and R ... the +ve 24 is on L1 .... the negative is on L ..and L2 to the next Detector, if it's the last detector, then an end of line resistor will be connected to R and L2,..when the detector activated by a presence of smoke...the signal will be 24 DC on the resistor, for now i've tried to use a zinner diod of 5 volt on the resistor so i got 5 volts output, and it's ok ..i had solved it finally....but if you have a safer design, really itld be my pleasure to get it from you.

Yours;

Tamer

weibullguy 05-18-2006 08:53 PM

It may take a week or two to find time, but I'll try to e-mail you something and post it in this forum for anyone else interested. If you don't get something in a couple of weeks, go ahead and bug me.

weibullguy 05-26-2006 10:20 PM

brave_heart7725,

I sent you an email with two files of a simple circuit for interfacing your +24VDC fire detector attached. The circuit should provide you with a buffered +5VDC input when it receives a +24VDC signal from the fire detectors. In addition, it requires a minimum of 3.05VDC to trigger. This should prevent noise from causing output (unless you're welding nearby).

The program I used (gEDA, which was very nice by the way) did not have a symbol for the comparator I recommend (MAX969). I have also attached the datasheet for the MAX969 so you will know which pins are which.

I did not run a SPICE simulation or prototype the circuit, so definitely check it out before you connect it to the computer.

Good luck.

Andrew

If anyone else reading this thread is interested in a copy of the schematic, let me know too.

brave_heart7725 05-28-2006 08:48 AM

Thanx alot dear....but where did you send the files? my email is tamer_cd@yahoo.com ..i did not recieve them yet...please try to send them again...thanking your effort in helping me

Yours;

Tamer


All times are GMT -5. The time now is 09:03 PM.