navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 23, 2012, 04:57:07 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: 1 [2]   Go Down
  Print  
Author Topic: cheap ethernet box to host owserver  (Read 2739 times)
EccentricAnomaly
Guest
« Reply #15 on: February 01, 2011, 02:16:39 PM »

Another little wrinkle is that 'high' bits are normaly sent as 0V and low as +V (IIRC), so thinking about 'too many zeros dragging the voltage down' is probably backwards.

Here's a little reference on the RS232 and TTL interpretations of signal levels which might be useful.  Yes, it could be a case of 'dragging the ground voltage up' or something.  It's the sort of thing best debugged with a storage scope rather than over the internet, though.
Logged
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #16 on: February 01, 2011, 10:57:40 PM »

EA, Wookey,

Thank you for your continuing support. You might have seen that I also started a new thread, describing plan B (1-wire shared with ethernet LAN in one cable).

So, tonight I did a slightly larger and more structured experiment (EA, I agree, an oscilloscope would be a very useful addition to the toolkit.)

As before, I set-up both serial ports identical,  all parameters to "-" (minus), except for cs8 hupcl cread clocal.
Then I created two files, and filled one with 0x00, the other with 0xFF, and put a string of ascii charcters "1234567890" at the end.
"sz" is not available on OpenWRT (well, couldn't find it), so I used "dd" to copy each file to /dev/ttyS0

I have two level-shifters. One is a Nokia DLR-3P cable, which as far as I know uses a MAX3232 chip, and the other is a home-made PCB with a MAX232 and a 7805 to provide the 5V supply.

I tested several speed settings, 2400, 4800, 9600, 19200, 38400, and 115200 baud.
For each cable + speed setting, I sent each of the two files 10 times from the router, and recorded what was received on the desktop.

Results

1) At speeds of 19200 baud and above, the result is independent of any of the other parameters: of the "1234567890" string, the trailing "0" was always missing.

2) For 2400 and 4800 baud, the home-made level-shifter worked reliably, whereas the DLR-3P had a failure rate of about 10 to 20%. These failures are always of the type "1234467890". Notably, the wrong number was always too low, i.e. "1234467890", but never "1244567890". There were a few occasions were the last "0" was read as a "9", though. (bit pattern: "9" : 00111001, "0" : 00110000 ) and "77" instead of "78" (bit pattern: "7" : 00110111, "8" : 00111000), so it doesn't look like single bit mis-reading.

3) 9600 baud shows the same error pattern as 2400 and 4800baud, with very occasionally the leading "1" missing. 100% error rate for DLR-3P cable, and maybe 80% for the home-made PCB.

4) There is very little difference between the two files.

Klaus

Logged
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!