2
\$\begingroup\$

This is probably a basic question for most people on here but I'm new to electronics and tend to learn by example, so figured this was a good one to ask!

I've got a board called a Nano Pi Neo Plus 2 that is very similar to a Raspberry Pi, just with a smaller form factor and cheaper - think of it as a Chinese knockoff ;)

I've also got an Arduino Nano.

I want to send boolean values from the Nano Pi to the Arduino Nano, and after researching different communication protocols I decided to use simple GPIO and turn them on and off to represent boolean true/false.

All good so far - I found some rough examples on the Internet and connected everything up. Unfortunately I've already blown up a couple of Arduino Nanos in the process!

This is where my electronics knowledge is very limited. I'm not sure if I need resistors on the GPIO pins (I presume I do to stop it blowing up) but I don't know if they should be pull up, pull down and what values (no idea how to calculate them).

I'm powering both boards using a single 5V power supply. I've measured the voltage on Nano Pi GPIO pins and the voltage drop was ~3.3v.

Could someone walk me through what's wrong with the circuit and the steps you'd take to work out the resistor configuration and values?

This is the breadboard layout I'm currently using. I couldn't find a Nano Pi part in Fritzing so I used a Raspberry Pi to show how it connects together.

Current layout

Here's the Fritzing breadboard layout if that helps

\$\endgroup\$
  • \$\begingroup\$ The picture doesn't really help, a schematic of how you've set it up would be better. I'm not sure what you mean by "voltage drop was ~3V3". Do you mean the pins were at 3V3 or 1V7? Most likely, I'd've thought that you have pins set up as outputs on both and that's causing problems. There's no harm in connecting GPIO directly together as long as one is output and the other input. \$\endgroup\$ – DiBosco Dec 8 '17 at 9:10
2
\$\begingroup\$

As mention in the comment a schematic would help. Besides that: As soon as I read 'Arduino' and 'Pi' in the same question all my hair starts standing up because they use different I/O voltages. The Pis are 3.3 Volts the Arduinos are 5Volt. I am most surprised that your Pi did not blow up.
In general it does not hurt to connect controllers using resistors. The input impedance of a controller is very high thus adding a 2.2K resistor will not matter during operation. But it does protect your controllers if you have two outputs connected.
Coming back to the voltage difference: You can safely connect an output from the Pi to an input on your Arduino but as mention, adding a series resistor is a safety precaution.
The other way around you have to reduce the voltage. Simplest and cheapest is to use two resistor as voltage divider. You have to go from 5V to 3.3V which is a reduction of 0.66. I would recommend 1200 Ohm plus 2200 Ohm.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
\$\begingroup\$

The best way to do this in general is to use a dual Vdd voltage translator such as the SN74AVC4T245. There are many different such parts, but I recommend one with dual Vdd supplies that cover the ranges you require and those with an input to control direction (bidirectional ones that auto-switch are available but depend on high output drive to force the change).

Connecting the 5V output of your Arduino to the 3.3V inputs of the Pi can cause permanent damage or various interesting types of improper operation.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.