Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Complete Sensor Guide
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Tech Terms
    • Webinars & Digital Events
  • Resources
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • White Papers
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Talking Parrot using GR Sakura

By Ajish Alfred October 18, 2013

 

This is a very interesting and funny project made with the help of the GR SAKURA board which can record the speech and play it back in the voice of a parrot. It might look like a toy but there are lot of technology behind its working like voice sampling, memory card interfacing, PWM etc.
Voice signals are continuous analog signals and the digital devices like microcontrollers cannot handle the continuous analog signals. Most of the microcontrollers have an ADC module which can do analog to digital conversion. The microcontroller uses sampling technique to convert the continuous analog signals to discrete digital equivalent samples. While recording the voice, the GR SAKURA board samples the voice signals and writes the sampled values to a file at the sampling time itself.
The same file is opened again and reads the values at double the frequency at which they are sampled.This creates a sensation of a parrot talk even though the sampled read from the file corresponds to a human voice. The digital microcontrollers based devices cannot produce analog output also, since their output will be always either logic high or logic low. To generate the effect of the continuous analog voice signal, the GR SAKURA uses PWM (Pulse Width Modulation) technique.

 

DESCRIPTION
The GR SAKURA reads the digital equivalent value of the sampled analog signal and writes the same value to the micro SD card at the same sampling time itself. While playing back, the GR SAKURA reads the same sampled values from the micro SD card to generate the PWM equivalent of the analog voice signals at an output pin where the loudspeaker is connected.
The GR SAKURA board has a micro SD card slot and the board is connected to a microphone amplifier circuit at its input and loudspeaker driver circuit at its output. The project uses a simple condenser microphone which captures the voice input and the fetch them to one of the ADC channels of the GR SAKURA. The entire system can be divided into the following blocks:
Block Diagram of GR Sakura based Talking Parrot
             Fig. 1: Block Diagram of GR Sakura based Talking Parrot

 

      1)      MICROPHONE AMPLIFIER CIRCUIT
The microphone used here is a small commonly found condenser microphone. The microphone captures the voice signals from the surrounding and produces the voltage equivalent of the sound signals. The amplitude of the sound signal output from the microphone is very feeble and they need to be amplified several times before they are applied to the microcontroller or any other devices. This circuit blocks uses two stage transistor based amplifier which are designed amplify the analog voice signals to the required amplitude level for the GR SAKURA.

Circuit Diagram of Microphone Amplifier

Fig. 2: Circuit Diagram of Microphone Amplifier

The supply voltage is taken from the GR SAKURA board itself operating with USB power. To get the +5V from the 5 volt VCC pin of the SAKURA board, the jumper J2 is shorted.

 

      2)      GR SAKURA
For the recording of voice signals the TIMER 0 of the GR SAKURA is used to generate exact time intervals of 100 us at which the voice signals needs to be sampled. The 100 us sampling period means 10 KHz of sampling frequency which is good enough for sampling the human voice falling at a range of 3 to 4 KHz. At the same time interval the same voice sampled value is written to the micro SD card using memory card interfacing library. A file of predefined name is created and opened in writing mode into which the sampled values are written at each and every sampling period. Once the recording is completed the file is closed.
The voltage at the ADC channel or the analog input of the GR SAKURA will be the sum of quiescent voltage of the transistor amplifier + amplified voice signals. The quiescent voltage is subtracted from the total voltage to get the voice signal. For playing back the voice, the same file is opened in the reading mode and the sample values are read back from the file.
The sound signals are played back at double the frequency at which they are sampled. This makes the speech play at double the speed and creates a sensation of parrot voice. Thissample values are used to modify the ON period and the OFF period of the timer in such a way that the entire sampling period is always constant. This generates a PWM equivalent of the input voice signal at that digital output pin, but at double the frequency than the original speech signals. When this PWM wave is applied to the loudspeaker it will produce the same sound which has been captured through the microphone.
The code written for this uses the functions like digitalWrite()and analogRead()to write digital values to a digital output pin and read the analog input values from an analog input pin respectively. The files “intvect.c” of the Cloud Compiler IDE is modified to enable the TIMER0 interrupt. For writing into and reading back from the micro SD card the GR SAKURA uses the functions like begin(), open(), write(), read(), close() and remove() from the SD card interfacing library.
The sampling frequency is varied by changing the value of the TMR1.TCCR.BYTE. The value for the byte “0b01000” corresponds to a clock division of 2 for the TIMER 0’s input clock and the value “0b01001” corresponds to a clock division of 4 for the TIMER 0’s input clock.

Loudspeaker Driver and Playback

      3)      LOUDSPEAKER DRIVER
The Loudspeaker used to reproduce the sound signals in this project is an 8 ohm loudspeaker. The 8 ohm loudspeaker consumes lot of current while it operates but the current sourcing capabilities of the digital output pin of the microcontrollers are limited. Here the output pin is connected to the base of a transistor and the Loudspeaker is connected to the collector of a transistor. Very low base current is required to drive the loudspeaker at the collector of the transistor with the required amount of current.

 

Circuit Diagram of Loud Speaker Driver

Fig. 3: Circuit Diagram of Loud Speaker Driver

 

      4)      RECORD/PLAYBACK SWITCH

 

The record and playback switch is a simple push button which is pulled down using a 1K ohm resistor and when pressed it makes contact with the VCC. The button is connected to the pin number 8 of the GR SAKURA which is configured as an input pin. Before recording, the code will wait till the value at the pin number 8 becomes logic high which will happens when someone presses the button. The digital value is read from this pin using the functiondigitalRead().
Circuit Diagram of GR Sakura based Talking Parrot
Fig. 4: Circuit Diagram of GR Sakura based Talking Parrot
 
Prototype of GR Sakura based Talking Parrot
Fig. 5: Prototype of GR Sakura based Talking Parrot

Project Datasheet

https://www.engineersgarage.com/wp-content/uploads/2019/10/code_1.zip


Project Video


Filed Under: Electronic Projects
Tagged With: GR Sakura, talking parrot
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

Log in to leave a comment:

Lost your password?

Don't have an account? Register here

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Wide Bandgap Semiconductors
Moving from silicon to GaN or SiC feels like a whole new ballgame, doesn’t it? It isn’t just about faster switching; it’s about managing the layout parasitics and thermal realities that come with that speed. This month’s Tech Toolbox features a curated eBook that tackles these design hurdles head-on.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS feed: EDABOARD.com Discussions. EDABOARD.com Discussions.

  • How to keep two mutually exclusive analog MUXes disabled during MCU power-up using one GPIO?
  • Interfacing to FT260 for PC UART communication
  • Radiation Efficiency of Bulk CMOS-Integrated Antennas
  • Python for Engineering Projects: Which Tools Do You Use for Data Analysis?
  • Did you ever make an electronic circuit and gift to your loved one?

RSS feed: Electro-Tech-Online.com Discussions Electro-Tech-Online.com Discussions

  • Experienced Electronics Design Engineer & Reliability Specialist available
  • Rotary encoder with push function
  • Need to control diesel fuel injector using microcontroller
  • Schematic help, odd symbol
  • My Advanced Realistic Humanoid Robots Project

Featured Tutorials

VHDL Series (1-24)

  • VHDL Tutorial 17: Design a JK flip-flop (with preset and clear) using VHDL
    VHDL Tutorial 17: Design a JK flip-flop (with preset and clear) using VHDL
  • VHDL Tutorial 18: Design a T flip-flop (with enable and an active high reset input) using VHDL
    VHDL Tutorial 18: Design a T flip-flop (with enable and an active high reset input) using VHDL
  • VHDL Tutorial – 19: Designing a 4-bit binary counter using VHDL
    VHDL Tutorial – 19: Designing a 4-bit binary counter using VHDL
  • VHDL Tutorial – 20: Designing 4-bit binary-to-gray & gray-to-binary code converters
    VHDL Tutorial – 20: Designing 4-bit binary-to-gray & gray-to-binary code converters
  • VHDL Tutorial – 21: Designing an 8-bit, full-adder circuit using VHDL
    VHDL Tutorial – 21: Designing an 8-bit, full-adder circuit using VHDL
  • VHDL Tutorial – 22: Designing a 1-bit & an 8-bit comparator by using VHDL
    VHDL Tutorial – 22: Designing a 1-bit & an 8-bit comparator by using VHDL
More Tutorials >

Recent Articles

  • Harwin introduces online connector selector
  • Elma releases VNX+ deployment kit for embedded systems
  • Lattice introduces AI-assisted FPGA development tool
  • Lattice introduces FPGA family with post-quantum security
  • Melexis introduces sensors measuring up to 100 A RMS

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2026 Arrowfly LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Arrowfly
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Complete Sensor Guide
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Tech Terms
    • Webinars & Digital Events
  • Resources
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • White Papers
  • Guest Post Guidelines
  • Advertise
  • Subscribe