Several months ago, I want to have a weather station in my backyard. It should be battery powered and recharged with solar cells. The sensors data should be sent over Wifi to a Raspberry Pi server for collecting and displaying graphs on a simple web page.
I started with some Arduino boards and Wifi shields/adapters. The frustration level was high, because all combinations of boards/wifi had some project killing drawbacks like power consuming, brownout issues, PCB design complexity. Fortunately, I remembered that I backed the spark.core at kickstarter and I gave this device a try.
The learning curve was steep and during my project, I realised that spark continuously enhanced the performance and functionality. Still any Problems? The forum is a real live saver.
The weather station uses a few sensor boards from Adafruit and Sparkfun. The temperature / humidity sensor is a DHT22. Solar panel voltage and charging current is measured with sensor INA219. Barometric pressure data come from BMP085 sensor. Brightness and color data comes from TCS34735. I was surprised that all libraries for these sensor are available in the Libraries section of the Spark IDE. A first test was up and running in just a few minutes. Most sensors uses I2C except the RHT22 which has its own protocol.
In normal mode, the device awakes from deep_sleep, get data from sensor, send data to Raspberry Pi and then goes sleeping again. To flash new software to the core, it should not go to sleep again. For flashing new software the Raspberry Pi responses with char (I manually edit the data.php file). If the core receive any response containing char , the core does not sleep for the next waiting period.
Today, the code now checks power situation and does a long deep_sleep if the battery is at very low voltage. If the solar panel charges the battery and the voltage gets too high, the core does not sleep and help to minimize overcharging.
If there is any interest in code, just ask me.
Spark.Core: UL version Batteries: 4 x NiCad 4000 mAh, industrial type Solar panel: 4 x 2V Panels ~350mA Sensors: DHT22: Temperature / Humidity BMP085: Air pressure TCS34735: Light sensor => intensity, RGB data INA219: Voltage of battery, charging load from solar panels