I'm working on a new project, a pc based home security system which utilizes the lpt1 port to control locks, and read sensor inputs. If it is possible,
This sounds possible and doable.
1. how many input and output devices would I be limited to?
A normal PC parallel port has total 12 outputs and 5 inputs.
This is what is it normally used for. Some of those outputs can also be used as input if needed and you have suitable pritner port hardware.
2. Is there any way to expand the number of I/O devices ?
Here are few options:
Get another parallel port and use it for more lines.
Use the input/output pins available on the serial ports for some extra controls and inputs.
Use joystick interface button inputs as extra inputs.
Add some suitable multipexing electronics that allows several output pins to control which set of input signals are connected to input pins at one time. Needs some extra hardware.
Use a commercial industrial I/O card/module to implement the number of I/O lines you need. There are cards that connect to PCI bus. There are modules that connect to USB bus. There are commercial industrial I/O modules/controllers that can be connected to PC through serial port, USB, Ethernet etc..
3. any other helpful suggestions/links/tips?
Hardware tips:
Remeber that PC parallel port is quite sensitve device that can be easily damaged by feedign to high voltage to it, by surges etc.. And that low voltage quite high impedance inputs on the port can easly pick up interference if wired to logn wires.
I strongluy recommend thinking of proper interfacing electronics between your sensors and the PC parallel port to make interfacing reliable and safe for port. Adding overvoltage protection using zeners+resistors is one option. Another option to consider strongly is to use suitable signal isolation between port and the extra electronics: optocouplers and relays (both traditional and SSR devices) are good for this.
I also would like to implement a mobile phone alerting option which automatically sends sms messages when the sensors are triggered.
If you have Nokia cellular phone to connect to the PC, then check
www.gnokii.org for tools to communicate with the cellular phone connected to PC.
Many cellular phones nowdays use AT commands (like modem control commands) to send SMS messages and do other things. If the cellular phone is connected to serial port (or USB interface that looks like virtual serial port) then accessing phone might just take sending right commands to it.
Because different phones are somewhat different how to interface them, if you want to build universal system, it might be a good idea to separate the actual your application program and phone accessing.
Do thigns for example in such way that that when your alarm program need to send SMS, it calls a named external program (for example command line is given as software configuration option) to send the actual SMS messages (your application gives message to that program). In this way you can easily change the controlling part as your phone changes.
[quote]I'm working on a new project, a pc based home security system which utilizes the lpt1 port to control locks, and read sensor inputs. If it is possible, [/quote]
This sounds possible and doable.
[quote]1. how many input and output devices would I be limited to? [/quote]
A normal PC parallel port has total 12 outputs and 5 inputs.
This is what is it normally used for. Some of those outputs can also be used as input if needed and you have suitable pritner port hardware.
[quote]2. Is there any way to expand the number of I/O devices ?[/quote]
Here are few options:
Get another parallel port and use it for more lines.
Use the input/output pins available on the serial ports for some extra controls and inputs.
Use joystick interface button inputs as extra inputs.
Add some suitable multipexing electronics that allows several output pins to control which set of input signals are connected to input pins at one time. Needs some extra hardware.
Use a commercial industrial I/O card/module to implement the number of I/O lines you need. There are cards that connect to PCI bus. There are modules that connect to USB bus. There are commercial industrial I/O modules/controllers that can be connected to PC through serial port, USB, Ethernet etc..
[quote]3. any other helpful suggestions/links/tips? [/quote]
Hardware tips:
Remeber that PC parallel port is quite sensitve device that can be easily damaged by feedign to high voltage to it, by surges etc.. And that low voltage quite high impedance inputs on the port can easly pick up interference if wired to logn wires.
I strongluy recommend thinking of proper interfacing electronics between your sensors and the PC parallel port to make interfacing reliable and safe for port. Adding overvoltage protection using zeners+resistors is one option. Another option to consider strongly is to use suitable signal isolation between port and the extra electronics: optocouplers and relays (both traditional and SSR devices) are good for this.
[quote]I also would like to implement a mobile phone alerting option which automatically sends sms messages when the sensors are triggered. [/quote]
If you have Nokia cellular phone to connect to the PC, then check http://www.gnokii.org for tools to communicate with the cellular phone connected to PC.
Many cellular phones nowdays use AT commands (like modem control commands) to send SMS messages and do other things. If the cellular phone is connected to serial port (or USB interface that looks like virtual serial port) then accessing phone might just take sending right commands to it.
Because different phones are somewhat different how to interface them, if you want to build universal system, it might be a good idea to separate the actual your application program and phone accessing.
Do thigns for example in such way that that when your alarm program need to send SMS, it calls a named external program (for example command line is given as software configuration option) to send the actual SMS messages (your application gives message to that program). In this way you can easily change the controlling part as your phone changes.