Simulate Push button from Arduino to RaspberryPi

Hi,

I have an arduino with a sensor. According to some values of the sensor, a PIN is programmed to bright/connect a LED.
Instead of that LED, I want to connect that arduino's PIN into a GPIO of the Raspberry.

That GPIO is allready programmed with a push button. When I push that button, some scripts start runnging on the Raspberry Pi. Now, I want to replace that button with the triggered PIN of the arduino.

I can't figure out how to make that.
Can you please help me with the most simple schematic?

Thank you very much.
:roll_eyes:

A normal transistor would work.

If you want a galvanic separation: Opto-coupler.

I would like to avoid the Opto-coupler.
A normal resistor should work... But I'm not sure about the wiring...How to connect. I don't know if I need to connect the Ground of the raspberry to the Ground of the Arduino.... Or just a simple wire (with a resistor) directly connected from the Output PIN of Arduino to the Input PIN of the raspberry..??

eluis:
I would like to avoid the Opto-coupler.
A normal resistor should work... But I'm not sure about the wiring...How to connect. I don't know if I need to connect the Ground of the raspberry to the Ground of the Arduino.... Or just a simple wire (with a resistor) directly connected from the Output PIN of Arduino to the Input PIN of the raspberry..??

Stop!

I said TRANSISTOR!!!
with just a resistor you'll end up with a broken RPI or arduino...

opto-couplers are the way to go in this situation.
With a normal TRANSISTOR you do need to conect the ground of the RPI to the ground of the arduino...

Yep... Transistor, not resitor...

So, the wiring with the transistor should be:

Arduino GD ------------ GD Raspberry

Arduino PIN 10 ------- Transistor
|
|-------- GPIO 23 Raspberry

Is this right?

PS: I know how to do with the Opto-coupler.... but not with the transistor.
Thanks C-F-K

You can do it with two resistors.
From the arduino output have a 510R resistor going into the Raspberry Pi input GPIO pin.
Also from the Raspberry Pi input GPIO pin have a 1K resistor going to ground.
Connect the grounds of the Arduino and Pi together.

Thank you Grumpy_Mike,
I'm going to try it..

:wink:

That's it... Just as simple as I was looking for.
It works like a charm. :slight_smile:

Thank you very much Grumpy_Mike...

Did you translated that into the circuit like this?

I hope not. Those resistor values are wrong.

An interesting part family to learn about in your spare time would be something like this: TI Level Translator

Grumpy_Mike:
I hope not. Those resistor values are wrong.

Mike, I made that sketch quickly just as reference. Just I want to know if the cables are right relating your previous answer?

pwillard, thanks I will take a look.

Mike, I made that sketch quickly just as reference.

Look up the word reference. It is a thing that you can referrer to, it is not a rough half arsed idea. What you posted is not only next to useless but if some one followed exactly what you have posted it could end up damaging their hardware.

When you post information you have a responsibility to try and make it correct.

Besides which it was a very poor diagram anyway and why resurrect a two year old thread to add such dross?

Sorry Mike for that, I will look up the word reference then. I will edit and delete the sketch.

I resurrected the old thread because it is what I really need for my attiny85 project and rbpi. I did not understand the logic of the connection that's all. Sorry for the inconveniences.

I did not understand the logic of the connection that's all.

That diagram is not going to help where as this one will.