Skip to content

CamarenaAI/CanSat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📡 CanSat - Mini Satellite in a Can

A CanSat is a miniature satellite with the size and shape of a soda can ("Can" in English). It is used to conduct scientific and technological experiments in the atmosphere or space.

Once launched from a rocket or drone, the CanSat deploys and begins transmitting data and measurements to Earth via radios and other communication systems.

🛰 CanSat Components

A CanSat typically includes the following essential components:

  • 🔬 Sensors (pressure, temperature, humidity, acceleration, GPS)
  • 📊 Measurement devices to collect environmental data
  • 📡 Communication systems to transmit real-time telemetry
  • ⚙️ Other electronic equipment depending on the experiment design

🔌 Arduino Libraries Used

This project utilizes the following Arduino libraries to interface with the sensors:

📚 Library 📌 Description 🧑‍💻 Author
BMP280_DEV Controls the BMP280 pressure and temperature sensor Martin Lindupp
TinyGPSPlus Processes GPS data from the VK16E module Mikal Hart
DTH22 Controls the DTH22 Humidity and temparature sensor Adafruit
INA129 Measure battery voltage and current consumption Adafruit

XBee Configuration Guide

Requirements

  • 2x XBee Series 2 (XB24-B) modules
  • 1x XBee USB adapter (for the Coordinator)
  • 1x XBee adapter or shield (for the Router + Microcontroller)
  • 1x Microcontroler (Atmega328P)
  • Digi XCTU software (Linux, macOS, or Windows)
  • USB cables

Add your modules in XCTU

  1. Open XCTU.
  2. Click the “Add radio module (+)” icon.

add_module

Image 1. Add module

  1. Select the COM port of your XBee and click Finish.

select_port

Image 2. Select port

  1. Repeat for both modules (Coordinator and Router).
  2. Verify both appear in the Radio Modules list.
    • Click the “Discover radio module (browse)” icon.

select_port

Image 3. Select ports to found XBee modules

select_port_parameters

Image 4. Select port parameters

select_xbee_module

Image 5. Select the Xbee module

xbee_modules

Image 6. Xbee modules


Identify firmware

In the Radio Configuration tab, check:

  • Product family: XB24-ZB, XB24-B, or similar.
  • Function set: choose according to your firmware version:
    • ZigBee Coordinator AT
    • ZigBee Router AT
    • (or ZNet 2.5 variants if available)

module_configuration

Image 7. Radio Configuration


Coordinator configuration

Select the Coordinator module and set the following parameters:

Parameter Command Value Description
PAN ID ID 1234 Same network ID for all devices
Channel CH C Common channel
Coordinator Enable CE 1 Set as Coordinator
Destination Address High DH 0
Destination Address Low DL 0 or FFFF Receive from all routers
API Enable AP 0 Transparent (text) mode
Baud Rate BD 3 (= 9600 bps) Must match Arduino
Node Identifier NI COORD Optional name

Click Write (pencil icon) to save configuration.


Router configuration

Select the Router module and set the following parameters:

Parameter Command Value Description
PAN ID ID 1234 Must match Coordinator
Channel CH C Must match Coordinator
Coordinator Enable CE 0 Router mode
Destination Address High DH 0
Destination Address Low DL 0 or FFFF Broadcast
API Enable AP 0 Transparent mode
Baud Rate BD 3 (= 9600) Must match Arduino
Node Identifier NI ROUTER1 Optional name
Sleep Mode SM 0 Always on
Join Verification JV 1 Auto rejoin on power-up

Click Write to save.


Check network association

  1. Disconnect and reconnect both XBee modules.
  2. In XCTU, click the Network Working Mode icon (mesh symbol).
  3. Click Discover radio network.
  4. You should see:
    • The Coordinator in the center.
    • The Router connected to it.
  5. The ASSOC LED on the Router should blink once per second (associated successfully).

Test communication

  1. Select the Coordinator → open Console → click Open.
  2. Select the Router → open Console → click Open.
  3. Type in one console window — the message should appear in the other.

If you can send and receive messages both ways, your XBee network is configured correctly.

data_test

Image 8. Data Test


Connect the Router to Microcontroller

🔹 Wiring

XBee pin Microcontroller pin Description
VCC (3.3 V) 3.3 V Power supply
GND GND Common ground
TX (pin 2) D2 RX of Microcontroller
RX (pin 3) D3 TX of Microcontroller

Arduino code example

#include <SoftwareSerial.h>
SoftwareSerial xbee(2, 3); // RX, TX

void setup() {
  Serial.begin(9600);
  xbee.begin(9600);
  Serial.println("XBee Router Ready...");
}

void loop() {
  xbee.println("Hello from Arduino Router!");
  delay(1000);
}

Save & reuse configuration

  • You can save and reuse your configuration:
    • Click the gear icon → Save profile (Coordinator and Router separately).
    • Load it later with Import profile for new modules.

⚙️ Alonso Ismael Camarena

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages