This is an old revision of the document!


Sound Activated Lights

Introduction

I have always liked to play with lights and i had a led strip laying around my pc setup and i thought it would be fun if it was sound reactive. The lights should react to the sound waves, either because of the rithm or the wavelength of the sound.

General Description

There are 3 parts of the circuit, one for each color(RGB); the tranzistors are connected to the assigned arduino pins (gnd to gnd) and to the leds; the sound sensor is only connected to the arduino board(GND to GND, Vcc to 5V and out to A0). The power supply is conntected to the breadboard. Ultimately there are 5 different modules connected to each other:

Block scheme:

Hardware Design

The following components are required for this project:

  • arduino
  • Sound sensor with built in microphone and analog output
  • 3 transistors tip41c
  • 3 1k resistors
  • breadboard
  • led strip
  • power supply 12v

Electric scheme:

  • diagrame de semnal
  • rezultatele simulării

Software Design

Descrierea codului aplicaţiei (firmware):

  • ADC (lab4)

sensorValue = (float)analogRead(sensorPin) * (5.0 / 1024.0); performs an analog-to-digital conversion using the analogRead function; it reads the analog value from sensorPin and converts it to a digital value * Timer (lab3) Timer1.initialize(100000); sets the timer interval to 100ms (0.1s); this allows for periodic execution of a function based on the timer interval

  • Interrupt (lab2)

Timer1.attachInterrupt(FlashLEDs); attaches the FlashLEDs function to the interrupt triggered by Timer1; this means that every time the timer interrupt occurs (every 100ms), the FlashLEDs function will be executed. * (etapa 3) surse şi funcţii implementate Descrierea codului aplicaţiei (firmware): * mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR) * librării şi surse 3rd-party (e.g. Procyon AVRlib) * algoritmi şi structuri pe care plănuiţi să le implementaţi * (etapa 3) surse şi funcţii implementate ===== Rezultate Obţinute ===== Care au fost rezultatele obţinute în urma realizării proiectului vostru. ===== Concluzii ===== ===== Download ===== O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului: surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-). Fişierele se încarcă pe wiki folosind facilitatea Add Images or other files. Namespace-ul în care se încarcă fişierele este de tipul :pm:prj20??:c? sau :pm:prj20??:c?:nume_student (dacă este cazul). Exemplu: Dumitru Alin, 331CC → :pm:prj2009:cc:dumitru_alin. ===== Jurnal ===== Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului. ===== Bibliografie/Resurse ===== Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe Resurse Software şi Resurse Hardware. <html><a class=“media mediafile mf_pdf” href=”?do=export_pdf”>Export to PDF</a></html>

pm/prj2023/tmiu/soundactivatedlights.1685179220.txt.gz · Last modified: 2023/05/27 12:20 by denisa.stanescu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0