Motion and weather modules ignore "module power off" dock commands

Just for tinkerers knowledge…
Looking directly at the serial comms with a terminal, no rockpool, cookbook, or python involved. Dock firmware 1.14
When I use the “module power off” dock command p 0 with a motion module connected, it still sends data updates.
All other modules are reported as disconnected and stop sending data.
However, with a “powered off” motion module physically connected and still sending data, I then get spurious connects and disconnects from other modules while the module power is still cut. For example from a connected rainbow module.
Everything is ok with “module power on” p 1.
Not sure if this is a dock firmware issue, or just the way the motion sensor is wired and/or works.
It’s not really a real world problem, just a bit strange the way it seems to be implemented.

This is quite truly bizarre. It’s been a while since I worked on the Dock firmware, but I’m certain the “p 0” command triggers the “enable” pin of the current limiter, completely cutting any power to the modules.

Without trying it myself, my best guess is that either:

  1. A power off condition isn’t stopping the update loop of the Dock, so it’s reading random gumph as data and sending it. Seems like this is the case either way!
  2. The motion module may be powered parasitically from the pulled-up i2c lines. It’s possible, albeit unlikely!

Either way, it clearly warrants some debugging! I’ll see if I can re-create your setup.

Don’t read this, i mislead myself! Please skip to the next post!

Sorry about this but I think I was completely wrong with my initial problem report. All modules still send data after sending a p 0 command. The values they send back are ‘reduced’ in scale, for example, light and colour send back smaller values. But it isn’t random rubbish from the i2c bus, the sensors still appear to be working.
You might be right that they are getting enough power off the bus to still work without the normal power being supplied.

The thick plottens…
Both the motion and the weather module don’t obey the p 0 command. When they are both removed after sending p 0 the dock goes quiet, otherwise, if either of them are connected, there is a lot of spurious chatter going on.

I’ve measured with a multi-meter, and the 5v line is totally cold when powered off. It has a small residual reading from the capacitors as they discharge, but nothing that could power a sensor for any length of time.

Yet, exactly like in your setup, if I connect a Motion module to a Dock with a powered off ring it will carry on ticking as if nothing was different. Bonkers!

I read around 2.6v across the 5v rail of the plugged in sensor, so yeah… it can only be powering itself parasitically from the open-drain i2c lines with, presumably, the onboard decoupling capacitors - and perhaps even the caps on the dock itself - offering enough storage capacity to smooth out any wrinkles in the power supply caused by actual i2c comms (which, granted, are intermittent anyway).


It does highlight one clear flaw in my Dock firmware, though, and that’s that the module scanning code still runs even when the Dock has cut the power to the power ring. This is an oversight, and I should check to see if power is on before attempting to communicate with any modules.

I have a few things which need to be rolled into a Flotilla Dock firmware update, so I’ll add a fix for this to my todo list and it’ll be in the next version.

Nice find!