Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

RF module interfacing between Robot side and PC side

Status
Not open for further replies.

sysysy

New Member
Hi,

i have few doubts here want to make sure.
I am going to use RF module as my wire medium communication.

My question is in hardware interfacing,
we need a convert the TTL logic to the RS232 logic in PC side since the PC just can understand RS232 logic. To do this, we just need to use the max 232 for the PC side conversion.

But may i know in the robot side, should we use the max232 for the conversion or not before transmit out the data?

Can the TTL logic data transmit wireless? (not sure about this concept)

Hope to get some guideline here. thanks.
 
Most of those RF modules don't work with direct RS232 communication, you must use something like Manchester Encoding to send the data. And yes, on the robot side the RF module can connect directly to your uC where the decoding will take place.
 
hi,

i am attached together the simple block diagram together with this post.

anyone can provide me simple guideline to implement this? i am not sure with the hardware interfacing part yet. is it right?


Thanks.

regards,

sysysy.
 

Attachments

  • Q- block diagram.jpg
    Q- block diagram.jpg
    12.6 KB · Views: 480
There are other approaches but what you posted will work and is probably the method easiest for you. Data is sent from the computer over RS232 to an MCU which uses some form of suitable encoding (like Manchester) to send the along to the RF transmitter module. The receiver gets the data and passes it to the MCU in your robot where the data is decoded and acted upon.
 
Hi, thanks for ur reply.

May i know should i add in any decoder and encoder chip in my block diagram design for the decoding and encoding purpose?
Or this can be done juz in programming? So, that mean i dun need any hardware for the encoding and decoding part?

1 more things, i read from somewhere said that the data will be inverted after the rs232 conversion.
so if it is true, so the data that we transmit out will be in the inverted form and the receiving part juz simply receive the data without any further action in my design.
so, is it still valid?

Thanks.

Regards,

sysysy
 
The encoding and decoding is done in software within the MCUs in your block diagram. If you use a chip like the MAX232 and connect it to a hardware UART built into your MCU you have nothing to worry about or change, in most cases it will just work.
 
Hi,

Thanks for the very quick reply.

Hmmm....yaya. before that i also have this brief idea that similar to what u said.

Hmmm, my MCU will be a PIC 16f series. so in my PC side...then max232 interfacing is between the PIC USART channel and PC?
so for the receiver part, the receiver module is direct interface with the rx pin in PIC usart channel without max232 anymore.

am i correct?
 
PC->MAX232->MCU(16Fxxx)->RF Transmitter RF Receiver->MCU

You should be able to directly connect the RF modules to you PICs. If you can link to the module you plan to use I or someone else can say for sure.
 
Thanks.

Thanks a lot for the suggestion.
Hmmm...The RF module must be connect in USART channel of PIC right?

do u have any reference or tutorial for the machester encode or decode coding?
 
No. It's a easier to connect the RF module as an external interrupt. It's helps in the decoding process. RB0 on a PIC16F627 for example.

Will you be using C or Assembly? Assembly is best for accurate timing but it can be done in C if absolutely needed (you may lose reliability and/or speed).
 
Hi,

But how about for 16F877A?
The USART channel for 16F877A is on the pin RC6 and RC7 right?

I check the datasheet for 16F627, the RB0 juz simply the external interrupt pin. that mean no use USART channel.

In my case,C language will be use.

I think i am not clear about the whole illustration of this concept yet. maybe have to read more.:)

Thanks.
But i am rushing on time...because this is just one of my project part....

Hope will have more discussion with you.
 
Hi,

i have 1 more question here.

is it the RF module is not necessary interface in the USART channel but just a external interrupt I/O pin.
Any other suggestion is the better one?
 
I check the datasheet for 16F627, the RB0 juz simply the external interrupt pin. that mean no use USART channel.

Correct, that's what I said in my previous post. For the transmitter you can use practically any available i/o pin. For the receiver you want to use an external interrupt so you can act on incoming data. It's not a necessity but as I mentioned, it helps.

The only thing that will be connecting to a UART is the MAX232, and even that isn't critical. All of these tasks can be handled in software so the hardware side isn't of much concern other than the convenience of it.

This might help you if you haven't already done some searching Manchester code - Wikipedia, the free encyclopedia
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top