24V 5A 3-state capacitive touch switch (not a dimmer, without relay)

MisterBill2

Joined Jan 23, 2018
27,685
Actually, for small LEDs, it will worked to assume a target current of 20 mA and an approximate forward voltage of 2.5 volts. BUT the supply voltage must be known. With those numbers it is simple to calculate the resistance required to drop the difference between the supply voltage and the LED voltage at the nominal 20 mA current. Then take the next highest 10% standard value as the series resistor. This should be close enough since the supplier does not state ANY electrical details, such as switch ratings, current or voltage, nor LED ratings. Those details will need to be available if the project ever goes into mass production, because that supplier probably can not supply production quantities.
 
Last edited:

Thread Starter

oslosl

Joined Jan 13, 2023
270
I w
Actually, for small LEDs, it will worked to assume a target current of 20 mA and an approximate forward voltage of 2.5 volts. BUT the supply voltage must be known. With those numbers it is simple to calculate the resistance required to drop the difference between the supply voltage and the LED voltage at the nominal 20 mA current. Then take the next highest 10% standard value as the series resistor. This should be close enough since the supplier does not state ANY electrical details, such as switch ratings, current or voltage, nor LED ratings.
Supply voltage is 5v or do you mean including 2N7002 voltage drop ?
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,685
I w

Supply voltage is 5v or do you mean including 2N7002 voltage drop ?
In his context the "supply voltage" is the voltage at the ends of the LED-resistor string. That means that the 2N7002 voltage drop at the planned LED current would be subtracted from the 5 volts. BUT how much is the 2N7002 voltage drop ?? Typically mosfet specifications describe on-state resistance, usually in milliohms. So at 20 milliamps that is not very much voltage drop.
 

Thread Starter

oslosl

Joined Jan 13, 2023
270
In his context the "supply voltage" is the voltage at the ends of the LED-resistor string. That means that the 2N7002 voltage drop at the planned LED current would be subtracted from the 5 volts. BUT how much is the 2N7002 voltage drop ?? Typically mosfet specifications describe on-state resistance, usually in milliohms. So at 20 milliamps that is not very much voltage drop.
So blue LED 100 ohm ?
 

MisterBill2

Joined Jan 23, 2018
27,685
So blue LED 100 ohm ?
That depends on the forward voltage of the blue LED. at 20.0mA a 100 ohm resistor will drop 2.0 volts. But a 10% 100 ohm resistor is never within 5% so the resistance would either be above 105 ohms or below 95ohms. So if the forward drop were exactly 3 volts the current would be reasonably close. But probably the forward drop is a bit less than 3 volts and so the current would be a bit higher, but still reasonable.
 

Thread Starter

oslosl

Joined Jan 13, 2023
270
Speaking of blue (I hate blue LEDs), how do you initiate pairing of the Bluetooth module?
Pairing is initiated at startup (pretty much standard I think) TWS or PartyMode can be initially configured by pressing small buttons on the tiny bluetooth board.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,685
If there were external terminals available to initiate pairing, it could easily be launched by a longer press of the same button as already available. A momentary press changes state, a much longer press allows a timer to time out and initiate a pairing. One extra cheap IC and two resistors plus two capacitors. Possibly an opto-isolator if the Bluetooth module needs an isolated switch.
 

Thread Starter

oslosl

Joined Jan 13, 2023
270
Clever, but maybe not necessary. I have tested pairing it with multiple devices including phones, computers and a BT turntable. All you have to do to connect a new device is disconnect the current device.
 
Last edited:

Thread Starter

oslosl

Joined Jan 13, 2023
270
Have to order some new components to breadboard test Jon Chandlers curcuit.
If the board is mounted as suggested it can actually only be 3x1.1".
 
Last edited:

Jon Chandler

Joined Jun 12, 2008
1,619
....I believe the metal trim is 8mm thick. The button of the switch is 8.2mm above the pcb. If no through-hole components are used, the switch could be mounted directly to the circuit board, and the board adhered to the metal trim. See the sketch in the schematic. Again, I believe everything should fit in the space available. A surface mount termination for the cables would need to be determined for this to work.

See the attached pdf.
aac-crossover-tots.jpg

The button and power jack has to be mounted 90 degrees to the switch board about 10 mm up. Should I use a small riser board or something ?
It's almost...no, it's EXACTLY like you didn't read anything I wrote or even glance at the schematic.

I truly regret becoming involved in this AT ALL.

I have the revised schematic ready to post and the file ready to send to you so that YOU CAN DO THE ACTUAL WORK OF LAYING OUT A CIRCUIT BOARD WITH ALL THE GRUNT WORK DONE FOR YOU, but that will just involve more work for me. More unappreciated work. Geez.
 
Last edited:

Thread Starter

oslosl

Joined Jan 13, 2023
270
View attachment 290475



It's almost...no, it's EXACTLY like you didn't read anything I wrote or even glance at the schematic.

I truly regret becoming involved in this AT ALL.

I have the revised schematic ready to post and the file ready to send to you so that YOU CAN DO THE ACTUAL WORK OF LAYING OUT A CIRCUIT BOARD WITH ALL THE GRUNT WORK DONE FOR YOU, but that will just involve more work for me. More unappreciated work. Geez.
Sorry, I saw it afterwards and immediately deleted this mail (but obviously not in due time). I unfortunately only focused on the curcuit diagram. Please ignore it and delete your hate mail.

The center of the button and power jack must be 12 mm. from the back (bottom of the board) Sidewise is more flexible. If a power jack is also mounted on the board it will naturally have to be connected to the curcuit and an additional terminal pair must be added to connect straight to the battery BMS section. The orientation of button connectors is correct and the polarisation of the LED does not matter as the button can be turned 180.
Unfortunately I can't find any 2.5 x 5.5 power jacks for PCB mount that are vertical and only 8mm ? Unless the jack maybe goes through the board and the legs are bent to the sides.
 
Last edited:

Jon Chandler

Joined Jun 12, 2008
1,619
Revised schematic diagram. All components used are in JLCPCB's SMT assembly program.

The zip file contains the EasyEDA schematic, which is ready to convert to a pcb with the exception of terminations for off-board connections. These must be surface mount to use the suggested switch arrangement. PCB layout is left to the reader. This file is for use with the standard edition of EasyEDA, available from JLCPCB.com at no cost. Boards may be made at JLC or Gerber files generated to be used at the fab house of choice. JLC's assembly service is recommended but all components are available at LCSC.com if self-assembly is desired. The switch should NOT be included in the assembly service. Solder it by hand.

Adios Amigos.

acc-crossover switch parts on board.jpg
 

Attachments

Thread Starter

oslosl

Joined Jan 13, 2023
270
Revised schematic diagram. All components used are in JLCPCB's SMT assembly program.

The zip file contains the EasyEDA schematic, which is ready to convert to a pcb with the exception of terminations for off-board connections. These must be surface mount to use the suggested switch arrangement. PCB layout is left to the reader. This file is for use with the standard edition of EasyEDA, available from JLCPCB.com at no cost. Boards may be made at JLC or Gerber files generated to be used at the fab house of choice. JLC's assembly service is recommended but all components are available at LCSC.com if self-assembly is desired. The switch should NOT be included in the assembly service. Solder it by hand.

Adios Amigos.

View attachment 290492
Agreed. Thanks.
 

Jon Chandler

Joined Jun 12, 2008
1,619
Excellent, progress.

I suggest determining the position of the switch first, as its location controls everything. I would position it at the origin, then draw the board outline to fit the space around it.

If you get stuck, there is lots of help online – Google "EasyEda (what you're stuck with)" and you'll find plenty of info. Look at the tutorials too.

One piece of advice: don't be afraid to delete tracks, move things around and try again. It's a learning process.
 

Thread Starter

oslosl

Joined Jan 13, 2023
270
I would also like to add a 8mm horizontal power dc jack (if it exists?) and 3 x 2pin terminals for the offboarding connections.
 
Top