954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Sensor Programming

Hi there,

i m currently trying to come out with a project as below

i m trying to use a USB webcam to detect any movement

i plan to implement this into a parking system to detect wether the parking is available

is Java programming suitable for a system like that?

becuz i m running on a very low budget(how much can a student spend possible on his project) mayb sum1 can suggest me with a better h/w ?

i have considered using LED to show status of the availability but i m not sure what to use to sensor it..

any help will be appreciated a lot

justin105
Newbie Poster
9 posts since Jul 2009
Reputation Points: 4
Solved Threads: 0
 

Create a unique signal, emit it, watch for it, based on signal strength/
delay/whatever display whether there's a lack of space available.

Couple experiments to try:
http://home.earthlink.net/~lenyr/modlitbm.htm
http://home.earthlink.net/~lenyr/modlaser.htm

MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116
 

hi there,

thx for the fast reply

but i notice is all very electronic engineering is it?

i m currently a networking student..

as for my idea which is USB webcam to detect movement with php programming is it possible?

justin105
Newbie Poster
9 posts since Jul 2009
Reputation Points: 4
Solved Threads: 0
 

So you have no electronics background so you're looking for off the shelf components so as to build your project. You want to do sensor monitoring but keep focusing on a camera, which you really don't need. You in essence need to detect existence of a vehicle. The camera will be good for detecting motion. Have you investigated various security equipment available? Get an Ultrasonic detector and hook it up to a GPIO board, which is linked to your PC. The GPIO board can monitor multiple sensors, not just one. The only electronics required then would be wiring the harnesses. Though you could build an electronic circuit using a PIC but you can find the embedded board. Try www.digikey.com or www.mouser.com or a company like that!

wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
 

An IR LED and IR phototransistor will do for the car detection.
http://home.cogeco.ca/~rpaisley4/ATDetLong.GIF

You can look on http://www.ftdichip.com/ for creating a parallel or serial to USB interface.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

An IR LED and IR phototransistor will do for the car detection. http://home.cogeco.ca/~rpaisley4/ATDetLong.GIF

You can look on http://www.ftdichip.com/ for creating a parallel or serial to USB interface.

Hi Colin,

thx for ur idea

but i m a bit confused

creating a parallel or serisl USB interface for?

justin105
Newbie Poster
9 posts since Jul 2009
Reputation Points: 4
Solved Threads: 0
 

To send the data from the sensors to a PC. Isn't that what you want to do?

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 
So you have no electronics background so you're looking for off the shelf components so as to build your project. You want to do sensor monitoring but keep focusing on a camera, which you really don't need. You in essence need to detect existence of a vehicle. The camera will be good for detecting motion. Have you investigated various security equipment available? Get an Ultrasonic detector and hook it up to a GPIO board, which is linked to your PC. The GPIO board can monitor multiple sensors, not just one. The only electronics required then would be wiring the harnesses. Though you could build an electronic circuit using a PIC but you can find the embedded board. Try www.digikey.com or www.mouser.com or a company like that!

Hi there, the reason i wanted to use a USB webcam is becuz i have got some source in sourceforge.net, i'll b able to reference it but is a php programming

here's the link http://sourceforge.net/projects/phpmotiondetect/

justin105
Newbie Poster
9 posts since Jul 2009
Reputation Points: 4
Solved Threads: 0
 

Since that detects any sort of motion then takes pictures, you would need to look at the pictures to be sure if there was a car in the bay.
In a project like this, you would also need sensors that indicate for sure whether there is a car. A program can then scan the lot and report the number of free spaces etc.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 
To send the data from the sensors to a PC. Isn't that what you want to do?

thx a lot for ur suggestion

i'll try to do see what i can do and keep u updated incase i need any help

justin105
Newbie Poster
9 posts since Jul 2009
Reputation Points: 4
Solved Threads: 0
 
Since that detects any sort of motion then takes pictures, you would need to look at the pictures to be sure if there was a car in the bay. In a project like this, you would also need sensors that indicate for sure whether there is a car. A program can then scan the lot and report the number of free spaces etc.

hi Colin

regarding the diagram on http://home.cogeco.ca/~rpaisley4/ATDetLong.GIF

tat's an example for setting the IR to send data out?

can i know wat's the basic h/w i need for it?

justin105
Newbie Poster
9 posts since Jul 2009
Reputation Points: 4
Solved Threads: 0
 

That's all that's needed for the sensor. The IR LED is on constantly. The output is taken from the collector of the phototransistor, which acts as a switch. When an object blocks the IR light, the phototransistor is off and the output is HIGH. When there is nothing in between, it's on and the output is LOW.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

Indoor or outdoor parking lot? Sunlight washes out infrared!

Feel like digging up a parking lot, then halleffect sensors. A single loop will detect motion of magnetic metal. A double loop acts as a metal detector.

Pressure sensors.

Infrared - washed out by sun.

Ultrasonic - Can detect distance to ground, if short then being blocked then highly likely a car parked there.

Camera - Will need pattern matching to not shading difference to detect motion, etc. (Think MPEG MacroBlocks). Are pixel blocks being disrupted into a parking stall without going out? And what about those overline parkers?

First problem is the sensor. Work on it first!

Hint: There's a reason automated parking lots use choke points with vehicle counters.

wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
 

If it's just a proof of concept project, and you're not going to be near a car park. Then IR is fine.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

ya is just a proof of concept idea

so here's what i will do

a IR transitor and one receiver tat's constantly on, once a object block it, the receiver will send out the signal right?

here's the problem.. how should i capture the signal and send it to the pc? as far as i know the FTDI link and USB thingy given by Colin seems bit complicated is it?

my idea is to add in an IC with calculating the counter programmed in it and send it to the PC

i planed to use rs232 to send the signal to the PC, but the problem is wat type of signal is it? how do i determine the type of signal?

as far as i understand the signal will be determine by the programmed in IC is it?

justin105
Newbie Poster
9 posts since Jul 2009
Reputation Points: 4
Solved Threads: 0
 

The phototransistor is just a switch, the output is either the positive supply or ground. You could program a microcontroller to read the outputs and send serial data to the PC's serial port.

The FTDI devices are just a simple way of creating a USB interface.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

ya tat's what i m planning to do.. i haven figure out what should i do when the signal is transfer to the PC.. mayb VB or C++ to program a calculation and display

i m trying to get the h/w and try to get the signal to the pc now, tat's the stage i m now

justin105
Newbie Poster
9 posts since Jul 2009
Reputation Points: 4
Solved Threads: 0
 

RS-422 or RS-485 would be an appropriate serial connection. Handles distance. Since it sounds like you're putting a processor (may I recommend a PIC) directly attached to the sensor(s) you may consider putting an LED on an output driver as well. You can self test by toggling the LED on and off and monitoring the input sensor.

wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
 
i m trying to get the h/w and try to get the signal to the pc now, tat's the stage i m now


So you've experimented on a breadboard and observed a working design; first, before taking the leap of hooking it up to the PC?

MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116
 

Have you thought of using a photo cell(or a solar cell) and a laser(visible or invisible)? It can also be used to detect movements. If it suits your needs, then programming and other things can be so much easier!

Just a thought.

djextreme5
Junior Poster
104 posts since Mar 2009
Reputation Points: 76
Solved Threads: 6
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You