-
Power control
04/14/2015 at 18:21 • 0 commentsOdroid-U2 doesn't have a Power button, so I made one without modifying the board.
And excuse my English.
Whole setup requires more power than Odroid can provide from USB ports. I assumed the following:
-Odroid- 5V 2A (2x 500mA for USB ports included)
-DVD drive rated 5V 1A and PATA to USB converter- 5V 1.2-1.3A
-wifi usb dongle, MCE remote, USB sticks- 5V 1A
AC adapter (rated 12V 2A) powers 2 dc-dc buck converter modules based on MP1584EN ICs (datasheet: http://aitendo3.sakura.ne.jp/aitendo_data/product_img/ic/power/MP1584EN/MP1584.pdf ) which provide 5V 2A (3A peak) each, one is used exclusively to power Odroid, the other powers USB hub and DVD drive.
PowerCtrl board:
Board has it's own dc-dc converter based on LM2574 reference design (datasheet: http://www.ti.com/lit/ds/symlink/lm2574.pdf ) providing "standby" power for the board.
A photoresistor is coupled with odroid's led to check if OS is still running- by default kernel uses heartbeat trigger for it, led is blinking as long as kernel works (and I didn't have to solder anything to Odroid :) ).
1. Power button is pressed: ATtiny sets Enable pin on converter modules high and starts the timer
2. Photoresistror is used in a voltage divider- ATtiny checks voltage
-when led blink is deteced (voltage drops below reference value) timer is reseted
-when led doesn't blink and timer passes the desired interval Enable pin is set low- converters are disabled (effectively system is powered down)
3. ATtiny waits for another button press
Power Button board:
It is slightly modified Flip's 1-Key-Keyboard (link: http://blog.flipwork.nl/?x=entry:entry081009-142605 )
ATtiny (another one) works as a simple USB keyboard:
1. When Power button is pressed "S" key event is sent- this is a shortcut to Power menu in Kodi/XBMC
2. When Power button is released "Enter" key event is sent- this executes Power Off action (default selected) in Kodi/XBMC power menu
I've tried to modify HID descriptor to use System Control usage page- this way keyboard could directly send System Power Off event (but descriptors I made suck).
Note: keyboard hardware was modified as I wanted to use the same button for both boards- now keyboard uses 5V and has two 3.6V Zened diodes attached to USB signal lines. It turned out that that was not a necessary modification- button is attached to power control board and to usb board using a diode (see schematics on github).
Sources and schematics are availabe on github.
And a demo video (sorry for quality and TV in the background)