



The software that is programmed into the Atmega328 microcontroller will turn on the D13 pin, making it switch from a binary 0 (0 V) to a binary 1 (+5VDC). The voltage across the CdS cell is approximately +2.5VDC, allowing the D2 pin of the Arduino to respond to the binary 1 logic signal. If no light is present, a voltage drop appears across the light-dependent resistor. CHAPTER 1 ■ ElECTRoniC Singing BiRd 3 How It Works The operation of the electronic singing bird starts with a cadmium sulfide (CdS) cell (photocell) detecting the absence of light. Parts required for the Arduino-based electronic singing bird Note ■ An electronic oscillator is a circuit that produces a repetitive sine wave or square wave signal. System block diagram for the electronic singing bird Figure 1-1. Light Detection Circuit Arduino Transistor Relay Driver Circuit Electronic Oscillator Circuit 8Ω Speaker Figure 1-2. Figure 1-2 shows a system block diagram of the mixed-signal circuit connected to an Arduino. Placing a hand over the sensor allows the electronic circuit to produce a sound similar to a singing bird. In this project I will demonstrate physical computing with an electronic singing bird. Parts List Arduino Duemilanove or equivalent 0.047uF capacitor 0.1uF capacitor 470uF electrolytic capacitor 1 K resistor 50 K trimmer potentiometer Audio transformer 2N3906 PNP transistor 2N3904 NPN transistor 5VDC relay 1 N4001 silicon diode 100W resistor 8W speaker Cadmium sulfide (CdS) photocell 1 small solderless breadboard 22 AWG solid wire Digital multimeter Oscilloscope (optional) Electronic tools CHAPTER 1 ■ ElECTRoniC Singing BiRd 2 What Is Physical Computing? The interaction between a human, an electronic circuit, and a sensor is physical computing. The required parts are pictured in Figure 1-1. To illustrate the versatility of the Arduino in turning ordinary electronic circuits into cool smart devices, I will show how to make an interactive electronic singing bird in this chapter. 1 Chapter 1 Electronic Singing Bird The Arduino is a small yet powerful computer board that uses physical computing techniques with an Atmel microcontroller (processing development environment) and the C programming language. Please use the Bookmarks and Contents at a Glance links to access them. For your convenience Apress has placed some of the front matter material after the index.

Download Learn electronics with arduino and more Design Study notes in PDF only on Docsity!TECHnoLogY in ACTion™ Learn Electronics with Arduino Don Wilcher Learn eLectronics concepts whiLe buiLding practicaL devices and cooL toys with arduino.
