The clock and data pins are for your serial input. These can be controlled directly from the Arduino, just connect each to a digital out.
For the data routine, according to the datasheet there is one start bit, followed by 35 data bits which correspond to the "Serial Input Sequence" table in your question.
Create a function in your "sketch" to control the serial loading, something like below - I haven't checked this code. You only need to call it whenever you want to update the display.
You will have to replace the set_data_pin
and set_clock_pin
with the correct Arduino calls to whatever GPIO pins you have attached to the clock data pins on the display (I don't use Arduino so I don't know them) Same for the delay_us
(microsecond delay) which can be adjusted to whatever timing you want up to 500kHz clock speed - you can add a define for the value to save changing each one.
Each segment is shifted out MSB to LSB, which corresponds with A(MSB) to DP(LSB) for each input char:
void load_data(char seg1, char seg2, char seg3)
{
char i, temp;
char position = 0;
set_data_pin(1); // clock start bit in
set_clock_pin(1);
delay_us(5);
set_clock_pin(0);
delay_us(5);
temp = seg1;
while(i<8)
{
set_data_pin(temp & 0x80); // set data pin
set_clock_pin(1);
delay_us(5);
set_clock_pin(0);
delay_us(5);
i++;
temp = temp << i; // shift next bit out
}
temp = seg2;
while(i<8)
{
set_data_pin(temp & 0x80); // set data pin
set_clock_pin(1);
delay_us(5);
set_clock_pin(0);
delay_us(5);
i++;
temp = temp << i; // shift next bit out
}
temp = seg3;
while(i<8)
{
set_data_pin(temp & 0x80); // set data pin
set_clock_pin(1);
delay_us(5);
set_clock_pin(0);
delay_us(5);
i++;
temp = temp << i; // shift next bit out
}
// Last 11 bits - do something here if needed
while(i<11)
{
set_data_pin(0); // set data pin
set_clock_pin(1);
delay_us(5);
set_clock_pin(0);
delay_us(5);
i++;
}
}
Connections
- Connect the VDD pin to +5V, and the VSS pin to ground (0V)
- Connect the VLED pins to +5V also.
- Connect the DATA ENABLE pin low (i.e. to ground), as it is active low.
- For Bits 25-34 pins, leave these unconnected if you don't wish to use them, otherwise you can use them as digital outputs. Don't tie them high or low (i.e. don't connect to +5V or ground)
For the BC (brightness control) pin, you can use just a resistor to fix the brightness, or a potentiometer and resistor to control the brightness of the display.
To work out the value we can use the info in the datasheet:
- The absolute maximum \$I_f\$ (forward current) for the display is 30mA (pg.2)
- The display current is typically 36 times larger than the current into the BC pin (pg. 4) and the maximum current into the BC pin is \$550\mu A\$ (pg.5)
So with this info we can work out the best value for the pot. If we aim for a typical operating maximum of 20mA, then:
\$ \dfrac{+5V}{20mA \div 36} = 9k\Omega \$
This is the minimum value of resistance we would use (connected between +5V and BC pin)
If we want to vary the current, say from \$10mA - 20mA\$, then we can add a \$9k\Omega\$ pot in series with the resistor with it's wiper connected to one end (either end) Then the current varies between:
\$ \dfrac{+5V}{9k\Omega} \times 36 = 20mA \$
with the pot turned fully the other way
\$ \dfrac{+5V}{9k\Omega + 9k\Omega} \times 36 = 10mA \$
Note that the datasheet is not particularly helpful with details on the brightness control pin - it shows the pot set up for a varying voltage control in the diagram which confuses things a bit. I have just ignored this diagram and taken what is written to be correct. I'm also assuming the resistance to be across the full 5V (i.e. the BC pin is just above 0V), which is probably not be the case, but it's better to be on the conservative side if no details are given.
This means you may need to experiment a bit to get the brightness right - if it's too dim try changing to a lower resistance.
TL;DR: The kits you link to will not work with the big 7-segment display you propose. In my personal estimation, the complexity of the ICL7107 design (the Canakit and the Contrad kits are based on this chip) and the Arduino design will roughly be similar, if you build the simplest possible design. However, either design in the simplest version might not you to use the referenced 7-segment display at full brightness, and in fact the referenced 7-segment display might be too dim. Therefore, (depending on the display), you might as well go with the Arduino design, because the Intersil chip is really designed to run the 7-segment displays directly, something you cannot do if you want full brightness.
The large 7-segment LED display
The characterists of the 7-segment displays will in large part drive your design. There are two characterisits of concern here:
- The foreward voltage drop of each segment. If the Vcc supplied to the LEDs is less than this value, the LED will not turn on.
- The maximum forward current across each segment. To display at maximum brightness, you will want to supply something close to this value.
The datasheet I found for the Kingbright SA40-19EWA references two types of large 7-segment displays:
- High Efficiency Red: Forward V / segment: 8V typical, 10V max. Maximum forward current is not referenced, but the test conditions suggest that 20mA is typical. The charts on page three imply that 30mA is maximum.
- Super Bright Green: Forward V / segment: not reference. Maximum forward current: 60mA, suggests that 40-50mA current would be appropriate to drive it at full brightness.
If the above characteristics are correct, then you could build an ICL7106/ICL7107/ICL7107s-based circuit for the red 7-segment display, but not the green one if you want to run at full brightness.
Using the large 7-segment display with pre-packaged kits
The Canakit you link to is designed to run off 5V. Given that the forward voltage of the Kingbright SA40-19EWA is 8-10V, the result is likely to be a non-working digital LED thermometer. These kits are also not designed for the kind of current the super bright 7-segment display needs to be on at full brightness (, see below), and this is a problem inherent to the chip at the heart of the circuit, the ICL7106/ICL7107/ICL7107s
Building a new ICL7106/ICL7107/ICL7107s-based circuit from skratch
Using the ICL7107, the temperature probe signal is compared to reference voltage, and the result is processed by the ADC on the ICL7107 and then output on 7-segment LEDs. The ICL7106 runs off +15V, so you could use the 8V LEDs with this design. As you can see from the kit image there are not a lot of supporting components you need:
Note, however, that ICL7106/ICL7107/ICL7107s can only sink around 16mA of current from the 7-segment displays. This means that you will not be able to drive the super bright display at full brightness from the Intersil chips, and given the nature of ICL7106/ICL7107/ICL7107s, interfacing them to a driver that could allow more current from the 7-segment displays may be difficult.
Modifying a reference Arduino kit
The Arduino kit you referenced will likewise need extensive modifications in order to a) support the voltage required by the 7-segment display you reference and b) supply the current needed to run the large 7-segment display at full brightness.
Building a new Arduino temperature display from scratch
For an Arduino-based design, (assuming, at first, the underpowered design as above), you should have enough pins to do everything. The cheapest Arduino (Arduino nano) has 22 GPIO pins, of which you'd be using 1 to read the temperature sensor. This will leave you with 21 pins to drive your 7-segment LEDs. The way such displays are usually constructed is by multiplexing the LED displays (for instance the MAX7219 works this way). Specifically, what happens is first the first 7-segment display is drawn to display the correct digit, then the second, and then the third. If the cycle happens at more than, say, 30Hz, then the result is a seamless display as far as the human eye is concerned. To do this, you will only need 8 GPIO lines to paint the segments plus 4 GPIO lines to select the 7-segment display. The alternative (non-multiplexed display) is not possible on Arduino nano, since you'll need 8 lines / 7-segment display times 4 displays = 32 GPIO lines. It would be possible to do this on a beefier Arduino, but that will cost more. On the Nano you could use a shift register, or some other serial-to-parallel IC, such as the 74HC595 to give yourself more pins, so to speak.
The LED you are looking at is common anode, so you could use the Arduino to drive it directly buy sinking the LED current into the GPIO chips. At the same time, the LED you reference can take up to 320mA of current per segment, so if you want to drive it at full brightness, the Arduino solution will require external circuitry, such as a darlington array, as described here, for instance.
With the Arduino design, there will be some programming involved. You'll have to write a small program to read the temperature, and then to drive the LEDs. If you want full brightness, the Arduino will control discrete transistors (ugh) or a darlington array which will drive the LEDs directly. So you'll have to write code (or borrow one from an existing Arduino project) for converting your temperature data to 7-segment control lines. It isn't particularly difficult, but does take a bit of time. Additionally, combining this code with the multiplexing code is adds to the code complexity, but there are Arduino libraries for doing this.
Best Answer
6-digit 7-segment displays are not very common: Single, 2, 3 and 4 digit modules are much more easily sourced.
Here is one 6-digit 7-segment intelligent display module that can be bought as a kit or fully built - it actually consists of two 3-digit displays on a single PCB, with a serial interface:
It uses a serial input, 9600 baud, 8 data bits, 1 start bit, 1 stop bit and no parity.
Alternatively, consider using a 4-digit module with a colon indicator midway (e.g. from SparkFun) and tack on a smaller-sized 2-digit display module for the seconds.
Modules like the one above are more suitable for a clock than regular 7-segment displays anyway, with the hours and minutes separated by the colon.
Using a smaller seconds display module will increase readability of your clock as well.