Micro to PC Comms Errors

Status
Not open for further replies.

Wp100

Well-Known Member
Hi,



Been trying to do a simple 24/7 serial comms between a micro and the desktop PC over a cable distance of 15 mtrs, just sending out a few simple lines of text every minute to the PC at a lowly baud rate, 9600, 1200 and even tried 300. Not sending anything from the PC.

Initially, some time ago, with a 18F Pic and a genuine FT232 module via a usb repeater cable to Putty on the PC but though it would run for a day or so, it just give serial read error and Putty stopped. Totally random times between failures.

Now have been using an Arduino Uno sending the data out via the Serial Monitor using a 15mts Cat 5 cable and a usb to rj45 adapter on each end.

However this still gives the same kind of error using the Arduino serial monitor or fed straight into Putty.

When Putty or the Serial Monitor fails, I can see the Unos serial TX led and its still flashing to show the programs still sending out the data and also have led 13 flashing to prove the very simple main loop is working ok.

I can reprogram the Uno via this cable set up without any problems, which I think is 115200 baud .
( can even upload a larger 17k program and it runs ok)


Any suggestions as to where the problem may be, or a simpler alternative method ?
 
The problem may be with Putty. Try using something else - Tera Term works well for me.

Mike.
 
Internal or external crystal on the pic18??

Edit* Scratch that... Just re-read and its the UNO you have a problem with..

There was a thread here some years back where the crystal of a uUNO was gving some issues...

I tried searching but couldn't find it..
 
Last edited:
The Pic 18F was a 4520 using internal 4mhz oscillator and think I did then also try TeraTerm with the same failure, though that was on a USB repeater cable.

Did web /arduino forum search to see if there were any such reported serial comms problems but nothing obvious.

Have just started it off again using TeraTerm at 300 baud, will see how that goes.

Assume my Cat5 Cable and RJ45 to USB Adapters should work ok at that distance; only used in a domestic environment ?

( my desktop PC is a totally different machine to the one I had when I tried the Pic18 so think I can eliminate that )
 
15mtrs is a long way for RS232... You can get USB to RS485... That will go the distance easy!!
 
I'm using a pair of these adapters on either end of the Cat5 cable.
 

Attachments

  • 000264.jpg
    14.3 KB · Views: 189
So!! recap... The distance is on the USB and not the RS232?... If so it should work ( ish ) USB also has a distance issue..
 
There's a nice simple test to do here

Connect a PC at both ends, and see if it works reliably like that - assuming it does?, then you can start looking at the PIC side.

One point, how much power do the converters take?, and can the PIC circuit provide it? - if it was marginal it might cause intermittent problems.

While I don't like to keep pushing the same solution all the time, how about a pair of HC-12 RF modules instead of the wire?.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…