I have a little personal project involving an Arduino Uno and an amp board from Sure Electronics. The amp has contacts for a mute function that involves shorting the contact to ground. I would like to control this muting with the Arduino which I was planning to do with a relay. However I think I might be complicating things and I thought it might be possible to do it directly with the pins.
Can I use the Arduino to directly short a circuit to ground? Or would I need something more complicated to be safe?
2 Answers 2
Depends on the voltage that is on that mute pin. If it's below 5 volt, you could use the arduino pin. You can measure the voltage using a multimeter.
If it's more than 5v you can use a NPN transistor and resistor combination. enter image description here
Current isn't a problem with these kinds of "settings" pins, as there is just a pull-up resistor that by default (unconnected) sets the pin to HIGH. By connecting the pin to ground you set the pin to LOW.
-
I would recommend an optical coupler: en.wikipedia.org/wiki/Solid-state_relay, which will let the Arduino survive even in case of severe overvoltage in the amp. They also come in 2 or 4 per package, so this could control also the power of the amp, in a small footprint. Example: ebay.com/itm/6N136-Highspeed-Transistor-Optocoupler-DIP-8-/…Igor Stoppa– Igor Stoppa2015年06月01日 16:09:14 +00:00Commented Jun 1, 2015 at 16:09
-
I missed the product link in the question. The SD pin is pulled up to the voltage applied to the amp (page 20 datasheet). The voltage for the amp is 8-24 volts. So you can connect the pin directly. And optocoupler is a bit overkill with these low voltages. Solid state relays are uber-overkill.Gerben– Gerben2015年06月01日 19:58:07 +00:00Commented Jun 1, 2015 at 19:58
I can't see how much current the amp board will sink into the Arduino so like FuaZe I would recommend using your Arduino to drive an external component that you know can take the current. This isn't really complicating the design too much, use an NPN transistor, with the P connected to the Arduino and just write High to the pin when you want to apply the mute. If you blow the transistor then its going to cost you a few pence for a new one, if you blow your Arduino you are down 20ドル!
-
2Don't forget to add a resistor between the base (P) and the Arduino pin, or you will definitely blow your Arduino, regardless of the amp board.Gerben– Gerben2015年06月01日 14:51:54 +00:00Commented Jun 1, 2015 at 14:51
"For 328P, the max current rating is 400mA for the TQFP package"
- playground.arduino.cc/Main/ArduinoPinCurrentLimitations"DC Current per I/O Pin: 40.0 mA"
How stupid, I took the max current rating for the complete package... per pin it indeed is ~40mA. Also, ofcourse it shouldn't surpass the arduino voltage limits (5V?) I'll delete my comment before anyone will burn his/her arduino because of it :)