Temperature indication in today's industrial environment encompasses a wide range of needs and applications. To meet these diverse needs, the process control industry has developed numerous sensors and devices to meet these requirements. For most machine builders, temperature is a very critical and frequently monitored variable. In the world of medicine, temperature is a fundamental variable that must be measured to maintain a healthy life, but in the world of mechanical engineering, temperature must either be maintained to operate effectively or released to prevent damage to the factory.
The Temperature Display project combines a thermocouple temperature sensor (H09R0x) with three Hexabitz RGB modules (H01BR00) that act as a temperature display.
1. FTDI USB to UART Serial cable
H09R0x is a thermocouple temperature sensor module based on the Analog Devices AD8495ARMZ instrumentation amplifier and STM32F0 MCU.
3. Hexabitz RGB LED module (H01R0x)
H01R0x is an intelligent RGB LED module based on Cree CLVBA-FKA RGB LED and STM32F0 MCU. It is our first and most popular module, as it was used to test and develop most of the Hexabitz backend!
First, we prepare the project parts and plan our array design by aligning the four modules side by side.
- Then we solder the modules together using Hexabitz Fixture.
The topology array will be written to the topology.h file located in the user folder, and will be the same for all four modules, and will look like this
To begin, we specify the number of modules and then write the topology array (click this link (https://hexabitz.com/docs/how-to/make-a-pre-built-array-topology-file/) for more information).
Then we specify which ports to swap in each module:
And the same thing to moldule3 and module4.
After creating the topology for the four modules and setting their configurations, we insert the topology for each module. Then we start writing the main.c program for the temperature sensor (H09R0x) module. First, we specify the temperature ranges of the thermocouple temperature sensor module (H09R0x) to be displayed on the modules RGB LED (H01R0x) for instance, we've chosen this temperature ranges:
Then we define "Tempc" as a float variable as follows:
We obtain the temperature sample (in degrees) using the following API:
float SampleC(float *tempc);
Then we divide the ranges to turn on the corresponding LEDs as follows:
If the temperature range is less than 10 degrees, we send a message to the first LED, to turn it on in blue color and 75% density, and send a message to the second and third LEDs to turn them off. The same is true for other temperature ranges.
3) References:نقه
Comments