What's the proper way to shut down the Navio +

Dear community,

I am working on a GPS rover project. We use the Navio + and when we want to shut down the rover, we just unplug the power supply. By doing this our SD card in the Raspberry PI 2 crashed.

After doing some research we found out that the SD card crashed because we just unplugged the power supply all the time or the power supply dropped below a certain amount of voltage.

My question is if there is an option to shutdown de NAVIO + by a shut down button or is there another way to shut down the device what doesn’t cause this problem?

Either SSH into it and enter a shutdown command, or wire a switch into the Pi. There are guides available online for that, just wire it to the GPIO pin unused by the Navio+.

I typically use my phones hot spot and have the pi connect to that on boot. When in the field I use the Tower app for way-point management, and when I’m done I use an app called ‘Raspberry SSH Lite’ available from play store.

In this free (lite) version you can configure two buttons, I have one for shutdown.

I used an Arduino Leonardo, configured as a USB keyboard on my rover. I connected buttons to the Leonardo and connected it to the RPi via USB.
I did it this way, because I found all shutdown scripts running on the RPi to stop working after some time.
The guys from Emlid also suggest to use slower micro sd cards, because they seem to be more robust against sudden power losses.

Dear Sebastian,

Sorry for the late reply but thanks for the tip. I decided to try your idea.

My question is if you can tell my where you found the script for the Arduino and the RPI or if you could send your script if that is possible?

Thanks for helping !

On the RPi you only need to enable autologin. Otherwise your keyboard input is entered at the login and it won’t work.
I am on a short vacation at the moment, so I can not send you the sketch I wrote for the Leonardo right now. I will look for it as soon as I am home again. You can also search google for “Arduino Leonardo keyboard” or something like this.
I am no programmer myself, but I managed to change an example I found, to work the way I needed.

Okay thank you. I will google for it. And for the hardware you only plugged in a button.

Have a nice vacation!

Yes, I connected a button between +5V and the input pin I choose. Some sources state an external resistor is required to protect the input pin, but my Arduino Leonardo has internal resistors for each pin and I never had a problem without external resistors.

Hi @schuermannsebastian

Could you please send me your script of your Arduino Leonardo for the shutdown function?