Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 14th February 2005, 07:19 AM   (permalink)
Default Baud rate transmission problem

I am using a PC to transmit data using the serial port. The signals will go through a MAX232 chip before going into the RF transmitter module that i got. At the receiver module, it is connected to a PIC microcontroller.

The PIC can't seem to respond to the RF tranmission (it was ok without RF transmission)

I tested the RF transmitter and receiver using switches, LEDs and encoder / decoder chips and it was working.

Using:

Transmitter AM-RT4 http://www.farnell.com/datasheets/33590.pdf

Receiver AM-HRR3 http://www.farnell.com/datasheets/33591.pdf

So is the problem something to do with the baud rate? The transmission baud rate is currently 9600. According to the transmitter datasheet, it can only accept data rates of up to 4000Hz. The receiver can have data rate of only 2000Hz. Is this enough for a 9600 baud transmission?
Spectacular Butter is offline  
Old 14th February 2005, 08:00 AM   (permalink)
Default

try dropping down the baud rate , it couldent hurt..
from what i see your reciever is capable of 4800 baud ..
williB is offline  
Old 14th February 2005, 08:33 AM   (permalink)
Default

Quote:
Originally Posted by williB
try dropping down the baud rate , it couldent hurt..
from what i see your reciever is capable of 4800 baud ..
May i know you came to the conclusion that it might be capable of up to 4800 baud? thanks
Spectacular Butter is offline  
Old 14th February 2005, 09:38 AM   (permalink)
Default

Quote:
Originally Posted by Spectacular Butter
Quote:
Originally Posted by williB
try dropping down the baud rate , it couldent hurt..
from what i see your reciever is capable of 4800 baud ..
May i know you came to the conclusion that it might be capable of up to 4800 baud? thanks
It usually tells you in the spec!.

But you should be aware that generally you can't send plain RS232 via these radio modules, you need some kind of encoding (None Return to Zero - NRZ) for it to work.

I have done it (for a crude example), but I had to invert the RS232, as the modules won't transfer a continuous high level (as RS232 sends in between bytes). You can buy more expensive modules which provide the encoding/decoding in the modules (usually with on-board PIC's) - these allow standard RS232 to be sent and received.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 14th February 2005, 10:55 AM   (permalink)
Default

http://www.dutchforce.com/~eforum/in...topic=2403&hl= There is also a minimum data rate.
FRIED is offline  
Old 14th February 2005, 11:32 AM   (permalink)
Default

From a quick reading of the datasheets it infers that you can connect a TTL/CMOS level signal directly to the transmitter module and it will be transferred to the output of the receiver. You have demonstrated this with your switches and LEDS. An external modem should not be necessary.

The receiver is stated to allow a signal of 2000hz. This is your problem if running at 9600 bits/sec.

Consider a data signal with alternating 0 1 0 1 0 1 etc.
This is a squarewave with a frequency of half the bit rate. so a 9600 bps signal will be equivalent to a 4800hz square wave.
To transmit this you need AT LEAST 4800 hz frequency response through your system.

Try turning your speed down to 1200 bps and try again, it should work ok.
When you have that working, try turning the speed up. I guess it will stop working around 4000 bps (+/- a lot!).


JimB
JimB is online now  
Old 16th February 2005, 04:59 PM   (permalink)
Default Re: Baud rate transmission problem

Quote:
Originally Posted by Spectacular Butter
I tested the RF transmitter and receiver using switches, LEDs and encoder / decoder chips and it was working.
Do I see a deliberate mistake here ? I would love to know what these chips were ...

If the radio link can cope with 50 to 2000 Hz then I suspect it will need more than a 'simple' data stream to be successful. I have a hunch you will need something along the lines of a modem at each end to turn data into tones (encoder / decoder?), transmit two tones and then decode them back to data.

If I am right then your data rate may end up below 1200 baud before it works reliably.

You also mentioned a MAX232 line driver - NO !
__________________
I need a memory upgrade ...
My head is full !
mechie is offline  
Old 19th February 2005, 10:20 AM   (permalink)
Default

You probably want to get the RF600T from the same manufacturer as your TX/RX modules. Here's the link:

http://www.rfsolutions.co.uk/acatalo...ceiver_IC.html
jfunkie is offline  
Old 21st February 2005, 07:33 AM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
But you should be aware that generally you can't send plain RS232 via these radio modules, you need some kind of encoding (None Return to Zero - NRZ) for it to work.
May i know how did you implement the NRZ encoding?

I tried with baud rates as low as 300 but it still won't work. It displays lots of weird symbols and characters when i just send an ASCII code.

P.S: Is it just me or is the forum server facing problems because it seems to be down quite often
Spectacular Butter is offline  
Old 21st February 2005, 09:49 AM   (permalink)
Default

Quote:
Originally Posted by Spectacular Butter
Quote:
Originally Posted by Nigel Goodwin
But you should be aware that generally you can't send plain RS232 via these radio modules, you need some kind of encoding (None Return to Zero - NRZ) for it to work.
May i know how did you implement the NRZ encoding?
The usual method is Manchester coding, a web search will provide details, but actual code seems fairly thin on the ground!. I keep meaning to have a play with it, but I've not got round to it yet!.

Quote:

I tried with baud rates as low as 300 but it still won't work. It displays lots of weird symbols and characters when i just send an ASCII code.
As I said previously, you can't send RS232 over these radio links - if you invert it at both ends, it will then work to some extent (but it's somewhat crude!). Using a lower baud rate with standard polarity RS232 will just make it worse!.

Quote:

P.S: Is it just me or is the forum server facing problems because it seems to be down quite often
Yes, I find it's down quite a lot as well!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 23rd February 2005, 09:17 AM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
It usually tells you in the spec!.

But you should be aware that generally you can't send plain RS232 via these radio modules, you need some kind of encoding (None Return to Zero - NRZ) for it to work.

I have done it (for a crude example), but I had to invert the RS232, as the modules won't transfer a continuous high level (as RS232 sends in between bytes). You can buy more expensive modules which provide the encoding/decoding in the modules (usually with on-board PIC's) - these allow standard RS232 to be sent and received.
Would it make a difference if i send the PC serial data to a PIC after RS232/CMOS conversion and then the PIC will send the data through the RF into another PIC to process the data. Would this work? (Currently i don't have another PIC to test this out)

The project in this link seems to be able to send serial data in this way: http://www.seattlerobotics.org/encod...robarnold.html
Spectacular Butter is offline  
Old 23rd February 2005, 10:03 AM   (permalink)
Default

Quote:
Originally Posted by Spectacular Butter
Quote:
Originally Posted by Nigel Goodwin
It usually tells you in the spec!.

But you should be aware that generally you can't send plain RS232 via these radio modules, you need some kind of encoding (None Return to Zero - NRZ) for it to work.

I have done it (for a crude example), but I had to invert the RS232, as the modules won't transfer a continuous high level (as RS232 sends in between bytes). You can buy more expensive modules which provide the encoding/decoding in the modules (usually with on-board PIC's) - these allow standard RS232 to be sent and received.
Would it make a difference if i send the PC serial data to a PIC after RS232/CMOS conversion and then the PIC will send the data through the RF into another PIC to process the data. Would this work? (Currently i don't have another PIC to test this out)
There doesn't seem much point in doing that, if you're using a hardware UART simply add a simple transistor inverter between PIC and TX (or MAX232 and TX, if using a PC), and between RX and PIC.

Quote:

The project in this link seems to be able to send serial data in this way: http://www.seattlerobotics.org/encod...robarnold.html
Yes, I did something similar a number of years ago (see http://www.lpilsley.co.uk/cybot/rx_picboard.htm), which is how I know about the inversion problem.

The link you posted solves the problem the same way I did, by using a software UART (there is no hardware one in the F84). By using a software UART you can invert the serial data in the software - if you use a hardware UART you can't do that!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 23rd February 2005, 03:10 PM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
I have done it (for a crude example), but I had to invert the RS232, as the modules won't transfer a continuous high level (as RS232 sends in between bytes). You can buy more expensive modules which provide the encoding/decoding in the modules (usually with on-board PIC's) - these allow standard RS232 to be sent and received.
I dont really get it. By inverting the RS232 we would get a continous low level signal. Would that help? Usually encoding is perform to minimise DC signals. I dont see how it would make any difference
fabbie is offline  
Old 23rd February 2005, 03:24 PM   (permalink)
Default

ok i think i beginning to get what u mean. So is it something like the picture below?


So the problem is caused because the signal will have a sequence of highs until the next byte of message is sent. These highs will cause problems in the transmission (synchronization??). So we need to invert the signals at transmission and then invert back at the receiver side to eliminate these continuous highs.

Am i correct on this??

Really thanks a lot. This is a real mystery problem to me until now... i think
Attached Images
File Type: gif seriallink.gif (5.1 KB, 1045 views)
Spectacular Butter is offline  
Old 23rd February 2005, 03:39 PM   (permalink)
Default Re: Baud rate transmission problem

Quote:
Originally Posted by Spectacular Butter
So is the problem something to do with the baud rate? The transmission baud rate is currently 9600. According to the transmitter datasheet, it can only accept data rates of up to 4000Hz. The receiver can have data rate of only 2000Hz. Is this enough for a 9600 baud transmission?
Since the transmitter can accept a 4Khz rate and the receiver can only accept a 2Khz rate, I think you wont get any better than a 2Kbps (Kilo Bits per second). Let's ignore the 9600, because 9600 is too much for these devices.

You can either set your connection speed to 2Kbps or change your FM receiver to 4Khz so that you can get a 4Kbps data rate.

By the way, I take that "whatever" baud equals "whatever" bits per second, but baud rate doesn't always mean bits per second.
mstechca is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:34 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker