Safely establishing a connection between Pokitto and an Arduino Uno

What I understand is SPI is usually the best option if speed is concerned

No, the Uno uses those two pins for USB serial. It would be possible on a Leonardo for example though, because it uses a separate serial interface for USB, and the TX(1) amd RX(0) pins are referenced as Serial1 instead.

You could always use a ā€˜SoftwareSerialā€™ library though, and choose any two pins you like.

As @MLXXXp mentioned, if you go with I2C, connect the grounds of the Uno & Pokitto as well.

2 Likes

Iā€™ve decided to attempt I2C next because that diagram looks easiest if it doesnā€™t have any 3.3V/5V issues.

Iā€™ve just read into Ohms law, so I understand the equation, but I donā€™t know how to derive the values.

Iā€™ve decided to dig around for some guides and diagrams and Iā€™ve found an arduino one that looks quite promising.

Interestingly it notes:

There has been some confusion about the minimum voltage for a ā€˜highā€™ level. For the normal digital input pins of the ATmega328p this is 0.6 * Vcc. However, for the I2C pins it is 0.7 * Vcc

So actually thatā€™s 3.5V, not 3V which possibly complicates matters.

Iā€™ve seen the ā€œPhilips Applications Note AN97055ā€ thrown around a lot.
If a BC547 is a sufficient replacement for the mosfets in the diagram then I could certainly attempt that set-up.

I may opt for that if I struggle with I2C.
I only have a vague idea of what Iā€™m doing, like a BASIC programmer trying to write C code.

Iā€™m not even sure where the crystal is located, but since Iā€™d need the USB serial, thatā€™s probably not the best option.

At the moment speed isnā€™t the issue, I just want a way to be able to transmit data of a reasonable size (e.g. 8 bits in one function call).

I can always move up to SPI later.

i think arduino wire is exactly 8 bits via spi, wire is also for i2c
i2c is probebly the easiest one to work with and also easyer to chain with mutliple devices if need be (arduino and esp32 and whatever else you want :P)

:persevere: ā€¦could try anyway and see how reliable or not it is?

Yes, they use that method on the Video Game Shield to safely talk to 3.3V Wii Nunchuks, good explanation at the bottom of this page:

https://www.wayneandlayne.com/projects/video-game-shield/design/

NPN Transistor in place of the MOSFETs might not work - someone had an idea here using NPNs though:

http://forum.arduino.cc/index.php?topic=4215.0

ā€¦once it starts getting this complicated, the most sane solution might just be a good olā€™ level-shifter:

https://www.adafruit.com/category/864

1 Like

ā€¦or just pull-up to 5V instead if it has been established that the Pokittoā€™s I2C pins are fine with that? Could use one of your diodes for a small voltage drop, to have something-slightly-less-than-5V to pull-up to?

I only have two kinds of transistors and Iā€™ve only got one of the other kind,
so at this rate, yeah, itā€™s looking like I probably am just best off ordering some new parts.

One idea I did have was to somehow abuse an optocoupler to isolate the two halves of the circuit, but I think Iā€™d need more than one and frankly I donā€™t know if itā€™s a good idea or not anyway.


Hrm, Iā€™ll mull it over a bit.


(Electronics is hard, I think I prefer template metaprogramming :P)

i was wondering, why the uno and not something else Arduino based at 3.3v? ZERO, DUE, Teensy, ESP8266

Because I already own an Uno and didnā€™t want to buy any new parts if I could get away with what Iā€™ve already got.
I was hoping it would be a simple matter of a couple of diodes and resistors.