Computer Display?


Closed Thread
Results 1 to 30 of 30

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Question Computer Display?

    Hi All!
    I have a sensor that when I add about 1 meter of cable to the readings become wrong! I think the main problem is the pulses from the sensor are too fast so the PIC can only be a short distance. It would be great if there was a program I could download and display the results on the screen or maybe a different cable type than just shielded twisted wires?

  2. #2
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Quote Originally Posted by Ramius View Post
    Hi All!
    I have a sensor that when I add about 1 meter of cable to the readings become wrong! I think the main problem is the pulses from the sensor are too fast so the PIC can only be a short distance. It would be great if there was a program I could download and display the results on the screen or maybe a different cable type than just shielded twisted wires?
    Hyperterminal is one program which will display RS232 protocol.
    It is sometimes found in the Windows menu under Start>Programs>Windows Accessories>Communications.
    If not it can be downloaded.
    Another is TeraTerm.

    You will need a PC with a serial port or for newer PC's use a USB virtual serial port adapter.
    For longer distances a converter to and from RS485 with RS232 at both ends works well.

    You didn't say the baud rate in use.

    Others will have more info as well.


    Norm

  3. #3
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Thanks Norm!
    I do have a "newer computer with both USB and RS-232. If I look at the pulse width from the sensor with a Saleae Logic Analyser the pulse width from the sensor is very short an looks almost like it is at 2.4 MHZ although not closely spaced! The sensor clock is at 32,768. Since I am only displaying the data from the sensor I would think that a baud rate of 9,600 should be good? Don't really know for certain, never ran into this before. If I keep all the wires short (1' or less) everything seems to work fine. I just need to go a longer distance to read the sensor without having to build something complex and involved.

    Best, Ed

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    654


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Quote Originally Posted by Ramius View Post
    If I keep all the wires short (1' or less) everything seems to work fine.
    Hi. RS-232 should work for a distance much greater than 1'. I suspect something else is going on. What type of protocol are you using to communicate between the PIC and the sensor? Maybe noise in the line????

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,557


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Hi Ed,
    A link to the datasheet for the sensor in question, or at least a part number would be a good idea to post. Somehow Norm knew or assumed its output was RS232, something you didn't say in your first post, so my question is: Is it?

    If the sensor is indeed outputting async serial it may be doing so at TTL levels and your PC may not like that (even though it usually works for short distances) so you may need a MAX232 driver or something.

    A diagram showing how you have it connected would be nice as well.

    But again, without even knowing what type of sensor you're talking about it's just guesses.

    /Henrik.

  6. #6
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Hi Henrik!
    The sensor is the infamous MS5541-CM and I believe the protocol is SPI. Basically the sensor to a 3v to 5v converter to the PIC then from the PIC to a MAX232-cpe to the computer. At short distances from the 3-5v converter the sensor readings are "normal", that is you will accurately read room temperature for example. As the cable from the 3-5v converter becomes longer the room temperature reading becomes abnormal such as -1434C. First cable was a shielded 6-wire, 22 gauge cable. Then I tried a ribbon cable with signals on every other wire with ground at one end only for the wires inbetween the signal wires to avoid cross talk and any ground loops.

    Best, Ed

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,470


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?


  8. #8
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Computer Display?

    Hi Guys!
    Thanks and I actully did place some .1 caps across the 3v and 5v side. Just added a 100mfd to both the 3v and 5v side of the TXB0104. How things are built is there is a small proto board about 4" from the pic which has the TXB0101. Then the sensor connects to the same board. I would love to be able to add a .1 on the back side of the sensor with the 47mfd cap. and just connecting what I have connected has been a real challenge. Damn stuffs too small! Lol Best, Ed

Similar Threads

  1. Two Versions of MPASM in the Same Computer???
    By rsocor01 in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 11th July 2011, 20:24
  2. PIC16F877A interface with computer
    By jonil22 in forum Serial
    Replies: 4
    Last Post: - 19th February 2008, 20:29
  3. Computer crash and PBP V2.45
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2008, 20:57
  4. Some HID devcie on one computer
    By Shamir in forum USB
    Replies: 4
    Last Post: - 19th February 2007, 06:52
  5. read signal from computer
    By menhwa in forum Serial
    Replies: 1
    Last Post: - 18th February 2006, 04:28

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts