PC power ON/OFF triggers sound effect query

This is my first go into the Arduino way of life and was after some help if I understand what I want to do with it.

My project is to play a sound effect when I turn my PC on or off.

From the information I have gathered so far I can detect the power state of the PC by the power switch whether it's in a High or Low power state. To play the sound the Arduino and speakers can still have power since they can use the power from the power switch since it has an constant power supply to detect a power on.

The main problem I have is what Arduino to get since I don't know what I need to complete this project. I need a way to have about 5 random sounds for the power on and only 1 off, so a . The PC power switch is I think 5V so need something to suit that plus also an SD card slot.

Any advice would be great :smiley:

Cheers Mercury

It would be simple if not for the need for an off sound. This means you have to power the Arduino all the time even when the PC is off.
This is the sort of things you can do without an Arduino just by using scripting calls on the PC.

Depending on your PC:
Many PCs power their USB ports (or some of them) when the machine itself is powered off, but is connected to the mains power. That could be a way to power the Arduino while the PC is off, and let it play its songs.

Grumpy_Mike:
This means you have to power the Arduino all the time even when the PC is off.

Yes it would be always on but the power switch button has a constant power supply to it so it can detect a power up by the pressing of the button. It would be the same way for a door bell as it's waiting for the button to be pressed.
I looked at the Arduino MKR ZERO and that seems to match the requirements I need or do I need to attach that to something else even?

The MKR Zero would be fine playing files. You would of course need an amplifier and speakers to complete the project.

However this bit worries me:-

Yes it would be always on but the power switch button has a constant power supply to it so it can detect a power up by the pressing of the button. It would be the same way for a door bell as it's waiting for the button to be pressed.

You have to be very careful that you do not connect this Arduino to anything more than 3V3, so design the interface connections with care.

I do know that 3.3V is the max for the MKR ZERO but what a motherboard and case voltage can be at the power switch can vary from 3.3 to 5V depending on the combination which I won't know until I get those 2 components together.

When I test out my mobo/case combo setup and it end's up running at 5V (and can't be f@#*ed to step down voltage) what other possible hardware or combinations that could do what I required?

For power supply: regulator.
For input pin: voltage divider (two resistors).