I am using an Arduino Nano to trigger a shutdown of a Raspberry PI by pushing RPI GPIO 18 to HIGH for a couple seconds, and then it waits for RPI GPIO 17 to go from HIGH to LOW indicating the system has shutdown. At this point, the Nano will cut power to the RPI.
I have a number of logic level shifters but they all seem to be operating the opposite of what I need. They all output 5V and 3.3V on all respective pins. When any of these pins is pulled to GND, the respective opposite side will do the same. I believe I need the opposite... I want all pins to be LOW, and only go HIGH when the respective pin on the other side goes HIGH. If such a thing exists, what should I be looking for?
All you need is two resistors. 5K and 3.3K.
Connect Arduino to 3.3K, to 5K to Gnd.
Connect RPi to 3.3K/5K junction.
Connect Arduino Gnd to Pi Gnd.
Pi will see 5V*5000/(3300+5000) = 3V.
Make 5K a little bigger if you want the 3V bigger.
Voltage divider! Thank you for the resistance values! I can use that on the signal from the Arduino that will trigger the RPI to shutdown, but what about the 3.3V DO from the RPI? Will Arduino consistently see it as a HIGH? If I recall correctly, anything above 1V is considered HIGH in TTL logic, is that correct?
Anyhow, I am still curious to know whether there are level shifters that are low by default and only go high when a high signal is on the input. Are there any?
A TTL high is 2.0 volts minimum. This is digital logic: A low is low.
If it is not low, it must be high. There is no default.
Herb
What I actually meant was that 0 to 0.8V is Low and 2 to 5V is High. Therefore, a 3V logic high will always be read as High even on a 5V based Arduino.
By the way, I've implemented the divider and it works perfectly.