Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCT2075 I2C Temperature Sensor #34

Open
5 tasks
Tracked by #30
Mikefly123 opened this issue Oct 21, 2024 · 0 comments
Open
5 tasks
Tracked by #30

PCT2075 I2C Temperature Sensor #34

Mikefly123 opened this issue Oct 21, 2024 · 0 comments
Assignees
Labels
new component Creating a new component for this task sensor Relating to a sensor implementation

Comments

@Mikefly123
Copy link
Member

Mikefly123 commented Oct 21, 2024

What Does This Component Do?

The PCT2075 I2C Temperature Sensor is employed in two places on the PROVES Kit, the V3x Battery Boards and the V2 Antenna Boards. The PCT is marginally smaller footprint than the MCP9808 (which has higher accuracy) and is employed when we want to squeeze a temperature sensor into the kit where space is at a premium. The PCT measures board level "ambient" temperature inside the satellite (rather than the MCP which generally measures the temperatures externally).

We want a PCT Component to do the following:

  • Differentiate the location of the PCT Temperature Sensor (currently either Battery Board or Antenna Board)
  • Detect the I2C device on the specified bus given its expected address.
  • Collect the temperature in Degrees C
  • Log the temperature at 1hz frequency
  • Command the SLEEP and WAKE of the sensor.

Design Notes

Link to PCT 2075 Datasheet
Link to Adafruit PCT 2075 C++ Library

It's a temperature sensor, not much else to say. This information will eventually get forwarded to a Satellite Health component that can make decisions about turning on and off components based on the recorded temperature. Although the task is requesting the data is collected every second it probably makes sense to set some kind of maximum buffer size for that data before it starts getting deleted.

Example CircuitPython Implementation

import adafruit_pct2075
...
class Satellite: 
    ...
    def __init__(self):
        ...
        # Initialize PCT2075 Temperature Sensor
        try:
            self.pct = adafruit_pct2075.PCT2075(self.i2c0, address=0x4F)
            self.hardware["TEMP"] = True
        except Exception as e:
            self.debug_print(
                "[ERROR][TEMP SENSOR]" + "".join(traceback.format_exception(e))
            )
    ...
    @property
    def internal_temperature(self):
        return self.pct.temperature

Reference Schematic

Screenshot 2024-10-22 at 4 43 54 PM
@Mikefly123 Mikefly123 mentioned this issue Oct 21, 2024
12 tasks
@Mikefly123 Mikefly123 added sensor Relating to a sensor implementation new component Creating a new component for this task labels Oct 21, 2024
@Mikefly123 Mikefly123 added this to the fprime-proves-v1.0 milestone Oct 21, 2024
@Mikefly123 Mikefly123 added draft Currently being drafted and removed draft Currently being drafted labels Oct 21, 2024
@JamesDCowley JamesDCowley self-assigned this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new component Creating a new component for this task sensor Relating to a sensor implementation
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants