Maximizing the Power of 555 Timers: Creating an On-Off Switch for Your Computer

In summary: Yes. I like small, compact programs. I also have a reputation in my group for solving complex problems in a very simple way.
  • #1
Bassalisk
947
2
Hello!So recently I've been playing with 555 timers. And I am beginning to understand how powerful they can be.With that reset pin switching capabilities are endless. But that led me to thinking.How can I make that switch, which you have at your computer, that power on and off switch. The switch is one way. You turn it on and off in same position, in some way.

I think you send signals to some IC that processes that. Can this be realized through 555 timer?

Again, I am talking about that switch which you have on your PC, that one way switch. ( I don't know how its called, help me with the terms here).

So I want a switch which basically has one push position. When I push it, I turn on the circuit.(when I release it, the circuit is still on) When I push it again, the circuit goes to off state.
 
Engineering news on Phys.org
  • #2
I don't know specifically how they do it in a PC but I suspect it is through a dedicated power controller chip that also has a pin connected to the processor. Maybe it's even part of the PC power supply. I've designed circuits with this type of power switch. It can be done in many ways. One way is to use a mechanical latching relay and arrange the contacts so that they change which coil the switch is wired to. Another way is to have the push button switch activate a relay or mosfet, etc. which is then controlled by the microcontroller. As long as the microcontroller is running it always holds the relay, mosfet, etc. in the on state which keeps the device powered up. However, the microcontroller also reads the state of the pushbutton switch. When the microcontroller is running and sees activity on the push button switch it then deactivates the relay, mosfet, etc. powering itself down. I can't say the timing function of a 555 would be necessary to do something like this. It just depends. It has to be built in such a way so that holding the button in does not cause repeated on and off cycling.
 
  • #3
Averagesupernova said:
I don't know specifically how they do it in a PC but I suspect it is through a dedicated power controller chip that also has a pin connected to the processor. Maybe it's even part of the PC power supply. I've designed circuits with this type of power switch. It can be done in many ways. One way is to use a mechanical latching relay and arrange the contacts so that they change which coil the switch is wired to. Another way is to have the push button switch activate a relay or mosfet, etc. which is then controlled by the microcontroller. As long as the microcontroller is running it always holds the relay, mosfet, etc. in the on state which keeps the device powered up. However, the microcontroller also reads the state of the pushbutton switch. When the microcontroller is running and sees activity on the push button switch it then deactivates the relay, mosfet, etc. powering itself down. I can't say the timing function of a 555 would be necessary to do something like this. It just depends. It has to be built in such a way so that holding the button in does not cause repeated on and off cycling.

Yes I am running away from PICs for like 2 months. I guess I will have to start working with them some day. Ah, off to shopping for PIC programmer :/
 
  • #4
Doing things with PIC microcontrollers opens up a whole new way to do things. Especially if you like programming in a higher level language. Of course that is not to say that you cannot achieve your switching goal without a microcontroller or the relay I described.
 
  • #5
Averagesupernova said:
Doing things with PIC microcontrollers opens up a whole new way to do things. Especially if you like programming in a higher level language.

Yes I do love programming. But I do not like programs which have like 5000 lines. That is murder for me to do. I like doing small compact programs. I am known in my group for writing and solving complex problems in most simple possible way there is.

My mates have a code of let's say 50 lines, mine has 15 or so. I hope PICs don't go beyond 500 lines, but I understand this depends of how much complexity my operation of PIC is.
 
  • #6
5000 lines or 50 lines is really irrelevant. You can make it as long or as short as you want as long as it gets the job done and there is room for it in the memory. If your code is set up right you won't have one big long program of a bazillion lines. You may have many smaller chunks that you routinely call which makes it much easier. The total number of lines may well exceed what you like to do.
 
  • #7
Averagesupernova said:
5000 lines or 50 lines is really irrelevant. You can make it as long or as short as you want as long as it gets the job done and there is room for it in the memory. If your code is set up right you won't have one big long program of a bazillion lines. You may have many smaller chunks that you routinely call which makes it much easier. The total number of lines may well exceed what you like to do.

Thanks for the heads up. I've seen a lot of tutorials how to program these PICs. I feel I will have it under control.
 
  • #8
I learned it on my own using C. I had never used C nor done any microcontroller programming. Only troubleshooting. I had a lot of experience with VisualBasic doing instrument control. The only thing I had to go by was the datasheet for a PIC 18F2520 and a book on C that someone gave me. If I can do it I'm sure you can too.
 
  • #9
Hi, Bass your switch is called a 'toggle switch'.

The idea being that each press or activation of the switch steps or 'toggles' through all the available states in sequence, eventually returning to the original one.

Years ago this could only be implemented in mechanical switching, then came logic circuitry and finally (micro)computers made such a process available through software, so today we have many devices from cellphones to washing machines that allow us to 'scroll through the options.'

One of the simplest hardwired circuit with this behaviour is called a bistable or flipflop (google?).

The power switch on a (modern) PC is rather different as there is an interplay between the motherboard and the power supply on power up. This is necessary for complicated modern logic systems.
Notice the term power up, rather than switch on. This is because when you first apply the mains to the power unit it takes a finite time for the rail voltages to build up to their correct values.
Whilst they are building up the circuitry within the power unit provides a single 5V supply to very simple circuitry on the motherboard. This simple circuitry monitors the 'power good' signal line from the power unit. The power unit holds the power good line in the off state until its monitors tell it that the voltages rails have stabilised at their correct values. then The power unit sets the power good line to on.
At this time the circuitry on the motherboard allows the memory, processor and other components to turn on.

If this complicated process did not happen the pc could turn on with the voltages values on its data lines set to random or non indeterminate values and anything could happen.


PS I have an attached two position toggle switch with the positions entitled

Nap now
Nap again

go well
 
Last edited:
  • #10
Studiot said:
Hi, Bass your switch is called a 'toggle switch'.

The idea being that each press or activation of the switch steps or 'toggles' through all the available states in sequence, eventually returning to the original one.

Years ago this could only be implemented in mechanical switching, then came logic circuitry and finally (micro)computers made such a process available through software, so today we have many devices from cellphones to washing machines that allow us to 'scroll through the options.'

One of the simplest hardwired circuit with this behaviour is called a bistable or flipflop (google?).

go well

Yes yes! flip flop was the original circuit from where I got the idea. Thats why I posted this thread, I wanted to modify that flip flop somehow to make it turn between high and low state through one and the same toggle button. Averagesupernova told me that can only be realized through PIC or some other micro controller.
 
  • #11
Bassalisk said:
Yes yes! flip flop was the original circuit from where I got the idea. Thats why I posted this thread, I wanted to modify that flip flop somehow to make it turn between high and low state through one and the same toggle button. Averagesupernova told me that can only be realized through PIC or some other micro controller.

No I did NOT. Read again.
 
  • #12
Averagesupernova said:
No I did NOT. Read again.

Exclude the "only" part. Sorry.

I will however try to realize it through PIC. Or invent my own thing :D
 

Related to Maximizing the Power of 555 Timers: Creating an On-Off Switch for Your Computer

What is a computer on-off switch?

A computer on-off switch is a physical button or switch that is used to turn a computer on or off. It is typically located on the front or back of a computer tower or on the side of a laptop.

How does a computer on-off switch work?

When the switch is pressed or turned on, it sends a signal to the computer's power supply unit (PSU) to provide power to the computer's components. When the switch is turned off, it cuts off the power supply to the computer, shutting it down.

What happens if I press the computer on-off switch while the computer is running?

If you press the on-off switch while the computer is running, it will initiate a shutdown process. The computer will save any open files and programs before shutting down completely.

Can I use the computer on-off switch to restart my computer?

Yes, most computer on-off switches also have a restart function. You can use this function to restart your computer if it freezes or stops responding.

Is it safe to use the computer on-off switch to shut down my computer?

Yes, it is safe to use the computer on-off switch to shut down your computer. However, it is recommended to properly shut down your computer through the operating system to avoid any potential data loss or damage to your hardware.

Similar threads

  • Electrical Engineering
2
Replies
49
Views
3K
Replies
17
Views
984
Replies
42
Views
3K
  • Electrical Engineering
Replies
4
Views
841
Replies
37
Views
4K
  • Electrical Engineering
Replies
1
Views
915
Replies
31
Views
2K
  • Electrical Engineering
Replies
2
Views
598
Replies
9
Views
1K
Replies
7
Views
355
Back
Top