Seeeduino Stalker v2.3


Seeeduino Stalker is a feature rich Arduino compatible Wireless Sensor Network node. Its modular structure and onboard peripherals makes it convenient to log time stamped sensor data on a periodic basis. Seeeduino Stalker comes with a Temperature sensor, RTC with backup power, SD Card Socket, Bee Socket and Solar LiPoimer Ion Battery Charger. The Seeeduino Stalker is a good candidate for all your tracking, monitoring and control projects. Revision of 2.3 is almost the same as revision of 2.2, the reason we upgrade it is to fix the bug by adding a rectifier diode between LI_BAT and USB5V.
Model: ARD104D2P

Below is previous edition:

And Seeeduino Stalker is a good tool in following areas:



NOTE:




Specifications

Stalker v2.2 diagram.jpg





Demonstration

Getting Started

The following steps will help you assemble the hardware and software resources to get you started with Seeeduino Stalker

Step 1: Acquiring the Hardware

You will require the following hardware for running your first program.


Seeeduino Stalker v2.e


UartsBee v4.0
Required for programming
the Seeeduino Stalker.
Buy Here

Mini USB Cable
You would probably have this one lying around,
or if not, buy one here. We would use this
to connect the UartsBee to one of the
USB ports on your computer.

1 pin dual-female jumper wire
Required for connecting the UartsBee to Seeeduino Stalker.You might already have few lying around your workspace. If not, you can buy a colourful one here.


Step 2: Installing the drivers and plugging in the hardware

  1. UartSBee is like the multi-purpose Swiss Army knife of the Physical Computing world. There is a very detailed procedure to use UartSBee for both Windows and GNU/Linux users here. In our case it will perform three functions:
    • Allow us to program the Seeeduino Stalker.
    • Allow us to communicate with Seeeduino Stalker.
    • Provide power (from USB power of your computer) to Seeeduino Stalker (including any peripherals connected to it).
  2. The first two functions of UartSBee (programming and communication) are achieved through an Integrated Circuit called FT232RL which is present on it. Before FT232RL can be used for these purposes, its drivers (certain freely available programs from FT232RL's manufacturer) must be installed on your windows/ubuntu based PC. So before proceeding further, download the driver setup file from here and install it on your Windows PC. (OS X Drivers also available and required for OS X)
  3. UartSBee has an onboard voltage regulator and a switch to allow you to select what voltage (5.0V or 3.3V) you would like to supply to the target circuit board. In our case the target circuit board is Seeeduino Stalker and so you would need to set this slide switch to 5.0 volts
  4. The wiring connection scheme of our hardware is "Computer→(Mini USB Cable)→UartSBee →(Flat Ribbon Cable)→Seeeduino Stalker". The jumper wires must be connected between UartSBee and Seeeduino Stalker before connecting the UartSBee to the Computer. Refer the photos below and make sure the signals line up as shown in the table (Note: The TXD and RXD pins must be cross connected as shown in the table).
  5. Next connect the Mini USB cable from UartSBee to your computer. If you are using a Windows based PC, the "Found New Hardware" balloon will popup and within a few moments the drivers for FT232RL (i.e. UartSBee) will be installed.


Jumper Wire connections
Seeeduino Stalker       UartSBee
USB5V   ↔   VCC
RXD   ↔   TXD
TXD   ↔   RXD
GND   ↔   GND
DTR   ↔   DTR

Connection Notes

Jumpers and Connectors


microSD Card (TransFlash Card) Related

  By default EN is connected to VCC to always power TF card. If you want to control the TF card power with digital pin 4(PD4) of microcontroller, just put a solder blob between EN and PD4.   Conversely, if you want TF card is always available default to be powered, cut the solder you had put.

Bee Module Related

Bee Module Related - Only XBee related

User LED Related

Battery Related

Real Time Clock (RTC) Related

Programming

You must set your board type to Arduino Pro or Pro Mini (3.3V, 8MHz) w/ ATmega 328

RTC And Temperature

Adjust Date/Time



Seeeduino Stalker v2.1 adjust.png

Get Current Date/Time



Seeeduino Stalker v2.1 now.png

DS3231 Read Temperature


   RTC.convertTemperature();             //convert current temperature into registers
Serial.print(RTC.getTemperature());   //read registers and display the temperature
Serial.println("deg C");


Seeeduino Stalker v2.1 temp.png

DS3231 Interrupts


This example is a demonstration of interrupt detection from DS3231 INT output. This feature is useful for data-logger functionality where the MCU is put to sleep mode when not in use and DS3231 INT wakes up the CPU periodically. This extends battery power. The complete operation is documented in the code.


Seeeduino Stalker v2.1 interrupts.png

 

Reading Charging Status

Connected battery and solar pannel to Stalker,the battery could be charged via solar panel and USB5v. The lowest input voltage for charging battery is 4.4v, so if you are using solar panel, you should take it to an open-air place with enough sunshine. Afterwards, uploading the the follwing code to Staler to read the charging status of Stalker.

void setup()
{
  Serial.begin(57600);
  analogReference(INTERNAL);
  //analogRead(6);
}
 
void loop() 
{
  char CH_status_print[][4]=
  {
    "off","on ","ok ","err"
  };
  unsigned char CHstatus = read_charge_status();//read the charge status
  Serial.print("charge status -->");
  Serial.println(CH_status_print[CHstatus]);
  delay(500);
}
 
 
unsigned char read_charge_status(void)
{
  unsigned char CH_Status=0;
  unsigned int ADC6=analogRead(6);
  if(ADC6>900)
  {
    CH_Status = 0;//sleeping
  }
  else if(ADC6>550)
  {
    CH_Status = 1;//charging
  }
  else if(ADC6>350)
  {
    CH_Status = 2;//done
  }
  else
  {
    CH_Status = 3;//error
  }
  return CH_Status;
}


Reading Battery Voltage

If you want to know your battery voltage on Analog Pin 7, this is a simple example.

void setup(){
    Serial.begin(57600);
    analogReference(INTERNAL); 
}

void loop() {
 
float voltage;
int BatteryValue;

    BatteryValue = analogRead(A7);
    voltage = BatteryValue * (1.1 / 1024)* (10+2)/2;  //Voltage devider
    
    Serial.print("Battery Voltage -> ");
    Serial.print(voltage);
    Serial.print("V   ");
    Serial.println();
 
    delay(500);
}


Using a Battery Library

There is a library available for battery voltage, percentage and more. You will find the latest library Here.

/* 
Battery.cpp (Version 0.3) - Library for Battery infos on Seeeduino Stalker V2.3 
Created by Stefan, March 2013.

Notes: 
 - read lipo battery voltage -> analog pin 7
 - current capacity (in %) 
 - charging status -> analog pin 6
 - flashing LED for battery indication 
*/

#include <Battery.h>

int LEDPin=13;
int flashesforfull=10; // 1 blink =10%
int chcnt=0;

Battery battery;

void setup(){
  Serial.begin(57600);
  Serial.println("Battery Library for Seeeduino Stalker V2.3");
}

void loop(){
  battery.update();
  battery.ledflashStatus(LEDPin,flashesforfull);
  float voltage = battery.getVoltage();
  int percentage = battery.getPercentage();
  char* CS = battery.getChStatus();
  bool ch = battery.isCharging();
  if(ch) chcnt++;
  
  Serial.print("battery: ");
  Serial.print(voltage);
  Serial.print("V  -> ");
  Serial.print(percentage);
  Serial.print("%     Charge Status: ");
  Serial.print(CS);
  Serial.print("     charging counter: ");
  Serial.println(chcnt);
  delay(2000);
  
}

Data Logger Examples


The principal application of Stalker is data-logging of sensor signal like temperature along with the time-stamp. We have provided 3 sketches along with the DS3231 library demonstrating 3 different implementation. These sketches puts the MCU in sleep mode when not performing data sampling / logging operation. The complete implementation is documented very well in the code. The following section gives an overview :
Seeeduino Stalker v2.1 SolarPanel.png

  1. StalkerV21_DataLogger_Periodic.pde
    • This sketch logs temperature data periodically to SD card configured by RTC.enableInterrupts(periodicity) function.
    • The periodicity is provided using predefined constants EverySecond or EveryMinute or EveryHour
    • This sketch produces verbose output i.e the various events happening inside MCU are displayed in serial terminal.
  2. StalkerV21_DataLogger_5min.pde
    • This sketch logs temperature data using to SD card configured by RTC.enableInterrupts(h, m, s) function.
    • The periodicity is provided using h, m and s. Once an interrupt is detected, the next interrupt time is updated by advancing the h,m and s value. The DateTime Class comes handy for this.
    • ex:- interruptTime = DateTime(interruptTime.get() + 300); //decide the time for next interrupt
    • This sketch also produces verbose output i.e the various events happening inside MCU are displayed in serial terminal.
  3. StalkerV21_DataLogger_15Sec_NoSerialPort.pde
    • This is similar to previous sketch with different data-log interval. All Serial Port related code is commented to reduce power consumption.
    • There is no significant reduction in power consumption by removing Serial Port related code.

Stalker v2.1 datalogger flowchart.png

A note on power consumption

The following screenshot shows the current consumption measurement of Stalker @ 3.3V input connected to LIPO_BAT. In actual application LIPO_BAT is connected to a 3.7V LiPo battery. Hence, consider the following measurement with a pinch of salt!!!
Here in the forum are some discussions about power consumption. It seems that just the RTC has a Standby Supply Current of 110µA. Here are some infos on Low Power Consuption.
But don't be sad now, even if you get down to an average draw of 1mA, you get 980 mAh/1 mA = 980h = 40.8 Days without charging

Seeeduino Stalker v2.1 datalogger 15S Current Measurement.png


Note: If you buy the "microSD Card Reader (in a capsule)", you would not need the "Mini USB cable" since the former also doubles up




Resources

Accessories










Library and Eagle File


Datasheets of Components




FAQ

Here is the Seeeduino Stalker FAQ, users can list the Frequently Asked Questions here, example as below:

  1. Has the user defined switch been removed on version 2.x of Seeeduino Stalker?
    Yes, we have removed the user button on the version 2.x
  2. In version 1.0 of Seeeduino Stalker the microcontroller could be woken up from sleep mode via interrupt from the Bee module. Is this same feature also available on version 2.0?
    In the previous version (i.e. 1.0), the microcontroller could be woken on RF data packet reception by the Bee module via its pin 15 which was connected to INT0 (PD2) of the microcontroller. In the newer version, the INT0 (PD2) pin of the microcontroller is connected by a jumper (INT_RTC) to the INT pin of the RTC chip which can wake it up at a pre-configured time (or periodically). Since Seeeduino Stalker is meant for use as a wireless sensor network node, this modification would be useful in cases where the microcontroller must wake up periodically to transmit sensor readings and go to sleep again.
  3. The I2C pin headers on Version 1.0 of Seeeduino Stalker allowed easy connection to external 3.3V as well as 5.0V devices. Is the same feature available on the version 2.x?
    Yes, in fact we have improved it - previously PCA9306 was used for level translation on I2C bus. But now we use N channel MOSFETs for translation - this technique has many advantages (refer NXP's Application Note AN97055.
  4. There is no English datasheet for the CN3083, what do I do?
    We had used CN3083 on the beta revision of version 2.1 of Seeeduino Stalker (v2.1). The final v2.0 version will have CN3063 on it. The datasheet for CN3083 is only available in the Chinese language. On the other hand, CN3063 has an English language datasheet and is attached above. Both parts: CN3063 as well as CN3083 are very much similar in operation.
  5. I find the explanation of the battery related jumpers given above a bit confusing, I need a simpler explanation.
    BAT_READ - Allows you to read the battery voltage via Analog Pin 7 of the microcontroller using its builtin Analog to Digital Convertor.
    CH_READ and CH_STATUS Are no longer connectet to Digital Pins (6 & 7) instead to Analog Pin 6, each with a Resistor, so they work like shown in the example obove
    CH_STATUS - The above two signals (CH_READ and OK_READ) also have LEDs connected to them. CH_STATUS jumper allows you to disable these LEDs and decrease power consumption.




Licensing

This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are licensed under various open source license, see source code files for details.

Copyright (c) 2008-2016 Seeed Development Limited (www.seeedstudio.com / www.seeed.cc)
This static html page was created from http://www.seeedstudio.com/wiki