Back to Smartcitizen.me

Power-off Qwiic on SCK2.1 power-off

Hi,

I’ve successfully connected the SAM-M8Q through AUX and have been collecting data.

However, when I turn off the SCK2.1 the GPS board continues to be powered (PWR light is on and the PPS light indicates it’s capturing/processing satellites signals).

It’s possible to turn off the SAM-M8Q but requires connecting a pin to the SAM-M8Q INT pin. This isn’t optimal as I requires some additional wiring. Anyways, does the SCK2.1 have any ‘free’ pins to use?

Alternatively, is it possible to disable Qwiic power?

There’s some additional information on the SAM-M8Q Sparkfun page.

I’m currently considering going into low-power mode instead if I can’t do this - we’ll see how little power draw there is.

Cheers,
C-

I added code to sam/src/SckAux.cpp in the sensor’s stop() method to put the GPS/GNSS to sleep. It isn’t doing anything.

I’m wondering if the goToSleep in sam/src/SckBase.cpp is calling the AUX sensor stop methods at all?

I’ll try to implement this and get back to you.

Hi Cyrille,

Previously we were cutting power to auxiliary sensors when entering sleep mode, but some sensors (mostly electrochemical gas sensors) don’t like this kind of turn off/on, so we decided to remove it.

For a quick solution, you could cut the power of the auxiliary bus completely when sleeping and turn it on again on wake:

  1. On the goToSleep() function (around line 1278 will work) cut the power by adding the line::
    digitalWrite(pinPOWER_AUX_WIRE, HIGH);
  2. At the end of the SleepLoop() function, reconnect by adding the line:
    digitalWrite(pinPOWER_AUX_WIRE, LOW);

I haven’t tested this, but I think it should work as long as the sensors that are connected to the auxiliary bus don’t get affected negatively by the sudden power cut.

Other posibility is calling the stop() and start() methods for the auxiliary sensors on the same places we mentioned before, and implement the low power mode for your GPS.

To implement this properly, I think we need to create a new config setting to enable and disable the cutting of auxiliary power on sleep, or the option to call the stop() and start() method of the sensors. So the user can configure it depending on the type of sensors connected.
I will put this on the To-do list!

Hope this help!
Cheers
Victor

Hi victor

Not sure if it’s relevant but when a Calypso Anemometer is attached (via a Uart port on a pm board) manufacturer instructions are not to cut the power because it upsets internal calibrations. So gas sensors are not the only ones with an issue there.
With my system I have made it so the start and stop commands received via I2c only set/unset a “started” flag; whilst readings continue to be taken every 30 second s via the loop function in the ‘.ino’ file. But of course this device only draws micro amps when active anyway.

Ahhh penny just dropped. This might be why the PM Board has its own 5 v power feed to usb socket from power distribution board. I will need to add a similar power lead to the 2nd pm board for the same reason I guess.

Cheers
Bryn
@oscgonfer