Creating my first schematic: power on circuit - Page 1
Forum section: electronics / beginners

author: DJVG
author_rank: Contributor
timestamp: February 13, 2017, 06:44:33 pm
content: Hello,I would like to say I'm having very basic to none experience with creating electrical circuits. And I'm asking the questions here to learn, I want to understand how it works and not just get a working schematic.The story:I'm having a computer chassis which I'm going to use for one of my projects. I want to keep using the original frontpanel LED's and power switch. I will be using the original PSU which follows the ATX standard.I know that the PSU has a +5VDC standby. You can use this power to switch on the PSU (connect PS_ON to GND) or off of course.What do I know:If I need to create this with an Arduino I think I know how to do this. Power the arduino from the +5VDC, connect the power switch from the frontpanel to one of the pins. Connect an interrupt to this pin and wait for the switch to be pressed. Connect an output pin from the Arduino to a PNP transistor (with a resistor to get voltage around 0.7v) and connect PS_ON and GND. When the switch is pressed you can turn this transistor on or off based on the current state (e.g. button needs to be pressed 3+ seconds before turning off).Correct me here if I'm wrong, I want to learn!My questions:Using a microcontroller is a bit overkill in my opinion, and I think this should be able without one and just digital logic only. But now, how? I know I could use the PNP transistor from above to turn it on, but I just have no clue on how to make the turn-on/off circuit with a direct turn on and delayed turn-off circuit.I Googled and I found this circuit:But I don't understand how it works and if this is what I need.Can someone point me in the right direction? That would be really helpful!- DJVGP.S. I'm a Dutchie so sorry for any errors in my English

author: Ian.M
author_rank: Super Contributor
timestamp: February 13, 2017, 07:16:41 pm
content: Sure you can do it with a handful of discretes and logic gates etc. but if you know how to write Arduino code, it makes more sense to use something like an 8 pin ATtiny microprocessor. See:http://highlowtech.org/?p=1695You should be able to drive the ATX PS_ON# signal direct from an ATtiny or Arduino pin, as its TTL logic compatible.

author: james_s
author_rank: Super Contributor
timestamp: February 13, 2017, 07:59:29 pm
content: What's wrong with using gates? They're cheap, they work, and working with hardware is a useful skill to develop. Anyone can plug in an Arduino, not everyone understands how to design with logic gates.

author: Ian.M
author_rank: Super Contributor
timestamp: February 13, 2017, 09:31:48 pm
content: There's nothing wrong with using gates for logic, but when you start using them in quasi-analog circuits, with 100K pullup resistors connected to typically long and uscreened PC front panel cabling, its asking for trouble. Use a Schmitt trigger input NAND and it would be a bit better, but unless you need minimal power consumption for a battery powered application, and can put the button right next to the logic chip, I'd avoid it.Personally, if I was avoiding MCUs I'd use a CMOS 555 timer with Trigger and Threshold tied together and biassed to Vcc/2 with a momentary switch between that node and a RC delayed Output signal. The PS_ON# line could be driven directly by the 555's Discharge pin.

author: tautech
author_rank: Super Contributor
timestamp: February 13, 2017, 09:34:33 pm
content: Quote from: Ian.M on February 13, 2017, 09:31:48 pmWhich is probably more compact than the often seen 4013 toggle switch.http://www.zen22142.zen.co.uk/ronj/tg1.html

author: james_s
author_rank: Super Contributor
timestamp: February 13, 2017, 11:26:34 pm
content: A bistable latch out of a pair of transistors would probably work fine too. Lots of ways to reach the end goal, that's part of the fun.