Pocket Organ

This is a simple sound generator that can be controlled by light or by your fingertip. If you illuminate the photoresistor with a lamp or cover it with your hand, the pitch of the sound changes. You can try it out in Tinkercad:

https://www.tinkercad.com/things/aEJgBAQp91s-fingertip-organ

Instead of the photoresistor, you can place two bare wires that produce sound when you touch them with your finger. A stronger touch results in a deeper sound. Sometimes you may need to moisten your fingers slightly for the sound to become audible. You can also touch the two wires to various objects such as cheese, a potato, an apple, a pencil tip, a wet tissue, or dip them into honey, fruit juice, or cola. Listen to the “sound of things”! If you skillfully move the wires around a bit, the sound of the cheese can resemble a cow’s moo.

What do you need?

NameQuantityComponent
Mini breadboard1BB-170 test board
U11SN74HC14N – 6× Inverting Schmitt trigger
D115 mm red LED
C1, C22100 nF ceramic capacitors
R11100 kΩ 0.6 W resistor
R21DS5-5528-LDR photoresistor
PIEZO11Piezo speaker
BAT114× AAA battery holder + 4 pcs 1.5 V batteries or 1.2 V rechargeable cells

How does it work?

More about the SN74HC14 IC here. This IC contains six independent inverters:

The IC contains six independent inverters. In the schematic, the triangles represent the individual logic gates. The small circle at the tip of each triangle indicates that the gate is inverting, and the strange rune inside the triangle means these are Schmitt-trigger input gates (more on this in a moment).

The IC pins are numbered counterclockwise around the chip. Pin 1 is usually marked with a small dot, a stripe on the chip, or a semicircular notch.

The inputs of the six inverters are pins 1, 3, 5, 9, 11, and 13, and the outputs are 2, 4, 6, 8, 10, and 12, respectively. This is important.

Also important: the IC needs a power supply to operate. Connect the positive (+) terminal of the battery to pin 14, and the negative (–) terminal to pin 7.

Note: Between pin 14 and the battery, we temporarily place a red LED, which serves two purposes: it glows faintly to show that the circuit is working, and it protects the IC in case something is connected incorrectly. Once everything is working properly, you can remove the LED and replace it with a piece of wire. This will make the sound louder.

An inverter (i.e., a logic NOT gate) outputs the opposite of its input:
– if the input voltage is “high” (more than approx. 2.2 V*), the output is “low” (approx. 0.0 V)
– if the input is “low” (less than approx. 1.6 V*), the output is “high” (approx. 4.0 V*)

These logic levels are also often labeled as L (LOW) and H (HIGH). A quick summary:

InputOutput
L (0)H (1)
H (1)L (0)

There are various types of inverters. What makes the 74HC14 special is that its gates have Schmitt trigger inputs. This means that the threshold voltage to switch from H to L is different from the threshold for switching from L to H.

– When the input voltage decreases, the gate switches at VT– ≈ 1.6 V*
– When the input voltage increases, the gate switches at VT+ ≈ 2.2 V*

Thanks to this hysteresis, it’s possible to build an oscillator using just one gate, one resistor, and one capacitor (as shown here in an LED flasher example).

(The voltages marked with an asterisk are approximate values that depend on the supply voltage. The values shown here apply if you’re using four fresh AA batteries and the LED is connected. For precise data, refer to the IC’s datasheet.)

The inverter between pins 1 and 2 now functions as an oscillator, using the 100 kΩ resistor and 100 nF capacitor.

At power-on, the capacitor is uncharged, so its voltage is 0 V. This means the inverter input sees an L (LOW) level, which causes the output to go H (HIGH). Since the output (pin 2 of the IC) is now at about 5 V, the capacitor begins to charge through the resistor.

As the capacitor charges, its voltage gradually increases until it reaches the VT+ threshold, at which point the Schmitt trigger flips, and the inverter output becomes LOW. With the output now at about 0 V, the capacitor no longer charges but starts discharging through the resistor.

Its voltage drops until it reaches the VT– threshold, when the Schmitt trigger flips again, and the entire process repeats.

Our little trick here is that we’ve placed the photoresistor (or the two wires touched by your finger) in series with the capacitor. This slightly increases the voltage caused by the capacitor’s current, thereby changing the oscillation frequency.

TinkerCAD includes a very simple oscilloscope that can display how voltages change over time. Add two oscilloscopes to your simulation:
– Connect one to the capacitor (pin 1 of the IC),
– and the other to pin 2 (the inverter output),
then start the simulation.

Click on the photoresistor in TinkerCAD to bring up a slider that lets you adjust the “light” level.

You’ll see that the voltage on pin 1 (across the capacitor) smoothly oscillates between approximately 1.6 V and 2.2 V, forming a triangle wave.
Meanwhile, the voltage on pin 2 (the inverter output) jumps between 0 V and 4 V, forming a square wave.

The difference between the two switching voltages of the Schmitt trigger, VT– and VT+ (currently 1.6 V and 2.2 V), is called the hysteresis voltage (VH). In this case, it’s 0.6 V. We say that a Schmitt trigger has hysteresis.

Hysteresis plays an important role in many control systems, such as thermostats (room thermostats, air conditioners, refrigerators, irons, aquarium heaters, etc.).

– In heating systems, the heater turns on when the temperature falls below a certain lower limit, and turns off when the temperature rises above an upper limit.
– For cooling systems, it works the same way but in reverse: the cooler turns on at the upper limit and off at the lower limit.

If there were no hysteresis—if there were only a single threshold—the device would rapidly turn on and off around that threshold. In a refrigerator, for example, this would not only be annoying, but the constant switching could quickly damage the equipment.

Thanks to hysteresis, this doesn’t happen. However, it also means that the temperature inside the fridge doesn’t stay perfectly constant—it fluctuates slightly, just like the voltage across the capacitor in our circuit.

The square wave signal appearing on pin 2 is now connected to pin 3, which is the input of the second inverter. The output of this inverter (pin 4) is connected to the piezo speaker.

The other terminal of the speaker could be connected directly to the power supply (VCC) or to ground (GND), and the speaker would still produce sound.

But instead, we’ve connected it to the output of a fourth inverter (pin 8 on the opposite side of the IC), whose input is connected to the output of the second inverter (pin 4).

What does this achieve?
It means that one terminal of the speaker receives a square wave of about 4 V, while the other terminal gets the inverted version of that same square wave (because the fourth inverter flips it).

As a result, the voltage difference across the speaker isn’t just 4 V — it’s nearly 8 V, which makes the sound louder.

There is another 100 nF capacitor on the breadboard, connected between VCC and GND (pins 14 and 7 of the IC). Its purpose is power supply filtering: it smooths out the supply voltage and helps suppress unwanted voltage noise or disturbances.


What’s inside the IC?

The 74HC14 is an integrated circuit (IC) built using CMOS (Complementary Metal-Oxide-Semiconductor) technology.

  • The “74” at the beginning of the part number indicates it belongs to the 7400 series of logic ICs, a family of standardized TTL-compatible digital circuits.
  • The “HC” stands for High-Speed CMOS, meaning this is a fast variant based on CMOS technology.
  • The “14” refers to this specific IC, which contains six inverters with Schmitt-trigger inputs.

For example:
– The 74HC00 is a similar IC but contains four NAND gates instead of six inverters.
– The 74HC90 is a counter IC.

TTL background

TTL (Transistor-Transistor Logic) is an older logic family that revolutionized digital electronics in the 1960s and 1970s. TTL ICs used bipolar junction transistors to build logic gates. These gates were fast and compact, allowing relatively complex circuits to be integrated into a single chip.

One of the most advanced TTL-based chips was the AMD Am2900, a 4-bit processor series. A Hungarian-made early computer, the EMG-777, used this kind of chip. These processors were nowhere near as complex as modern ones — a complete CPU had to be built from multiple ICs, each containing only about 100 logic gates.

The main disadvantage of TTL circuits was their high power consumption and heat generation. This limited the number of gates that could be packed into a single chip.

The move to MOS and CMOS

The Intel 4004, the first commercially available microprocessor, didn’t use bipolar transistors like TTL circuits. Instead, it used MOSFETs (Metal-Oxide-Semiconductor Field-Effect Transistors), which consume far less power and produce less heat. This allowed many more logic gates to be placed on a single chip.

However, since TTL was already well-established by 1971, the 4004 was designed to be TTL-compatible — meaning it could directly interface with TTL circuits. Many later processors, like the Intel 8080, Zilog Z80, and Motorola 6800, followed this practice: they weren’t built with TTL but were still compatible with it.

What is CMOS?

CMOS is a special type of MOS technology that uses complementary pairs of MOSFET transistors — when one transistor is conducting, the other is off. This greatly reduces power consumption.

– In an idle state, CMOS ICs draw virtually no current.
– Power is only consumed during switching.
– Because of this extremely low power usage, low heat generation, and small transistor sizes, very complex circuits can be built with CMOS.

Today, nearly all modern microelectronics — including processors, memory, and sensors — use CMOS technology almost exclusively.

A single inverter in the 74HC14 is made up of 10 MOSFETs. It is clearly symmetrical, with the transistors used in complementary pairs. (Protective diodes are not shown in the diagram.)

A major drawback of CMOS circuits is their sensitivity to electrostatic discharge (ESD). One of the key components of a CMOS transistor is the oxide layer, which is an insulating layer made of silicon dioxide (SiO₂) located between the gate electrode and the semiconductor channel.

Discharges caused by things like synthetic sweaters or even just walking on a plastic floor (which can generate several thousand volts) can punch through this thin insulating layer and destroy the transistor.

Fortunately, all ICs in the 74HCXXX series include internal protection circuits that make handling them much safer. They contain internal protection diodes that clamp voltage spikes above the positive supply voltage (Vdd) or below the negative supply voltage (Vss).

This means the IC is relatively well protected against static discharge. However, these protection diodes also mean that applying power with incorrect polarity can cause large currents to flow, which may damage the IC.

To prevent this, special care must be taken to connect the battery with the correct polarity. To reduce the risk of damage, we included the red LED in the power line — it helps protect the IC if the battery is accidentally connected in reverse.

The inputs of ICs in the 74HCXXX series are protected by clamp diodes, which guard against overvoltage caused by electrostatic discharge (ESD).

If we were able to open the plastic package of the IC, we would find a tiny silicon die, no larger than about 1.5 × 2.0 mm, inside. It would look something like the image below. You’d be able to recognize the external connections (bonding pads) and six roughly similar sections, which represent the six logic gates—though they look nothing like triangles.

The triangle symbol is just the schematic representation of a gate. In reality, the internal structure of a gate—how it is built up from various layers within the semiconductor—is the domain of microelectronics engineers.

For us, it’s enough to understand how the IC works and how to use it.

Leave a comment