Electronics > Projects, Designs, and Technical Stuff

Hacking computer interface to random electronics

(1/1)

tribat:
So you have a PIR motion sensor lamp ( http://www.dealextreme.com/details.dx/sku.16803 ) that you want to hack with a computer interface. Meaning the computer can read the state of the lamp, if its on (sensing motion) or off (no motion).

Another thing I would like to hack with computer interface is one of those RF Relays that come with a 2 button remote that can open and close the relay. How would you interface those two buttons from the remote to a computer?

There are probably a million ways to do those things but I'm looking for a simple and cheap way of doing it.

tyblu:
Easiest and simplest would be to wire it to a key on your keyboard through a level-shifter. Looking for something a bit more professional, like RS232, ISA, USB, PCI(e)? You may be able to use RS232 without an intermediary, but the others require packetization. Actually, not really sure about ISA.

Psi:
Easist way i reckon would be the printer port (assuming you have one)
There is plenty of digital I/O there, your application just needs to read the address (NOTE, your application will have to tell windows xp/vista/7 to allow your application direct I/O access).

also, its a good idea to optoisolate the printer port I/O, otherwise you may blowup the port.

Ferroto:
The most common "first" project with a parellel port is to make a 7-segment display. With the parallel port you have 8 wires for the 8 bits. You can simply wire those 8 wires up to a seven-segment display. Each bar in the display is an LED, that's 7 led's plus the decimal point which is the 8'th digit. The rest is software which I can't help out with unfortunately :P

williefleete:
yes parallel ports are good, you got 8 outputs, and if you can read the status lines, quite a few inputs as well
i have delved in this area (at least the parallel output side of things) i might have some code lying around for VB and some dll's that can control IO ports, stick something like a ULN2003 or similar (with 8 outputs) and use some opto-isolators if its gonna be driving more than logic level or different potentials etc, for LEDs and transistors you can drive them with no more than a current limit resistor in series

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod