An Arduino-powered literary machine inspired by Roald Dahl's 1949 short story The Sound Machine, translating soil moisture into an imagined audible mood for plants.
The Sound Machine is an electronic-literature project built around a simple fictional premise:
What would a machine sound like if it allowed us to hear the condition of a plant?
A soil-moisture sensor measures the hydration level of a plant. An Arduino Nano converts that reading into a percentage and selects a corresponding prerecorded sound from a DFPlayer Mini and microSD card.
A well-watered plant may laugh.
A dry plant may complain, groan, or scream.
Plant
โ
โผ
Soil moisture sensor
โ
โผ
Arduino Nano
โ
โโโ Moisture level
โ
โโโ Display / analog meters
โ
โโโ Sound selection
โ
โผ
DFPlayer Mini
โ
โผ
Speaker
The machine does not claim to record actual plant voices. Its sounds are prerecorded and selected according to the measured soil moisture.
The project exists at the intersection of:
- ๐ literature
- ๐ฑ plants
- โก Arduino
- ๐ต sound
- ๐จ๏ธ 3D printing
- ๐ง speculative interfaces
- ๐ฌ plant sensing
- ๐ญ electronic art
- ๐ฑ Soil-moisture measurement
- ๐งฎ Arduino Nano controller
- ๐ต DFPlayer Mini MP3 playback
- ๐พ microSD audio storage
- ๐ 4 ฮฉ speaker
- ๐ Physical activation button
- ๐ Visual moisture indication
- ๐๏ธ Adjustable sensitivity in the redesigned version
- ๐ Analog panel meters in the redesigned version
- ๐ก Status LED
- ๐ Startup audio
- ๐ฒ Avoids immediate repetition of sounds
- ๐จ๏ธ Custom 3D-printed enclosure
- ๐ 21-page project manual included
- ๐ญ Inspired directly by Roald Dahl's fiction
- ๐ GPL-3.0 licensed source code
The project is inspired by:
Roald Dahl's short story The Sound Machine appeared in the September 17, 1949 issue of The New Yorker.
The protagonist, Klausner, builds an electronic device capable of translating ultrasonic vibrations into frequencies audible to humans.
In the story, he becomes convinced that flowers and trees produce sounds that humans normally cannot hear.
Plant vibration
โ
โผ
Klausner's fictional machine
โ
โผ
Frequency conversion
โ
โผ
Human hearing
The Arduino project does not attempt to reproduce the fictional acoustic electronics literally.
Instead, it translates the idea into a contemporary physical-computing object:
Plant condition
โ
โผ
Soil moisture
โ
โผ
Arduino
โ
โผ
Artificial voice
The Sound Machine โ The New Yorker
The repository documents two iterations of the machine.
The Sound Machine
โ
โโโ Version 1
โ Digital moisture display
โ
โโโ Klausner Machine
Analog instrumentation
Calibration control
Redesigned enclosure
The repository contains two Arduino sketches:
SoundMachine3.ino
SoundMachine5.ino
along with the complete project manual:
LaMaquinaDeKlausner.pdf
The first version was completed in early 2020.
Its hardware includes:
- Arduino Nano
- FC-28 soil-moisture sensor
- 7-segment display
- push button
- DFPlayer Mini
- microSD card
- 4 ฮฉ speaker
- custom enclosure
The interface is deliberately simple.
Insert sensor into soil
โ
โผ
Press button
โ
โผ
Read moisture level
โ
โผ
Map value to 0โ100%
โ
โโโโโโโโโโโโโโโโ
โผ โผ
Display % Select sound
โ
โผ
Speaker
The analog soil reading is converted into a percentage representing the approximate moisture level.
Conceptually:
rawSensorValue
โ
โผ
map(...)
โ
โผ
0 ... 100 %The percentage then determines the emotional response of the machine.
The original implementation uses behavior such as:
< 30% moisture
โ
โผ
distressed / screaming sound
and:
> 75% moisture
โ
โผ
happy / laughing sound
Intermediate values select other recordings.
The second version was completed later in 2020.
It is a substantial redesign of the original prototype.
Changes include:
7-segment display
โ
2 analog panel meters
fixed sensor behavior
โ
adjustable sensitivity
basic sound selection
โ
anti-repetition routine
simple startup
โ
startup sound
original enclosure
โ
redesigned case
The goal was to make the physical object look less like a conventional Arduino project and more like the fictional scientific instrument described by Dahl.
The Klausner Machine adds:
- two analog panel meters
- sensitivity potentiometer
- power switch
- LED
- calibration routines
The analog interface reinforces the appearance of an experimental scientific instrument.
โโโโโโโโโโโโโโโโโโโ
โ Klausner Machineโ
โโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโ
โผ โผ โผ
Moisture Analog Sensitivity
probe meters knob
โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โผ
Arduino Nano
โ
โผ
DFPlayer
โ
โผ
Speaker
| Qty | Component | Purpose |
|---|---|---|
| 1 | Arduino Nano | Main controller |
| 1 | FC-28 soil-moisture sensor | Moisture measurement |
| 1 | 7-segment display | Moisture percentage |
| 1 | DFPlayer Mini | MP3 playback |
| 1 | microSD card | Audio storage |
| 1 | 4 ฮฉ speaker | Audio output |
| 1 | Push button | Measurement / playback |
| 1 | Custom enclosure | Physical interface |
| Qty | Component | Purpose |
|---|---|---|
| 1 | Arduino Nano | Main controller |
| 1 | Soil-moisture sensor | Plant hydration measurement |
| 1 | DFPlayer Mini | Audio playback |
| 1 | microSD card | Audio storage |
| 1 | 4 ฮฉ speaker | Audio output |
| 2 | Analog panel meters | Visual indication |
| 1 | Potentiometer | Sensitivity calibration |
| 1 | Push button | User input |
| 1 | LED | Status indication |
| 1 | Power switch | Main control |
| 1 | Custom enclosure | Instrument body |
The project measures the electrical properties of the soil using a resistive moisture probe.
A typical FC-28-style module provides an analog voltage corresponding approximately to soil conductivity.
Wet soil
โ
โผ
different electrical resistance
โ
โผ
analog measurement
The Arduino reads this value and converts it into the scale used by the machine.
Raw soil-moisture values vary significantly depending on:
- soil composition
- mineral content
- probe depth
- temperature
- sensor corrosion
- water conductivity
- power-supply voltage
The redesigned Klausner Machine therefore includes an adjustable calibration control.
For a new sensor or plant, determine representative values for:
dry soil
and:
wet soil
before interpreting the output as a percentage.
Audio is reproduced using a DFPlayer Mini-style MP3 module.
The module provides:
- microSD storage
- MP3 playback
- serial control
- direct speaker output
- compact standalone operation
The Arduino sends commands selecting which recording should be played.
Arduino
โ
โ serial command
โผ
DFPlayer
โ
โผ
microSD
โ
โผ
MP3 recording
โ
โผ
Speaker
Prepare the microSD card with the sound files required by the sketch.
The collection can contain recordings representing different states such as:
startup
very dry
dry
normal
wet
very wet
The actual sounds are an artistic choice.
The original machine uses contrasting human-like sounds such as:
groans
screams
laughs
giggles
to convert an otherwise ordinary sensor value into an emotional interface.
The redesigned version adds logic intended to avoid playing the same sample repeatedly.
Instead of:
same moisture
โ
โผ
same sound
โ
โผ
same sound
โ
โผ
same sound
the machine can select among several recordings associated with the same general state.
This makes repeated interaction less mechanically predictable.
Typical operation is:
1. Insert probe into soil
2. Turn on the machine
3. Adjust sensitivity if required
4. Press the measurement button
5. Arduino reads the sensor
6. Visual indicators react
7. A corresponding recording is played
The machine is intentionally interaction-driven rather than continuously producing audio.
The Sound Machine measures:
soil moisture proxy
It does not directly measure:
plant emotion
plant pain
plant consciousness
plant acoustic emissions
The emotional interpretation is part of the literary and artistic interface.
physical measurement
+
fictional interpretation
=
The Sound Machine
The project was created in 2020, several years before a notable 2023 study on plant acoustics.
Researchers from Tel Aviv University later published experiments showing that stressed tomato and tobacco plants can emit airborne ultrasonic sounds.
The researchers recorded plants under conditions including:
- dehydration
- physical injury
- normal control conditions
and found that Machine Learning models could distinguish aspects of plant condition from those ultrasonic recordings.
The study was published in Cell in March 2023.
This does not mean that The Sound Machine records those sounds.
The two systems work very differently:
The Sound Machine
soil moisture
โ
โผ
Arduino
โ
โผ
prerecorded MP3
versus:
Plant bioacoustics research
plant
โ
โผ
ultrasonic microphone
โ
โผ
40โ80 kHz recordings
โ
โผ
signal analysis / ML
The similarity is conceptual: both connect plant stress to sound, though through entirely different mechanisms.
Sounds emitted by plants under stress are airborne and informative โ Cell / Tel Aviv University
Plants Emit Sounds โ Especially When Stressed โ Tel Aviv University
TheSoundMachine/
โโโ LICENSE
โโโ LaMaquinaDeKlausner.pdf
โโโ README.md
โโโ SoundMachine3.ino
โโโ SoundMachine5.ino
Arduino source representing an earlier iteration of The Sound Machine.
Later Arduino iteration associated with the redesigned Klausner Machine.
21-page project guide containing additional construction information, circuits, source-code context and project documentation.
GNU General Public License v3.0.
git clone https://github.com/ronibandini/TheSoundMachine.git
cd TheSoundMachineDownload:
Select the appropriate Nano board and processor configuration in:
Tools
โ Board
Older Nano boards may require selecting the corresponding legacy bootloader option.
Format a compatible microSD card according to the requirements of the DFPlayer module.
Copy the required MP3 files to the card.
Keep file names and track numbering consistent with the Arduino sketch.
The DFPlayer requires:
power
ground
serial TX/RX
speaker output
Check the pin assignments in the selected Arduino sketch before wiring.
Connect:
VCC
GND
Analog output
to the Arduino.
The analog input used by the sketch must match the hardware wiring.
Depending on the selected version, connect either:
7-segment display
button
or:
analog meters
potentiometer
button
LED
power switch
Refer to the circuit documentation included in:
Open the corresponding sketch:
SoundMachine3.ino
or:
SoundMachine5.ino
Compile and upload it to the Arduino Nano.
Both versions use custom enclosures designed in Fusion 360 and fabricated with a 3D printer.
The second enclosure was redesigned to resemble an older experimental instrument, with prominent analog meters and physical controls.
3D-printable designs by the author are available through:
The repository includes the complete:
21-page user guide.
Download LaMaquinaDeKlausner.pdf
The guide contains additional information about:
- project background
- components
- electronics
- circuit
- construction
- calibration
- source code
- operation
The original demonstration shows the sensor inserted into a plant pot and the machine responding with prerecorded sounds according to moisture.
-
๐๏ธ Add ultrasonic recording โ combine the moisture sensor with an ultrasonic microphone to experimentally record high-frequency plant emissions alongside the fictional MP3 responses.
-
๐ Long-term plant telemetry โ log moisture, temperature, light and machine responses to a microSD card for later visualization.
-
๐ฑ Multiple plant profiles โ store individual calibration ranges and sound libraries for different plant species.
Hackaday published a dedicated article about The Sound Machine on March 18, 2020.
The article covers:
- Roald Dahl's inspiration
- soil-moisture sensing
- Arduino
- DFPlayer audio
- happy and distressed sounds
- the 3D-printed enclosure
Italian electronics magazine Elettronica In published:
on May 7, 2020.
The article describes the moisture-controlled sound system, Arduino implementation, DFPlayer and 3D-printed enclosure.
Open-Electronics also published coverage of the project:
Published March 10, 2020.
The tutorial documents:
- Arduino Nano
- FC-28 sensor
- 7-segment display
- button
- DFPlayer
- microSD
- speaker
- enclosure
- moisture mapping
- source repository
The Sound Machine โ Hackster.io
Published October 17, 2020.
This second project documents the redesigned machine with:
- two analog meters
- sensitivity potentiometer
- improved enclosure
- startup audio
- calibration
- sound anti-repetition logic
The Klausner Machine โ Hackster.io
Spanish-language article covering:
- the original literary inspiration
- Arduino implementation
- plant-moisture sensing
- Klausner Machine redesign
- project manual
- Hackaday coverage
- Literature Machines presentation
The Klausner Machine was included in Literature Machines, a talk about physical devices inspired by literature.
Other machines discussed in the presentation included projects inspired by:
- Julio Cortรกzar
- Mario Levrero
- Lewis Carroll
- Roald Dahl
The presentation was part of the Maker Faire Rome / Maker Learn program.
Literature Machines โ Medium
The original story can be read through The New Yorker archive:
The Sound Machine โ Roald Dahl
The story's fictional machine detects frequencies beyond ordinary human hearing and converts them into audible sound.
The project itself uses soil moisture and prerecorded MP3 files, but later research provides an interesting scientific counterpart to its fictional premise.
- Sounds emitted by plants under stress are airborne and informative โ Tel Aviv University / Cell
- Plants Emit Sounds โ Especially When Stressed โ Tel Aviv University
The Sound Machine belongs to a broader series of projects where literature, old technologies, unusual interfaces and electronics are turned into physical machines.
More projects, technical context and essays are collected in:
- Arduino
- Arduino Nano
- DFPlayer Mini
- The Sound Machine โ The New Yorker
- Plant stress sounds โ Tel Aviv University
Other projects by Roni Bandini connecting literature, physical interfaces and electronic machines.
Generative literature system using local LLMs to produce fictional memories beginning with โMe acuerdoโฆโ.
Another experiment where a literary structure becomes the operating rule of a machine.
github.com/ronibandini/AIRemember
A jailbroken Kindle Paperwhite converted into a distraction-free typewriter connected to a Raspberry Pi and thermal printer.
A project combining literature, obsolete interfaces and physical output.
github.com/ronibandini/Kindle-Typewriter
A discarded Furby transformed into a literary electronic automaton.
Another project that turns an existing object into a new interface for literature and sound.
FC-28-style resistive probes can corrode when powered continuously in wet soil.
For occasional measurements this may be acceptable, but for long-term monitoring consider:
- powering the probe only while taking a reading
- using a capacitive soil-moisture sensor
- periodically recalibrating the system
The source code in this repository is released under the GNU General Public License v3.0.
See LICENSE for details.
Roni Bandini
Maker, AI developer, electronic artist and writer.
- ๐ GitHub: @ronibandini
- ๐ผ LinkedIn: Roni Bandini
- ๐ธ Instagram: @ronibandini
- ๐ฆ X: @RoniBandini
- โ๏ธ Medium: bandini.medium.com
- ๐ ๏ธ Hackster: Roni Bandini
Buenos Aires, Argentina.