Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Specifications (from the EE Team)

Overall Hardware Architecture (taken from https://uwarg-docs.atlassian.net/wiki/x/AoCsmQ )

Inc drawio
zoom1
simple0
isSketch0
custContentId2795208817
pageId2578219010
lbox1
diagramDisplayNameUntitled Diagram-1719935379177.drawio
hiResPreview0
baseUrlhttps://uwarg-docs.atlassian.net/wiki
imgPageId2841149698
diagramNameUntitled Diagram-1719935379177.drawio
pCenter0
aspectgNHAFkkuJoC4MAd_17IC 1
width1656
includedDiagram1
aspectHash515ab772fb9a87493f9c5f2f2354dc7c48aabf45
linksauto
tbstyletop
height764

Background

The drone uses a battery pack containing 12 cells, where 2 groups of 6 cells are each connected in series (hence 6S).

Each group of 6 cells is connected to a battery monitoring circuit (shortened as BMC later).

This circuit measures:

  • The voltage of each cell

  • The current delivered by the group

    • This is done by forcing the battery to deliver current through a resistor with a tiny resistance. This resistor, called a shunt/shunt resistor, follows Ohm’s law: V=IR

    • This implies that I=V/R, which means that the current passing through a shunt is equal to its voltage (which can be measured easily), divided by its resistance (which is a known constant).

And it sends:

Note

We are not exactly sure of everything yet.

  • Battery-related information relating to the voltages and currents

  • The voltage and current information are sent as 2 analog signals, which our microcontroller converts to digital ones via an Analog-to-Digital Converter (ADC).

  • Some other information is sent via the I2C protocol

Description

Info
  • MCU (STM32xX) in the top right is the microcontroller that we are writing the code to

  • Its job is to translate the messages it receives from the BQ76925 6s LiPo Battery Monitor boards and send the corresponding messages to the flight controller (FC) using the CAN protocol

Expand
titleWhy are we making this?

The FC needs this information to make other decisions, e.g. if a part is consuming too much power, or when to land

Specific Hardware Information (taken from https://uwarg-docs.atlassian.net/wiki/x/HYBXq)

...

Info

The ports we are interested in:

  • PA9: SCL_1, Serial Clock line for I2C 1, to configure BMC 1

  • PA10: SDA_1, Serial Data line for I2C 1, to configure BMC 1

  • PA7: SCL_2, Serial Clock line for I2C 2, to configure BMC 2

  • PB4: SDA_42, Serial Data line for I2C 2, to configure BMC 2

  • PA12: CAN_TX, Transmit line for CAN

  • PA11: CAN_RX

Speculated ports:
  • , Receive line for CAN

  • PA3: Receives a digital signal representing whether an overcurrent occurredPA5: Receives an analogue signal OVERCURRENT, receives 5.5 V when an overcurrent occurs, and 0 V otherwise

Speculated ports:

  • PA5: VCOUT1_FILT, receives 1.47-1.53 V (REF_SEL=0) / 2.94-3.06 V (REF_SEL=1), representing the cell voltages for cells 1-6

  • PB0: Receives an analogue signal ADC1_FILT, receives 0.25-1.25 V (REF_SEL=0) / 0.5-2.5 V (REF_SEL=1), representing the cell currents current for cells 1-6PB1: Receives an analogue signal , as measured by a 1-milliohm shunt

  • PB1: VCOUT2_FILT, receives 1.47-1.53 V (REF_SEL=0) / 2.94-3.06 V (REF_SEL=1), representing the cell voltages for cells 7-12

  • PA2: Receives an analogue signal ADC2_FILT, receives 0.25-1.25 V (REF_SEL=0) / 0.5-2.5 V (REF_SEL=1), representing the cell currents current for cells 7-12, as measured by a 1-milliohm shunt

...

\uD83E\uDD14 Current Roadblocks

Note

Libcanard has a high learning curve. Neither the DroneCAN website nor the Libcanard repo has beginner-friendly tutorials. YouTube videos also won’t help directly

Tasks Break Down:

✅  Action Items

  •  etc.

\uD83D\uDEA9 Milestones

  •  Understand project specifications
  •  Understand the I2C protocol
  •  Understand the CAN protocol
  •  Understand DroneCAN
  •  etc.

Open Questions

...

  • What is transmitted over I2C?What is the voltage range for the signals our MCU receives for the voltage and current info from the battery monitoring circuitsREF_SEL set to for the battery monitoring boards?

  • Are our speculated ports correct?

  • How should the MCU beacon itself to the FC (i.e. so that the FC is aware that the MCU on the power module is there)?

  • What should be sent over CAN?

...

\uD83D\uDD17 Reference materials

Relevant protocols

...