Shop OBEX P1 Docs P2 Docs Learn Events
Intermitant Com problem — Parallax Forums

Intermitant Com problem

SixMGuySixMGuy Posts: 6
edited 2013-02-05 11:43 in General Discussion
I am working on a low power lighting project. I learned the lesson that these chips do not like 120VAC in the same box. In the process of building a separate lamp driver now. The past few weeks I have been working on the S/W portion of the project and ran into a frustrating problem in that the D40 chip would intermitantly stop communicating with my PC. I have a test program in the EEPROM that works fine. I wonder if anyone else has had this experience. If this is one that I need a new chip, so be it. Thanks.

Comments

  • kwinnkwinn Posts: 8,697
    edited 2013-01-22 15:16
    How are you communicating? Is it RS232, TTL, etc.
  • SixMGuySixMGuy Posts: 6
    edited 2013-01-22 16:49
    I am using the "Serial to Propeller Connection Schem." dtd 9-22-06. Yes, I know there is a revised schematic, but this worked. Anyway, this goes to a D-sub 9 pin connection to the PC Serial port. Propeller Tool looks for connection and finds zip on Comm 1& 2. The chip would do this and say the next day be fine with Comm 1 showing the chip. A day may pass or later that same day it would drop out. Can't tell you how frustrating it has been. Originally I was going to use an old TTL scheme that I am familiar with, but this chip seemed to offer more flexibility. Too many man-hours put in now. At least I know the EEPROM to P40 link is good. A little more tinkering with the S/W and it is almost there. Hope this clarifies for you.
  • kwinnkwinn Posts: 8,697
    edited 2013-01-22 21:38
    Yes, this is standard RS232 signalling and it is susceptible to electrical noise. That is why building and industrial automation switched to RS485 and automotive to CANbus. The RS232 can be converted to RS485 at the PC end, and the prop end modified to work with what you have but it will require a cable with 2 more conductors.
  • SixMGuySixMGuy Posts: 6
    edited 2013-01-23 10:27
    Well thanks for the tip. I am in a relatively quiet noise area (semi-rural) and I can tell on the radios when there is some real noise around. Would be something if the chip is picking up the intermitant line noise that I hear on 50mHz. That has been traced to some bad wiring in someone else's place. At least it sounds like the chip is OK, just some noise blocking communications. Thanks again.
  • SixMGuySixMGuy Posts: 6
    edited 2013-01-23 11:19
    I looked up the specs between RS232 and RS485. I can see the vulnerabilities of the former now. I got the parts for the lamp driver box today, so my effort right now will be to complete that part of the project. It appears to me the simpler solution for the communications link will be to get an adapter from RS232 to USB. Live and learn.
  • kwinnkwinn Posts: 8,697
    edited 2013-01-24 20:27
    I am not sure what you mean by post 6. There is no converter I know of that can plug into a PC serial port and convert the data to USB. There are converters that can plug in to a PC's USB port that send RS232 serial data out via that port and adapter.

    A Prop plug (32201) from Parallax would allow you to connect directly to the prop pins for programming and communications if the PC will be close to the propeller. It converts the output from the PC's USB port to 3.3V serial data at the propeller end and is more noise resistant than RS232.
  • SixMGuySixMGuy Posts: 6
    edited 2013-02-04 16:14
    Just finished construction and testing of the lamp driver unit today. The comment I made was refering to going directly from the RS-232 port on the controler unit to that converter (Parallax) to USB to PC. Hope to get that device ordered later in the month. Later.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-02-05 05:12
    Sounds like you are use USB cable to cover most of the distance. It works, but cables are rather expensive. The expense may limit your distance.

    I have a very nice RS232 to RS485 converter that plugs into the RS232 port on the back of a PC and requires a wall wart for power. From there to wherever there is another RS-485 tranciever you should have a nice clean signal and distances can be easily over a mile.

    I can use cheap telephone extension cord wire with the RS-485 without any problem.

    IOW, RS-485 is more cost effective as well as being technically better.
  • SixMGuySixMGuy Posts: 6
    edited 2013-02-05 11:43
    At this point it is a matter of doing the final tweaks on the program. PC to control box distance is not a factor as a one foot piece of USB cable would be fine. At least the RS-232 PC to control box link stayed up long enough to almost complete work on the S/W aspect of this project (even with the intermitant com link.) As I said above, I would have the com link working ('232 to control box), load a test program to RAM, an hour or two later when I am ready to load another test program, NO comm link via COM1 or COM2. That is frustrating, to say the least. The Parallax RS-232/USB unit looks like the simplest solution at this point. I already have ideas for another version of this system, so the converter device may be a good investment after all. Thanks for your input.
Sign In or Register to comment.