Very simple use of Arduio to drive 4 digit 7 segment display (common Cathode) Showing data from a TMP36 temperature sensor.

1 x Arduino

1 x 74HC595 Shift register

1 x 4 Digit 7 Segment display

4 x 220ohm Resistors

1 x TMP36 Temperature sensor


My display has a common cathode (negative) connection, so that when each of the negative pins, (12, 9, 8 and 6 on the display) for each of the digits is brought low. It selects that particular digit.


(I have since learnt that this is NOT the correct way to handle common Cathode displays, but for now, it works =P )


Then the desired selection of segments is lit via sending a byte to the shift register.


I have implemented the code in an Arduino library, with an example that displays random numbers on each of the digits, with some looping to try and see what can be done with timing to make it display more clearly.


The library can also handle common Anode displays (not tested, but the theory is sound)


Updated: Now included is my code to use the TMP36 temperature sensor. It requires the "TimerOne" libary to handle the interrupt handling for the display updates and sensor reading timing.