• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Looking for a 12v trigger transmitter & receiver

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,808
Likes
3,126
Prefer off the shelf if at all possible. I can DIY a bit but am out of my comfort zone when it comes to electronics and soldering.

I did realize that the intended use case for that buck converter is for a power supply, but wouldn't it still work for this?
I should have searched using arduino rather than pi - many more hits for items such as:
https://www.ebay.co.uk/itm/PC817-2-...uino-optoisolator-optocoupler-ST/274499061740

The power supplies don't always switch on and off quickly or cleanly, especially with essentially zero load as you'd have with the pi input pin. You probably wouldn't break anything but it might not work very well either.
 
OP
win

win

Senior Member
Joined
Jun 17, 2020
Messages
430
Likes
432
Location
Irvine CA
I should have searched using arduino rather than pi - many more hits for items such as:
https://www.ebay.co.uk/itm/PC817-2-...uino-optoisolator-optocoupler-ST/274499061740

The power supplies don't always switch on and off quickly or cleanly, especially with essentially zero load as you'd have with the pi input pin. You probably wouldn't break anything but it might not work very well either.

thanks, I suppose it can't hurt to try. Also keep in mind, this buck converter would get a constant 12vdc, since it's tied to the 12v trigger out.

the power supply I photographed is to send a mock trigger output to the subwoofers' trigger inputs.
 

Sal1950

Grand Contributor
The Chicago Crusher
Forum Donor
Joined
Mar 1, 2016
Messages
14,312
Likes
17,153
Location
Central Fl

Vasr

Major Contributor
Joined
Jun 27, 2020
Messages
1,409
Likes
1,926
Any commonly available 12vDC automotive electro-magnetic relay provides isolation from the 12V circuit to convert the 12V off and on to a passive on or off SPST switch just like an optoisolator. The current draw from the trigger when on would be 150-200 mA only.

5RLU7_AS01.jpg

You are not worried about introducing noise into a signal path here. The automotive relays are built to be reliable for a long time. You then use the 3.3v pin of the Pi board itself as the source to detect the off/on condition of the switch. There may be off the shelf assemblies for this or you can do a circuit like this to limit the current draw with even solder-less connections to a couple of resistors. To detect on or to detect off by default.

https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/buttons_and_switches/

EGHS-PullUpDownSwitchProtected.jpg
 
Last edited:
OP
win

win

Senior Member
Joined
Jun 17, 2020
Messages
430
Likes
432
Location
Irvine CA
So use a 12v relay to open/close a connection between the rpi 3.3v power and some GPIO pin?

and just to be sure, you don't think the current draw of keeping the relay closed will hurt the 12v trigger circuit (sourced from my ahb2 amp)?

(ahb2 user manual)
 12 VDC 200 mA current-limited output to trigger turn-on of remote devices
 
Last edited:

Vasr

Major Contributor
Joined
Jun 27, 2020
Messages
1,409
Likes
1,926
So use a 12v relay to open/close a connection between the rpi 3.3v power and some GPIO pin?
Yes, with those resistors for protection as described in that linked article. One, in case you programmatically wrongly configure that GPIO pin as output and the other to limit current draw when the 3.3v circuit is on (switch closed). Anything you do here is isolated from the trigger circuit itself.
and just to be sure, you don't think the current draw of keeping the relay closed will hurt the 12v trigger circuit (sourced from my ahb2 amp)?
Amps limit the trigger current draw (to 200ma in your case) because they have to protect themselves against the trigger out being shorted (with a bad cable or "user error") in the worst (and not rare) case. The good ones are likely even protected against someone putting the trigger out into a trigger out of another device feeding 12v back into that circuit! People do stupid things.

They are designed for the destination to draw up to that amount when on. So, the worst that can happen is that an amp does not provide enough voltage or current to switch the relay (which can also happen if you connect the trigger out to multiple devices). But if the amp provides close to 12v and up to 200ma, most automotive relays will work. You can check the spec of the relay to ensure that it will work with 200ma or less. As I mentioned earlier, they should draw about 150-200mA and work in that range. You can also use relays meant for electronics use but the pins are designed more for PCBs and so the connections aren't as easy to do as an automotive relay for a PCB-less, solder-less setup.

You can first test your relay/Rpi set up with a 12v wall wart adapter before connecting it to the amp trigger. And similarly test the relay switch working by connecting the trigger but not to the RPi to ensure the relay works.

This is no different from what happens when you hook the trigger out to a device that takes the trigger in. It is connected to a relay that switches on the main power in a secondary circuit. This is essentially what this set up does but with no risk of high voltage or high current draw anywhere.
 
  • Like
Reactions: win
OP
win

win

Senior Member
Joined
Jun 17, 2020
Messages
430
Likes
432
Location
Irvine CA
I got this thing

HiLetgo 12V 1 Channel Relay Module With Optocoupler Isolation Support High or Low Level Trigger https://smile.amazon.com/dp/B00LW15D1M/

does this mean I don't need to use resistors per that diagram? I have to figure out how to wire it up. I'll have the 12v + and - from the trigger, and the two pins from the pi - the 3.3v source and any generic GPIO pin.

Also have to figure out the whole pulling down vs pulling up business. That's Greek to me right now.
 

Vasr

Major Contributor
Joined
Jun 27, 2020
Messages
1,409
Likes
1,926
It is just a more complicated version of an automotive relay providing nothing additional for your needs and more parts to fail. ;)

The relay side is a SPST passive switch and if you use the Rpi 3.3v and GPIO pin here, it would be the same schematic as the ones posted above and you would need the resistors for protection and limiting current draw on the RPi side.

On the trigger side, the typical use case is to have separate 12vDC power supply always on to power it and provide a separate trigger input (which can be less than 12VDC). But you can do what the topmost review on the Amazon page has done - to feed the amp trigger output + to both the trigger IN and DC+ and trigger ground to DC- (jumper to H) or trigger + to DC- and IN and trigger ground to DC+ (jumper L).

Test the board by itself with a 12VDC wall wart adapter for trigger side and a multimeter to test the relay close and open when you turn 12V power off and on. Before you connect to amp or RPi.

Then you would know whether the logic is right and which of NC to NO to use to connect to the RPi when input is at 12V. I have heard of cases where some boards like this came with wrong labeling of NC and NO relay pins. So don't depend on those labels.
 
OP
win

win

Senior Member
Joined
Jun 17, 2020
Messages
430
Likes
432
Location
Irvine CA
just a more complicated version of an automotive relay providing nothing additional

I like that it requires a lot less current to close the relay. The automotive ones are just on the threshold. That also has an opto-isolator, which should solve

you would need the resistors for protection and limiting current draw on the RPi side

no?

Thanks!
 

Vasr

Major Contributor
Joined
Jun 27, 2020
Messages
1,409
Likes
1,926
I like that it requires a lot less current to close the relay. The automotive ones are just on the threshold.
That is a valid point. Automotive relays also generate a little heat from the coil. This should take about 40-50mA when relay is on (not the 5mA which is for a separate trigger input).
That also has an opto-isolator, which should solve ...
no?
No. It just means that the signal transmission from trigger circuit to relay circuit is optical (no mechanical or electrical connectivity). The relay circuit is not current limited other than burning out if you send more than the rated current through it. (upto 10A in this one). Otherwise, it just acts like a switch with contacts closed. You can check the resistance across the closed pins. It will be insignificant.

So, if you just connect the Rpi 3.3v and GPIO pin to the relay side closed pins, it would be equivalent to shorting the 3.3v pin to the GPIO pin.
 
  • Like
Reactions: win
OP
win

win

Senior Member
Joined
Jun 17, 2020
Messages
430
Likes
432
Location
Irvine CA
That is a valid point. Automotive relays also generate a little heat from the coil. This should take about 40-50mA when relay is on (not the 5mA which is for a separate trigger input).

No. It just means that the signal transmission from trigger circuit to relay circuit is optical (no mechanical or electrical connectivity). The relay circuit is not current limited other than burning out if you send more than the rated current through it. (upto 10A in this one). Otherwise, it just acts like a switch with contacts closed. You can check the resistance across the closed pins. It will be insignificant.

So, if you just connect the Rpi 3.3v and GPIO pin to the relay side closed pins, it would be equivalent to shorting the 3.3v pin to the GPIO pin.

Just want to make sure I understand this and have it correct.

The optically-isolated bit keeps the 5mA trigger input isolated from the 12v coil circuit. I'm assuming that this 5mA trigger is used in the scenario where you have a battery hooked to the 12v circuit +/-, and you have a separate, very small signal to close the relay. This would mean the 5mA trigger input needs to be 'tied' to high or low, which is why that product has resistors on it.

But I am using a switched 12v circuit, not a battery, so I don't need to concern myself with that. The switching of the circuit (i.e. the trigger voltage goes to 12v) will switch the relay open/closed instead.

Once the relay is closed, it's the same situation as the automotive relay (except the required trigger current), with a simple contact switch. And this is why, owing to the extraneous opto-isolation and accompanying resistors, you stated that it was

a more complicated version of an automotive relay providing nothing additional for your needs and more parts to fail

I think I get it now. I basically bought a smaller 12v relay, and got a little platform for it to proudly be displayed on.
 
Last edited:

Vasr

Major Contributor
Joined
Jun 27, 2020
Messages
1,409
Likes
1,926
Just want to make sure I understand this and have it correct.

The optically-isolated bit keeps the 5mA trigger input isolated from the 12v coil circuit. I'm assuming that this 5mA trigger is used in the scenario where you have a battery hooked to the 12v circuit +/-, and you have a separate, very small signal to close the relay. This would mean the 5mA trigger input needs to be 'tied' to high or low, which is why that product has resistors on it.

But I am using a switched 12v circuit, not a battery, so I don't need to concern myself with that. The switching of the circuit (i.e. the trigger voltage goes to 12v) will switch the relay open/closed instead.

Once the relay is closed, it's the same situation as the automotive relay (except the required trigger current), with a simple contact switch. And this is why, owing to the extraneous opto-isolation and accompanying resistors, you stated that it was
You have it more or less for what you need to do. Just to be precise...

There is no coil in the opto-isolator. The electro-mechanical automotive relays have a coil which pulls the contacts closed magnetically when trigger current is flowing through it. In the opto-isolator, a diode in the trigger circuit produces "light" which is detected by the relay circuit to switch on or off. This is why it is more efficient in current draw.

The isolation is between the trigger and the relay (the NC or NO) circuits. Typically you are using them for very different voltage and ampere levels or even AC in the relay circuit.

The 12VDC + and - is just to power the board since it has electronic components that need power to work. You set it to detect whether a separate trigger input connected to IN is going high (relative to the -) closes NO or going low closes NO based on the jumper. This is the common use.

In your case you can use the 12V trigger from the amp as both board power (draws about 40mA) and trigger input (draws about 5mA). So don't need a separate power source. When it is off, there is no power coming to the board at all and NC stays closed and NO stays open. When the amp powers the trigger, it powers the board via the 12vDC + and - and lets it detect the same 12V coming through the input as its trigger. Whether this is considered high or low depends on the polarity of how you connect the amp trigger wire as described earlier. You can experiment with both.

Yes, the relay side is the same as the automotive relay. Just a switch that closes or opens. In this case there are two switches (NO/common and NC/common) going in opposite directions of open and closed. So you can map the logic of what the low and high in the trigger is to the switch is closed or open one-one or inverted.
 
  • Like
Reactions: win
OP
win

win

Senior Member
Joined
Jun 17, 2020
Messages
430
Likes
432
Location
Irvine CA
Just want to comment that this is up and running. Thanks for the help!

The only snag I ran into was from using an external pull-down resistor. That ended up not being needed, as the raspberry pi (not sure when this was implemented) has internal functionality to pull-down, and mine was interfering with its.

I'm very happy with the solution, because now I can also automate my SHD Studio to change EQ preset, and turn off Dirac for headphone listening, which was otherwise a chore each time.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,808
Likes
3,126
The only snag I ran into was from using an external pull-down resistor. That ended up not being needed, as the raspberry pi (not sure when this was implemented) has internal functionality to pull-down, and mine was interfering with its.
For future reference most of the pins can be configured in software for pull-up, pull-down or floating. How you do that depends on the programming language you're using. See the documentation section on inputs for the exceptions.
 

Neel

Member
Forum Donor
Joined
Oct 1, 2020
Messages
19
Likes
25
Hi @win & other forum members,

I have my benchmark DAC3 providing 12v output trigger to my power amps. I am happy with my DAC3, however, I wish to try out some other DAC. I have placed an order for Gustard X16 and hope to try it out soon in my setup. My question to the forum members - what 12v trigger option has worked best for you guys. Can you please provide some suggestions?

I would prefer not to go down the DIY route as the first option.

Thank you in advance for your suggestions and help.
 
OP
win

win

Senior Member
Joined
Jun 17, 2020
Messages
430
Likes
432
Location
Irvine CA
It is relatively easy to wire a 12vdc switched power supply - which you probably already have lying around somewhere - to a mono TS 1/8" connector. Then, plug the power supply into a smart plug/socket, and the TS connector into a standard phono jack Y connector to hook up whichever 12v trigger components you want to control.

Then it's a matter of how you want to control the smart plug on/off. You could even make a button on your phone widgets.

As a safety precaution, I would not recommend using a TRS (standard headphone connector) connection for the power supply connector, only a TS (std 12v trigger connector).
 
Last edited:

Neel

Member
Forum Donor
Joined
Oct 1, 2020
Messages
19
Likes
25
Then it's a matter of how you want to control the smart plug on/off. You could even make a button on your phone widgets.

@win Thank you for your reply. I really like this idea.

One question - shouldn't a trigger provide a instantaneous 12v trigger and then become 0v after that. In the solution you are suggesting the amps will see a 12v supply at all times - am I correct? Also is that a concern for the amps?
 
OP
win

win

Senior Member
Joined
Jun 17, 2020
Messages
430
Likes
432
Location
Irvine CA
@win Thank you for your reply. I really like this idea.

One question - shouldn't a trigger provide a instantaneous 12v trigger and then become 0v after that. In the solution you are suggesting the amps will see a 12v supply at all times - am I correct? Also is that a concern for the amps?
The 12vdc trigger uses an active circuit, not a 'trigger' pulse, as the name may not imply.

not a concern as this is exactly the same thing the dac3 was doing before. I would just make sure to use a power supply with at least 1-2 amps (more is fine) if you intend to slave multiple components.
 

Bamyasi

Senior Member
Joined
Feb 19, 2019
Messages
491
Likes
357
Hi @win & other forum members,

I have my benchmark DAC3 providing 12v output trigger to my power amps. I am happy with my DAC3, however, I wish to try out some other DAC. I have placed an order for Gustard X16 and hope to try it out soon in my setup. My question to the forum members - what 12v trigger option has worked best for you guys. Can you please provide some suggestions?

I would prefer not to go down the DIY route as the first option.

Thank you in advance for your suggestions and help.
I used solution #1 from this post on Reddit. The Ktec power adapter was hard to find, so I went for another generic 12v model and had to also add a barrel to 3.5mm TS adapter.
 

Neel

Member
Forum Donor
Joined
Oct 1, 2020
Messages
19
Likes
25
Hi @win & @Bamyasi - I wanted to thank you both for your inputs.

I finally have my home made 12v trigger solution working! I used a 12v DC power supply (attached it to a 3.5 mm TS) and plugged it into a smart plug. I have programmed the smart plug to work with my Logitech harmony remote - it works like a charm :)

Thanks again - appreciate your inputs.
 
Top Bottom