Mesh Products in deep sleep wake on USB/VIN power state change

xenon
boron
argon
Tags: #<Tag:0x00007fe21c3079a0> #<Tag:0x00007fe21c307860> #<Tag:0x00007fe21c3076f8>

#1

Hi,
We have a Mesh device that is put into Deep Sleep mode and is Solar Powered. It’s woken every 30 minutes to do a reading and then goes back to sleep.
We have connected the Solar panel via a Converter to the VIN of the particle so that it can charge the battery during the day, however we have an issue with the SLEEP functionality that, every time the VIN state changes, IE a cloud appears or shade happens, the particle wakes.
So on a cloudy ish day with fast moving clouds, the particle is coming on and off every few minutes.
Is there an option to disable that feature?


#2

Could you elaborate on the “converter” you’re using or the circuit between the solar panel and the device?

I’m not a hardware expert, but it sounds like you may need to add some capacitors to filter the power from the solar panel.


#3

The converter is not the issue, but it’s a buck/boost converter that will convert the 7v to 5v. It happens when I plug in or disconnect the USB as well. Or if I have a plain old Linear PSU on the VIN.


#4

I would suspect that the regulator is not providing a stable voltage to the device - it seems to me like it is perhaps dropping into the “brown out” zone as clouds affect the solar panel output - so I would agree with @nrobinson2000 that some capacitors close to the VIN may make a difference.
Remember that solar convertors are mainly desiged to charge a battery and as such don’t have to worry about short lived fluctuations. Perhaps post the details of the convertor for better comment? However start with 220uF 16V (or similar) capacitor, scope the voltage and simulate intermittent light intensities (if you have access to a scope) and test for the results you want


#5

except that it also happens when you connect/disconnect the usb connected to a pc and connect/disconnect a lab power supply


#6

Then you may have faulty module or battery - just tested my 2 x argon’s with 3,7V 2000mAh battery and not a glitch when disconnecting / reconnecting the PC USB. So perhaps try a another battery pack or another device if you have one, in the same configuration.


#7

you are putting the device into deep sleep?

I’ve tested this on two xenons and a argon same reaction. Plugging in the usb while the device is sleeping, wakes it.


#8

Post me enough of your code to test with and I will let you know what I get?


#9

I assume by VIN pin you mean VUSB on Argon and Xenon and you have a LiPo battery plugged in? Otherwise it will be doing a restart!

How are you putting the devices into deep sleep? System.sleep(SLEEP_MODE_DEEP); Is it possible that the D8 pin (which will wake device from Deep Sleep) is getting a high voltage signal?

Lastly, I suggest you try System.sleep({},{}, seconds); and see if you get the same behaviour. You can test the reason for wake using the SleepResult class.


#10

reading the data sheet for the nrf I found the following statement “When VBUS rises into its valid range while the device is in System OFF, the device resets and transitions to System ON mode”.
Looking at the schematic the Vbus pin is directly connected to the vbus of both the usb and the nrf, so this will always wake the device (And feed back into the PC!) which begs to wonder why this was used instead of connecting it the vin side of the lipo charger after the protection diode. So to me looks like a hardware defect.


4.2V on the VUSB+ pin are not enough to charge the Li-Po battery?
#11

I doubt VBUS/VUSB nor LiPo/Li+ can be feeding directly into nRF chip. VBUS/VUSB are speced at 5V but the nRF only accepts 3.3V supply.


Update:
My bad :blush: - VBUS for the USB interface on the nRF is in fact directly connected to VBUS/VUSB.
I was thinking of Vdd on the nRF :flushed:


#12

absolutly not. VBUS is fed directly into all USB enable chips be it 1v8,3v3 or 5v. Its a USB specification requirement but is seperate thing from the gpio or vdd of the mcu.
Most MCU use this to power the USB transceiver built in with some outputing a regulated voltage that can be fed into VDD either directly or from an external dcdc converter.
VBUS is usually a seperate power to VDD in most mcu case but is always 5v.


#13

Confirmed happens on my Argons as well …


#14

I started testing a Solar Powered Xenon yesterday.
I just tried and mine does Not exhibit this behavior that you are seeing.

  • Firmware 1.3.1-rc.1 w/ System Threading enabled, Auto Mode.
  • Sleeping with System.sleep( {}, {}, 600) “Timed Sleep”
  • Li-Po on battery connector
  • Solar Panel on USB connector.

Changing the Solar Panel from Dark to Full Sun doesn’t cause a wake event.
Connecting USB to a 5V supply doesn’t cause a wake event.

DEEP Sleep may be the culprit.
But how are you waking every 30 minutes using Deep Sleep?


#15

We have an external RTC with an alarm interrupt output to wake the particle.


#16

@johnnyfp, I added Deep Sleep to my test unit. My Xenon now behaves exactly as you described…Waking up as Solar Panel Output changes/cycles.
The only change was System.sleep( {}, {}, 600) to System.sleep(SLEEP_MODE_DEEP)

The Change to DEEP sleep dropped the sleeping current from 48 µA down to 26 µA from the Li-Po, but it now wakes up from voltage changes on USB connector, link to related results.


#17

You know, the fact that sleep is only 22µA more expensive than Deep sleep, I may just use sleep instead to get around this issue/“Feature”.


#18

Thanks for doing this - it is valuable data and while DEEP sleep consumes the least, the 22μA is probably not that significant in many solutions.

Could you try a large capacitor across the VIN as a buffer from the solar panel controller - and could you post the solar panel you are using ? Obviously a night / day transition will wake device but it may stop the “cloud” based wake ups?


Wait for Event / Best Idle state
#19

@shanevanj, I’m testing many different Solar Panels for the Xenon. I’ll create a new Topic after I’ve drilled down a little more on the final selection. I have one model that seems to be 100 % safe for the Xenon’s Torex XC6802 even in Full Sunlight conditions without any additional converters/hardware, and several models that do a “decent” job harvesting solar energy Indoors.
My goal was to find (1) Panel that could do both reasonably well …but that appears to be too optimistic at the moment.

But due to this Forum Thread (thanks @johnnyfp) , I don’t see any need to use Deep Sleep right now or a CAP for a Solar Recharged Xenon.
.
Quick Calc’s for Xenon running 1.3.1-rc.1:

System.sleep = 0.19 mW
DEEP Sleep   = 0.10 mW
Delta        = 0.09 mW 
Over 24 Hr   = 2.16 mWh

The Smallest Solar Panel that I’m testing is a 0.5 Watt = 500 mW, so there’s no “perceived” difference from 26 µA to 48 µA for 24 hours (or 2 mWh for a Tiny 500 mW Panel)
If the 0.5 Watt panel was operating at 50% it’s rated output, that only requires 30 seconds (in 24 hr) to make up the difference in Sleep Modes. …unless my math is wrong :smiley:

Seems we can save Deep Sleep for projects when we want/need to catch a Vin transition event to Wake the Xenon… or low-powered battery projects of course.


#20

@johnnyfp, you may want to consider leaving the Xenon + Solar running 24/7 @ 32mW and only sleep if something goes wrong with the Panel (Li-Po Voltage drops below 3.7).

I’m still running my Xenon Solar trials that I mentioned previously, but I’m extremely impressed.
I’ll create a full Forum Thread once the trials are complete, but the short version for operating 24/7 is this:

  • Assume a Li-Po Voltage of 4.05V max at the end of a solar charging day…more details to follow

  • A typical 2,000 mAh Li-Po’s voltage will drop ~ 0.04V overnight (12 hours) w/ Xenon on the Mesh.

  • Xenon will source all of it’s required power (0.032 Watts) from a 1 Watt Panel in Indirect sunlight (shade) during daytime (12 hours). This is the most important result from my trials so far and has a positive impact on a Power Budget.

  • I performed a Curve Trace on this 1W panel and it maxes out at 0.82 Watts @ 4.71V for me in direct Summer Sun in the Southeast USA, 95 degrees ambient air temperature.

  • ~ 1 hour of Direct Sunlight will replace the power consumed from the Li-Po during the 12 Hours that the Xenon is Battery Powered Only (overnight). I’m seeing anywhere from 0.25 Watts to 0.45 Watts actually being stored in the Li-Po from direct Sunlight from the 1 Watt Rated Panel. The 0.25 to 0.45 Watts includes all efficiency losses in the Complete System. This will obviously fall during Winter Months.

  • I used a 6.2V reverse biased Zener Diode (5 Watt) for this panel to limit the Open Circuit Voltage, but it’s not absolutely necessary when installed outdoors due to the natural operating conditions. More details to follow.

  • Using a 2,000 mAh Li-Po and a conservative Operating Voltage range of 4.05V to 3.70V, the Xenon can operate 24/7 for a week without a Solar Panel. This gives us a huge Safety Factor for Solar Recharging a Xenon, especially during Winter Months. I’m expecting a 0.5 Watt panel will work just fine also.