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

Thread Starter

oslosl

Joined Jan 13, 2023
270
The connections to the 4017 counter do not look right to me. From post #1 I get these:
1. off
2. audio on
3. audio and lighting on.
That will not be possible with the circuit as shown.
But pin3 is high when the counter resets to zero, and that will not be the "everything off" condition. So really, pin 3 should have no connection, Pin #2 is high at the count of "one", and so it should feed the gate of Q2 through a diode, to allow Q2 to also be switched on through another diode for the count of 2, when pin 4 is high. That would be a diode "wired OR" function, required to hace the audio power on for conditions #2 and #3.
R2, used as a pull-down resistor to switch the mosfet off, needs to connect to the gate and to the common, NOT another CMOS output.
As shown, there is no "everything off" option available. With the 4017 decimal counter, one of the ten outputs is always high.
Dunno, it works.
 

MisterBill2

Joined Jan 23, 2018
27,683
I agree with @MisterBill2 about connections. The Zero output (pin 2) should be open. "Audio" should be connected to 1 (pin 2), and Lights to 2 (pin 4).....
And a diode "OR" function can switch on the "lights" output along with the audio system power.
Also, "digital" Mosfet devices do not usually need a series gate resistor. Mosfet switches DO require adequate gate drive to switch to the low resistance ON condition.
To conveniently drive LEDs to indicate logic operations, six channels can be provided using a CD4049 hex inverter, with the LEDs tied to V+ and the sinking output of the inverter. The 4049 outputs can sink far more current than they can source, is why I suggest that mode of operation, and changing the V+ to 12 volts (Use a 7812 voltage regulator instead of a 7805)
 

Jon Chandler

Joined Jun 12, 2008
1,616
Just show the full alternative curcuit
People here are more likely to help you when you make some effort to understand what they are saying, how the circuit works, etc. If you have no intention of trying to learn anything and just want to be handed a solution, this may not be the best forum for you.

Just my humble opinion, but I suspect many will agree.
 

Thread Starter

oslosl

Joined Jan 13, 2023
270
People here are more likely to help you when you make some effort to understand what they are saying, how the circuit works, etc. If you have no intention of trying to learn anything and just want to be handed a solution, this may not be the best forum for you.

Just my humble opinion, but I suspect many will agree.
Sorry, I can better understand and test the curcuit if I have the whole curcuit diagram.
 
Last edited:

ElectricSpidey

Joined Dec 2, 2017
3,340
The pinout is correct, it's using output "2" as "off". (pin 4)

So that state exists, it's just not output "0" as one might expect.

When you power up a 4017 any output can be high unless you use a POR.
 

Jon Chandler

Joined Jun 12, 2008
1,616
Just a weird way to do it. Most people would expect the Zero condition to be the off condition. Strange place to take a stand since it's merely a matter of moving one line on a schematic.

The fact that there's no defined state when power is applied is inconvenient at best.
 

sghioto

Joined Dec 31, 2017
8,634
As I have said before it works as designed and verified by the TS.
Why don't you breadboard the circuit as shown and see if it works.
 

Jon Chandler

Joined Jun 12, 2008
1,616
Sure, it works. But why make the reset state a power-on condition?

A better solution would be to provide a simple POR (Power On Reset) circuit (one resistor and one cap) to make sure that the speaker comes up in the power-off state when power is applied?
 

ElectricSpidey

Joined Dec 2, 2017
3,340
JFTR when a POR circuit is used with an active output such as another pin that is likely to start low you also need a diode.

This prevents that pin from charging the POR capacitor and preventing it from doing its job.

But I don't really see the point because this part of the system is powered all of the time.
 
Last edited:

Jon Chandler

Joined Jun 12, 2008
1,616
Good point about the diode.

Ah, but is it powered all the time? It's powered all the time until the batteries go flat. If you plug in a charger to recharge it, it's no big deal if it turns on.

But what happens if the charger is connected all the time, and there's a long enough power failure that the batteries go flat. When power is restored, it could come up in any state. Maybe it's 2am and you'll be blasted awake by all the LEDs. Or maybe you're away from home and the LEDs are on 24 hours a day, advertising that nobody is home.

Is it a big deal? Probably not. Is it a "feature" customers will appreciate? Doubtful.
 

sghioto

Joined Dec 31, 2017
8,634
Sure, it works. But why make the reset state a power-on condition?

A better solution would be to provide a simple POR (Power On Reset) circuit (one resistor and one cap) to make sure that the speaker comes up in the power-off state when power is applied?
Because the TS requested it that way. The project is battery powered and normally powered continuously. Originally it used a touch switch to activate.
 

sghioto

Joined Dec 31, 2017
8,634
No you are missing the point, this is not my project and I'm not the TS. When you join a conversation after 2 months you really need to go back to the first post and follow what has already taken place.
 

Thread Starter

oslosl

Joined Jan 13, 2023
270
I do see the point in the rare event where you have no or drained batteries, running on charger and you have a power failure. I am just so gratefull that sghioto drew this curcuit for me.
But then please draw the full curcuit of the small changes required to start up in off mode.
 
Last edited:

sghioto

Joined Dec 31, 2017
8,634
What exactly are you using now for power and charging?
Do you want to use a power supply for the primary power with battery backup?
 
Top