Integrated Circuits - NE555N, 4017, 74HC595

09/12/18

Last modified on 09/12/18

Categories: Electronics

~/contents

Dumping ground for notes on whatever ICs I encounter. Being able to make something like a timed LED without code is interesting, but as a hobbyist I think it makes more sense to work with microcontrollers, especially since quality clones can be obtained so cheaply.

100 IC Circuits looks like a good resource.

Use a small screwdriver to lift the chips off the breadboard without bending the legs. I belatedly learned you can get IC sockets to hold the chips, and then if you need to replace the chip you simply lift it out of the socket.

NE555N

NE555N is a timer chip used to provide time delays, oscillations, and flip-flop. This is the bipolar chip, there is a CMOS variant that consumes less energy. Pin numbering is counter-clockwise from top left corner.

1 GND
2 TRIG - When voltage drops below #5 voltage the pin goes high and the timer starts.
3 OUT - Push/Pull LOW/HIGH
4 RESET - Reset timing interval
5 CTRL - internal voltage divider (2/3 VCC), often not used so a 10nF ceramic or film cap can connect to ground to reduce noise
6 THRESH - When voltage is higher than CTRL timing ends
7 DISCH - open-collector used to discharge a capacitor between intervals
8 VCC

First experiment is a simple flashing LED from 555 LED Flasher. Switching out the electrolytic capacitor, 10uF blinks more quickly and 220uF is more slow. This is the first circuit tutorial I’ve seen that actually shows you how to set up the breadboard step by step, so I was able to learn how to read circuit diagrams using this.

GND > GND
TRIG > THRESH / 100uF > GND
OUT > 2.2k Ohm > LED > GND
RESET > PWR
VCC > PWR
DISCH > 5.6k Ohm > GND
THRESH > TRIG / 10k Ohm > DISCH
C VOLT > 10nF > GND

Next, add a pentometer. A 10k pentometer can replace the 10k Ohm resistor so the blink speed can be set that way. See Timer Basics - Astable Mode and 1 Minute Timer Circuit.

4017

CD4017BEE4 is a counter/divider with 10 stages. I picked it up for electronic dice but discovered I needed a larger breadboard, among other things.

1 Q5
2 Q1
3 Q0
4 Q2
5 Q6
6 Q7
7 Q3
8 GND
9 Q8
10 Q4
11 Q9
12 CARRY OUT - For cascading additional chips
13 CLOCK INHIBIT - Enables clock at low
14 CLOCK - Clock input
15 RESET - Resets IC at high
16 VCC

https://circuitdigest.com/electronic-circuits/digital-dice-circuit-using-ic-555
http://www.mallinson-electrical.com/555-dice

74HC595

74HC595 is a commonly used shift register that is used to expand output ports. It allows us to power 8 (or more) LEDs using only 3 GPIO. You can daisy chain these ICs, though I didn’t have room on my board to do so. Data, clock, and latch can utilize any free GPIO pin. Beginner´┐Żs Guide To The 595 Shift Register was the most helpful article I read. For this project I used the SN74HC595.

QB ~ VCC - 3.3V
QC ~ QA - Connects to first LED chain
QD ~ DS (Serial Data) - PA12
QE ~ OE (Enable Output) - GND
QF ~ RCLK (Latch) [I connected this to SRCLK]
QG ~ SRCLK (Clock) - PA6
QH ~ SRCLR (Reset) - 3.3V
GND ~ QH (Serial Output) - Used to chain multiple shift registers

Code modified from 170pt Projects Part 3: The Humble Shift Register.


#!/usr/bin/python
from pyA20.gpio import port
from pyA20.gpio import gpio
from time import sleep

DATA_PIN = port.PA12 ## DS
CLOCK_PIN = port.PA6 ## SRCLK, shifts byte register when high

gpio.init()
gpio.setcfg(DATA_PIN, gpio.OUTPUT)
gpio.setcfg(CLOCK_PIN,gpio.OUTPUT)

def shift(byte):
for x in range(8):
gpio.output(DATA_PIN, (byte >> x) & 1)
gpio.output(CLOCK_PIN,1)
gpio.output(CLOCK_PIN,0)

for x in range(1000):
shift(x)
sleep(0.001)