Skip to content

Heater Driver #48

@alexapostolu

Description

@alexapostolu

We have a heater for the batteries. We need a driver to 1) set the temperature and 2) read the temperature.

  1. The heater applies heats based on the current applied, so the longer current is applied the more it heats up until it reaches its max temp. We can control the current applied by turning on and off a load switch. The load switch can be represented as a GPIO device in Zephyr.

  2. The temperature of the heater is measured by a thermistor. The thermistor goes through an analog to digital converter (ADC), which is built into the STM32, so we can convert the thermistor value to a temperature value. Zephyr provides an ADC driver which we can use. So we just have to use the ADC driver to read the analog signal.

From Coby,

the thermistors go directly into PA0. The STM32s have built in 12-bit ADC's. The temperature reading you'll be getting is from 0 to 2^12. We're using a reference voltage of 3V0 so the analog reading will be a linear mapping of [0V, 3V] to [0, 2^12)


The heater driver will consist of various functions that read and set the temperature. The first step would be coming up with a rough idea of the functions we might want (including the parameters, return values, etc.). Feel free to talk with Mirai or myself for ideas. Then the next step would be setting up the GPIO device and ADC driver in Zephyr, and making sure the code can build without error.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions