Spark Consumption on sleep mode

Okay guys, I needed to study the energy comsumption of the Spark.

Imagine this scenario: the spark core is in sleep mode (but it has to be connected to the wifi network), it wakes, send a message via mqtt(or whatevers) and then goes to sleep again.

What’s the necessary current on the spark? I was looking forward to make a solar rechargeable lithium battery shield for spark.

1 Like

@gcats, you may want to read this topic:

The Core has no sleep mode where it remains connected to the wifi network. Sleep mode puts the wifi module in standby (ie not connected) while deep sleep essentially shuts down the Core for the specified time after which it reboots. :smile:

I just bought the Adafruit solar charger board / a panel / battery to build something like this at home. The ARM32 consumes way less power than the CC3000 wifi module, so sleeping only the arm chip doesn’t help much. If you assume the core takes about 5-25 seconds to wakeup and get back on the wifi, depending on the network, you could sleep it and only wake every minute / every few minutes / hours / etc.

I think the usage is something like 100-150mA when transmitting, but I think we need to measure the lower bounds more closely. I’ll share my build as soon as it’s done. :slight_smile:

I hope that helps!

Thanks!
David

Thanks @peekay123 and @Dave.
I’m trying to develop a stand-alone wireless wall switch

  • stand-alone because it recharges itself through solar panels, so it doesn’t need maintenance (at least for my choice lifetime) or wiring trouble;

  • wireless because it would be just a plug and play MQTT publisher; (if Spark use is feasible)

It is a switch, so it would be strange to wait 5-25 seconds for the light to turn on. So I need the connection always on? Kinda sad

For sure read the article peekay123 posted. I also made a bit of a framework that I copy and paste to a few different projects that lets me section off code to be ran during sleep mode and code to be ran once it connects to to the wifi again. That way I leverage the sleep timer it’s self.

Hi @gcats,

I would just then make sure you’re saving and sourcing enough power to be able to keep the connection going. One important feature we’re working on is anything you prototype now will be easy to port forward to more power efficient versions of the core. So it might be this version has 12-48 hours of battery life, but the next version lasts much much longer, and in the meantime you can prototype really quickly. :slight_smile:

Thanks,
David

how can I control how much power the spark consumes when connected?
do you think it is feasible? with a sufficient big battery…
Recharging the battery while the spark is plugged can be done? need to study more on this matter, sorry if it is a obvious question

When reffering to more efficient versions of the core do you mean like Spark II or something like that? (it would be super cool)

IC what you mean. Looks like you will need a big enough battery to get you thru the night at 140ish mAh. based on this Battery Life Calculator from digikey it looks like you’d need around a 2400 mAh battery to get you thru 12 hours. Also take into account the recharge time when the sun is out & the battery drain during the recharge.

I bet if you went with a 3w panel, a LiPo rider charger and a 2200mAh LiPo battery you’d be fine on all but the cloudest of days.

1 Like

So on second thought the 2200 would only last you 11 hours best case. That may work in the summer but not in the winter.

If I’m doing my math right that 3w panel with the lipo rider would charge a 4400mAh battery in a shade under 9 hours of full sunlight. Now factor in the drain from the SparkCore still running and you are looking at around 11 hours to fully charge the battery from dead. A more powerful panel won’t help because you are limited to the charging speed of the charger and battery.

Now I would assume you would have sun at least for 6-7 hours on the shortest days of the year (unless you live near the poles) then that means 18 hours of battery drain and 6 hours of charging should be enough to keep it going year round. (just keep the snow off the panel :wink:

The problem is I wouldn’t be using the sun, but the light of the room itself. Only at night when people are home*
That is why I needed a reeeeeaally ultra low consumption solution (like those sad RF at sub 1 ~ 2.4GHz. But spark is so neat I wanted to give it a shot

a little bit overkill to use spark for only each switch? I would need like 30 of them for here hahah
It may sound overkill but wifi has those super ultra neat filters and modulations so interferences are not a problem. I was trying comm with 415MHz RF modules and it sucked big time when TX happened from two different places at the same time. of course I’ll try another solutions but spark makes it so easy

*I can disable them when going out for a long time, this needs some more thinking

The easiest way to control your power consumption is by sleeping the WiFi module right now, but there are lots of creative ways to do that that might benefit your project. For example, you could use something like a passive motion sensor and wake up the cc3000 when there was motion in the last X minutes… A large battery / large panel might work, but powering a solar panel on something like a wall using indoor light might be tricky. If the Wi-Fi network for the core were unsecured, the core would connect a bit more quickly, so you could try waking it only on a button press, but it’s still variable, so that might be a 5-10 second wait from fully asleep to fully online.

Future versions of the core (Spark Core II) will hopefully be more energy efficient for projects just like this. :slight_smile:

Thanks!
David

OHHHHhhhh yeah solar is not going to work like that inside, not with WiFi. funny enough I have done almost this exact same thing but my approach was different. Using a 4 channel latching 315 mHz RF receiver and an arduino as a base station with a hardwired powersource. Here is an old blog post I did on some initial testing. http://crumpspot.blogspot.com/2013/08/adafruits-simple-rf-receiver-testing-on.html

How do you wake up the cc3000? I couldn’t find a way in the docs, only how to put it to sleep for a set time.

I think you can use the WiFi class here:

https://github.com/spark/core-firmware/blob/master/inc/spark_wiring_wifi.h

WiFi.on();
WiFi.off();

Thanks!
David

1 Like

@gcats, the reality is that the Spark is not really suitable for your application since wifi is not an “instant on” protocol when a connection is not active. Even if it was, sleep mode consumes 35-40ma typcially. I suggest looking at a 315 or 433MHz system as mentioned by @ccrumpacker.

1 Like