Breadboarded: Curiosity-Nano — Thermistor with four 7-segment display

Using a Curiosity Nano dev board to read an analog voltage reading from the NTC thermistor, and sending a digit to display to a constant current LED driver IC to drive a four digit, seven segment display.

Parts list:

Using a Curiosity Nano dev board to read an analog voltage reading from the NTC thermistor, and sending a digit to display to a constant current LED driver IC to drive a four digit, seven segment display.

I had built a similar setup using Arduino, but this time I wanted to use the constant current LED driver. After reading the TLC5916’s datasheet, it seemed I just need to ‘clock in’ eight bits of data, strobe the latch, and bring the output enable pin low.

If you want more information about how the 7 segment displays work, check out my post where I used it in my final project for engineering programming, Engineering Programming Final Project.

Here is the schematic:

First things first. Can we get the ATTiny1627 to bit-bang out our data to the LED driver?

Assuming our four data pins to the LED driver are all set to output, it should just be a matter of a few sequential pin changes, strobing the latch pin, then take the output enable low. Sorry, I didn’t get any photos of the latch or enable lines. Trust me, I want a four-channel scope more than you want me to have a four-channel scope 🙂

ATTINY1627 driving two output pins as Clock and Data

Lets hook up some LEDs to the driver’s output pins. The current limit for all LEDs is set by a single resistor connecting pin R-EXT to ground. In this case, I’ve used a 1k resistor.

ATTINY1627 counting in binary and sending data to the LED driver.

Now we can connect wires from attiny1627 to L1, L2, L3, and L4. And the output of the LED driver to A, B, C, D, E, F, and G.

The Nano is talking to the TLC5916 which is using the yellow>blue>brown and orange wires to ‘load’ a character on the 7 segment display. Then it pulses one the long yellow wires at a time. For more information on how to multiplex the display, refer to my earlier post in which I used this display in a school project and go in to how to drive it in much greater detail: Engineering Programming Final Project.

Now we can add the NTC thermistor and 50k resistor, running a line to the ATTINY1627’s ADC pin. I choose a 50k resistor because when I measured the resistance of the thermistor at room temperature, it was pretty much spot on 50k.

Thermistor is not polarity sensitive. The thermistor and 50k resistor creates a voltage divider. Because the 50k resistor was chosen to match the 50k of resistance for the thermistor at room temperature, the ADC pin should see (3.3v / 2) = 1.65v

I created a linear function from the readings of an ice cube (roughly 32°F) and holding the sensor in my hand (roughly 90°F).

uint32_t temp = (0.9508 * reading) - 41.2131;

Now at room temperature, it reads 70, which is relatively accurate.

I think if I did this over again, I’d use a 36-channel LED driver. It would provide 32 channels to control the four character 7-segment display without the need to multiplex. Leaving four channels to control transistors connecting the select lines (L1, L2, L3, and L4) to VCC.

(Edit 5/8/2021 8:21AM CST) Shopping around for a 36-channel LED driver had me realize those select lines are sourcing current to the diodes and would be limited through the driver on the both pins used to source and sink current. If pins were scarce, adding four BJTs and resistors to control the select lines would work. If pins were not scarce, traces are free.

To see the programming part of this project: Coded: Curiosity-Nano — Thermistor with four 7-segment display

Please check out my recent posts to the right and thanks for following along!

Author:

Leave a Reply