Monday, August 20, 2012

Seeeduino Stalker Waterproof Solar kit review PART 2

In my last post, I covered the Seeeduino Stalker board itself, I wanted to get into some of the other aspects of the kit.

The hardware (continued)

0.5w Solar Panel


It's got a 2mm 'JST' connector to connect directly to the Seeeduino board. You can buy the solar panel directly here. I was able to power the board and get the default "blink LED" firmware to run with the battery or external power by placing the solar panel on my North-facing window sill. The Seeed page has this ominous sounding warning: "In those bright summer days with clear sky and big sun, the peak OC voltage can rush up to 10V. To prevent any damage to boards that accept a narrow range of input voltage, like Lipo Rider, it’s recommended to check whether the OC voltage is safe before any connection." I didn't read that before i placed the Stalker in full July midday North Carolina sun, I'm hoping since they sell this as a packaged kit, I should have to worry about placing the device in full sun. The maximum input voltage on the Seeeduino 2.2 solar panel port is list on Seeeduino's wiki as 6 volts. Interesting. I'll have to try and setup a project where I track the maximum voltage on the panel, I should do it soon, since the strongest sun in North Carolina has probably just about passed. 


"980 mAh" LiPo battery 

There's a little confusion here regarding true capacity, there Seeed's site lists the battery at "980mAh", the battery itself says 1000 mAh, and if I google the part number, I've seen references to a 1080 mAh battery. It's not a large discrepancy, but a little confusing nonetheless. I mentioned in the first part of this review that I was able to run the board with an attached 1.25mW Zigbee transmitting data and logging to the SD card every 10 seconds for 4.5 days from a fullly charged battery with no solar assistance. From a "dead" state, I'm guessing it took roughly 3-4 hours to charge fully, and the battery remained cool to the touch. One of my biggest concerns when it comes to Lipo's are the fire risk for improper charging. So far, it seems very well behaved as far as battery use goes.

UartSBee

UartSBee V4, much less blurry in real life.

The kit also includes a UartSBee v4, available here. The UartsBee serves 3 main purposes within the Seeeduino kit. It's a FTDI usb serial board, it can act as a power supply to the Seeeduino, and it's an XBee socket (which is quite handy when you want to use a second ZigBee on the PC side for communicating with your Seeeduino).

Purchased by  itself, the device is a little pricey at $20, but it has a few bells and whistles beyond your basic FTDI breakout. It's got all the convienient factors that make working with XBee or Arduino device almost effortless. An XBee reset button is essential when working with the X-CTU software for ZigBees. Also, there are several LED's on board, for RX,TX, Power, in addition to ZigBee status and signal strength (RSSI)  indicators. There are empty unpopulated 2.54 mm headers for the XBee breakout, this is similar to the Seeeduino board, but I haven't needed yet to populate it. There's also a 2x3 pin unpopulated ISP port, but the Seeed wiki is not super clear on how to configure it, you'll probably have to read the schematics. Luckily, I've got some other pretty capable ISP devices. 

There are a couple things to watch out for when connecting the UartSBee to the Seeeduino or using the XBee port. First, makes sure that the supplied 6 pin ribbon cable is oriented correctly. (I always make sure "GND" is connected to the red wire). Also make sure you are using the appropriate voltage selection, most XBee device run at 3.3 volts, 5 volts may damage it. The Seeeduino can run off a 5 or 3.3 volt supply, (the device is regulated to 3.3 volts), but it takes a 5 volt input to charge an attached batterty. Lastly, the serial lines are between the XBee port and the programming port to the Seeeduino, so you cannot have an XBee in the port and connected to a Seeeduino at the same time.

Water proof enclosure

There's not much to write about the enclosure. It fits the Seeeduino well, the kit come with mounting screws to fix the board to the bottom of the enclosure. You can tape the solar panel to the transparent lid of the container, for the rest, you're on your own.

I have not tested the enclosure as to it's effectiveness in keeping out moisture. I have an idea for a test: save one of those humidity indicators that come inside the sealed static bags with SMD parts, and run the empty box under a hose or leave it in the elements for some time. That way I don't risk my electronics. I'll write a follow up comment to this post once I get around to that. I may even try to build in an electrical humidity/condensation detector to whatever project I use this in, so that I can warn if a leak is detected.

Well that's my review. Here's a parting picture of the Seeeduino with a ZigBee in it:

The full monty. Note that the ZigBee does not come with the kit.
You cannot use the UartSBee with  a ZigBee on the Stalker at the
same time, I just put them all together for the picture.
If I ever get around to it, I'll clean up and post the test-logger code that I slapped together from various samples for logging. That's probably a good subject for another post, as I did have some interesting discoveries.

--P


5 comments:

  1. Hello,
    your post convinced me into purchasing one! good review, nice autonomous logger!
    Thanks to the Wiki I had the RTC working, can read the temperature from the Clock chip, need to get the SD working (probably a format issue).
    Didn't get the way to read the voltage but it seems feasible.

    Could you share your sketch, as version 1 of arduino is jamming most of the data loggers I could find?
    Thks
    Arnaud

    ReplyDelete
  2. Nice review, really what I needed before clicking BUY !
    Got it working in no time!
    Could you share your sketch as version 1 of arduino makes lots of the data loggers I could find obsolete!!
    Thanks
    Arnaud

    ReplyDelete
    Replies
    1. Checkout http://www.jerome-bernard.com/blog/2012/03/12/a-few-stalker-v2-dot-1-glitches-that-can-easily-be-solved/

      He has the changes needed to Seeed's version of the DS3231 library to make it work on Arduino 1.0. (Seeed's site is down right now, so I can't find the right wiki page with the copy I downloaded). I'll post my code, which is just modified from the samples, and maybe some random forums somewhere.

      Delete
  3. Sorry for the delayed response, I've been away from this blog for a couple weeks(I aim to fix that), and didn't notice your comments.

    Let me dig up what I changed to get it working. I have to first figure out what machine I did that on, because I think I didn't check it all into my internal source control.

    I don't think I changed a lot, if I remember correctly it was simply a matter of finding the correct FatFS or RTC libs. I think the ones on the Seeed Studio website may have been out of date. I have a been habit of saying I'll post some code on this blog then not doing it... Stand by...

    ReplyDelete
  4. //most of this code is not my own, but was from Arduino samples...

    #include <Wire.h>
    #include <DS3231.h>
    #include <Fat16.h>
    #include <Fat16util.h>

    char weekDay[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };

    DS3231 RTC;

    int led = LED_BUILTIN; //'13' on seeeduino stalker 2.2
    boolean state = true;

    int chStatusSensorPin = A6;
    int chStatusSensorValue = 0;
    int lipoSensorPin = A7;
    int lipoSensorValue = 0; // variable to store the value coming from the sensor

    #define CTSPIN 4
    #define RTSPIN 7


    SdCard card;
    Fat16 file;

    void toggleRTS()
    {
    digitalWrite(RTSPIN, HIGH);
    delay(1);
    digitalWrite(RTSPIN,LOW);
    }

    bool waitForCTS()
    {
    const int maxCount = 600; //x10 ms = 6 seconds
    int count = 0;
    do
    {
    bool ctsState = digitalRead(CTSPIN);
    if (!ctsState)
    {
    return true;
    }
    delay(10);
    count++;
    } while (count < maxCount);
    return false;
    }

    void prepareToSendData()
    {
    //This is my (not quite correct) hardware flow control implementation with jumper
    //wires on the Stalker going to the XBee port. comment this out, if you dont want
    //hardware flow control (it turns out I get the ZigBees to work well without it anyways)
    toggleRTS();
    waitForCTS();
    }

    // store error strings in flash to save RAM
    #define error(s) error_P(PSTR(s))

    void error_P(const char* str) {
    PgmPrint("error: ");
    SerialPrintln_P(str);
    if (card.errorCode) {
    PgmPrint("SD error: ");
    }
    while(1);
    }


    void setup ()
    {
    Serial.begin(57600);
    Wire.begin();
    RTC.begin();
    pinMode(led, OUTPUT);
    pinMode(RTSPIN, OUTPUT);
    digitalWrite(RTSPIN, LOW);
    }


    void getDateTimeString(const DateTime& dateTime, char* dateTimeString)
    {
    sprintf(dateTimeString, "%i/%2.2i/%4.4i %i:%2.2i:%2.2i", dateTime.month(), dateTime.date(), dateTime.year(),
    dateTime.hour(), dateTime.minute(), dateTime.second());
    }

    void loop ()
    {
    char buffer[32];

    digitalWrite(led, state ? HIGH : LOW); // turn the LED on (HIGH is the voltage level)

    state = !state;

    prepareToSendData();

    DateTime now = RTC.now(); //get the current date-time

    memset(buffer, 0, sizeof(buffer));
    getDateTimeString(now, buffer);

    Serial.print(buffer);
    Serial.println();

    RTC.convertTemperature(); //convert current temperature into registers
    float temp = RTC.getTemperature()*9.0f/5.0f + 32; //Read temperature sensor value

    Serial.print("Temperature: ");
    Serial.print(temp);
    Serial.println();


    chStatusSensorValue = analogRead(chStatusSensorPin);
    Serial.print("Charge Status: ");
    Serial.print(chStatusSensorValue);
    Serial.println();

    lipoSensorValue = analogRead(lipoSensorPin);
    Serial.print("Batt: ");
    Serial.print(lipoSensorValue);
    Serial.println();


    if (!card.init()) error("card.init");

    if (!Fat16::init(&card)) error("Fat16::init");

    char name[] = "LOGDATA.CSV";
    // clear write error
    file.writeError = false;

    if (!file.open(name, O_CREAT | O_APPEND | O_WRITE))
    error("error opening file");

    const char* separator = " ,";
    file.print(buffer);
    file.print(separator);
    file.print(temp);
    file.print(separator);
    file.print(chStatusSensorValue);
    file.print(separator);
    file.print(lipoSensorValue);
    file.println();
    if (!file.close())
    error("error closing file");

    delay(10000);


    }

    ReplyDelete

I welcome you're thoughts. Keep it classy, think of the children.