Skip to content

Instantly share code, notes, and snippets.

@CODeRUS
Last active February 3, 2021 12:53
Show Gist options
  • Save CODeRUS/f025fa5c12d6eaad6878576e8255913a to your computer and use it in GitHub Desktop.
Save CODeRUS/f025fa5c12d6eaad6878576e8255913a to your computer and use it in GitHub Desktop.

Analog audio wiring

You can use single channel for esp8266 (there is the only A0 port) or stereo for ESP32

Single channel

Single channel is only tested with MAX9814 microphone module. It has audio amplifier built in. Tried with KY-037, but it's a lot worse.

Wiring is simple:

  • GND - GND
  • Vcc - Vin
  • Out - 100kOhm - VP

Stereo channel

Stereo channel is tested with two audio jacks, one for input, second for output. It's a bit noisy at the end. Requires some filtration. Feel free to improve!

Wiring diagram is taken from: https://github.com/G6EJD/ESP32-8-Octave-Audio-Spectrum-Display/blob/master/Stereo_Input_Wiring.jpg

R1, R2, R3, R4 are 110kOhm Capacitors are 47nF

GyverLampCpp

To use audio signal in effects uncomment last lines in https://github.com/CODeRUS/GyverLampCpp/blob/master/src/EffectsManager.cpp:

  • SoundEffect for mono channel
  • SoundStereoEffect for stereo channels
@tom2199
Copy link

tom2199 commented Feb 3, 2021

To use the effects after uncommenting them in EffectsManager.cpp, you have to add them to the effects,json file like this for single channel:

  {
    "i": "Sound",
    "n": "Sound Effect",
    "color": 0,
    "hColor": 10565,
  }

and like this for stereo channel:

  {
    "i": "Stereo",
    "n": "Sound Stereo Effect",
  }

Of course items like name (n), color and hColor (heatColor) are customizable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment