QuickStart board as level shifter
Rsadeika
Posts: 3,837
in Propeller 1
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
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
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.
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
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.
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