Adafruit Audio FX Sound Board + 2x2W Amp - WAV/OGG: Low Rela

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
billla
 
Posts: 4
Joined: Sat Sep 12, 2020 5:33 pm

Adafruit Audio FX Sound Board + 2x2W Amp - WAV/OGG: Low Rela

Post by billla »

I'm a complete noob here so patience, please :)

I'm trying to low-level trigger a relay (links at the bottom of the post) from this board and running into an issue where either the relay won't trigger...or stays triggered. The board is connected directly to a 5V, 2A power supply wired to the Vin and GND pins. The ACT pin goes low when the board is playing sound.

Scenario 1: Connect board BUS to relay DC+, board GND to relay DC-, and board ACT pin to relay IN. I see about 3.3V at the BUS pin (although it should be Vin) and at the ACT pin. The power light on the relay is lit. When the ACT pin goes low, the relay does not trigger. The relay notes that it requires 5VDC.

Scenario 2: Connect relay DC+ directly to 5V power, board GND to relay DC-, and board ACT pin to relay IN. I see 5V at the relay DC+ pin and about 3.3V at the ACT pin. When the ACT pin goes low the relay triggers correctly, but when the ACT pin goes back high, the relay does not release. Cycling power causes the relay to release. Tried 2 different relay units.

I suspect the issue is in Scenario 1 the 3.3V is just not enough to power the relay, and in Scenario 2 the difference between 5V at DC+ and 3.3V at IN at the relay is causing a false positive where the relay still thinks ACT is low.

I hope this made some sense :) I'm loving every second I'm learning here, and I so deeply appreciate the community taking time to look over my shoulder and shake their head :)

Board: https://learn.adafruit.com/adafruit-aud ... rd/pinouts

Relay: https://www.amazon.com/HiLetgo-Channel- ... 2914&psc=1

User avatar
cosined
 
Posts: 30
Joined: Tue Sep 22, 2015 8:05 pm

Re: Adafruit Audio FX Sound Board + 2x2W Amp - WAV/OGG: Low

Post by cosined »

Hi billla, it's been a while since you posted, so you might have already figured out what to do by now. I think you did a great job explaining the situation.

Your analysis sounds correct to me. I'm assuming you configured the relay to use inverted logic, via the jumper setting talked about in the Amazon product description. Aside from that, you have to use the Scenario 2 wiring in your post, since that particular relay operates off of +5V to power the DC side.

The symptoms you describe suggest that, while 0V LOW is low enough to trigger the relay, 3.3V HIGH (default state HIGH from the Sound Board ACT pin while a sound is not playing) is not high enough to cause the relay to release. This indicates that maybe the relay uses a CMOS input, which is less forgiving than a TTL input when it comes to logic levels. For 5V-level CMOS, a 3.3V signal is not high enough to trigger a HIGH read state. A signal between 3.5V and 5V is needed to do that. The description on Amazon doesn't really speak on TTL vs. CMOS input details for the relay but I think that would explain the problem you're seeing.

All About Circuits goes into more details on this if you're interested.
https://www.allaboutcircuits.com/textbo ... ge-levels/

To solve the problem, you could either get a 3.3V logic level relay, a 3.3V-to-5V level shifter IC, or create your own level-shifting circuit using transistors or FETs.
Attachments
billla-wiring.png
billla-wiring.png (292.46 KiB) Viewed 106 times

User avatar
billla
 
Posts: 4
Joined: Sat Sep 12, 2020 5:33 pm

Re: Adafruit Audio FX Sound Board + 2x2W Amp - WAV/OGG: Low

Post by billla »

Thank you for your response - this was incredibly helpful! Especially useful was the link to All About Circuits - that is a fantastic reference.

I'm learning about and exploring using a P-Channel MOSFET for the load and for driving the relay for future projects. The adafruit MOSFETS trigger correctly with 3.3V, but still having some issues with the load. Switching is relatively short; it's turned on for ~30 seconds every few minutes.

I'm going to try your suggestions as well as continued learning on the MOSFET.

Again, many thanks for sharing your expertise and making the time for such a complete reply!

User avatar
cosined
 
Posts: 30
Joined: Tue Sep 22, 2015 8:05 pm

Re: Adafruit Audio FX Sound Board + 2x2W Amp - WAV/OGG: Low

Post by cosined »

No problem!

Another thing that could be the case with the relay is that the input voltage needs to be 5V to drive the relay coil with the 5mA (see product description) current necessary to activate it. 3.3V input might be too low to supply this current. If the relay coil isn't activated, then it won't magnetically pull the contacts together on the opposite end. This is actually much more likely to be the case than the CMOS vs. TTL idea I was talking about earlier. The relay circuit looks to be simple and not use any ICs outside of the white optoisolator chip. I was being too creative when I wrote up that post.

Anyways, it seems like you're well on the way to figuring out how to get your application going. Good luck! If your load is an inductive one like a motor or another relay, make sure to include a reverse-oriented flyback/free-wheeling diode across the inductive load to protect your other connected circuitry. The relay board you linked already has a reverse-biased diode across the coil to protect the input (your SoundBoard ACT pin in the original application). But if you end up using another inductive load with a different control circuitry set-up, i.e. using the P-channel MOSFET, then you want to include a flyback diode to protect the MOSFET.

Here's some good links surrounding flyback diode theory and practice:
https://www.douglaskrantz.com/ElecFlybackDiode.html
https://electronics.stackexchange.com/q ... or-a-relay

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”