0

trigger sounds by 12v
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

trigger sounds by 12v

by jespercolding on Sun Nov 19, 2017 1:22 pm

Hi there,

I have the breakout board sound fx module, and for triggering, I have a system of LED's which are powered individually by 12v power source.
Is there any easy way, to make each of the LED's trigger an input on the sound board, when they light up? Only idea I can come up with, is to buy some really small watt relays, and make the led's trigger the relay, that then makes the connection on the sound boards input channel??

Anybody, who can come up with a better idea?
Is there an integrated board with, for instance 8 super-micro-tiny relays (they don't have to draw a lot of power to just traigger the sound board, I guess)?

Best, Jesper
Denmark

jespercolding
 
Posts: 11
Joined: Fri Jan 20, 2017 7:44 pm

Re: trigger sounds by 12v

by adafruit_support_mike on Mon Nov 20, 2017 1:24 am

What kind of signal are you using to turn on one set of LEDs?

adafruit_support_mike
 
Posts: 45941
Joined: Thu Feb 11, 2010 2:51 pm

Re: trigger sounds by 12v

by jespercolding on Mon Nov 20, 2017 3:36 am

I have a powerbox in an old car, which sends out +12v to the led. The output can hold up to 3 amphere, which more than enough for the led. I think the led draws around 20 ma.
It's an led with a built in resistor. Basically, when the led gets 12v, I want the signal to drive one of the sounds on the sound board, but I don't think that putting the 12v+ directly to one of the inputs on the sound board, will be right to do. So I need some sort of super tiny micro relay, that the +12v signal can drive, and then the relay will trigger the sound board.

Is this the right assumption or is there any other more clever way to do it?

Best, Jesper

jespercolding
 
Posts: 11
Joined: Fri Jan 20, 2017 7:44 pm

Re: trigger sounds by 12v

by adafruit_support_mike on Tue Nov 21, 2017 1:38 am

Relays could do it, but would be overkill. Transistor switches will do the same thing and will be more durable:

12-switch.jpg
12-switch.jpg (11.85 KiB) Viewed 245 times


An NPN transistor is basically a voltage-controlled switch to GND, and matches the FX Board's inputs. The PN2222s we carry in the shop will work:

https://www.adafruit.com/product/756

adafruit_support_mike
 
Posts: 45941
Joined: Thu Feb 11, 2010 2:51 pm

Re: trigger sounds by 12v

by jespercolding on Tue Nov 21, 2017 9:59 am

Thank you very much for the info. The diagram shown seems to include two resistors? is that right, or is it part of the transistor?

Best, Jesper

jespercolding
 
Posts: 11
Joined: Fri Jan 20, 2017 7:44 pm

Re: trigger sounds by 12v

by adafruit_support_bill on Tue Nov 21, 2017 10:24 am

Yes. The resistors are necessary. 12v directly into the base of the PN2222 would likely damage the transistor.

The resistors limit both the voltage and the current to just enough to ensure that the transistor turns on and triggers the sound on the Fx board.

adafruit_support_bill
 
Posts: 63479
Joined: Sat Feb 07, 2009 10:11 am

Re: trigger sounds by 12v

by jespercolding on Tue Nov 21, 2017 12:05 pm

Thanx, so:
1. parallel to the LED, a +12v to 100k resistor to B-pin, and on the same B pin, a 10k resistor to Ground.
2. Then fxpin to C-pin, and E-pin to ground too.
(me newbie)
:-)

jespercolding
 
Posts: 11
Joined: Fri Jan 20, 2017 7:44 pm

Re: trigger sounds by 12v

by adafruit_support_bill on Tue Nov 21, 2017 12:45 pm

That sounds right. When there is 12v to the LED, you will get a little over 1v to the base of the PN2222. That will turn on the transistor and pull the Fx trigger pin to ground.

adafruit_support_bill
 
Posts: 63479
Joined: Sat Feb 07, 2009 10:11 am

Re: trigger sounds by 12v

by jespercolding on Tue Nov 21, 2017 3:57 pm

..So if I run the 12v serial from the led, instead of parallel with the Led, I don't need the resistors, due to the fact that the built in resistor of the led and the voltage drop, means that the it's only 1v getting thru?

Best, Jesper

jespercolding
 
Posts: 11
Joined: Fri Jan 20, 2017 7:44 pm

Re: trigger sounds by 12v

by adafruit_support_bill on Tue Nov 21, 2017 7:34 pm

Hard to say without knowing the specs of the led and whatever resistor might be built into it.

adafruit_support_bill
 
Posts: 63479
Joined: Sat Feb 07, 2009 10:11 am

Re: trigger sounds by 12v

by jespercolding on Thu Nov 30, 2017 4:22 am

Hi again,

So now, with your generous help, I am able to control the sound board from a 12v source. Thanx.

Then if I want to do logic operations on different 12v signals for controlling the sound board, say for instance, two different 12v signals have to be on, to play a specific sample,
then is it better to move on to first using a "Linear Voltage Regulator - L4931-3.3 TO-92" for each 12v signal, and then feeding the signals (now 3.3v) to a logic chip?
And, if yes, what chip would you suggest using?
And what would the resistor values have to be for the individual transistor setups, before hitting the sound board?

IF this is too many questions, and you feel, I am not enough into this, do you know of anybody, who can help me with this?

Best, Jesper

jespercolding
 
Posts: 11
Joined: Fri Jan 20, 2017 7:44 pm

Re: trigger sounds by 12v

by adafruit_support_bill on Thu Nov 30, 2017 7:43 am

There are a number of ways to approach that. How many 12v signals will there be? In what ways will you want to combine them? Will these logic operations be a relatively static configuration, or should it be easily changeable?

adafruit_support_bill
 
Posts: 63479
Joined: Sat Feb 07, 2009 10:11 am

Re: trigger sounds by 12v

by jespercolding on Tue Dec 05, 2017 1:30 pm

I don't think it will be neccessary to change later on. But of course, if a module like this exist, it would be awsome.
(a module where you can put in up to 8 3.3,5 or 12v signals, have some dipswitches or jumpers to route the signals to different sorts of gates, and then create these low voltage triggers, that the sound board can hook up to.

BUT until then :-)

Well, I tried to count them, so here goes:

Setup 1:
4* 12v signals called a,b,c,d

a AND NOT b = sound (1)
b AND NOT a = sound (2)
a AND b = sounf (3)
c = sound (4)
d= souind (5)

Setup 2:
Same as setup 1, but with four more normal 12v to trigger signals.

Best, Jesper

jespercolding
 
Posts: 11
Joined: Fri Jan 20, 2017 7:44 pm

Re: trigger sounds by 12v

by adafruit_support_bill on Tue Dec 05, 2017 1:36 pm

The simplest way is probably with a microcontroller like an Arduino. You can easily scale the input signals down to logic level with a voltage divider. Then you can combine them in any way you like with a few lines of code.

adafruit_support_bill
 
Posts: 63479
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.