Seeeduino-Stalker v3

From Wiki 来自痴汉的爱
Jump to: navigation, search

[中文]

Seeeduino Stalker v3.0 is a feature rich Arduino compatible Wireless Sensor Network node especially useful for outdoor data-logging applications . It has a X-Bee carrier board for using with X-Bee modules, such as GPS Bee, Bluetooth Bee and Wifi Bee, etc. Its modular structure and onboard peripherals makes it convenient to log time stamped sensor data on a periodic basis. Seeeduino Stalker comes with a RTC with backup power, SD Card Socket, Bee Socket and Solar based Li-Ion Battery Charger. The Seeeduino Stalker is a good candidate for all your tracking, monitoring and control projects.

To buy this product, click the following link: Seeeduino-Stalker v3

NOTE: Seeeduino Stalker v3.0 is the latest version of this board. Please Look here for comparison with older versions of this board. Seeeduino Stalker V3 has many features and offers ways to modify the functionalities by soldering or disconnecting PCB jumpers. Please understand this document and refer to the schematic before programming.

Seeed Stalker v3-6.pngSeeed Stalker v3-7.png


Contents


Features

  • Compatible with Seeeduino (I/O ports use 3.3V Logic). Can be programmed with Arduino Processing language.
  • Onboard microcontroller: ATMega328P
  • Onboard Real Time Clock chip DS1337S (Socket for a CR1220 coin cell, which acts as a backup power source for RTC)
  • Serial interface with DTR for auto reset during programming when operating in standalone mode. (For programming, UartSBee must be bought separately).
  • microSD card socket
  • I2C Pin header (operation voltage is selectable: 5.0V or 3.3V)
  • Grove interface (operation voltage is selectable: 5.0V or 3.3V)
  • Reset buttons for XBee Modules and ATMega328P
  • Bee series socket - 2*10 pin 2.0mm pitch (which will mate with - one at a time - any of the wireless modules: XBee, BluetoothBee, GPSBee or RFBee.)



Specification

Parameter Value
MCU ATmega328
Crystal Oscillator 8 MHz
RTC DS1337S
I/O Logic 3.3v
Board for Arduino IDE Arduino Pro or Pro Mini (3.3v , 8 MHz)w/ATmega328
Power Supply 3.7v LiPo Battery, Use 5VDC solar panel for charging the battery.
Power Connector 2 pin JST/ USB
Connectivity I2C, UART, SPI
Open Circuit Current 6 mA max
Charging Current 300mA
Maximum Current on 3.3v port 800mA
Size of PCB 86.74mm x 60.96mm

Application Ideas

  • Wireless Sensor Network (using XBee - bought separately)
  • GPS Logging (using GPSBee - bought separately)
  • Data Acquisition System capable of communicating with an App running on iPhone/Android Phone (using BluetoothBee - bought separately).
  • RF Remote Control (using RFBee - bought separately).
  • As a simple standalone Arduino compatible physical computing platform (UartSBee must be bought separately for programming).



Hardware Overview

Seeed Stalker v3.png


  • RST for Bee : Press this button to reset the Bee module. However, this reset button does not affect the state of the main board(ATmega328).
  • RST for ATmega328 : Press this button to reset the main board.
  • ATmega328 : The micro controller of the main board. And the crystal oscillator is 8MHz.
  • SD Socket : It is convenient to store data on an SD card. There is a pad (P2) for soldering to turn the power supply of SD card ON or OFF via Digital pin D4.
  • Bee Socket : There is provision for the main board to communicate with other wireless modules via the Bee socket. There is a pad (P1) to turn the power supply ON or OFF via Digital pin D5.
  • Solar Panel : Catch the sunshine and transfer it to power via the solar panel, without the constraint of USB cable.
  • Li-Po BAT : Provide power supply to the main board via Li-Po BAT; The battery can be charged by solar panel.
  • CN3065 : Lithium Ion Battery charger for solar-powered systems. There are also two director lights on the board, they are "OK" and "CH" on the side of Li-Po BAT, which mean "Charged" and "Charging" respectively.
  • TD6810 : 1.5MHz 800mA Synchronous Step-Down Regulator Dropout, which provides 3.3v power supply to the main board.
  • RTC : I2C Serial Real-Time Clock -- DS1337S. And two optional interrupt signal pins have been breakout as pads(P3 and P4). These jumper pads can be used to connect RTC /INTA pin to Digital Pin D2 and RTC /INTB to Digital pin D3.
  • BAT for RTC : A CR1220 battery, to provide power supply to RTC independently.
  • Grove Connectors : On the board there are two Grove connectors, i.e. I2C and D7. And you can plug Grove products onto the board directly via these Grove connectors.
  • UartSBee Headers : The UartSBee headers are used with UartSBee v4, you can upload program to the main board via these headers.


PCB Jumper Pads

The bottom side of Seeeduino Stalker V3 has many PCB jumper pads optionally changing the configuration / functionality. The below table provides details about the same.

Jumper Pads Name Application Circuit
P1 Soldering these jumper enables Digital pin D5 to ON or OFF power-supply of Bee Socket Seeeduino Stalker Jumper Pad P1.jpg
P2 Soldering these jumper pads enables Digital pin D4 to switch ON or OFF power supply of SD. Seeeduino Stalker Jumper Pad P2.jpg
P3 Soldering these jumper pads connects RTC /INTA pin to Digital Pin D2(INT0). Seeeduino Stalker Jumper Pad P3.jpg
P4 Soldering these jumper pads connects RTC /INTB to Digital pin D3(INT1). Seeeduino Stalker Jumper Pad P4.jpg
P5 This jumper by default connects BEE_TXD to Digital pin D0 (H/W UART TXD). By cutting the existing PCB connection and soldering to adjacent pad, BEE_TXD can be connected to Digital pin D7 for S/W Serial.
Note: There is a know hardware bug. Please read here for a work-around.
Seeeduino Stalker Jumper Pads P5andP6.jpg
P6 This jumper by default connects BEE_RXD to Digital pin D0 (H/W UART RXD). By cutting the existing PCB connection and soldering to adjacent pad, BEE_RXD can be connected to Digital pin D6 for S/W Serial. Seeeduino Stalker Jumper Pads P5andP6.jpg

Apart from these, there are other jumper pads for WIRELESS_PROGRAMMING, RSSI_STATUS and CH_STATUS. These are by default connected and please refer to the schematic if you would like to modify any functionalities.

Getting Started

If you are new to the "Physical Computing" world and if Seeeduino Stalker v3.0 is the first physical computing platform you want to begin with, then we suggest you to start with Seeeduino.

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

Step 1. Acquiring the hardware


LEFT
The picture above shows the hardware and components required for Seeeduino Stalker v3 to communicate with PC. The Stalker does not have USB to Serial functionality. Hence, UartSBee is necessary for programming Stalker via PC. Other USB to Serial converter board can be used to replace UartSBee v4.
Note: UartSBee v4 needs to be bought separately.

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:
    • To program the Seeeduino Stalker.
    • To communicate with Seeeduino Stalker.
    • Provide power (from USB power of PC) to Seeeduino Stalker (including any peripherals connected to it).
  2. UartSBee has an on-board voltage regulator and a switch to select the target board voltage ( either 5.0V or 3.3V). In case of Seeeduino Stalker, set this slide switch to 5.0V.
  3. The wiring connection scheme of the 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. Note: The TXD and RXD pins must are cross connected as shown in the table.
  4. Connect the Mini USB cable from UartSBee to PC. If you are using a Windows based PC, the "Found New Hardware" balloon will popup and within a few moments the FT232 drivers will be installed.


The following table shows the connection between Seeeduino Stalker v3 and UartSBee v4.

Pins connection
Seeeduino Stalker v3       UartSBee v4
5V   ↔   VCC
RXD   ↔   TXD
TXD   ↔   RXD
GND   ↔   GND
DTR   ↔   DTR



Demos

Download and install the DS1337 library and sketches available in the resources section. DS1337 library includes modified version DateTime class by Jean-Claude Wippler at JeeLabs

  • The datalogger demo sketches makes use of the Arduino SD Library.

1.RTC

Please pay attention: You need to solder some pads while using the "Interrupts" demo

How to solder
Pins on RTC Pads on Seeeduino Stalker v3 Pins on ATmega328
INTA P3 digital 2
INTB P4 digital 3


Adjust Date/Time


  • Set Arduino board as Arduino Pro or Pro Mini (3.3V, 8MHz) w/ ATmega 328.
  • Open adjust.ino example from DS1337 library
  • Set the current date/time using the DateTime Class object dt in the example:
    • DateTime dt(year, month, date, hour, min, sec,week-day(starts from 0 and goes to 6));
    • Ex:- DateTime dt(2015, 10, 1, 11, 43, 0, 4);
  • compile and upload to Seeeduino-Stalker v3
adjust.ino output

Get Current Date/Time


  • Set Arduino board as Arduino Pro or Pro Mini (3.3V, 8MHz) w/ ATmega 328 .
  • Open now.ino example from DS1337 library
  • The current date/time is read from DS1337 using RTC.now() function.
    • Ex:- DateTime now = RTC.now();
  • compile and upload to Seeeduino-Stalker v3
now.ino output

DS1337 Interrupts Example


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

  • Solder P3 jumper.
    • This connects the DS1337 interrupt out pin to ATmega328 INT0 pin.
  • Set Arduino board as Arduino Pro or Pro Mini (3.3V, 8MHz) w/ ATmega 328.
  • Open interrupts.ino example from DS1337 library
  • compile and upload to Seeeduino-Stalker v3
interrupts.ino output

Data Logger Example


The principal application of Seeeduino Stalker v3.0 is data-logging of sensor signal like battery voltage, etc along with the time-stamp. This sketch 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 :

  1. StalkerV30_DataLogger_10Sec.ino
    • This sketch logs battery voltage data 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() + interruptInterval); //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.
Overview of Data-logger implementation

Read the charging status


The battery charging status can be read using the below sketch. The battery can be charged by plugging solar panel onto the board or via the UartSBee.

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 the voltage of Li-Po BAT


The voltage of the Li-Po battery connected to Seeeduino Stalker V3 can be read by Analog pin A7. The below sketch demonstrates this.

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);
}

Reference: analogReference

Additional information for using the Bee module

The following tables show the default UART connection between Bee Socket and ATMega328 MCU.

How to use
Pins on Bee socket Pins on ATmega328
BEE_TXD digital 0
BEE_RXD digital 1

Also, you can turn the power supply of Bee module on or off by the optional pad.
Operation: On the back of Seeeduino Stalker v3, you can find a solder pad "P1". Solder the P1 and use the following code to cut off the power supply.

digitalWrite(5,HIGH);

Known Issue

Affected users: This issue affects those who would like to use the optional feature of connecting Bee Socket to software serial port instead of H/W serial port(default).

Issue: Jumper P5 can not be configured to use software serial port by cutting the default connection and resoldering (i.e) BEE_RXD can not be connected to PD7 instead of default PD1 by simply cutting/soldering the jumper as per P5 description. There is a hardware bug.

Workaround:

1. On the top layer cut the routing from PD1/TXD signal to R16 resistor as shown in the following pictures. Please use a sharp knife and gentle cut the connection:

Before modification
After modification

2.Now apply the procedure mentioned in P5 jumper description (i.e) cut the jumper and solder the middle pad of Jumper P5 to PD7.

Board Layout

The Images are taken from the EAGLE Files



Resources

Personal tools
Namespaces

Variants
Actions
Bazaar
Navigation
Collections
Toolbox