How to add a power button to your N2

Post Reply
User avatar
odroid
Site Admin
Posts: 32360
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 147 times
Been thanked: 325 times
Contact:

How to add a power button to your N2

Unread post by odroid » Mon Feb 25, 2019 5:33 pm

You can add a power button with a few wires soldering.
We've written a guide on this WiKi page.
https://wiki.odroid.com/odroid-n2/appli ... key_wakeup

The blue LED in the button flashes like heartbeat action, if you edit the device-tree file.
You may like this GIF animated image. ;)
Image
These users thanked the author odroid for the post (total 2):
kardanadm (Sun May 19, 2019 7:02 am) • Kernel (Wed May 29, 2019 5:42 am)

User avatar
rooted
Posts: 6701
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 166 times
Been thanked: 33 times
Contact:

Re: How to add a power button to your N2

Unread post by rooted » Mon Feb 25, 2019 6:41 pm

Very nice, thanks for the how-to.

User avatar
mad_ady
Posts: 6679
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 194 times
Been thanked: 148 times
Contact:

Re: How to add a power button to your N2

Unread post by mad_ady » Mon Feb 25, 2019 8:15 pm

Nice case adjustment. You can leave an opening and it could be used for serial.
Would the power button sold with the h2 work as well?

User avatar
tobetter
Posts: 4038
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 43 times
Been thanked: 189 times
Contact:

Re: How to add a power button to your N2

Unread post by tobetter » Mon Feb 25, 2019 9:44 pm

mad_ady wrote:
Mon Feb 25, 2019 8:15 pm
Nice case adjustment. You can leave an opening and it could be used for serial.
Would the power button sold with the h2 work as well?
Technically it is, the problem is the size. In terms of hardware, it would work.

hominoid
Posts: 306
Joined: Tue Feb 28, 2017 3:55 am
languages_spoken: english
ODROIDs: C2, XU4, MC1, N1, N2
Location: Lake Superior Basin, USA
Has thanked: 9 times
Been thanked: 20 times
Contact:

Re: How to add a power button to your N2

Unread post by hominoid » Mon Feb 25, 2019 11:24 pm

Thanks, much appreciated!

User avatar
mad_ady
Posts: 6679
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 194 times
Been thanked: 148 times
Contact:

Re: How to add a power button to your N2

Unread post by mad_ady » Tue Feb 26, 2019 12:45 am

Out of curiosity, how did you cut through the case evenly?

User avatar
tobetter
Posts: 4038
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 43 times
Been thanked: 189 times
Contact:

Re: How to add a power button to your N2

Unread post by tobetter » Tue Feb 26, 2019 4:57 am

mad_ady wrote:
Tue Feb 26, 2019 12:45 am
Out of curiosity, how did you cut through the case evenly?
Simple, cut the surface with a drill and a cutter to make a hole and file until you have an 8 x 8.5mm square.

wallyz21
Posts: 103
Joined: Thu Apr 04, 2019 11:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 9 times
Been thanked: 11 times
Contact:

Re: How to add a power button to your N2

Unread post by wallyz21 » Thu Apr 11, 2019 12:14 pm

Momentary or latched switch?

And the button diameter of the specific switch that you used is what, please?

User avatar
tobetter
Posts: 4038
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 43 times
Been thanked: 189 times
Contact:

Re: How to add a power button to your N2

Unread post by tobetter » Thu Apr 11, 2019 12:39 pm

wallyz21 wrote:
Thu Apr 11, 2019 12:14 pm
Momentary or latched switch?

And the button diameter of the specific switch that you used is what, please?
Momentary if you follow up the Wiki. Latched switch if you like to control the power at DC jack.
The hole for the switch in the Wiki is about 6-7mm.
https://www.aliexpress.com/item/Led-Lig ... 52543.html

sanangel
Posts: 4
Joined: Wed Apr 24, 2019 7:53 pm
languages_spoken: english, spanish
Has thanked: 0
Been thanked: 0
Contact:

Re: How to add a power button to your N2

Unread post by sanangel » Sun Apr 28, 2019 2:20 am

@odroide Thanks for the tutorial

kardanadm
Posts: 56
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: How to add a power button to your N2

Unread post by kardanadm » Sun May 19, 2019 7:01 am

Hi,
How to do Simple On/Off Odroid N2 Power button/switch.
I'm a beginner, can you teach it simply?
The led heartbeat do not want to led do not want, just power button.

Thank
Edit: I put a button on 9 and 11 GPIO pins, it works.

User avatar
mad_ady
Posts: 6679
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 194 times
Been thanked: 148 times
Contact:

Re: How to add a power button to your N2

Unread post by mad_ady » Sun May 19, 2019 1:35 pm

For heartbeat led try:

Code: Select all

echo none > /sys/class/leds/blue\:heartbeat/trigger

pillemats
Posts: 8
Joined: Mon Apr 03, 2017 2:19 am
languages_spoken: german, english
ODROIDs: xu4 + cloudshell
Has thanked: 0
Been thanked: 0
Contact:

Re: How to add a power button to your N2

Unread post by pillemats » Sat Jun 15, 2019 3:39 am

Hey

How does it works ?

Only Plug the button cables to gpio and it works ?
I dont Unterstand the tut because my English is Not the best.

I use my n2 with Batocera Linux for emulation!

Should i put the Button to gpio an thats it ?

Thx

pillemats
Posts: 8
Joined: Mon Apr 03, 2017 2:19 am
languages_spoken: german, english
ODROIDs: xu4 + cloudshell
Has thanked: 0
Been thanked: 0
Contact:

Re: How to add a power button to your N2

Unread post by pillemats » Sat Jun 15, 2019 4:00 am

kardanadm wrote:
Sun May 19, 2019 7:01 am
Hi,
How to do Simple On/Off Odroid N2 Power button/switch.
I'm a beginner, can you teach it simply?
The led heartbeat do not want to led do not want, just power button.

Thank
Edit: I put a button on 9 and 11 GPIO pins, it works.
Which Switch did you use ?

In my case it wont works

User avatar
tobetter
Posts: 4038
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 43 times
Been thanked: 189 times
Contact:

Re: How to add a power button to your N2

Unread post by tobetter » Sat Jun 15, 2019 5:30 pm

pillemats wrote:
Sat Jun 15, 2019 4:00 am
kardanadm wrote:
Sun May 19, 2019 7:01 am
Hi,
How to do Simple On/Off Odroid N2 Power button/switch.
I'm a beginner, can you teach it simply?
The led heartbeat do not want to led do not want, just power button.

Thank
Edit: I put a button on 9 and 11 GPIO pins, it works.
Which Switch did you use ?

In my case it wont works
How did you connect the switch? And what's the switch you use?

pillemats
Posts: 8
Joined: Mon Apr 03, 2017 2:19 am
languages_spoken: german, english
ODROIDs: xu4 + cloudshell
Has thanked: 0
Been thanked: 0
Contact:

Re: How to add a power button to your N2

Unread post by pillemats » Sat Jun 15, 2019 7:11 pm

This one for testing on Pin 9 + 11
Attachments
C4667522-5C26-48B4-A13C-75AD702012DD.jpeg
C4667522-5C26-48B4-A13C-75AD702012DD.jpeg (1.3 MiB) Viewed 2477 times

User avatar
tobetter
Posts: 4038
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 43 times
Been thanked: 189 times
Contact:

Re: How to add a power button to your N2

Unread post by tobetter » Sun Jun 16, 2019 4:42 am

@pillemats, the switch would work if you wire properly. Also, please double check your boot.ini.
https://wiki.odroid.com/odroid-n2/appli ... ng_bootini

pillemats
Posts: 8
Joined: Mon Apr 03, 2017 2:19 am
languages_spoken: german, english
ODROIDs: xu4 + cloudshell
Has thanked: 0
Been thanked: 0
Contact:

Re: How to add a power button to your N2

Unread post by pillemats » Sun Jun 16, 2019 5:53 am

How do i wired propably?

I think i Need a pic with the connections

Do you have it?

democles
Posts: 1
Joined: Thu Jul 11, 2019 10:33 pm
languages_spoken: english
ODROIDs: N2/U3/ C1+
Has thanked: 0
Been thanked: 0
Contact:

Re: How to add a power button to your N2

Unread post by democles » Thu Jul 11, 2019 10:45 pm

Here is a picture with wat jou have to copy and past in the boot.ini file.
Works great :D
I edit it with WEBMIN.

aangepast.jpg
aangepast.jpg (155.76 KiB) Viewed 1855 times

joy
Posts: 890
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 13 times
Been thanked: 49 times
Contact:

Re: How to add a power button to your N2

Unread post by joy » Fri Jul 12, 2019 3:03 pm

pillemats wrote:
Sun Jun 16, 2019 5:53 am
How do i wired propably?

I think i Need a pic with the connections

Do you have it?
Do you have a PCB layout and circuit description of your button part?

Please refer to this wiki page for the wire connections.
https://wiki.odroid.com/odroid-n2/appli ... are_set-up
https://wiki.odroid.com/odroid-c2/appli ... are_set-up

superpowter77
Posts: 31
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: ODROID-N2 4GB CoreELEC Edition
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: How to add a power button to your N2

Unread post by superpowter77 » Sun Sep 15, 2019 9:54 pm

Very nice solution. Alternately, if you just want to play "safe" without getting your hands "dirty", you can just spend $12 USD bucks and get a "Smart Plug Mini WiFi Outlet" just for the Odroid-N2 with an On/Off switch controlled from any Android phone. Also, 100% compatible with Alexa and Google Home where a simply vocal command will suffice.

kardanadm
Posts: 56
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID N2
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: How to add a power button to your N2

Unread post by kardanadm » Wed Sep 18, 2019 2:11 am

Boot.ini does not work when you change boot.ini for Ubuntu Mate

setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} disablehpd=${disablehpd}" Do not paste this code. Protect your existing code.

Code: Select all

 
setenv gpiopower "479"
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} logo=osd0,loaded ${cec_enable}"
setenv bootargs ${bootargs} gpiopower=${gpiopower}

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

Re: How to add a power button to your N2

Unread post by odroid » Wed Sep 18, 2019 8:30 am

Sorry for the inconvenience caused.
I've updated the wiki page.
https://wiki.odroid.com/odroid-n2/appli ... ng_bootini
These users thanked the author odroid for the post:
kardanadm (Wed Sep 18, 2019 5:05 pm)

superpowter77
Posts: 31
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: ODROID-N2 4GB CoreELEC Edition
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: How to add a power button to your N2

Unread post by superpowter77 » Wed Sep 18, 2019 10:22 pm

Excellent job. Finally,we have a well written and Visual documented guide to DIY.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests