Page 1 of 1

Odroid XU4 safe shutdown??

Posted: Sun Apr 29, 2018 6:00 am
by fender90
Howdy Odroiders!

I am building a CarPC based on Odroid XU4.
I need the board to safely shut down when I turn off the ignition in my car.
I've found a switch on Mausberry Circuits which connects to GPIO pin on RPi or other board and allows to run a shutdown script. Unfortunately it is quite expensive and provides only 3 amps of power which is not enough for XU4
Does anyone know an alternative for Mausberry car switch that can provide up to 4 amps and allow to safely shutdown the board?

P.S. The XU4 currently works on Android 7.1 by Voodik. Has anyone tried to initiate shutdown using GPIO on this ROM?

Re: Odroid XU4 safe shutdown??

Posted: Sun Apr 29, 2018 9:23 am
by odroid
Refer this thread first.
viewtopic.php?f=94&t=27890

Re: Odroid XU4 safe shutdown??

Posted: Mon Apr 30, 2018 8:06 pm
by fender90
odroid wrote:Refer this thread first.
viewtopic.php?f=94&t=27890
Thank you! I already figured out how to shutdown the board using pin12. Now I'm just looking for a smart switch that will provide 1.8-5 volts to pin 12 when I turn off the ignition

Re: Odroid XU4 safe shutdown??

Posted: Fri May 11, 2018 4:42 am
by fender90
odroid wrote:Refer this thread first.
viewtopic.php?f=94&t=27890
Dear Odroid
Is there any information on how much current is required for PWRON 12 pin? I know that it supports voltages from 1.8v to 5 volts, but no information on the current demand.
The idea is to connect an Arduino Nano to my car which should detect the power loss when the ignition is switched off and send a signal to pin 12 on my XU4.

Re: Odroid XU4 safe shutdown??

Posted: Fri May 11, 2018 4:46 am
by odroid
It must be less than 1mA.
So any Arduino IO port can handle the power control.

Re: Odroid XU4 safe shutdown??

Posted: Fri May 11, 2018 5:26 am
by fender90
odroid wrote:It must be less than 1mA.
So any Arduino IO port can handle the power control.
Wow! Great thanks! Seems I have found a great solution for external power management.

Re: Odroid XU4 safe shutdown??

Posted: Mon Jun 03, 2019 8:09 pm
by Dominic86
Hi fender90,

have you managed to power on/off Odroid from Arduino?
I've made a separate circuit that detect the 12v and give a signal to Arduino.
Now with a simple skretch I'm tring to give a signal for 2 seconds to pin12 to power on/off the Odroid.
All works well, Arduino reveice the right signal, but when it send the HIGH to Odroid, it seems to not listen the Arduino signal to pin12.
Anyone has had a similar problem?
Thanks

Re: Odroid XU4 safe shutdown??

Posted: Fri Jun 07, 2019 10:19 pm
by Dominic86
I've done another try with a TIP122 connecting the TIP122 BASE to an Arduino signal PIN, the TIP122 COLLECTOR to pin1 (+5V) and the TIP122 EMITTER to pin12, but it doesn't work.

No one know how to power up the Odroid XU4 from external signal?
It seems a so simple operation, but I'm going crazy!
Help me!

Re: Odroid XU4 safe shutdown??

Posted: Sat Jun 08, 2019 10:54 am
by odroid
What happens if you short Pin1 and Pin12 with a wire for a second? It is equivalent to pressing the power button on the XU4.
https://wiki.odroid.com/odroid-xu4/hard ... _2x15_pins

Re: Odroid XU4 safe shutdown??

Posted: Sat Jun 08, 2019 9:09 pm
by Dominic86
If i short them it works, but the problem is that I what to give a short from external, controller by Arduino. Have you read my messages?

Re: Odroid XU4 safe shutdown??

Posted: Mon Jun 10, 2019 9:05 am
by odroid
I read that.
How long did you send a 5V (high) signal from Arduino to XU4?
Do you have a DMM or oscilloscope to measure the voltage and time of Arduino GPIO output?

Re: Odroid XU4 safe shutdown??

Posted: Fri Jun 14, 2019 5:46 am
by Dominic86
Sorry, I don't have on oscilloscope, but it makes 4V and I've set the time to some steps until 6s.
I've also tried adding a transistor 2n2222 only activated from Arduino, connected from pin1 to pin12 of the XU4:
- BASE to an Arduino signal PIN
- COLLECTOR to pin1 (+5V) of XU4
- EMITTER to pin12 of XU4
for short wire pin1 and pin12.
Do you have any advice?

Re: Odroid XU4 safe shutdown??

Posted: Fri Jun 14, 2019 12:22 pm
by odroid
4Volt should be enough to trigger the power signal.
Did you measure the voltage swing(0V-to-5V or 5V-to-0V) on the transistor EMITTER pin with your DMM?

Re: Odroid XU4 safe shutdown??

Posted: Tue Jun 25, 2019 6:47 am
by Dominic86
On analog and digital pins I read 5V and over 500mA (it's the max reading of my DMM).
On TIP122 I measure 4V and less Amps, the same on the collector and emitter.

Re: Odroid XU4 safe shutdown??

Posted: Tue Jun 25, 2019 9:45 am
by odroid
Some thing wrong in you schematics with the resistors inside NPN transistor.
Post a full connection diagram and I will try to find what's wrong.

Is there any reason you use the transistor?
Why don't you connect an Arduino GPIO pin directly?

Re: Odroid XU4 safe shutdown??

Posted: Tue Jun 25, 2019 6:21 pm
by Dominic86
I've tried to use the transistor because I can't manage with Arduino GPIO directly, even if analog and digital pins make 5V and over 500mA, measured with DMM.
Any suggestion or test to try?
Thanks a lot

Re: Odroid XU4 safe shutdown??

Posted: Tue Jun 25, 2019 6:30 pm
by odroid
2~3mA of driving current must be enough to handle the pin12 PWRON signal.

How did you check 500mA with a DMM?
I don't understand your signal connections.
Post a full schematics of your connections.
If you don't have a proper common ground connection, you may fry your XU4 and/or Arduino boards quickly.

Re: Odroid XU4 safe shutdown??

Posted: Tue Jun 25, 2019 6:59 pm
by Dominic86
odroid wrote:
Tue Jun 25, 2019 6:30 pm
How did you check 500mA with a DMM?
I've connected the DMM red wire to Arduino signal PIN and black to Arduino ground.
odroid wrote:
Tue Jun 25, 2019 6:30 pm
I don't understand your signal connections.
Post a full schematics of your connections.
If you don't have a proper common ground connection, you may fry your XU4 and/or Arduino boards quickly.
I've simply connected Arduino signal pin to PIN12.
Could you explain me better the meaning of the proper common ground?
I think that it's not enough to connect only Odroid PIN12 to the Arduino signal pin, right?

Re: Odroid XU4 safe shutdown??

Posted: Wed Jun 26, 2019 8:53 am
by odroid
You have to connect an Arduino's ground(GND) to the XU4's ground too.
Otherwise, the voltage level on the GPIO is meaningless.

Re: Odroid XU4 safe shutdown??

Posted: Thu Jun 27, 2019 5:27 pm
by Dominic86
Great! Finally it works!
Thank you very much @odroid!
I've looked for a long time but I've found nothing about this, only for working with a remote button using PIN1 and PIN12.

Thank you again!

Re: Odroid XU4 safe shutdown??

Posted: Thu Jun 27, 2019 6:05 pm
by odroid
Glad to hear that.
It is always worth to learn the famous Ohm's law and Kirchhoff's circuit laws. ;)