FW15 Telemetry
Task Structure
SD Card Logging Task - 500ms (Maybe more, depending on how much data we are logging) with priority 3
Will write the entire RX struct onto the SD card.
Considerations: We CURRENTLY (September 8, 2024) have 17 messages on CAN. For an overestimate and to include undeveloped systems like MPPTs and IMUs, let’s assume we have 30 messages in total. Assuming each message is the full 64 bits, we will have 1920 bits in total. This gives us 3840 bits/sec. This is a relatively slow data rate.
Needs more research but good resources:
https://www.eevblog.com/forum/microcontrollers/sd-card-writing-speed/
How to Use MMC/SDC
XBee UART Task:
Update the can_receive function in can.c so every successful queue_pop will trigger a UART data transmission. The XBee UART Task will continuously call can_rx_all() so our rx_struct updates while sending data live.
PROS: Easy to implement and accounts for our mono-repo projects. It will support all data transmission regardless of the rate of transmission.
How to use XBEE
Programming the XBEE
How to Set up an XBee Module with Arduino | Arduino
TX: Send UART to the XBee. It will handle the RF communication for us.
RX: Receive UART from the XBee.
To configure the radio channel, scanning periods, XBee ID, master/slave configurations use XCTU
Digi XCTU
Notes:
Connect to the XBee by click the magnifying glass button on the top right corner (as shown on image)
Keep everything default and just search
If nothing pops up, try making sure that the ports are working and the correct drivers are installed
If it still doesn’t work try redownloading the firmware through the recovery tool in the tools dropdown on the top of the page. The product family is on the white stick tag of the XBee
Make sure to update the firmware of each XBee. The Product family is on the white sticker tag on the back of the XBee.
You can update the firmware by pressing update button (on the right hand side of image below)
If the chip icon on the has a “C” like on the 2nd chip “CO-YODA” in the image below, it is a Coordinator, meaning it sends out the messages. Chips with “E” are the ends, which receive the message
Things Other Teams Do
UBC: Runs a bare-metal application that runs off ISRs. Warned us about packet linkage occurring, where adjacent packets have no distinction on the receiver's side. Seems to be a transceiver issue and is likely not a FW issue. However, we can include software checks to prevent this.