Shop OBEX P1 Docs P2 Docs Learn Events
QuickStart board as level shifter — Parallax Forums

QuickStart board as level shifter

What I am doing is using my QuickStart board, using P26 and P27, to talk to my iRobot Create. The problem is when I receive data from the Create, the values are unpredictable. I narrowed the problem down to, I think, level shifting, the Create TX pin is 0-5V and the QuickStart RX pin is 0-3.3V. So far I have been lucky, I have not destroyed any pin(s) on the QuickStart board.

I was looking at the info for the QuickStart buss, and it does have access to P31 and P32. Now if I were to make the connections to the Create using the P31 and P32, would that solve the level shifting problem? Not sure if at that point, if the pins are still being handled via the USB(FTDI chip) or not. Since I do not have any FET transistors laying around, I can not make a small compact level shifting circuit. Any ideas on a good way to solve this problem? You would think that some of these 3.3V boards would have some accessible way of talking to the 5V boards, at the serial level, without having to build separate special circuits.

Thanks

Ray

Comments

  • No, using P30 and P31 will not solve your problem. On the output side (QuickStart to Create), you can usually get away without using anything since the high level on a Propeller output pin is usually above the level required for a high on a Create input pin. For safety's sake (for the Propeller), I'd put a 4.7K (or higher) resistor between the QuickStart I/O pin and the Create I/O pin. On the input (or bidirectional) side (Create to QuickStart), you must put a 4.7K or higher resistor between the two or risk damaging the QuickStart's I/O pin. Usually these series resistors don't affect logic signal transmission unless the signal is high frequency or the distance is far.
  • JonnyMacJonnyMac Posts: 9,105
    edited 2016-03-07 20:07
    TX out of Propeller should be fine at 3.3v into 5v system

    If the device you're connecting uses a 5v driven TX signal, run it through a divider to bring it near/under 3.3v. I use 6.8K + 10K which, at 5v in to the top of the stack (6.8K), gives~3v into the Propeller.

    If the device uses on open-collector output for TX, check the pull-up -- if it's 10K you're okay.
  • I tried the suggestion that Mike made about using the 4.7K resistor, but I am still getting some peculiar values. So, I might have to give the suggestion that Jon made.

    Only one small problem, I have only used a voltage divider circuit for use with a battery, I am not sure what the circuit would look like for the way Jon is suggesting. If somebody could provide a little sketch, if possible, as to how this would look like between the Create TX pin and the QuickStart RX pin, I would have a better idea as to what I am doing. The only other problem that I see with the voltage divider business, is getting a hold of the correct resistor size, I think I have some 10K, but 6.8K or 3.4K or even 1.7K, I am very sure that I do not have those laying around.

    Ray
  • Two 10Ks will be fine; 2.5v is above the input threshold of the Propeller.

    5V serial --> 6.8-10K --> Propeller RX pin <-- 10K <-- Ground.

    Easy-peasy. Arduino users are forced to do this all the time when connecting to 3.3v devices.
  • I have been testing the voltage divider setup, instead of 6.8K, I used a 4.7K, which -> 3.4V. But, something is still not working is expected.

    The numbers, when you first start, seem to be in the ball park, then they start to go erratic. I am not sure what is going on now, and not even sure what the next step would be to resolve this issue.

    In the Create docs it states that "...These connectors provide two-way, serial communication at TTL (0 - 5V) levels." Since I am using:
    create = fdserial_open(26,27,0,57600); // Comm with Create robot. simpletools
    I am starting to wonder if I have a comm problem on the QuickStart side. I guess I need more ideas for a solution.

    Ray
Sign In or Register to comment.