943,923 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 9781
  • C RSS
You are currently viewing page 3 of this multi-page discussion thread; Jump to the first page
Apr 18th, 2009
0

Re: DEtails .....

owk ... den let me give u a bit more details regarding the project

i am building a multilayered car park model.now it will be totally an automatic one.The basic idea is i will use file handling in C programming to allocate spaces for car parking.When a car would arrive.the program would check for vacant slots in the car park nd would allocate it a vacant space.

now this is where the IR comes into play.Each parking space would have a wall behind it.nd on the wall would be mounted a IR sensor and on its side a beam givin out IR (i dont know what u call these).so when the car gets parked close to the wall the IR will be refected from the car to the sensor.nd when the car will leave the sensor will recieve ne reflected signal no more.so now it would send an indication to the C program to clear that parking slot.

now i must mention this is my first year in electronics engeneering nd i am not familiar with microcontrollers.Nd other than the language C ... i know C++ and Java.So this is my entire project details.At least to demonstrate the project i need 10 parking spots with 10 IR beams.

Plzz help me out if u can.... thnxx a ton ...
Reputation Points: 5
Solved Threads: 0
Newbie Poster
parjanyaroy is offline Offline
5 posts
since Apr 2009
Apr 18th, 2009
0

Re: Send data on a serial port

..
Last edited by parjanyaroy; Apr 18th, 2009 at 7:23 am.
Reputation Points: 5
Solved Threads: 0
Newbie Poster
parjanyaroy is offline Offline
5 posts
since Apr 2009
Apr 18th, 2009
0

Re: Send data on a serial port

You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.

The output is high when an object blocks the infrared from falling
on the phototransistor or low when there is no object.

After that I'd personally go with a microcontroller and connect the ten outputs to 10 inputs, scanning them sending the data through the serial port every so often. There isn't an easier way really.
Last edited by Colin Mac; Apr 18th, 2009 at 10:03 am.
Reputation Points: 78
Solved Threads: 22
Posting Whiz
Colin Mac is offline Offline
327 posts
since Sep 2006
Apr 18th, 2009
0

Re: Send data on a serial port

Click to Expand / Collapse  Quote originally posted by Colin Mac ...
You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.
The circuit is good, but I would use a variable resistor for R2, so you can modify the detection-distance.

I've used the Sharp GP2D12 a while back in a small project I did, and I was very content with it. The only draw-back is that it outputs an analog voltage, so you would need to use 10 ADC's for 10 sensors and most (low budget) microcontrollers I've worked with only have 8 (or less).
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006
Apr 18th, 2009
0

Re: Send data on a serial port

Those seem to be range sensors though that output a voltage corresponding to the distance of the IR led?
You can get detectors with a digital output. Like the TSOP1738.
Last edited by Colin Mac; Apr 18th, 2009 at 3:08 pm.
Reputation Points: 78
Solved Threads: 22
Posting Whiz
Colin Mac is offline Offline
327 posts
since Sep 2006
Apr 18th, 2009
-1

Re: Send data on a serial port

Click to Expand / Collapse  Quote originally posted by Colin Mac ...
You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.

The output is high when an object blocks the infrared from falling
on the phototransistor or low when there is no object.

After that I'd personally go with a microcontroller and connect the ten outputs to 10 inputs, scanning them sending the data through the serial port every so often. There isn't an easier way really.
thnx a lot bro ... thnx to all of u .....
the circuit appeared simple enough ... but the thing is ... do i really have to use a micro controller ???

well in tat case .... plzzz plzz plzzz help me a bit more .... i really dont have much idea regarding ... microcontrollers(except just the knowledge tat u can program them wid WINAVR thru an USB cable nd they work as u want them to do) nd how to program them ( c'mon ... m just in my first year....started off wid electronics just a few months back) .... so .. if u could help me out in dat part i wud be grateful ..... if u can refer me a site which shows a similar circuitry ... tat will also be grt ...

thnx a ton .. once again ..
cheers ...
Reputation Points: 5
Solved Threads: 0
Newbie Poster
parjanyaroy is offline Offline
5 posts
since Apr 2009
Apr 19th, 2009
0

Re: Send data on a serial port

but the thing is ... do i really have to use a micro controller ???
Nope. You could wack them all in a multiplexer and feed it to your serial port.

And here's another link you might want to read.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006
Apr 20th, 2009
0

Re: Send data on a serial port

thanks ...
Reputation Points: 5
Solved Threads: 0
Newbie Poster
parjanyaroy is offline Offline
5 posts
since Apr 2009
Nov 23rd, 2009
0

Need C Language Help

Is there any Person who help out me to start the Programming Using C Language for the Hardware Control , Please reply me back

<e-mail snipped>
Last edited by Nick Evan; Nov 23rd, 2009 at 9:19 am. Reason: e-mail snipped
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mbit.dbms is offline Offline
1 posts
since Nov 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Need to Fix this
Next Thread in C Forum Timeline: Using pcap, dirent.h and error C2085, C2061





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC