w10 mrl hibernate

I use a w10 laptop as mrl executor. I use remote control on my "main" pc to start and control MRL.

I notice when the laptop goes to hibernate that after wakeup I see arduino messages exchanged in the serial monitor but the robot has somehow lost the connections to the servos, they do not move.

Not a big issue, I can restart MRL after each hybernate and it works again as expected - just wondered what could be the reason for it and whether it could be resolved without a new start of MRL.

AutonomicPerfectionist's picture

Windows 10 USB

Hello Juerg

The problem you are seeing is due to how Windows 10 handles the USB power bus when hibernating. In order to conserve power, the default is to disable it on all USB ports on suspend or hibernate. When Windows resumes, the power bus is reset, sending a reset signal on each port in the process. Arduinos listen for such a reset signal and, when encountered, power cycle themselves. This causes the issue you are seeing. MRL can still talk to the Arduino since the port and baud are the same, but the Arduino has not been told about any servos since its last reset (resuming from hibernation). Thus, there are state inconsistencies between MRL and the Arduinos, and MRL can no longer control the servos. 

A fix to this is to disable power management in Windows for that particular root hub. The guide can be found here. Linux computers, I believe, have a similar feature but the default varies between distros.

Hope this helps!

juerg's picture

Hi AP still watching this


still watching this forum as I see but did not hear to much from you otherwise? have you also built an InMoov or are you rather interested in MRL only?

Thanks for your perfect reply with the link and that should make it easy for me to keep the Arduinos alive. I usually have the laptop connected to power when idle so no problem with running out of battery.

happy 2018!

AutonomicPerfectionist's picture

Yeah, I haven't been posting

Yeah, I haven't been posting much lately because I'm working on college applications right now, but I am building my own InMoov. I'll put up a blog post about him soon. I've got most of the torso and head done, working on bicep and top stomach now.

About the USB thing, since the Arduinos are on a separate power line, keeping the USB ports alive shouldn't affect power consumption, it'll just keep them from resetting on resume, so feel free to hibernate on battery.

Happy 2018 to you as well! :)