Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: superchiku on February 24, 2009, 11:07:25 AM

Title: computer to mcu wireless communication
Post by: superchiku on February 24, 2009, 11:07:25 AM
iam using a 433 mhz rf module to transfer data from pc to mcu ...now do i have to use max 232 to transfer data through the RF modules transmitter???

If yes then plzz tell me should i connect the rx part of the max 232 after ttl level conversion to the transmitter data pin.. because iam sending data from pc to mcu... via the rf module...
Title: Re: computer to mcu wireless communication
Post by: Soeren on February 24, 2009, 01:09:16 PM
Hi,

It's hard to make out exactly what you are doing or planning, but if you want to send wireless from a controller TO a PC, you need this:
Controller -> TX ~~~ air ~~~ RX -> Level converter -> PC RS232 port

If you want to transmit in the other direction, it should look like:
Controller <- RX ~~~ air ~~~ TX <- Level converter <- PC RS232 port

Did that help?  Else, please read what you wrote and change it to be a bit more unambiguous.
Title: Re: computer to mcu wireless communication
Post by: Webbot on February 24, 2009, 01:26:18 PM
Also check the data sheet for the rf module to see what voltage levels it expects to use. They may well be TTL levels (ie 5v).

Also what port are you using on your PC - an RS232 port or USB?
Title: Re: computer to mcu wireless communication
Post by: superchiku on February 24, 2009, 01:30:25 PM
sorry for the ambiguous writing...what i meant was now it is pc---->max232----->transmitter-------->air------->receiver------>rx of mcu...... now my doubt is in the max232---->transmitter part....in this case which pin of the max 232 should be connected to the transmitter..there are many t1 out ...t2 out...etc
Title: Re: computer to mcu wireless communication
Post by: Soeren on February 24, 2009, 07:39:59 PM
Hi,

It doesn't matter whether you use T1OUT or T2OUT, as long as you connect the PC's serial port TXD (Transmit Data) to the matching input T1IN or T2IN.

That said, if you're only going to send PC->µC, you could use a transistor as the level converter, as you don't really need the largest feature of the MAX232, namely the charge pump.
Title: Re: computer to mcu wireless communication
Post by: superchiku on February 24, 2009, 11:21:04 PM
if i connect t1out to the tx of pc then i should connect r1out to the transmitter data pin isnt it....??

and could u plzz pose the schematics with the transistor
Title: Re: computer to mcu wireless communication
Post by: BEAMer on February 25, 2009, 07:55:43 AM
hi,

If you are using the max232 to transmit data serially from the PC then the max acts as the reciever. so you have to use the 12th pin of the IC, that is, the R1OUT (or R2OUT).

i have used the same 433 mhz module that you are talking about, but it doesnt seem to work well with a serial data sent to it directly... a lot of noise gets added. i used an encoder - decoder pair to do it. the encoder encodes the data with some address bits (to avoid noise and interferences) and sends it 3 times. the decoder then checks the arrived data and gives the output.

But the encoder takes in parallel data and the decoder gives out a parallel data. so for  my application i used the PC parallel port and directly gave it to the encoder.

therefore the scheme is PC -> encoder -> TX -> air -> Rx -> Decoder -> MCU

These encoders are pretty cheap and are easily available. search the datasheets for HT640 and HT648L. i used these and the module works happily without any noise....!


BEAMer
Title: Re: computer to mcu wireless communication
Post by: superchiku on February 25, 2009, 11:11:01 AM
oh thanks for the help...but if i dont get the encoderss..will they really coz any big prob as iam gonna send only single characters ...
Title: Re: computer to mcu wireless communication
Post by: BEAMer on February 26, 2009, 10:53:05 AM
hmmm.. those encoders are pretty easy to get...! i dont think there should be a problem getting those encoders. just find out about its availability near your place.
because those encoders and decoders are worth using in the circuit..   :)


BEAMer
Title: Re: computer to mcu wireless communication
Post by: superchiku on February 26, 2009, 11:36:04 AM
problem is the reciever circuit is already done...getting the encoders and decoders would mean changing the circuit....if i try to remove all kinds of cellphones and radio etc...then will it be still having noise...
Title: Re: computer to mcu wireless communication
Post by: Soeren on February 26, 2009, 02:34:32 PM
Hi,

if i connect t1out to the tx of pc then i should connect r1out to the transmitter data pin isnt it....??

Sorry for the error in my earlier description.
You should of course connect the TXD of the PC's RS232 port to R1-in and R1-out to the logic level input of the transmitter.

and could u plzz pose the schematics with the transistor

Sure: http://That.Homepage.dk/PDF/RS232-TXD_to_Logic_Level.pdf (http://That.Homepage.dk/PDF/RS232-TXD_to_Logic_Level.pdf)
Title: Re: computer to mcu wireless communication
Post by: airman00 on February 26, 2009, 05:12:42 PM
I actually made a USB to RF dongle. Its going to be sold in about 3 months.
Heres a picture:
(http://narobo.com/products/USB_RF/transmitter.jpg)

What I did was as follows:
FT232 to convert USB to TTL , and I used a LT1073 to step up the 5V to 12V so I can power the transmitter with maximum power
Title: Re: computer to mcu wireless communication
Post by: superchiku on February 26, 2009, 09:49:29 PM
is it r1 in r1 out or t1out ---r1out
Title: Re: computer to mcu wireless communication
Post by: superchiku on March 06, 2009, 02:00:57 PM
can i know the schematics for conneting the encoder and decoder to the transmitter and receiver repective.y
Title: Re: computer to mcu wireless communication
Post by: BEAMer on March 07, 2009, 10:35:33 AM
Hi,

I dont have a circuit, i just followed what was given in the datasheet. Just read the datasheet  and in that an application circuit is given. just wire it up as it is given in the application circuit...

Encoder : HT640

Decoder : HT648L

BEAMer

Title: Re: computer to mcu wireless communication
Post by: superchiku on March 07, 2009, 10:52:11 AM
actually i went through it...u dont need the encoder if u are sending data diretly via the uart...and i think iam onna do that.....if u are sending parallel data ten u ned the encoder
Title: Re: computer to mcu wireless communication
Post by: BEAMer on March 07, 2009, 11:27:55 AM
yeah you are right...! i tried sending serial data through my controller to the tx but it didn't work out... as i told you i was getting lot of noise... there was some problem with  the baud rate of the microcontroller and the baud rate of the transmitter module. (The module works at a very low data rate)...

You just try it out and please do tell me.... i might have gone wrong somewhere also  ::)


BEAMer
Title: Re: computer to mcu wireless communication
Post by: superchiku on March 07, 2009, 11:43:09 AM
u hve to use max 232 level converter when u do any kinda of interfacing with the computer....and yes he baud ratehas to be synchorinized....i try to use baud rate for 38400...gives optimum performance...
Title: Re: computer to mcu wireless communication
Post by: BEAMer on March 08, 2009, 05:25:17 AM
oh... so you mean its working??  :o


BEAMer
Title: Re: computer to mcu wireless communication
Post by: superchiku on March 08, 2009, 08:34:33 AM
ya but  need to attach seris resisitors ...iam till getting sum probs...see there can be many causes like the start bits an stop bits...the parity they may not be registered correctly
Title: Re: computer to mcu wireless communication
Post by: BEAMer on March 08, 2009, 09:12:02 AM
where do you have to atach series resistors?

Actually i wrote a program for the PIC microcontroller to send my name serially, char by char (a wired channel using the max232) and i was viewing it in the hyperterminal. it was displaying as programmed.. then what i did was, i cut the wired channel and made it wireless with these modules (max232 was still there).. then when i ran the same thing, i  was getting my name but in between there were some random characters. i even changed the baud rate to synchronize with the baud rate of the module but the same problem was there...

the USART peripheral of the PIC will automatically insert the start/stop bits when i configure it for asynch mode and i have disabled parity....

if you get it working, do let me know...

BEAMer

Title: Re: computer to mcu wireless communication
Post by: superchiku on March 08, 2009, 09:24:38 AM
iam sending fromp to mcu ...and ill be doin it through java lets see wat happens//...
Title: Re: computer to mcu wireless communication
Post by: BEAMer on March 08, 2009, 11:20:07 AM
yeah okay  ;D
all the best!!!
Title: Re: computer to mcu wireless communication
Post by: superchiku on March 08, 2009, 01:24:33 PM
changed my min now iam gonna use vb2008...coz javax.comm is no supported in winows platform nemore