Send data on a serial port

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2009
Posts: 5
Reputation: parjanyaroy has a little shameless behaviour in the past 
Solved Threads: 0
parjanyaroy parjanyaroy is offline Offline
Newbie Poster

Re: DEtails .....

 
0
  #21
Apr 18th, 2009
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 ...
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: parjanyaroy has a little shameless behaviour in the past 
Solved Threads: 0
parjanyaroy parjanyaroy is offline Offline
Newbie Poster

Re: Send data on a serial port

 
0
  #22
Apr 18th, 2009
..
Last edited by parjanyaroy; Apr 18th, 2009 at 7:23 am.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 327
Reputation: Colin Mac is on a distinguished road 
Solved Threads: 22
Colin Mac Colin Mac is offline Offline
Posting Whiz

Re: Send data on a serial port

 
0
  #23
Apr 18th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,978
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 308
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Cenosillicaphobiac

Re: Send data on a serial port

 
0
  #24
Apr 18th, 2009
Originally Posted by Colin Mac View Post
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).
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 327
Reputation: Colin Mac is on a distinguished road 
Solved Threads: 22
Colin Mac Colin Mac is offline Offline
Posting Whiz

Re: Send data on a serial port

 
0
  #25
Apr 18th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: parjanyaroy has a little shameless behaviour in the past 
Solved Threads: 0
parjanyaroy parjanyaroy is offline Offline
Newbie Poster

Re: Send data on a serial port

 
-1
  #26
Apr 18th, 2009
Originally Posted by Colin Mac View Post
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 ...
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,978
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 308
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Cenosillicaphobiac

Re: Send data on a serial port

 
0
  #27
Apr 19th, 2009
Originally Posted by parjanyaroy View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: parjanyaroy has a little shameless behaviour in the past 
Solved Threads: 0
parjanyaroy parjanyaroy is offline Offline
Newbie Poster

Re: Send data on a serial port

 
0
  #28
Apr 20th, 2009
thanks ...
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 1
Reputation: mbit.dbms is an unknown quantity at this point 
Solved Threads: 0
mbit.dbms mbit.dbms is offline Offline
Newbie Poster

Need C Language Help

 
0
  #29
28 Days Ago
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 niek_e; 28 Days Ago at 9:19 am. Reason: e-mail snipped
Reply With Quote Quick reply to this message  
Reply

Message:




Views: 5620 | Replies: 28
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC