LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-10-2006, 04:43 PM   #1
brave_heart7725
LQ Newbie
 
Registered: May 2006
Location: Amman, Jordan
Distribution: RedHat
Posts: 4

Rep: Reputation: 0
Talking 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
 
Old 05-11-2006, 07:56 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
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

Last edited by Wim Sturkenboom; 05-11-2006 at 07:57 AM.
 
Old 05-11-2006, 10:13 AM   #3
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
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)?
 
Old 05-12-2006, 03:41 PM   #4
brave_heart7725
LQ Newbie
 
Registered: May 2006
Location: Amman, Jordan
Distribution: RedHat
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 05-12-2006, 04:49 PM   #5
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
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.
 
Old 05-18-2006, 07:37 PM   #6
brave_heart7725
LQ Newbie
 
Registered: May 2006
Location: Amman, Jordan
Distribution: RedHat
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 05-18-2006, 08:53 PM   #7
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
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.
 
Old 05-26-2006, 10:20 PM   #8
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
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.
 
Old 05-28-2006, 08:48 AM   #9
brave_heart7725
LQ Newbie
 
Registered: May 2006
Location: Amman, Jordan
Distribution: RedHat
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
parallel port mehro Linux - Hardware 5 01-31-2006 06:43 AM
Acessing parallel port in Linux Bondfire Linux - General 1 04-27-2005 04:01 PM
Converting a parallel port input to a usb printer via a Linux box as a print server GlamZ Linux - Software 3 10-06-2004 11:26 PM
How to get Parallel Port Joysticks (eg SNES pad) working in linux 2.6.4 kernel Tyco Linux - Hardware 1 06-06-2004 02:59 PM
linux device driver & parallel port albatros Linux - General 1 01-08-2003 04:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration