0
\$\begingroup\$

I have a media center (Pi), where I can control the powering from an Attiny. This is done through a simple powerswitch. What I want to add now is "wake on USB".

I've though of two things that could be neat. One is wake on a simple keyboard press and the other is wake on bluetooth. I have a small BLE dongle that I want to connect to one of the USB ports of the hub and when my phone gets close, it should start the Pi.

This is a conceptual drawing of what I want.

enter image description here

The USB Hub IC (USB2514B) is currently powered from the Pi, meaning that it will be off when the Pi is off. This can be changed. The USB port will have power on all the time.

My idea was to connect one of the downstream data lines from the USB port to one of the ports of the Attiny and simply have the Attiny detect a change in the data lines when the keyboard is pressed.

I think my question is more a matter of the idea being feasible? Is it the right direction i'm going in.

Thanks

\$\endgroup\$
3
  • \$\begingroup\$ USB has management traffic going back and forth all the time, so you won't be able to spot the actual keypress without a great deal of effort monitoring and decoding the protocols. \$\endgroup\$
    – Finbarr
    Commented Jun 15, 2020 at 8:55
  • \$\begingroup\$ To make this work you would need an MCU with both a USB host and device port and connect it as an intermediate proxy for the keyboard. That would be a fairly challenging project. \$\endgroup\$ Commented Jun 15, 2020 at 10:28
  • \$\begingroup\$ Would this IC be able to do the trick? diodes.com/assets/Datasheets/PI5USB2546AQ.pdf \$\endgroup\$
    – stackman82
    Commented Jun 15, 2020 at 13:50

1 Answer 1

2
\$\begingroup\$

That's not going to work. the keyboard will need to be asked repeatedly if any keys have been pressed, the keyboard won't put signals on the USB without being asked. thast copuld be tricky and/or impossible to do with a an ATTINY.

Your best bet is probably just to confugure the raspberry pi into a low power mode (eg, by turning off the display and the networking)

\$\endgroup\$
1
  • \$\begingroup\$ Raspi also take some time to boot up. I agree to use power safe mode instead. \$\endgroup\$
    – M lab
    Commented Jun 15, 2020 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.