I have a DAC, pre-amp, and headphone/pre-amp which use an Arduino, specifically the LCDuino, to control them. The power/config switch is a capacitive touch style with configurable RGB LEDs. I wanted to build a board to make hooking this up easier, then had the idea to modify the LCDuino firmware to use an extra pin to indicate when mute is enabled. Between the SSR trigger pin and this extra mute pin I can use that to turn the switch's LED on when the device is powered on, and change it's color when mute is enabled.
What I've come up with is a dip switch to configure the colors, and a couple logic gates to determine which transistor/dip switch combo should be active. On my breadboard this is working fine but now I want to turn it into a board I can plug in to the LCDuino. I've built a bunch of things over the years, but never designed anything, so before I go buying parts or having PCBs made I was hoping to get some feedback on what I have so far.
I think the circuit itself is ok, but maybe there's a way to simplify it a bit that I'm overlooking? When the device is powered off the SSR trigger goes low, but the mute pin stays high, so in this scenario I need to make sure the mute indicator also goes off. I can certainly work around that in code which would remove the need for the logic gates, but there's very little memory left and I don't want to add more code than I need to. This is especially true in the event of a firmware update where I could lose some of the currently available free space.
I went SMT because of space constraints on the board and in my pre-amp where there's very little extra space to add this in. I've worked with components of these sizes so soldering them won't be an issue. I also added some jumpers so I don't need to populate all of the components depending on how this is used. If I know what colors I want I don't need a dip switch, and if I don't want the mute function I can use JP1 and skip populating most of the circuit. Not all of the headers will be used either, so some of them will be left off depending on where it's used.
The ICs are the same series used in the DAC this will be going in so I don't see why there'd be any issues with those. The resistors and capacitors all seem like ok versions of the through hole parts I've been using. The diodes I picked are what I'm really not sure about. With my breadboard version I'm using 1N4148 because that's what I had extra of but I'm not sure if I picked a good alternative for the PCB version.
The switch is a Schurter 3-101-412 and each LED control line draws 0.05mA when shorted to ground to turn on it's corresponding LED. These are the parts I've picked out so far:
I've gone through more PCB iterations than I can count. The current version should have the pin headers in all the right locations which is what dictated the rest of the layout. I also need to be mindful of components on the board this is plugging into which is why there's nothing on the back aside from the headers. It's a 4 layer board with the back side facing the LCDuino when plugged into it. It's setup as as follows:
Front: LED control circuit
Inner 1: power
Inner 2: ground
Back: connector passthrough
Here's a quick demo of the breadboard version in action.
What I've come up with is a dip switch to configure the colors, and a couple logic gates to determine which transistor/dip switch combo should be active. On my breadboard this is working fine but now I want to turn it into a board I can plug in to the LCDuino. I've built a bunch of things over the years, but never designed anything, so before I go buying parts or having PCBs made I was hoping to get some feedback on what I have so far.
I think the circuit itself is ok, but maybe there's a way to simplify it a bit that I'm overlooking? When the device is powered off the SSR trigger goes low, but the mute pin stays high, so in this scenario I need to make sure the mute indicator also goes off. I can certainly work around that in code which would remove the need for the logic gates, but there's very little memory left and I don't want to add more code than I need to. This is especially true in the event of a firmware update where I could lose some of the currently available free space.
I went SMT because of space constraints on the board and in my pre-amp where there's very little extra space to add this in. I've worked with components of these sizes so soldering them won't be an issue. I also added some jumpers so I don't need to populate all of the components depending on how this is used. If I know what colors I want I don't need a dip switch, and if I don't want the mute function I can use JP1 and skip populating most of the circuit. Not all of the headers will be used either, so some of them will be left off depending on where it's used.
The ICs are the same series used in the DAC this will be going in so I don't see why there'd be any issues with those. The resistors and capacitors all seem like ok versions of the through hole parts I've been using. The diodes I picked are what I'm really not sure about. With my breadboard version I'm using 1N4148 because that's what I had extra of but I'm not sure if I picked a good alternative for the PCB version.
The switch is a Schurter 3-101-412 and each LED control line draws 0.05mA when shorted to ground to turn on it's corresponding LED. These are the parts I've picked out so far:
I've gone through more PCB iterations than I can count. The current version should have the pin headers in all the right locations which is what dictated the rest of the layout. I also need to be mindful of components on the board this is plugging into which is why there's nothing on the back aside from the headers. It's a 4 layer board with the back side facing the LCDuino when plugged into it. It's setup as as follows:
Front: LED control circuit
Inner 1: power
Inner 2: ground
Back: connector passthrough
Here's a quick demo of the breadboard version in action.
Attachments
-
1743881588132.png331 KB · Views: 43
-
1743884140323.png23.4 KB · Views: 41
-
1743884161391.png36.1 KB · Views: 27
-
1743884181444.png34.4 KB · Views: 27
-
1743885260304.png199.9 KB · Views: 24
-
1743885278738.png201.7 KB · Views: 29
-
1743885323900.png1.3 MB · Views: 27
-
1743885351288.png1.2 MB · Views: 44
Your logic gate connections using U1 and U2 seem redundant to me. The two AND gates are wired to produce (_D6*TRG)*TRG, whose output will be the same as _D6*TRG. The function performed by U1 and U3 is equivalent to (!_D6)*TRG -- invert _D6 and AND it with TRG.
Maybe your design doesn't have any spare inverters? It's always better to use some already-existing spare gates rather than adding another package to your board. In some cases, particularly for low-speed applications, I have rolled my own inverter using a transistor and a couple of resistors.
I also am curious regarding the diodes. Your NPN buffers Q1 and Q2 can only source current, but the diodes will block it. Am I missing something?
Maybe your design doesn't have any spare inverters? It's always better to use some already-existing spare gates rather than adding another package to your board. In some cases, particularly for low-speed applications, I have rolled my own inverter using a transistor and a couple of resistors.
I also am curious regarding the diodes. Your NPN buffers Q1 and Q2 can only source current, but the diodes will block it. Am I missing something?
Yes U2 isn't doing anything as its input is already gated by TRG.
Q1 and Q2 are upside down. Emitter should go to ground for an NPN. 10k seems rather large for a base resistor - for switching transistors have a current gain of about 10 only.
BTW always draw ground as below, never above, it will cause confusion and error.
Several of the pull-down resistors are redundant - any signal driven by the output of a gate doesn't need any pullup/down resistors. And you only need one per signal line.
You can probably choose a single 74 series chip to do all the logic with a bit of thought. Normally NAND and NOR are the most versatile elements as they are inverting. You can use diode logic for a "free" AND gate.
Q1 and Q2 are upside down. Emitter should go to ground for an NPN. 10k seems rather large for a base resistor - for switching transistors have a current gain of about 10 only.
BTW always draw ground as below, never above, it will cause confusion and error.
Several of the pull-down resistors are redundant - any signal driven by the output of a gate doesn't need any pullup/down resistors. And you only need one per signal line.
You can probably choose a single 74 series chip to do all the logic with a bit of thought. Normally NAND and NOR are the most versatile elements as they are inverting. You can use diode logic for a "free" AND gate.
Thanks for the feedback!
U1 & U2 felt weird to me, but an early version of the circuit needed both. I guess I changed things around enough that U2 became redundant. I've now removed it along with C2, R3, and R4.
MMBD4148TW-7-F looks to be the smd version of the 1N4148 I've been using so I switched to that since those have been working fine for me.
Good catch on Q1 & Q2. I flipped them so they're in the right orientation. They were correct on my breadboard, but not in the schematic or pcb.
I removed R6 since that pin is driven by U1. I'm not sure if R1 makes R5 redundant, but I left it for now.
After removing U2 I found that pins 1 & 2 on U3 can be jumped and serve the same purpose as JP1 did, so that's been removed.
I used 10k resistors everywhere because the 2N3904 used them and it's what I had available when hooking everything up. They seemed to work so I stuck with it, but I don't think they're the right values for the smd parts I picked. The 74LVC line from TI doesn't have info on pull up/down resistors in their data sheets, at least not the ones I've looked at. I found a document on using this series which said pull down resistors should be 1k so that's what I've switched to.
R7 & R8 are still 10k. The DAC this is going in has the same MMBT3904, driven by a pin off a 5v port expander, and that uses 10k. Since it worked on the breadboard, and is on the DAC, I figured that was ok here too but maybe it should be a different value?
I did look into using a single chip with multiple gates, but I couldn't find anything in a small package that was also cheaper than the two I'm using right now. It's $1.39 for 10 of each (20 total) which is hard to beat.
U1 & U2 felt weird to me, but an early version of the circuit needed both. I guess I changed things around enough that U2 became redundant. I've now removed it along with C2, R3, and R4.
MMBD4148TW-7-F looks to be the smd version of the 1N4148 I've been using so I switched to that since those have been working fine for me.
Good catch on Q1 & Q2. I flipped them so they're in the right orientation. They were correct on my breadboard, but not in the schematic or pcb.
I removed R6 since that pin is driven by U1. I'm not sure if R1 makes R5 redundant, but I left it for now.
After removing U2 I found that pins 1 & 2 on U3 can be jumped and serve the same purpose as JP1 did, so that's been removed.
I used 10k resistors everywhere because the 2N3904 used them and it's what I had available when hooking everything up. They seemed to work so I stuck with it, but I don't think they're the right values for the smd parts I picked. The 74LVC line from TI doesn't have info on pull up/down resistors in their data sheets, at least not the ones I've looked at. I found a document on using this series which said pull down resistors should be 1k so that's what I've switched to.
R7 & R8 are still 10k. The DAC this is going in has the same MMBT3904, driven by a pin off a 5v port expander, and that uses 10k. Since it worked on the breadboard, and is on the DAC, I figured that was ok here too but maybe it should be a different value?
I did look into using a single chip with multiple gates, but I couldn't find anything in a small package that was also cheaper than the two I'm using right now. It's $1.39 for 10 of each (20 total) which is hard to beat.
Attachments
Last edited: