Mac Envy

13K2620

Intro: Mac Envy

You got to hand it to Apple, they don't skimp on design or the little things. These little nuances set them apart from the mass produced clones, but now you can have a level playing field ...sort of. This project will supply you with the fading standby LED that the mac boast when resting. A few dollars of components and you will be fading in and out like any mac in the land.

STEP 1: Shopping List

For this project you will need -

1. Picaxe 08m and prototype board Kiwi's go here,Americans go here. Brits go here
2. 10kohm and 100ohm resistors (+ one more discussed later)
3. Some hook-up wire
4. Some bus connectors

NOTE: You will need a picaxe 08m this is not the same as a Picaxe 08. If you have not used this type of PIC before you will have to get the programming cable as well.

STEP 2: Computer Stuff

Now I am making some assumptions here. I assume you have a spare floppy disc drive power lead and I also assume you have a spare usb connector on you mother board and that you mother board keeps this live in standby.

If these assumptions are correct lets move on!

This circuit works off the theory that when the power to your drive is removed the computer is going into standby. When this happens the micro controller starts a PWM routine (raising and lower the voltage) on the status light of the PC giving you the mac effect.

First thing you need to find is a spare USB port and the floppy disk drive connector. Most modern PC's have these as spare so don't panic.

STEP 3: Getting the Board Together

Assemble the components on the proto board as shown in the picture. The third resistor is for the LED on the front of your PC. The value for the resistor can vary depending on make size etc etc. I measured the voltage drop across the LED and the current drawn to figure out the correct size resistor. You can go to this site LED calc to calculate the LED resistor once you have the values. If you do not have a multimeter then about 20mA and 2.3v is a good figure to roll with, probably a resistor around 150ohms to 180ohms will do.

STEP 4: Connecting to the Mother Board

Word of caution - computers take a bit of stick but if you kooz your PC I can't help ya.

Connect the power leads of the proto board to the USB plug as shown. Note the connector has one row of 5 pins and one row of 4 pins the pin to the left of the extra pin is the -ve or ground pin. The pins furthermost away from the extra pin are the +ve of 5v pins. Still confused? Look here.

STEP 5: Connecting to Motherboard Cont'd

Now connect the floppy disk drive power plug as shown. This is VERY important to get this the right way, if you plug it in back to front you should prepare yourself for some magic smoke!

The front panel LED can be connected also, depending on your case this may or may not be labeled on the leads. If it is the -ve lead goes to the board edge side of the connector. If it isn't don't stress it just won't work, then just swap them over.

STEP 6: Programming the PIC

Once your all connected fire up you PC and see what happens. With a bit of luck nothing will happen. The PIC is blank and needs to be programmed to do anything. I hear you groaning 'so now I have to buy some programmer and fudge around with assembly to make it work'.

No you don't in fact all you need is the free software and a download cable (USB or serial are available make sure you buy one when you order the proto kit or make your own). Open the software and type in the following as a new program.

'---------------------------------------------------------------------------------
Start:
pause 2000 'wait to seconds
if pin3 = 1 then pwron ' if the power is on goto pwron sub routine
if pin3 = 0 then standby 'if off goto standby

pwron:
pwmout 2,255,1000 'set pwm so light stays on
pause 2000 ' wait 2 seconds
goto start ' got back to start and check status again

standby:
for w0 = 0 to 500 step 1 'start a loop to ramp up pwm
pwmout 2,255,w0 ' ramping up pwm using w0
pause 5 'slowing things down bit
next w0 'loop back to w0

for w1 = 500 to 0 step -1
pwmout 2,255,w1
pause 5
next w1

goto start ' check status again.
'----------------------------------------------------------------------------------

This is a very simple method of achieving what we need. You can fudge around with pauses and loop (stuff in bold) amounts to perfect your fading but for the most part this should get you going. Make sure you practice on the LED you are actually using as they will all react a bit different.

Anyone who has done any programming will recognise this as BASIC.

Press the f5 key in the programmer and it should download right to the PIC and it should start working!

STEP 7: Conclusion

You should put the circuit board in a plastic case so you don't have to worry about shorting things out and also it'll be easier to swap between computers.

Now some puritans will be saying that they could do the same with a 555 timer chip or a pair of transistors and some capacitors, but why would you? These little PIC's are cheap as chips (drum fill) and can be easily modified with a few lines of code. If you get adventurous you will be able to measure the temperature of your pc add some more LEDS control more fans the options are limitless.

So if you have been successful you have...
1.Found a use for the spare plugs in your PC.
2.Worked out how to calculate resistors for LED's
3.Made your first step into the world of microcontrollers
4.Ticked one more box against the MAC.

Cheers,

Jason

p.s sorry about the crap video.

20 Comments

 We need more Mac Instructables on this site!!!
 Yes it is... On Mac that top bar would have the buttons on the left and not the right.

Example,
I've never seen a Mac's standby light, but my two Toshiba laptops have fading standby lights, as did my deceased Toshiba A30 from about 5 years back... :) Though, standby wastes energy, so I try not to use it, only when moving from room to room (laptop that is, can't do that with a desktop!!!)... :)
Hi this is very cool i sadly won't be using it as i've got a laptop but i might add this to another eletroics project of mine at some time.
For kiwi's ,Surplusstronics in Auckland do PIC chips and a guy on Trademe dose a little PCB that would be very good
who was the guy on trademe i found him a while ago but dont seem to be able to find him again
Some might also like to know that an ATX power supply in a PC supplies a constant +5V at 720mA on pin 9 (+5VSB) of the ATX connector even while the computer is in standby mode. This provides the necessary voltage and current levels required to operate the "Wake on" features available in most motherboards such as WOL (Wake on LAN) and the power on circuitry. Pins 4, 6, 19 & 20 will supply +5V in power on mode and pin 10 will supply +12V in power on mode and pins 1, 2 & 11 supply +3.3V in power on mode. For those willing to tap into these wires it may also be a source of the necessary voltages you need for your circuit.
pretty good, the Led should have been white and a bit bigger though
Iv been brainstorming on some cool ideas for something like this. Im wanting to know thouth if this could be put into a portable format to run on some small batteries and a few surface mounted led's. Contact me on here and ask for a way to contact me through messenger or email. I have some ideas Id like to work on and get into some fun projects.
Here is a neater solution, the same thing, but surface mount, one tiny PIC, one tiny white LED and a CR2032 battery & holder (also maybe the fade in/out is more mac-like).

K.
Heh, yea, I got this in my rss feed recently. :P

Thanks for the info. .==.
08M is availabe in surface mount so should be a problem I will PM you my email
If you're ok with the light suddenly coming on, and then slowly fading out, you could just use a pummer circuit. If you don't know what I'm talking about, google for it. There are many variations, but it is common in BEAM robotics.
I think there is an easier way to make an LED ade without the picaxe. Anyone know how? Thanks
What programmer do you use?
The programmer is a free download from the picaxe web site.
Well actually here but I get where your coming from. Can't help the Aussies or S.A tho.
When do I install Half-Life 2? ;-p