Total Newb: Would I / Should I use an Arduino for this?

Hello Arduino community!

I'm relatively new to the entire Arduino world, but I've seen some of there uses in the past, and realize the massive potential these boards have. As such, I have a thought for a project I'm working on and I wonder if learning some Arduino code and getting my feet wet with this is a good place to go.

I'm currently building a custom Hackintosh, and I would like to emulate some of an original Mac Pro's features. Namely, when the machine is first powered on, I get the Apple "chime" played through a small speaker (power on ---> play sound). Also, I'd like to be able to slowly pulse the power LED when the computer is put into a sleep state. A slow, "breathing-like" pulse.

I know the second one can be accomplished with an Arduino, but I would need to figure out how to tell the Arduino that the computer is in a sleep state...

Has anyone done anything similar to this? Anyone have an advice or pointers where I should start looking, reading, researching? I'm good at all three of those things, and I'm not afraid to learn.

Seems to me that your main problem is detecting what your 'Hackintosh' is doing. How do you know it is powering up? How do you know it is sleeping? Does it light up an LED when it's on, and turn it off when it's sleeping? If so, you could potentially (sorry!) have your Arduino monitor that.

Yes. There is already a header on the motherboard for a POWER LED, which would cover the ON/OFF states, but I'm not sure what I can monitor on the board that would let me tell the Arduino that the computer is sleeping. I'm sure there's a voltage change somewhere on board when the computer is put to sleep, but that remains to be seen.

Essentially you've answered my initial question, so thank you for that. It seems it would make sense to try and accomplish this project with an Arduino. Since I'm completely new to this kind of project, I have a lot to learn.

I just had a thought. After looking at my motherboard specs, and realizing I have unused system fan headers, I may have an idea that could work.

The Arduino would know when the POWER LED was on through the header on the motherboard. I know there are certain things that don't lose power when the system is put into a sleep state (like USB, which would power the Arduino, right?). However, the fans lose power and don't run when the system is asleep...

Couldn't I code the Arduino to monitor the POWER LED and one of the SYSTEM FAN headers and use that to differentiate? For instance, no voltage at POWER LED and SYSTEM FAN would mean no status light (and no power to the Arduino). Voltage at both POWER LED and SYSTEM FAN would mean the Arduino would have the status light completely lit. And then when put to sleep, there should be USB power to Arduino, and no power to the SYSTEM FAN header, so I could essentially code the Arduino to pulse the light in the state...

Did that make any sense?

strung,

I myself am on a hackintosh. Best thing I ever did (well, almost).

You will still get the "Bung" chime when it turns on. It will come out of the main computer speakers.

As for the pulsing lamp, there's a number of ways. yes you can do a comparator of LED vs fan, or you can do a comparator of 12V and 5VSB, ect. But I like your method, myself. That is, assuming the power LED stays on when the computer is on, which varies from board to board.

Magnet,

This might be a little OT, but why "almost"? My hack is the best computer I own! The power of a Mac Pro for 1/4 the cost!!

Ok, back on-topic...

magnethead:
You will still get the "Bung" chime when it turns on. It will come out of the main computer speakers.

You mean via the Arduino? Or via a script or something?

And the LED does stay on when the power is on. Or at least one of the systems has constant-on power, because there's a blue glowing ring around the power button that's lit whenever the computer is on...

Also, can someone explain to me how the Arduino is powered (forgive me for being so inquisitive without actually owning an Arduino)... Is it strictly run from the USB 12V or does it have an external power source as well?

strungout420:
Magnet,

This might be a little OT, but why "almost"? My hack is the best computer I own! The power of a Mac Pro for 1/4 the cost!!

I lucked into having built with the right components..although audio kexts gave me heII. I'm on a relatively "slow" quad 2.8, and I sometimes have issues with flash not being happy. Only 1 kernel panic in 9 months though, knock on wood.

strungout420:

magnethead:
You will still get the "Bung" chime when it turns on. It will come out of the main computer speakers.

You mean via the Arduino? Or via a script or something?

When I restart mine (every 38..40..45..50..60..eventually days), I get the apple "Bung" chime through my main speakers, just like my iMac at work.

strungout420:
And the LED does stay on when the power is on. Or at least one of the systems has constant-on power, because there's a blue glowing ring around the power button that's lit whenever the computer is on...

Something I just thought about. I don't think you can do an analog-read of >5VDC without detonating something. I would have to measure, but I know for sure that computer fan header will be 12VDC, and the LED header is probably 3.3V or 5V, but may not and could well be 12V. That said, since we're working with fairly constant voltage values (most PSU's are rated +-5% on output rails, those of us at TSF consider anything beyond 8% as requiring replacement), you could use voltage dividers to get down to a 3.3V nominal sensing voltage, and do an analogRad comparison, assigning booleans to each input, and evaluating them.

strungout420:
Also, can someone explain to me how the Arduino is powered (forgive me for being so inquisitive without actually owning an Arduino)... Is it strictly run from the USB 12V or does it have an external power source as well?

Danger danger, USB is NOT 12 VDC. It's actually 5VDC. And you have 3 methods of powering it: through the usb port (system 5V), 7-12 (9 optimal) volts through the barrel plug, or 7-12 volts (9 optimal) through the Vin port in the connection arrays.

The most consistent way would be to give it it's own power off a wall-wart. I don't think 5VSB from the PC PSU has enough current to run an arduino, and the 5V power lines (and thus, USB lines) will lose power when the computer is off.

(7-12V spec/9 opt is based on the Mega and Uno. Pro, Pro Mini, Lilypad, ect will differ)