hello, can someone please help?
im using SD card module with arduino mega to play audio using external speaker. everything is working fine, and im reading Temperature sensor and LDR, a fan and bulb are connected, if i try to digital write or analog write to the fan or the bulb, the audio becomes corrupted and just gives noise sound, any idea why?
im using pin6 for audio output, pin 23,2 for fan and bulb(connected to relay)
Could be a power supply problem: the fan and relay draw (relatively) large amounts of current, and this is causing your supply to "sag" or "brown out" - which messes with your audio module.
As a test for that, what happens if you just disconnect the fan and/or relay?
Please post your schematic, and some good clear photos of your setup.
yes bro, i think you are right, its about the current, how to fix that?
i tried to disconnect the relay as u said, and wrote digital high to the pin and the audio kept working properly, so yes it is as u mentioned.
how to fix that?
the schematic is simple brother, im using antec power supply to provide 5v,12volt to the system, and the arduino pins are connected to each module as mentioned above, could u help fixing this current "brown out" problem?
yes bro i know, im using relay module and also using powered computer speakers, if i try everything alone, everything is working fine, but if i use them all together, the Fan, the relay , the audio, everything works fine but the audio becomes corrupted, seems like a current differences or something, i need a fix for that if u could help
There are too many unlabelled connections and "black boxes" (where you can't see the internal connections, components are generic, like "Relay".
If you want help, you have to step up and provide details. The photos are a start, but it would be a significant job to understand what the connections are, just looking at those. A proper schematic (or system wiring) diagram does that, nothing else does.