-1
\$\begingroup\$

I want to design something like this:

There is a button, an input pin, an output pin, a voltage input, and a voltage output.

If the button is pressed once while the device is off, it won't do anything. If the button is long-pressed while the device is off, it will set the voltage output to high (it will short the voltage input and output together). If the device is on and the button is pressed once, it will send a pulse to the output pin. If the device is on and the button is long-pressed, it will turn off the device (cutting the power on the voltage output). If it receives a pulse on the input, it will also cut the power.

I found the stm6600 chip but it does not quite do what I want it to do.

While searching online, I found a lot of advice about using microcontrollers. The thing is, I don't want to. I have the knowledge and the equipment to do so, but I don't want to use a uC just for this.

\$\endgroup\$
6
  • \$\begingroup\$ Why you don't want to use an MCU? you didn't show us what you tried but as a raw idea; when device is off a single short button press can't charge a capacitor but when you hold the button the capacitor will be charged and then activates a transistor base. that transistor will indicates whether the device is ON or OFF. from that point you can design the rest with a lot of analog "if else". \$\endgroup\$ Commented Aug 13, 2020 at 6:27
  • \$\begingroup\$ @ElectronSurf yes I also considered using a RC delay circuit to detect long presses. But I can't figure out how it would behave in the fourth and fifth conditions. \$\endgroup\$ Commented Aug 13, 2020 at 6:34
  • \$\begingroup\$ A logic circuit would do but it'll be quite complex as it requires a clock source, counter(s), comparators, and a few logic gates. \$\endgroup\$ Commented Aug 13, 2020 at 6:41
  • \$\begingroup\$ Add the schematic of your progress to the question. \$\endgroup\$ Commented Aug 13, 2020 at 7:01
  • \$\begingroup\$ Related 1 Related 2 \$\endgroup\$
    – AJN
    Commented Aug 13, 2020 at 7:49

1 Answer 1

2
\$\begingroup\$

I know you don’t want to use a micro for this but an ATtiny85 will be cheaper and far easier than any method using discrete components. It’s not even overkill since you’ll be using most of its I/O pins.

\$\endgroup\$
4
  • \$\begingroup\$ I don't want to use one. \$\endgroup\$ Commented Aug 13, 2020 at 6:38
  • \$\begingroup\$ Is the “device” different than the output of the circuit? You say that if the device is on and the button is pressed, this circuit sends a pulse to the output pin. Does this mean that the output of the circuit is independent of the state of the device? \$\endgroup\$
    – vir
    Commented Aug 13, 2020 at 7:03
  • \$\begingroup\$ no, the on state of the device means the voltage output of this circuit is on. \$\endgroup\$ Commented Aug 13, 2020 at 7:15
  • \$\begingroup\$ So when you say that if the device is on and you press the button to send a pulse to the output pin, does the output go low and then high again? Does it rise to a higher voltage and drop again? \$\endgroup\$
    – vir
    Commented Aug 13, 2020 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.