Chapter 5 · Book pp. 73–94
Learning and Playing with ICs: the 555
ตะลุยโครงงานอิเล็กทรอนิกส์เบื้องต้น : เรียนและเล่นไปกับไอซี
An IC (integrated circuit) packs many parts — transistors, diodes, resistors — onto one small piece of silicon, the chip, joined by tiny aluminium or gold wires. One IC may hold a few parts or millions of them, which is how modern devices stay so small. This chapter introduces ICs and then puts the famous 555 timer to work.
5.1 Types of IC ชนิดของไอซี
Early ICs were split into two kinds: analogue and digital. Today there are many specialist types instead: op-amps, timers, digital signal processors (DSP), analogue-to-digital and digital-to-analogue converters, bus and interface ICs, logic ICs, power-supply and power-management ICs, radio ICs and microcontrollers.
ICs are also graded by where they will be used: audio, cars, factories, medical equipment, security systems and even space.
5.2 IC packages ลักษณะรูปร่างของไอซี
An IC needs pins to connect to the outside, so it comes in a standard package. The best known is the DIP (Dual In-line Package): two rows of pins, from 4 pins upwards. Modern surface-mount (SMD) ICs come in many small packages, such as SOIC (Small-Outline IC), QFP (Quad Flat Package) and QFN (Quad Flat No-leads).
Each package marks pin 1 in its own way:
5.3 Introducing the 555 แนะนำไอซี 555
- Designed in 1971 by Hans Camenzind at Signetics; it quickly became one of the world’s best-known chips, and by 1972 more than 12 makers produced it.
- It is a timer. Inside are 25 transistors, 2 diodes and 15 resistors in an 8-pin DIP.
- Common uses: astable multivibrator (a continuous signal), monostable multivibrator (one pulse) and time-delay circuits.
- The standard 555 runs from 4.5 to 16 V. The ICM7555 runs from 2 to 18 V, so it also works from two alkaline cells (3 V).
Inside (Fig 5-3) are two comparators built from op-amps and a chain of resistors that sets their reference levels: 2/3 Vcc (about 0.67 Vcc) for the threshold comparator and 1/3 Vcc for the trigger comparator. Their outputs set and reset an RS flip-flop, whose output is amplified to drive pin 3.
| Pin | Name | Pin | Name |
|---|---|---|---|
| 1 | GND (ground) | 8 | Vcc (supply) |
| 2 | TRIG (trigger input) | 7 | DIS (discharge) |
| 3 | OUT (output) | 6 | THR (threshold input) |
| 4 | RESET | 5 | CTRL (control) |
The threshold input is connected to an outside resistor and capacitor — an RC timing circuit that sets the timing and frequency (Fig 5-4). As the capacitor charges to 2/3 Vcc, the comparator sets the flip-flop, the discharge transistor turns on, the capacitor discharges, and the output goes to “0”. When the voltage falls to 1/3 Vcc, the flip-flop resets, the discharge transistor turns off and the output goes back to “1”.
5.4 Using the 555 การใช้งานไอซี 555
5.4.1 The 555 as an astable (continuous signal)
- RESET (pin 4) is tied to +Vcc. If it were grounded, the 555 would be disabled.
- C2 on the control pin (pin 5) stops noise causing false triggering.
- While the discharge transistor is off, C1 charges through RA and RB: t₁ = (RA + RB) × C1 seconds.
- At 2/3 Vcc the flip-flop changes state, the discharge transistor turns on and C1 discharges through RB: t₂ = RB × C1 seconds.
- At 1/3 Vcc it changes back, and the cycle repeats. The output keeps switching between “0” and “1”.
Because charging goes through two resistors but discharging through only RB, the high and low parts are not equal. The ratio is the duty cycle, from 50% to 100% for this circuit:
D = (RA + RB) ÷ (RA + 2RB) × 100%
f = 1.44 ÷ ((RA + 2RB) × C1)
The book prints this as 1 ÷ ((RA + 2RB) × C1); the projects below use the full form with 1.44.
If RB is much bigger than RA, D is close to 50%. If RA is much bigger than RB, D is well above 50%.
5.4.2 The 555 as a monostable (one pulse)
A monostable gives one pulse each time it is triggered. The trigger input (pin 2) is normally held near Vcc. When it drops below 1/3 Vcc, the flip-flop resets, the discharge transistor turns off and C1 charges through R1. At 2/3 Vcc the flip-flop changes again, the transistor discharges C1, and the output returns to “0”. Further triggers during the pulse are ignored.
tm = 1.1 × R1 × C1 seconds
Example: R1 = 10 kΩ, C1 = 0.01 µF → tm = 1.1 × 10 × 10³ × 0.01 × 10⁻⁶ = 0.11 ms
5.5 Putting the 555 on a breadboard ติดตั้งไอซีบนเบรดบอร์ด
A new IC’s pins splay outwards. Before you push it into the breadboard, bend them in so they stand straight down — press each row gently against the table, or use an IC tool. The same goes for any other DIP IC.
Project 7 · Two-LED flasher with the 555
P7.1 How it works
An LM555 wired as an astable sends pulses out of pin 3 to make two LEDs blink. The blink rate comes from equation P7-1:
Fout = 1.44 ÷ ((R1 + 2(R2 + VR1)) × C1)
R1 = 10 kΩ, R2 = 1 kΩ, VR1 = 0–100 kΩ, C1 = 10 µF
VR1 = 0 Ω: Fout = 1.44 ÷ ((10×10³ + 2(1×10³ + 0)) × 10×10⁻⁶) = 1.44 ÷ (12×10³ × 10×10⁻⁶) = 1.44 ÷ 0.12 = 12 Hz
VR1 = 100 kΩ: Fout ≈ 0.68 Hz
- So the LEDs blink between 0.68 and 12 Hz. The supply is 3 AA alkaline cells: 4.5 V.
- When pin 3 is High, LED2 lights (R4 limits its current) and LED1 is off.
- When pin 3 is Low, LED1 lights and LED2 is off — and so on, back and forth.
P7.2 Building it in Tinkercad
Your layout does not have to match the picture exactly, as long as every pin is connected correctly — but if you are new to this, copying it first helps. Click Start Simulation and the LEDs blink in turn. Turn the potentiometer to speed them up or slow them down.
Then build it with real parts and power it up (Fig P7-3). Take extra care with the polarity of the capacitor and the LEDs — the stripe on an electrolytic capacitor marks its negative leg.
P7.3 What you learned
How a 555 makes a continuous signal, shown by LEDs. To change the frequency, change the variable resistor — or the capacitor.
Project 8 · Driving a piezo speaker
P8.1 How it works
A piezo speaker turns an electrical signal into sound. It needs a signal at an audio frequency (Fig P8-1): the signal makes a small electromagnet pull a metal diaphragm in and release it, again and again, and the vibrating diaphragm moves the air.
Fout = 1.44 ÷ ((R1 + 2R2) × C1) (equation P8-1)
R1 = R2 = 10 kΩ, C1 = 0.047 µF → Fout = 1.44 ÷ ((10k + 2 × 10k) × 0.047 µF) = 1.023 kHz
P8.2 Building it in Tinkercad
The 1 kHz output drives the piezo. The tone follows the frequency: below 1 kHz you hear a lower tone, higher frequencies sound shriller, and above about 10 kHz people can no longer hear it.
Tinkercad’s piezo looks different from the real one and is bigger, but it works the same way. The kit’s piezo has pins spaced to plug straight into the breadboard.
Project 9 · Adjustable time-delay circuit
P9.1 How it works
This 555 monostable sets a delay from about 1 to 3 seconds with the variable resistor VR1 (100 kΩ down to 0 Ω). C1 and C2 are in parallel, giving 20 µF.
Tmax = 1.1 × (100k + 47k) × (10 µF + 10 µF) = 1.1 × 147 × 10³ × 20 × 10⁻⁶ ≈ 3.2 s
Tmin = 1.1 × (0 + 47k) × (10 µF + 10 µF) = 1.1 × 47 × 10³ × 20 × 10⁻⁶ ≈ 1 s
- RESET is tied to the supply so the timer only resets at power-on.
- The trigger (pin 2) needs a falling edge, so R1 pulls it up to keep it High. Pressing S1 (START) pulls pin 2 low and starts the timer.
- The supply voltage is not in the equation, so the timing is about the same at 4.5 V or 6 V.
🛠️ Lab 5.1 · Time it
- Simulate Project 9 in Tinkercad. Turn VR1 to one end, press START and time how long LED1 stays on.
- Turn VR1 to the other end and time it again. Compare with Tmin ≈ 1 s and Tmax ≈ 3.2 s.
- Remove C2 (leaving 10 µF). Predict the new times, then measure.
5.6 The melody IC ไอซีเสียงเพลง
A melody IC plays a tune, for fun projects or as an alert in appliances. The best known is the UM66, first made by UTC (Unisonic Tech), with one song built in. Many compatible versions now exist, such as the BJ1552, which can replace a UM66 directly.
- A 64-note memory.
- A built-in oscillator; it can drive a piezo directly, or through an amplifier for more volume.
- Supply 1.3–4.5 V (3 V recommended); it uses very little current — 2 mA at most.
- A 3-pin TO-92 package.
Project 10 · Using the melody IC
P10.1 How it works
The UM66 or BJ1552 needs only 3 connections. Its output (pin 3) drives the piezo directly.
P10.2 Building it
⚠️ Not simulatable
Tinkercad has no UM66, so it cannot play the tune. Use Fig P10-2 as a wiring guide for the real breadboard.
Project 11 · Music box
This builds on Project 10 by adding a transistor amplifier, so the music is louder. Use it as a music box, or connect it to a microcontroller to play a tune when something happens.
P11.1 How it works
The UM66 output passes through R1 (1 kΩ) to the base of Q1, which drives the piezo louder.
P11.2 Building it
Like Project 10, Tinkercad cannot simulate it. Build it with real parts using Figs P11-2 and P11-3, then power it up.
Formulas from this chapter
| Circuit | Formula | Book’s example |
|---|---|---|
| Astable frequency | f = 1.44 ÷ ((RA + 2RB) × C) | 10k, 10k, 0.047 µF → 1.023 kHz |
| Astable duty cycle | D = (RA + RB) ÷ (RA + 2RB) × 100% | 10k, 10k → 66.7% |
| Monostable pulse | tm = 1.1 × R × C | 10k, 0.01 µF → 0.11 ms |
| Project 7 flasher | 1.44 ÷ ((R1 + 2(R2 + VR1)) × C1) | 0.68–12 Hz |
| Project 9 timer | 1.1 × (VR1 + R2) × (C1 + C2) | 1–3.2 s |
🛠️ Activity · Work it out, then test it
Use the calculator on the 555 tab to check your answers, then try them in Tinkercad.
- Project 7 with C1 changed to 4.7 µF: what are the slowest and fastest blink rates?
- Project 8: choose a new C1 so the tone is about 500 Hz. Simulate it — does it sound lower?
- Project 8: which C1 gives about 2 kHz?
- Project 9: which R2 would make the shortest delay 2 s with the same 20 µF?
- A monostable with R1 = 100 kΩ and C1 = 10 µF: how long is the pulse?
Check yourself
Chapter 5 of the book has worked calculations but no exercises, so these questions are my own, based on its pages.