Hey guys,
i need to reset my Arduino from a RaspberryPi programm.
So far I know that I can reset the Arduino by pulling to RESET-Pin to ground. What would be the easiest way to do that from the RaspberryPi?
Does it make sense to use a relais for that?
Cheers!
You could close and re-open the Serial port.
Does it make sense to use a relais for that?
No. Not even using relays.
The simplest way is to use a GOIO output to ground the reset pin. However as the reset pin normally sits at 5V you can’t directly connect it. So I would use a resistor to connect the GPIO pin to the base of a transistor and put the collector to the reset pin. Put the emitter to the common ground of the two devices. Then when the GPIO pin goes high the Arduino will be in reset.
I want to reset the arduino as a kind of a safety measure, because its part of a system with a few devices. So when the raspberry recognises that somehow theres no more connection to the Arduino (I2C), it's able to reset it. I know it would be better to not even have any errors in the first place, but like i said it's just meant as a last resort.
Thanks Grumpy_Mike, i'll try that. Why is it better that using a relay? I'm trying to avoid any soldering haha
hdfready:
Why is it better that using a relay? I'm trying to avoid any soldering haha
Wouldn't you need to solder the relay, just the same? Anyway, it's better because
-it has no moving parts to wear out
-it is smaller
-it uses much less power
-it is cheaper
-it is easier to drive
Yes you will need a transistor to drive a relay from the Raspberry Pi anyway, so why use it.
So when the raspberry recognises that somehow theres no more connection to the Arduino (I2C), it's able to reset it.
So why can't the Arduino do that for itself? You have the watch dog timer to help you do that. Why should there be no more connections to the Arduino I2C? You not trying to use an I2C device as a hot pluggable device are you? If you are then that is not how the should be used.