Shop OBEX P1 Docs P2 Docs Learn Events
Need some help with propeller and USB PSC no comms. — Parallax Forums

Need some help with propeller and USB PSC no comms.

Christo from SAChristo from SA Posts: 4
edited 2008-02-09 17:29 in Propeller 1
My fist problem is that I cannot drive the USB PSC with 3.3V from the Propeller Proto Board, the green RX LED on the USB PSC is continuously ON, with or without the TX from propeller. So I use 1K resister between Propeller and USB PSC. But with 5V supply to USB PSC TX LED is as normal state.

My second problem is USB PSC seem not to operate when I send serial comms to it, I can see the RX LED on the USB PSC receiving data but no servo response. The USB PSC is working when I use my BS2. I have tried deferent OBJ’s with no luck (FullDuplexSerial, Simple_Serial, ·SerialMirror , Extended_FDSerial and BS2_Functions).

I have search the WEB and found GaitHexHDATS.spin OBJ for Propeller and PSC (Serial), with this I cannot make it work ether. Please can someone help me, with spin code or connection diagrams for Propeller to USB PSC connection?

At this time I can send Serial Data from the Propeller to the BS2 and then the BS2 comms to the USB PSC. But this is not the ideal setup.····

Propeller Proto Board
USB PSC
BOE with BS2

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2008-02-09 15:44
    I needed some time to decode your message, but might still err..
    So a PSC can be a "Parallax Servo Controller" ??
    There are some people using it, though it has always been strange to my why not use the Propeller directly... It is different with a BS2, of course.

    There is an USB version, as I see reading through the Parallax Shop.

    Can this be connected to the Propeller!? No, I think not!
    In which way have you tried this? There is no hint in your posting....
    But maybe you are doing something absolutely different...

    Edit:
    This is one of the first phrases in the manual:
    The processor used on the PSCusb requires 5 VDC which is supplied by the USB port.

    Post Edited (deSilva) : 2/9/2008 3:54:28 PM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-09 16:03
    PSCusb Manual said...
    Notes concerning the connection of the PSCusb to your microcontroller:
    For the Board of Education, Rev C:
    1) The power source for the servos must be a separate power source from that of the Board of
    Education.
    2) Connect the three-pin cable from the PSCusb to X4, slot 15.
    3) Ensure that the Vservo jumper selector, (between X4 and X5), is set to the Vdd position.
    Connect your servos to the 3-pin terminals provided.
    4) To power your PSCusb, the power switch must be placed to the “2” position.
    For all others:
    1) The power source for the servos must be a separate power source from that of the 5 VDC
    used to supply the on-board logic.
    2) Connect the three pin cable from the PSCusb to: VDD (Red), VSS (Black), and the white wire
    to your choice of I/O pin. VDD must be 5 VDC. Note: the idle state of the serial line is 5
    VDC.

    O.k. so you can connect it that way to ANY 5V I/O system. But I have no idea what communication is going on over that line....

    When connecting to the Propeller add a 10k resistor into that line. As it works most like bidirectional there must be a pull-up somewhere on the PSC board... So you should not drive the line high from the propeller but rely on that pull-up...

    Post Edited (deSilva) : 2/9/2008 4:11:57 PM GMT
  • Christo from SAChristo from SA Posts: 4
    edited 2008-02-09 16:17
    It is the Parallax Servo Controller USB version. The USB PSC does have onboard serial to. I now you can use the Propeller directly with servo but with los of extra cog's.

    I can serial connect to the USB PSC from the BS2 but not from the propeller. The only thing that I can think of is that the propeller is to fast even if I put the baudrate to 2400 the default of the USB PSC and set the baudrate when I start the new cog with FullDuplexSerial OBJ.

    The USB PSC only differ from the Serial PSC with the USB FTDI chip on it to connect to the computer but you don't need to use it.

    As of my setup: from P7 (Propeller) to 1K resister, from resister to Serial IN on the USB PSC, 5V from Propeller regulator to USB PSC + of Serial and Vss (Propeller) to Vss of Serial.

    I use VGA, Keyboard, Mouse, Extensive Maths (2cog's), Serial Comms on the propeller.
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-09 16:17
    I just looked through your references. You are lucky to have already found this:
    share.crustcrawler.com/NorrisLabs/HexHDATS/GaitHexHDATS.spin

    It tells you how to use FullDuplexSerial

    The Manual (for the "serial" product) explains all commands in detail. It even has detailed sketches as (see encl.)

    So there is NO PULL-UP on the board, rather an LED...

    Post Edited (deSilva) : 2/9/2008 4:42:28 PM GMT
    326 x 417 - 13K
  • Christo from SAChristo from SA Posts: 4
    edited 2008-02-09 16:27
    I know but using it gives me the same problem it might be the USB PSC version I have. I will still continue to seek the correct connection or setup. I think NorrisLabs uses the serial version of the PSC.
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-09 16:41
    I can see no difference wrt connecting them. As there are no details in the USB Version, I expect all other things unchanged!
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-09 16:56
    All right, the sketch I posted above shows a part of the problem. With a resistor >100 Ohms (which was me first idea as well) you can no longer drive the line low, as it will work as a voltage devider, the other part of it being 220 Ohms+ LED.

    100 Ohms on the other hand will not protect you against the 5 V IF the line is driven high to 5 Volts.... IF NOT driven high, this might work. I have to look how FullDuplexSerial is used from the example---
    Edit:
    Well this looks very fine
    PscComm.Start(-1, m_PscTx, 0, 2400)
    


    Assuming the board does the same just keep the 100 Ohms or leave it completely out.

    What you described in your OP (LED shining all the time) would be noticed when the line you connect it to is driven low, may be during one of your experiments.. It shall not shine under no circumstances when cou connect to an "input" pin of the Propeller...
    ---
    Well this was quite interesting to learn something about the PSC smile.gif

    Post Edited (deSilva) : 2/9/2008 5:12:35 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-09 17:00
    I believe the problem is with the LED. Because of the higher voltage used by the PSC, the Propeller needs some kind of protection since +5V on an I/O pin will conduct through the internal protection diodes of the Propeller's I/O pin circuitry. The standard protection resistor is something like 1K, but, with the LED, this won't bring the LOW input voltage low enough. Because the LED circuitry already is current limited by the 220 ohm resistor, you should be able to connect the Propeller pin directly to the PSC input. Ideally, you should remove the LED and/or 220 ohm resistor and substitute a 4.7K to 10K pullup resistor.
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-09 17:09
    Well done, Mike. It took me some minutes longer smile.gif
    Your suggestion will protect the Propeller if the PSC would drive the line high, which I doubt after my studies...
    As the GREEN LED takes up 2V there is no further need for current protection.
  • Christo from SAChristo from SA Posts: 4
    edited 2008-02-09 17:15
    I found in the parallax forum a PC to PSC connection. I have build this only that the propeller is connected where the PC will be connected and that I have only added a extra 1K on the RX on the PC (propeller) side. With this I have manage to communicate with the USB PSC from the Propeller. Thanks for the input.
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-09 17:29
    *Sigh*
    But still, you are welcome...

    Post Edited (deSilva) : 2/9/2008 6:49:39 PM GMT
Sign In or Register to comment.