HomeElectronicsDesigning a thermometer with a 3-digit 7-segment indicator

Designing a thermometer with a 3-digit 7-segment indicator



Designing a thermometer with a 3-digit 7-segment indicator

Reworking a easy 10-kΩ NTC thermistor right into a exact digital thermometer is a good instance of mixed-signal design in motion. Utilizing a mixed-signal IC—AnalogPAK SLG47011—this design measures temperatures from 0.1°C to 99.9°C with spectacular accuracy and effectivity.

SLG47011’s analog-to-digital converter (ADC) with programmable achieve amplifier (PGA) captures exact voltage readings, whereas its reminiscence desk and width converter drive a 3-digit dynamic 7-segment show. Every digit lights up in speedy sequence, making a secure indication for a consumer, a neat demonstration of environment friendly multiplexing.

Compact, versatile, and self-contained, this design exhibits how one system can seamlessly deal with sensing, computation, and show management—no microcontroller required.

 

Working precept

The circuit schematic of the thermometer with a 3-digit 7-segment indicator is proven in Determine 1.

Determine 1 The circuit schematic shows a thermometer with 3-digit 7-segment indicator. Supply: Renesas

The VDIV = 1.8 V voltage is utilized to PIN 7 by way of a resistive divider RT / (R + RT), the place R = 5.6 kΩ. PIN 8 prompts the primary digit, whereas PIN 6 prompts the second digit and decimal level. PIN 4 prompts the third digit.

The sign from PIN 7 goes to the single-ended enter of the PGA (buffer mode, mode #6) after which to ADC CH0 for additional sampling. The allowable temperature vary measured by the thermometer is 0.1°C to 99.9°C (or 273.25 Okay to 373.05 Okay).

The voltage (VIN) after the resistive divider is the same as:

The ADC converts this voltage to a 10-bit code utilizing the method:

Whereas,

  • RT is the resistance of the NTC thermistor:
  • R0 = 10,000 Ω is the resistance at ambient temperature T0 (25°C or 285.15 Okay)
  • B = 4050 Okay is a continuing of the thermistor
  • VIN is the voltage on PIN 7
  • 1024 represents the 10-bit decision of the ADC (210)
  • 1620 represents the inner Vref in mV
  • VINdec is VIN in 10-bit decimal format

The utmost worth of VINdec is 1023.

The NTC thermistor resistances for the minimal and most worth of the temperature are calculated utilizing equations under:

The utmost voltage after the resistive divider is

The minimal voltage after the resistive divider is

The connection between the measured temperature and VIN for the utilized parameters of the circuit is proven in Determine 2.

Determine 2 Graph exhibits the connection between temperature and VIN.

Thermometer design

The GreenPAK IC-based thermometer design is proven in Determine 3. Obtain free Go Configure Software program Hub to open the design file and see how the performance is carried out.

Determine 3 Thermometer with 3-digit 7-segment indicator design is constructed round a mixed-signal IC. Supply: Renesas

The SLG47011 mixed-signal IC incorporates a reminiscence desk macrocell that may maintain 4096 12-bit phrases. This house is sufficient to retailer the values of every of the three indicator digits for every VINdec (1024 * 3 = 3072 values in whole). In different phrases, the 3n phrase of the reminiscence desk corresponds to the primary digit, the 3n + 1 to the second digit, and the 3n + 2 to the third digit of every corresponding T, the place n = VINdec.

The ADC output worth is shipped to the MathCore macrocell, the place it’s multiplied by three. This worth is then used as a reminiscence desk deal with. Assuming that the ADC output is 1000, the MathCore output is 3000. Which means the reminiscence desk values at 3000, 3001, and 3002 addresses shall be used and can correspond to the indicator’s first, second, and third digits accordingly.

Knowledge from the MathCore output goes to the IN+ CH0 enter of the multichannel DCMP macrocell. This information is in contrast with the info on the IN- CH0 enter, which is taken from the Knowledge Buffer0 output. Knowledge Buffer0 shops the info from the CNT11/DLY11/FSM0 macrocell, which operates in Counter/FSM mode.

The Counter/FSM is reset to “1” when a HIGH sign from the ADC data-ready output arrives and begins counting upward. The multichannel DCMP OUT0 output is linked to the Hold enter of CNT11/DLY11/FSM0. Which means when the CNT11/DLY11/FSM0 present worth is the same as the MathCore output worth, the DCMP OUT0 output is HIGH, and the Hold enter of CNT11/DLY11/FSM0 can be HIGH, conserving the counted worth for additional addressing to the reminiscence desk.

On the identical time, along with CNT11/DLY11/FSM0, the Reminiscence Management Counter is counting upward from 0 and units the reminiscence desk deal with.

Thus, when the ADC measures a sure voltage worth, the beforehand described comparability operation will level to the corresponding voltage worth saved within the reminiscence desk—three consecutively recorded digits, that are then dynamically displayed on the 7-segment show.

The reminiscence desk’s saved information then goes to the width converter macrocell, which converts the serial 12-bit enter right into a parallel 12-bit output (Desk 1).

Desk 1 The above information highlights width converter connections. Supply: Renesas

The inverter allows the decimal level (DP) by way of PIN 16 based mostly on state of 3-bit LUT0 (second digit).

To dynamically show the temperature, the digits shall be ON sequentially with a interval of 300 μs. The interval is ready by the CNT2/DLY2 macrocell (in Reset Counter Mode). The three-bit LUT4 units the clock of the width converter based mostly on its synchronization with the CNT11/DLY11/FSM0 clock and the state of DCMP OUT0.

The P DLY, DFF8, and 3-bit LUT12 macrocells type a state counter for the Up/Down enter of the Reminiscence Management Counter macrocell based mostly on the state of the second digit (falling edge on OUT2 of the width converter).

When the primary digit is ON, the Reminiscence Management Counter counts upward by 1; when the second digit is first set ON, the state counter is ready to LOW, forcing the Reminiscence Management Counter to depend down, whereas it has already activated the third quantity. Subsequently, the second quantity is activated once more, and the state counter goes HIGH, forcing the Reminiscence Management Counter depend upward, whereas it has already activated the primary digit. Thus, all three digits shall be sequentially activated till there’s a new measured worth from the ADC macrocell.

CNT8/DLY8, CNT12/DLY12/FSM1, and 3-bit LUT7 are used to correctly activate the ADC after the primary turn-on when POR arrives, in addition to throughout additional operation when the ADC is turned on and off. CNT12/DLY12/FSM1 offers a interval of 1.68 s, which ends up in the thermometer worth being up to date each 1.68 s.

Reminiscence desk filling algorithm

The algorithm under is proven for a VDIV voltage of 1.8 V and a resistive divider of 5.6 kΩ and RT.

First, the resistance worth of RT (Ω) at ambient temperature T is calculated utilizing the method:

Second, the worth of the temperature t (°C) for a decided RT worth is calculated by:

Then, the calculated t (°C) values are rounded to the primary decimal level.

For every VINdec worth, three values are assigned within the reminiscence desk as follows: every VINdec corresponds to 3 consecutive values within the reminiscence desk 3n, 3n + 1, and 3n + 2, the place n = VINdec.

Three separate columns for every of the values of 3n, 3n + 1, and 3n + 2 needs to be created. They every correspond to the primary, second, and third digits of the indicator, respectively. The primary column is assigned to the primary digit of the rounded t worth. The second column is assigned to the second digit, and the third column is assigned to the third digit.

For every digit of every column, a 7-bit binary worth is discovered (m11 – m5), comparable to the activation of the corresponding digit of the 7-segment show (Desk 2).

Desk 2 The above information highlights the 7-segment code. Supply: Renesas

When the measured tmeas temperature is in vary 0.1°C > tmeas > 99.9°C, the 0 – L symbols needs to be displayed on the indicator. The third digit isn’t activated on this case.

The subsequent step is so as to add 5 extra bits (m4 – m0) to the suitable of this worth to get a 12-bit quantity.

The ninth bit (m3) is answerable for turning on the primary digit, the tenth bit (m2) is answerable for turning on the second digit, and the eleventh bit (m1) for the third digit. Since a 7-segment indicator with a typical cathode is used, turning on the digit is completed with a LOW stage (0). Subsequently, for the primary column (with phrases of sort 3n), the ninth bit (m3) will equal 0, whereas the tenth (m2) and the eleventh (m1) bits will equal 1.

For the second column (with phrases of sort 3n + 1), the tenth bit (m2) shall be equal to 0, whereas the ninth (m3) and eleventh (m1) bits shall be equal to 1. For the third column (with phrases of sort 3n + 2), the eleventh (m1) bit shall be equal to 0, whereas the ninth (m3) and tenth (m2) bits shall be equal to 1.

The twelfth bit (m0) isn’t used, so its worth doesn’t have an effect on the design. The ensuing 3072 binary 12-bit values should then be transformed to hex.

The required values for the reminiscence desk are already decided, now they have to be sorted in ascending order of the Phrase index and inserted into the suitable location within the software program. For a greater understanding of the connections between the reminiscence desk and the width converter, view Determine 4.

Determine 4 The above diagram highlights connections between the reminiscence desk and the width converter. Supply: Renesas

Take a look at outcomes

Determine 5 exhibits the results of measuring a temperature of round 17°C with respect to information obtained by a multimeter thermocouple.

Determine 5 Temperature vary is ready as much as room temperature of round 17°C. Supply: Renesas

Determine 6 exhibits the results of measuring a temperature of round 59°C with respect to information obtained by a multimeter thermocouple.

Determine 6 The measurement outcomes present a temperature of round 59°C. Supply: Renesas

Determine 7 exhibits the results of measuring a temperature of round 70°C with respect to information obtained by multimeter thermocouple.

Determine 7 The measurement outcomes present a temperature of round 70°C. Supply: Renesas

The mixed-signal integration

This design illustrates a sensible method to implementing a compact digital thermometer utilizing the SLG47011 mixed-signal chip. Its ADC with PGA allows exact oblique temperature measurement, whereas the reminiscence desk and width converter handle dynamic management of the 3-digit 7-segment indicator.

By adjusting the resistive divider and updating the reminiscence desk, engineers can simply redefine the measurement vary to go well with totally different purposes. The consequence is an easy and versatile thermometer design that successfully demonstrates mixed-signal integration in follow.

Myron Rudysh is software engineer at Renesas Electronics.

Nazar Ftomyn is software engineer at Renesas Electronics.

Yaroslav Chornodolskyi is software engineer at Renesas Electronics.

Bohdan Kholod is senior product growth engineer at Renesas Electronics.

Associated Content material

The publish Designing a thermometer with a 3-digit 7-segment indicator appeared first on EDN.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments