Skip to content

solutions/reference-designs/ad-swiot1l-sl/sample_application: Add Tem… - #433

Closed
plescaevelyn wants to merge 1 commit into
analogdevicesinc:mainfrom
plescaevelyn:swiot1l-sample-app-clean
Closed

solutions/reference-designs/ad-swiot1l-sl/sample_application: Add Tem…#433
plescaevelyn wants to merge 1 commit into
analogdevicesinc:mainfrom
plescaevelyn:swiot1l-sample-app-clean

Conversation

@plescaevelyn

Copy link
Copy Markdown
Collaborator

…perature Controller sample application

This sample application demonstrates a closed-loop temperature control system using the AD-SWIOT1L-SL platform with 10BASE-T1L connectivity.

The demo showcases:

  • Real-time temperature monitoring via TMP01 sensor connected to AD-SWIOT1L-SL voltage input channel
  • Automatic fan control with configurable ON/OFF thresholds and hysteresis to prevent rapid cycling
  • Dual AD-SWIOT1L-SL setup: one for sensing, one for actuation
  • Communication over Single Pair Ethernet through AD-RPI-T1LPSE-SL
  • Live matplotlib visualization of temperature trends and fan state

Hardware setup instructions cover wiring the TMP01 sensor, fan actuator, and power resistor (simulating heat source). Software setup includes pyadi-iio installation, firmware flashing with static IPs, device tree overlays, and NetworkManager configuration for the T1L interfaces.

Ideal for prototyping thermal management systems, process monitoring, or learning closed-loop control concepts with industrial Ethernet.

The application is deployed here: https://plescaevelyn.github.io/adi-documentation/pull/20/solutions/reference-designs/ad-swiot1l-sl/sample_application/index.html

Type

  • Documentation
  • Bug fix
  • New feature
  • Continuous integration

Checklist

@plescaevelyn

Copy link
Copy Markdown
Collaborator Author

Hey @thorenscientific, could you please review this PR?

@thorenscientific thorenscientific left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plescaevelyn just a few suggestions, looks good!

Prerequisites
-------------

- Python 3.8 or newer (3.8–3.11 tested with pyadi-iio). Ensure that a

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a tricky one - the versions pyadi-iio is tested against is updated periodically, see pyadi-iio/.github/workflows/test.yml
The current testing range is 3.10 to 3.14. I'd suggest saying:
"Python 3.10 or newer. (Refer to pyadi-iio documentation for currently supported versions.)"
...even though the documentation doesn't list this, I'll suggest this to @tfcollins . https://analogdevicesinc.github.io/pyadi-iio/guides/quick.html would be a good place.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this, adding the supported versions to the doc is a great idea. Thanks for the review!


- Git command-line tools installed.

- Raspberry Pi with :adi:`Kuiper 2` image installed. Follow the instructions in

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to :adi:kuiper-linux
(kuiper 2 doesn't return anything)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- Git command-line tools installed.

- Raspberry Pi with :adi:`Kuiper 2` image installed. Follow the instructions in
the :doc:`/linux/kuiper/index` documentation to prepare the Raspberry Pi.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to use the kuiper tag, :ref:kuiper

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- 1x :adi:`TMP01` Temperature Sensor
- 1x MC002103 DC Axial Fan
- 1x Raspberry Pi USB Type-C Power Supply (5V, 3A)
- 1x Power Resistor (6.2Ω, 10W was used by us)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1x 6.2Ω, 10W Power Resistor

(don't hint at other options, don't want anyone burning themselves :) )

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- 1x MC002103 DC Axial Fan
- 1x Raspberry Pi USB Type-C Power Supply (5V, 3A)
- 1x Power Resistor (6.2Ω, 10W was used by us)
- 1x Power Supply for the Power Resistor (5V, 1A was used by us)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1x 5V, 1A Power Supply for the Power Resistor (a 5V USB charger is a convenient option)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- **Channel 4 (CH4)** is configured as a **Voltage Input** to measure the
TMP01 analog output. Connect:

- ``CH4 SWIO`` → ``TMP01 VOUT``

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change VOUT to VPTAT, that's the name of the pin.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


.. note::

CH3 provides a regulated 5 V supply to power the TMP01, while CH4 is

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's start this note with:
"VPTAT is a voltage output that is proportional to absolute temperature. The temperature in degrees Celsius is then calculated in software."

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, thanks!

:show-user:

$ git clone https://github.com/analogdevicesinc/pyadi-iio.git
$ cd pyadi-iio

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally analogdevicesinc/pyadi-iio#734 should be merged first or concurrent with this example.

@@ -0,0 +1,372 @@
Sample Application
==================

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make this a bit more descriptive:
Temperature Controller Sample Application

And give the page a tag like:
.. _swiot1l_temp_ctrl_sample_app:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

…perature Controller sample application

This sample application demonstrates a closed-loop temperature control
system using the AD-SWIOT1L-SL platform with 10BASE-T1L connectivity.

The demo showcases:
- Real-time temperature monitoring via TMP01 sensor connected to
  AD-SWIOT1L-SL voltage input channel
- Automatic fan control with configurable ON/OFF thresholds and
  hysteresis to prevent rapid cycling
- Dual AD-SWIOT1L-SL setup: one for sensing, one for actuation
- Communication over Single Pair Ethernet through AD-RPI-T1LPSE-SL
- Live matplotlib visualization of temperature trends and fan state

Hardware setup instructions cover wiring the TMP01 sensor, fan actuator,
and power resistor (simulating heat source). Software setup includes
pyadi-iio installation, firmware flashing with static IPs, device tree
overlays, and NetworkManager configuration for the T1L interfaces.

Ideal for prototyping thermal management systems, process monitoring,
or learning closed-loop control concepts with industrial Ethernet.

Signed-off-by: Evelyn Plesca <evelyn-iulia.plesca@analog.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants