![]() |
3V3 digital signal to the cRIO
I am using a Raspberry Pi to send a digital I/O to the cRIO. I know that the Pi uses 3.3V (3V3) for a True, while the cRIO expects a 5V signal.
I know that with some combinations of hardware this is fine, and others cause problems. Does anyone know about the Raspberry Pi / cRIO combination? (Note and warning: I know that putting a 5V signal into the Pi will fry it, I'm asking about the Pi --> cRIO direction.) |
Re: 3V3 digital signal to the cRIO
Like you have said, and others have tried, running a 3V3 signal into the cRIO will not trigger a logic high for the cRIO. You must use some type of logic level converter(LLC) to perform the task you are desiring. (3V3-->5V)
Picking the proper LLC depends on the frequency of switching that your application requires as well as the type of signal you are running (i.e is it bidirectional or not). However, without knowing this, I can at least point you in the right direction to start looking... Sparkfun Electronics sells a cheap LLC board that is run off of the BSS138 Transistor. It should work for you, and has worked for other teams Link to Board Link to Schematic Link to Transistor Datasheet Also, here is a relevant thread from last year: http://www.chiefdelphi.com/forums/sh...d.php?t=101407 |
Re: 3V3 digital signal to the cRIO
The 14 DIO on the digital sidecar are connected to the NI 9403 digital module, which specifies 5v TTL. a 5v TTL input is compatible with 3.3v CMOS output. Vih for 5v TTL is 2v, while Voh for 3.3v CMOS is 2.4v. There is reduced margin, but it was designed to work. I have not tried it, however. Sparkfun has a nice tutorial on logic levels: https://learn.sparkfun.com/tutorials...s/introduction. However, because the digital sidecar has a 5v pullup, you should not connect them to the Raspberry Pi, but could be used with 5v tolerant 3.3v logic.
I could not quickly find a spec on the DIO for the Raspberry Pi, so you would have to make sure it conforms to 3.3v CMOS logic levels. Other signals on the digital sidecar do not go directly to the 9403 and would have to be evaluated independently (like I2C). Quote:
|
Re: 3V3 digital signal to the cRIO
I would say, if you have a two way connection with one direction per line, the RPi tx can be directly connected to the rx on the crio. However, you would need a resistor in the rx of the pi. Are you using i2C or SPI, etc? I use a 5v UART connection with my pi to access terminal via serial.
5v requires 2v5 to register a 1. |
Re: 3V3 digital signal to the cRIO
Quote:
|
Re: 3V3 digital signal to the cRIO
Quote:
Quote:
|
Re: 3V3 digital signal to the cRIO
Quote:
|
Re: 3V3 digital signal to the cRIO
If all else fails you could always make up a converter with any open collector transistor. Off the top of my head a MPSA14 or MPSA13 would work very nice to change the 3.3 to 5 volt. All you need is to drive the base with the 3.3 logic and then use a 4.7K pullup to cRIO 5 volts on the collector. Be sure to use a common ground between the PI and cRIO.
|
Re: 3V3 digital signal to the cRIO
You actually DO NOT want to directly connect a pin on the Pi to a pin on the Sidecar. The sidecar has an internal pullup to 5V in it. Putting that 5V to the Pi could destroy the Pi. Either a Pull down, voltage divider, or logic converter would be needed in order to protect the Pi. The CRIO can take up to i think 24v on an input, so no need to worry about damaging the CRIO at the levels you are using.
That 5V comes from the Sidecar even if it is set as an input, so it needs to be worked out even if the CRIO is set as input. |
Re: 3V3 digital signal to the cRIO
Quote:
Is that true that the pin is held up? That reduces some of the nightmares I have, about limit switches having the pins floating, so thanks :) |
Re: 3V3 digital signal to the cRIO
Quote:
Here's the schematic. http://www.usfirst.org/uploadedFiles...matic%20v7.pdf |
Re: 3V3 digital signal to the cRIO
Quote:
Just as a side note, I have a 5 volt micro computer stand alone system that is used to drive an 'H' bridge that runs at 24 volts with no problems handling the two voltages. As long as you use the transistor between the Pi and Digital side car no problem as the transistor will act as the buffer between the two. |
Re: 3V3 digital signal to the cRIO
1 Attachment(s)
Are you talking about this excerpt (attached below)? It shows a set of pull-up resistors connected to the I/O.
|
Re: 3V3 digital signal to the cRIO
Quote:
|
Re: 3V3 digital signal to the cRIO
2 Attachment(s)
Here is section of my ‘H’ bridge that is driven by TTL 5 volt logic and then will either source B+ (24 volts) or sink the 24 volts.
The TTL control signals are on the right hand side and called; COL3 when logic high will source B+ (24 volts) through Q11 (TIP127) With the help of Q33 (MPSA14) that is used an a inverted in this case. COL3’ when logic high will sink the B+ through Q22 (TIP122) Just a side note here, NEVER put a logic high on both COL3 and COL3’ at the same time as it will create a short from B+ to ground and blow the fuse F11. For your application all you need is COL3 (Output from PI) R22 (220ohm) R55 (1K) and Q33 (MPSA14). The point where Q33 connects to R33 is not needed but instead would go GPIO [1-14] on the digital side card. So just three parts and your Pi can talk to your cRIO. I am sure there is a I/C chip that will also work but I don’t have my data books handy. If you need more help just ask. The other picture is the actual boards in the project. |
| All times are GMT -5. The time now is 21:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi