SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By rvince
#43603
Please pardon our ignorance when it comes to matters electronic. We hope this forum can point us in the right direction. We are programmers (Java mainly) who need to create hardware to detect an entry through a doorway by a person(s). Additionally, we need this to be wireless, and have it register something, (via an IP address on our network perhaps) on a realtime basis. Essentially, all we want to do is pick up that someone has entered a dooray on our network, and we can take it via software from there.

We purchased Sun Microsystem's Sun Spot Development kit, but frankly that does not have the kind of sensor we need (though, they tell us it can accomodate an IR sensor....somehow!). Ideally, we are hoping someone on this forum can tell us to buy this, that and the other thing, hook them up as so, and voila.....you'll see this packet sent to this IP address on that network. And shy of that -- any other direction you can give us would be more than appreciated. - A couple of crackerjack coders, ignorant of hardware & electronics!
By stevech
#43614
there are a zillion ways to solve this problem.. some are... (assumng a school/hobby project):

If door is closed and must open each time a person enters, a simple magnetic reed switch will do. Getting that switch into a computer is simple; see below.

If door is always open...
Motion detector focused only on doorway. Lots of these on the market.
Or an infrared beam-break sensor. Like you see in stores, beeps when beam is broken. Radio Shack has (had?) these.
Easy interface: The detector chosen has a security alarm panel interface output which is a contact closure. Wire this to the computer's serial port, connect on lead to GND, one to CTS. Software detects change of state of CTS on that port. Cheap. Or use a USB-to-serial converter if the PC has no serial port. Read the COM port that the USB adapter creates.

To network the door sensor, have the PC, above do a UDP broadcast on the LAN using a certain socket #.

More elegant, more costly: Motion or beam-break detector as above. Connect it's contact closure to...
1) Networked Print Server intended for centronics parallel printers. Connect paper-out bit of this interface to door sensor. Software would access this status change. Server sits on ethernet but computer's spooler/server is the interface, perhaps.
2) X10 "Powerflash" module wires to contact closure. It sends changes over AC power line to reach one or more PC interfaces. These interfaces include the X10 (brand) CM11A (serial port of PC), USBlinc, same but via USB. There are public domain DLLs drivers for these, such as at Homeseer.com. X10 also has a wireless motion detector that can be used. It's called the Hawkeye or EagleEye. X10.com.

A networked (Ethernet or WiFi) terminal server can be used. Connect its serial port CTS or some such to the door sensor. This creates a TCP or UDP message. Vendors: Lantronix, Digi, BlackBox, Moxa. These are $150 or so.

Lots more.
By rvince
#43675
Wow, thank you! This is exactly the kind of direction we were looking for.
By wiml
#43699
There are embedded Java modules out there ... I'm not much of a Java person, but I'm pretty sure you can buy a module with an ethernet jack at one end and a few I/O pins. Connect the I/O pins to a contact-closure type sensor, poll the state of the pin periodically from Java, and when something happens, do something on the network using the java.net classes.

Here's a comparison chart of a few embedded java modules I googled up. There are probably some others but this lists the ones I know about.