I use ESP-12 and Adafruit Mono Amplifier for playing audio. It works but It has one big issue. My circuit uses RxD to transfer audio (A+ connect to RxD), also ESP uses for flashing the chip. This causes horrible noise when it is programming the ESP8266 from the speaker. The good thing about this module is it has SD pin which can be used to turn it off.
Now the question is how I can connect this SD pin to disable the amplifier during the flashing procedure and also keep it off by default in normal mode and use something like digitalWrite() to turn it on manually in my application when it is needed. Thanks
-
1since you can't set pins during/before flashing, afaik, you have to use pins 4 or 5, which are LOW during RESETdandavis– dandavis2018年04月30日 22:20:22 +00:00Commented Apr 30, 2018 at 22:20
-
Are they LOW during RESET or Flashing? Do you mean GPIO4 and GPIO5?user1079877– user10798772018年05月01日 12:24:41 +00:00Commented May 1, 2018 at 12:24
-
1low from power-on, yes, gpio 4-5. useful for relays, buzzers, and other output where an uncontrolled state is annoying or dangerous,.dandavis– dandavis2018年05月01日 14:29:39 +00:00Commented May 1, 2018 at 14:29
1 Answer 1
SD is pulled up to VIN by a 10kΩ resistor. You will need to pull it down to ground with something "stronger" that 10kΩ - a 1kΩ resistor would probably do it.
Then you can drive the pin HIGH and override that 1kΩ resistance to enable the module.
You could also modify the module to remove the 10kΩ pull-up resistor (the one right by the VIN label which has 1002 printed on it) and use a weaker pull-down resistor (10kΩ would be good).
-
Thank you, I change 10K pull-up to the ground and it works perfectly. The only problem now is the pin (I'm using GPIO16 now) is HIGH when it flashes the new ROM and it still makes the noisy sound. Is there any other pin (LOW during flashing) to use to fix that too?user1079877– user10798772018年05月01日 12:28:20 +00:00Commented May 1, 2018 at 12:28
-
116 is a special pin used for wakeup. 0, 2 and 15 have special meanings too. Anuthing other than those pins should be fine.Majenko– Majenko2018年05月01日 12:36:42 +00:00Commented May 1, 2018 at 12:36