Author Topic: Hacking computer interface to random electronics  (Read 3186 times)

0 Members and 1 Guest are viewing this topic.

Offline tribatTopic starter

  • Contributor
  • Posts: 19
Hacking computer interface to random electronics
« on: December 22, 2010, 04:47:54 am »
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.
 

Offline tyblu

  • Frequent Contributor
  • **
  • Posts: 287
  • Country: 00
    • blog.tyblu.ca
Re: Hacking computer interface to random electronics
« Reply #1 on: December 22, 2010, 05:20:58 am »
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.
Tyler Lucas, electronics hobbyist
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12691
  • Country: nz
Re: Hacking computer interface to random electronics
« Reply #2 on: December 22, 2010, 09:04:47 am »
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.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Ferroto

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: ca
Re: Hacking computer interface to random electronics
« Reply #3 on: December 22, 2010, 11:28:00 pm »
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

 

Offline williefleete

  • Regular Contributor
  • *
  • Posts: 109
  • Country: nz
Re: Hacking computer interface to random electronics
« Reply #4 on: December 24, 2010, 03:12:56 am »
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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->