Zonnestroompanelen in Nederland

duurzaamheid achter de meter

(15) ISD1820 voice recording chip and the Arduino

by Floris Wouterlood – January 20, 2020

Summary
A chip that records and replays up to ten seconds of a spoken message can be useful in many applications. An example is the ISD1820. An ISD1820 mounted on a miniboard is an independent unit that can record and play on its own. Fortunately, ISD1820 miniboards exist that have pins that allow to connect it with an Arduino. With such a miniboard we can create a unit that can deliver a spoken message at any desired moment in an activity monitored by the microcontroller. One obvious action is playing a message at the end of a period of time. We connect here an ISD1820 miniboard with an Arduino Nano. Wiring and controlling the ISD1820 voice recording board with an Arduino is very straightforward. A simple time controlled messaging machine sketch is added.

Introduction
Timers can introduce a variety of sounds, flashing leds or a repertoire of ringing and buzzing at the end of a set period. With a voice recording chip that holds a recorded message the end of the timed period can be literally announced.

figure 1. ISD1820 voice recording board connected with an Arduino Nano.

Applications are myriad. I connected a ISD1820 voice recording board with an Arduino Nano and programmed a timer to report loud and clear the end of a timed period. The ISD1820 and its wiring with an Arduino Nano are shown in figure 1. As the ISD1820 is advertised as a 3.3V device its VCC pin is connected with the 3V3 pin of the Nano. As the voltage of the pulses provided by pin D6 of the Nano is 5V I have inserted as a matter of caution a 220 Ω resistor to attenuate that voltage.

ISD1820: buttons and jumpers
An ISD1820 voice recording board is a self containing unit that only needs a 3.3V DC power source to run full swing. Wires connecting the ISD1820 to a 8 Ω, 0.5 W speaker are plugged into the on board connector marked ‘SP1’ (Figure 1).

‘Manual’ actions can be initiated with the buttons ‘REC’, ‘PLAYE’ and ‘PLAYL’:

  • button ‘REC”: press this button to record a voice message via the on board microphone. Releasing this button will end the recording. The chip holds 10 seconds of recorded sound.
  • button ‘PLAYE’: press this button and the chip will play the entire recorded message.
  • button ‘PLAYL’: press this button and the chip will play the entire message as long as the button remains pressed.

Arduino or jumper controlled functions:

  • Jumper ‘FT’: connect the two pins and the spoken words will be played by the speaker (‘feed through – megaphone function’). No recording will occur.
  • Jumper ‘P-L’: if set HIGH the recorded message will be played as long as this pin stays HIGH.
  • Jumper ‘P-E’: setting this pin HIGH for a short time (100 ms) starts a one-time playing of the entire message.
  • Jumper ‘REC’: if set HIGH recording will happen as long as this pin stays HIGH. As storage capacity is 10 seconds of sound it does not make sense to set this jumper HIGH for longer than that period.

The feature that jumper pins are available that can be set HIGH or LOW means that we can use a microcontroller board to control the ISD1820. Both 5V and 3.3V DC pulses are accepted. This means that the ISD1820 board can be used with traditional Arduinos (5V) and with ESP8266 boards (3.3V).

Wiring
Figure 1 shows the wire connections between an Arduino Nano and an ISD1820. We use in this example pin D6 of the Nano to control jumper P-E on the ISD1820. The ISD1820 receives power from the Nano. This simple wiring is sufficient to create a machine that plays messages. The ISD1820 miniboard is powered and controlled in this example with 3.3V power and 3.3V pulses.

Sketch
The instruction that triggers the ISD1820 to play its recorded message is a simple digitalWrite (6, HIGH) on jumper ‘P-E’ during 100 milliseconds. The example here is a simplemost times with a pulse causing the ISD1820 to issue a  voice message at the end.

//  ISD1820_very_simple_timer_message_player
//  plays a pre-recorded message
//  every approx 30 seconds
//  based on delay ()

int messageTime = 7475;         // 4 cycles minus 100 trigger milliseconds make up 30 seconds

void setup() {

pinMode  (6, OUTPUT);           // pin 6 Nano to jumper P-E of ISD1820
}

void loop() {

delay (messageTime*4);
digitalWrite  (6, HIGH);
delay (100);                               // triggers PE function
digitalWrite  (6, LOW);
}

Results
The ISD1820 works fine with an Arduino Nano. The sound is perfect when the speaker is mounted in a speaker box. As there is no amplifier the volume of the voice message can not directly be controlled.

Discussion
The ISD1820 miniboard is sold as 3.3V equipment. As expected its runs perfectly on 3.3V and with 3.3V control signals. I tested the device with a typical 3.3V microcontroller board: a NodeMCU ESP8266. This worked as expected. Also with an Arduino Nano at 5V power supply to the ISD1820 and 5V trigger pulses there were no problems. However, with an eye on life expectancy I favor to power the ISD1820 from the 3V3 pin of the Nano while in addition a 220Ω resistor is placed in the wire from pin 6 of the Nano to jumper P-E of the ISD1820 miniboard.
Maybe a bug in the ISD1820 board at my disposal is that when a message is being played the serial port of the Nano is blocked and is only released after the message has ended. This gave some cumbersome moments during the development of the sketch that controls the ISD1820 because this bug blocks uploading updated sketches. This problem is not reported on various forums. A workaround is to unplug – replug the usb cable between the computer and the Nano.
The ISD1820 board shown in figure 1 is currently used to provide a loud message at the finish of a time slot in my self-made countdown timer project (references* and**).

References

* Floris Wouterlood – Arduino countdown timer with two displays and a buzzer, part 1: Display Terminal. TheSolarUniverse.wordpress.com, November 20, 2018.

** Floris Wouterlood – Arduino countdown timer with two displays and a buzzer, part 2: the Box. TheSolarUniverse.wordpress.com, January 5, 2019.