I have also used a similar setup as below to drive 5V neopixels from pokitto
EDIT:
Signal from 3V3 (Pokitto) to 5V Arduino
Use schematic shown above. 2 normal diodes and 1 10k resistor needed.
3V_OUTPUT can be any I/O pin outputting from the Pokitto header
+3V3 is Pokitto 3V3 power pin from PEX header
+5V is Arduino 5V pin
5V_INPUT is the input pin on Arduino
REMEMBER TO PUT DIODES the RIGHT WAY AROUND (google it)
What this arrangement does is it shifts the 0…3.3V signal to 0.7V…4.0V which is within the LOW/HIGH treshholds of the Arduino 5V logic. Easy to build, works flawlessly.
Signal from Arduino (5V) to Pokitto (3V3)
Maybe nothing needed. Just connect directly from Arduino to a 5V tolerant pin on Pokitto (see diagram by @Pharap below)
If you want to play it safe, use lower schematic in the above picture.
I’d say go with I2C - the way I2C works is that both devices can only drive the lines low, not high. Instead, there are two pull-up resistors that pull the lines high when they are released (common resistor value to use is 4.7K, but you can do the math if so inclined).
So, in this case you would have the pull-ups tied to 3.3V - I checked the ATmega328P datasheet and the good news is that minimum that is recognised as an ‘Input High Voltage’ when VCC = 2.4V to 5.5V, is 0.6 * VCC (so, 0.6 * 5V = 3V which still leaves you 0.3V for good measure!).
Yes, there is 5V tolerance available on the Pokitto, but that is 5V Maximum, 5.5V Absolute Maximum! Probably not healthy in the long run, and the topic does say ‘safely’!
So, all you need are a couple of external pull-up resistors and a few jumper leads to get started…
Additionally, on 5V tolerance - from the datasheet: “5 V tolerant I/O pins; only valid when the VDD(IO) supply voltage is present” and “When configured as analog input, digital section of the pad is disabled and the pin is not 5 V tolerant”.
EDIT: Good news is that I2C as I suggested above should be fine, as those two pins are the exception to the rule: “Applies to all 5 V tolerant I/O pins except true open-drain I2C-bus pins PIO0__4 and PIO0__5, 5.5 V can be applied to these pins when VDD(IO) is powered down, compliant with the I2C-bus standard”.
BTW I have tried shorting the PEX pins into output pins, constant short, temporary. So far I have not been able to “kill” the device with its own voltage, no matter how I short them. Edit: I think one of you warned against shorting vdd to a low output pin. As far as I have tried, it has no effect.
Note that both SPI and I2C are really only meant for component to component, on the same board, or board to board over short distances. The same would be true for direct pin to pin UART connections.
If the goal is to connect over longer distances, you could consider using a pair of TTL to RS232 converter modules with the UARTs.
Yellow is 5V tolerant unless it’s being used as an analogue input.
Red is not 5V tolerant.
Grey is ‘not applicable’
GND should be fine with 5V right? The point of ground is to drain the power (or something like that)?
Cyan is “I don’t know, there was no P to match to the data sheet”
I suspect 3v3 should be grey since it’s an output
I’ll wait for someone else to double-check that before I go adding it to the PEX page.
Anode (+) long, cathode (-) short.
I’m not sure if I’ve got a plain old signal diode in my box of tricks, I’ll have to check.
Those bullet points are very useful, thanks.
According to the data sheet, some aren’t when they’re cofigured as analogue inputs (category [3] and category [4]).
I won’t be doing that anyway, but it’s something to be wary of.
Do you mean remove the chip?
@uXe that sounds promising, but I think I’d understand it better with a diagram.
Or at least with an idea of which pull up resistors I’m configuring to what value.
I can locate the Pokitto’s I2C ports and I’ll look the Uno’s up later, but I don’t know which resistors I’m hooking up to what.
I spotted that. The reason I took so long to start replying was because I was checking every pin and its caveats.
Whereabouts is that?
When I looked at the table both the I2C pins were marked as cat [7], which is:
I2C-bus pin compliant with the I2C-bus specification for I2C standard mode, I2C Fast-mode, and I2C Fast-mode Plus. The pin requires an external pull-up to provide output functionality. When power is switched off, this pin is floating and does not disturb the I2C lines.
Open-drain configuration applies to all functions on this pin.
Why do the grounds have to be linked?
Overall that does seem easiest. I’m not worried about speed yet.
This is one of my bigger concerns.
I’ve never attempted to hook a 3.3V board up to a 5V board and I don’t want to get it wrong in case I damage the Pokitto.
A good idea if I end up wanting to do this a lot.
For the time being I’d rather attempt to do it using parts I already have though.
Distance is not an issue and probably won’t be an issue.
For the moment I’m just attempting a proof of concept experiment.
(The ground is often used as a reference of 0V. If you connect the local 5V to the local 0V, you’re essentially shortcutting the power source. When communicating with a system powered by another source, you need a reference voltage somewhere - usually GND is that reference voltage, but sometimes you get 5V or 3.3V voltage like I2C does)