...
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. |
...
Info |
---|
The ports we are interested in:
Speculated ports:
|
...
\uD83E\uDD14 Current Roadblocks
...
- Understand project specifications
- Understand the I2C protocol
- Understand the CAN protocol
- Understand DroneCAN
- etc.
Open Questions
What is
REF_SEL
set to for the battery monitoring boards?Are our speculated ports correct?
What is transmitted over Why are we reading the battery and voltage information via both I2C ?What is the voltage range for the signals our MCU receives for the voltage and current info from the battery monitoring circuitsand analogue pins?
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?
...
I2C: I2C - Inter-Integrated Circuit
I2C is all about registers (i.e. memory that can be accessed by an address)
Each I2C peripheral has its own register map (i.e. what the registers are used for, such as storing the voltage of a cell)
To read data from a peripheral, you send an address to it, and it will respond with data
To write data to a peripheral, you tell it which address to write to, and what data to write
CAN:
A general description of CAN: https://uwarg-docs.atlassian.net/wiki/x/BgDPlw
DroneCAN: a protocol built on top of CAN to communicate information between drone parts and the FC: https://dronecan.github.io/
Libcanard: an implementation of DroneCAN for low-end microcontrollers. An example code on how to use it: https://github.com/dronecan/libcanard/blob/master/examples/SimpleNode/simple_node.c
A helpful presentation on CAN: https://docs.google.com/presentation/d/12i6TiUuXQw5mO2u3pq8DMXTD1bCRe8rJtzVZRk6pDz0/edit?usp=sharing
A helpful document on CAN applications: https://uwarg-docs.atlassian.net/wiki/x/AwA8q
...