can any one put me on the start of using serial port?
i need to know the pins and protocols to use serial port, i know alittle information
and how we configure it by using c programming language and visual c++.if there is asite to learn me using serial port from A to Z. and giving some applications.
and how we make IR remote control circuit that transmit and receive more than two signals.
can we use serial port to do that.
thank you for every body.

Recommended Answers

All 28 Replies

and how we make IR remote control circuit that transmit and receive more than two signals.
can we use serial port to do that.

Give clear specifications regarding what you want to achieve using serial port programming.

ok if we have a dc motor how to use remote control to revese its motion using two signals

Connect Signal1 to one terminal and Signal2 to the second terminal.

If Signal1 is 0V and Signal2 is 5V, dc motor rotates in one direction. If Signal1 is 5V and Signal2 is 0V, dc motor rotates in the reverse direction.

You need a receiver IC and modulate the IR signal at what the receiver is set to detect, usually between 32 and 40 kHz for remote control. You'd then need a way of decoding two data signals.
http://www.winpicprog.co.uk/pic_tutorial5.htm

thank you for your help i asked for multi signal transmission over ir , i just need to know the concept i have no application to do.

i just need to know the concept

You transmit different signals at different frequencies. One option that I earlier used is by implementing square wave generator using IC 555. At the receiver end, you can have different ICs for different frequencies like TSOP17xx (where xx is the frequency in kHz, e.g. TSOP1738 means receiver of 38 kHz).

can you give me an application circuit that demonstrates the concept using TX and RX ir based circuit

I can give you loads of links regarding the theory and its various applications. But if you'll narrow down the topic to exactly how (i.e. using what) do you want to accomplish multi-signal transmission using IR, then it will be easier for both of us.

thank you for your interest but i told you before i have no clear application ,but ok if we have akey pad with ten buttons and ir tx and at the receiver we have ten relays to be connected to ten loads how can we accomplish that.
again thank you for your help.

Without having a circuit diagram or something, and a whole bunch of other details, there isn't a lot we can say. Even if you posted it all, it would still be tantamount to us doing your homework for you.

You need to have a nice long reading session of the links posted so far and have a go at it yourself.

Then perhaps you can post some code, and perhaps a comment like "this is supposed to send TX high, but it doesn't". Now that is something we could help you with.

But comments like "there's a keypad with 10 buttons" tells us nothing.

that wasnot ahome work, it is just a hoppy and i need to learn about ir transmission and reception
that application was an idea of mine because you ask me to give an application to help me to understand the ir circuits and now when i gave you an example not a home work you tell me to do it my self, i just need to learn ir circuits so could you help me it's up to you to give me any application you want.

There's a whole bunch of information (on IR and motors) on the site I posted way back in post #2, all for the sake of you showing some effort to read it.

You're not going to learn this stuff overnight, and we're not going to post it here over several hundred messages for you to digest one bite at a time.

It's like you're incapable of helping yourself.

I mean, if you posted "I've read <link>, but "this sentence" is confusing me", that at least would show that you're showing some initiative. But all you're doing is posting the same old "help me, I'm lazy" posts.

TBH, this kind of low-level development requires a hell of a lot more enthusiasm to read up on and try things for yourself than what you're showing at the moment. You're going to need that to investigate what's happened when it all does wrong (as it will do). If the only debug you have is a flashing LED, then you've got to get creative!.

Unlike portable ANSI-C which will work pretty much anywhere, any code you produce will only work on YOUR hardware. Which pretty much means you're on your own, and all we can do is offer suggestions (rather than answers).

Do you even have a hardware kit to hand? If so, tell us which one.
And I don't mean something vague. Be specific, post URLs.

Here's another forum which has lots of info on low-level programming / hardware development.
http://www.avrfreaks.net/

commented: Exactly :) +2

hello all ...

i dunno whether this is the right place for my question ... but atleast it seems to be .... plzzz help me out if u can figure out the solution ...

m doing this project which involves sensing infra red waves .... by a lot of sensors ... now ... this is the part in which i want help ... i want a way in which .... i can ... take the input from the IR sensors through a circuit .... nd ... connect it with a port in the pc ... nd take it as input in "C" ...so that ... when a particular sensor ....senses IR .... it'll give some kind of indication in the circuit .. .which will finally make its way to my pc .... and come as some kind of indication in "C"

.. m sorry if it dosent make mauch of a sense to u .... but plzzz refer me a site if u know about one ...

thnx in advance ....

commented: ...you....fail. -3
commented: nope, it's not the right place to post your question -2

You probably don't need lots of IR sensors. You probably only need one and send different data to it. If you want to interface to the PC though its serial port, it's easiest to use a microcontroller with onboard UART. As far the PC side of things, how you read the input depends on your operating system. Can't really be anymore helpful without more info. What are you trying to do exactly. Are you just sending control signals or do you want to send data. What kind of data rate do you need, etc.

^ its presumptuous of you to tell him what his project needs or doesnt need. how do you know he's not building an array of IR detectors?

^^ if you want to connect with a commercial off-the-shelf IR sensor, its typically just three signal lines: RD (receive data), TD (transmit data), and SG (signal ground) *

use a DB-sub9 (aka DB-9) cable to connect the IR sensor to a RS-232 serial connector on the host computer. if you dont have DB-9 connectors on your computer you can use a USB - RS232 adapter, typically sold for ~$10 on any peripheral distributor's site.

you can also make your own cable if you need to, just get a female DB-9 connector for connecting to the PC (or the USB/RS232 adapter) , and connect a wire to each of the required signals: pin2=RD, pin3=TD, pin5=SG. the other end of the lines will connect to whatever connector allows you to connect with the RX , TX and GND of the IR device communication port.

if you're building your own IR sensor of of discrete and active components then you will need to use a UART in order to interface with the PC.

you will have to give more information about what you're trying to accomplish and what you've already done so far if you want more help.

one hint: please don't use abbreviations, or what you think passes as "chat speak". it's very hard to understand what you're saying.


(* note, RD/TD/SG is the standard configuration. some may also employ handshaking lines, which will use additional pins)


.

^ its presumptuous of you to tell him what his project needs or doesnt need. how do you know he's not building an array of IR detectors?

What the hell are you talking about. I said it's probable you don't need more than one receiver, not what he does and doesn't need. I don't know, that's why I am effectively asking.
It's just food for thought, you have to presume when you're not given information.

i'm sorry, what the hell do i what?

i don't know, i was just reading what you wrote.

You probably don't need lots of IR sensors.

commented: youre the one picking the fight dickhead +3

i'm sorry, what the hell do i what?

i don't know, i was just reading what you wrote.

Which I did because there's no reason I can see to use more than one IR receiver attached to a single device.

And build a IR detector out of discrete components? What kind of silly idea is that? Instead use a IR receiver IC, that has a photo-diode, high gain AGC amplifier, bandpass filter and demodulator that costs a couple of cents.

commented: i said "active and discrete" ... if youre going to pick a fight, don't quote me out of context. -1

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 ...

You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.
[IMG]http://www.reconnsworld.com/ir_ultrasonic/basicirdetectemit.gif[/IMG]
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.

You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.
[IMG]http://www.reconnsworld.com/ir_ultrasonic/basicirdetectemit.gif[/IMG]

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).

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.

You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.
[IMG]http://www.reconnsworld.com/ir_ultrasonic/basicirdetectemit.gif[/IMG]
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 ... :D

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.

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>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.