Odroid XU4 safe shutdown??

Post Reply
User avatar
fender90
Posts: 36
Joined: Thu Nov 09, 2017 4:43 pm
languages_spoken: english, armenian, russian
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Odroid XU4 safe shutdown??

Unread post by fender90 » Sun Apr 29, 2018 6:00 am

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?

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Sun Apr 29, 2018 9:23 am

Refer this thread first.
viewtopic.php?f=94&t=27890

User avatar
fender90
Posts: 36
Joined: Thu Nov 09, 2017 4:43 pm
languages_spoken: english, armenian, russian
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by fender90 » Mon Apr 30, 2018 8:06 pm

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

User avatar
fender90
Posts: 36
Joined: Thu Nov 09, 2017 4:43 pm
languages_spoken: english, armenian, russian
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by fender90 » Fri May 11, 2018 4:42 am

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.

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Fri May 11, 2018 4:46 am

It must be less than 1mA.
So any Arduino IO port can handle the power control.

User avatar
fender90
Posts: 36
Joined: Thu Nov 09, 2017 4:43 pm
languages_spoken: english, armenian, russian
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by fender90 » Fri May 11, 2018 5:26 am

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.

Dominic86
Posts: 34
Joined: Thu Jan 03, 2019 7:49 pm
languages_spoken: Italian, english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by Dominic86 » Mon Jun 03, 2019 8:09 pm

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

Dominic86
Posts: 34
Joined: Thu Jan 03, 2019 7:49 pm
languages_spoken: Italian, english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by Dominic86 » Fri Jun 07, 2019 10:19 pm

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!

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Sat Jun 08, 2019 10:54 am

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

Dominic86
Posts: 34
Joined: Thu Jan 03, 2019 7:49 pm
languages_spoken: Italian, english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by Dominic86 » Sat Jun 08, 2019 9:09 pm

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?

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Mon Jun 10, 2019 9:05 am

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?

Dominic86
Posts: 34
Joined: Thu Jan 03, 2019 7:49 pm
languages_spoken: Italian, english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by Dominic86 » Fri Jun 14, 2019 5:46 am

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?

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Fri Jun 14, 2019 12:22 pm

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?

Dominic86
Posts: 34
Joined: Thu Jan 03, 2019 7:49 pm
languages_spoken: Italian, english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by Dominic86 » Tue Jun 25, 2019 6:47 am

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.

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Tue Jun 25, 2019 9:45 am

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?

Dominic86
Posts: 34
Joined: Thu Jan 03, 2019 7:49 pm
languages_spoken: Italian, english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by Dominic86 » Tue Jun 25, 2019 6:21 pm

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

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Tue Jun 25, 2019 6:30 pm

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.

Dominic86
Posts: 34
Joined: Thu Jan 03, 2019 7:49 pm
languages_spoken: Italian, english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by Dominic86 » Tue Jun 25, 2019 6:59 pm

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?

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Wed Jun 26, 2019 8:53 am

You have to connect an Arduino's ground(GND) to the XU4's ground too.
Otherwise, the voltage level on the GPIO is meaningless.

Dominic86
Posts: 34
Joined: Thu Jan 03, 2019 7:49 pm
languages_spoken: Italian, english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by Dominic86 » Thu Jun 27, 2019 5:27 pm

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!

User avatar
odroid
Site Admin
Posts: 32478
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 175 times
Been thanked: 344 times
Contact:

Re: Odroid XU4 safe shutdown??

Unread post by odroid » Thu Jun 27, 2019 6:05 pm

Glad to hear that.
It is always worth to learn the famous Ohm's law and Kirchhoff's circuit laws. ;)

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest