SD Activity Indicator For Wii

[DeadlyFoez] wanted to know when the SD card in his Nintendo Wii was in use. He built and indicator LED using a PICAXE 08M and added it next to the SD slot. He uses one pin of the microcontroller to monitor the voltage on one pin of the SD card slot. That pin has a specific value when the card is idle, which rises when it’s in use. He didn’t share the details of which pin he’s sampling, or what the magic number from his source code actually represents. But the concept should be enough of a start if you want to do this one yourself. Watch it go blink-ity-blink in the clip after the break.


31 thoughts on “SD Activity Indicator For Wii

  1. There are five digital signals that have pullup
    resistors connected. CMD and the four data lines.

    Since he’s saying tha card is idle if the analog
    voltage is greater than a magic value, I’m
    guessing he’s monitoring one of these five lines,
    and when it starts toggling that he sometimes
    detects a “low” on a line and lights up the LED.

    It seems like just hooking the CMD line up to a
    digital input on the PIC and turning on the LED
    for 1 second or so every time it goes low would
    also do it, but you’d need to make sure the
    voltage at CMD went high enough to show as a “1”
    on the PIC.

    Without a schematic it’s pretty much guessing for
    me, so I expect to be wrong about some of this.
    (I didn’t create a login on that website to be
    able to look at the photos, so there might be
    some useful information in those also.)

  2. At first I thought it was overkill to use a microcontroller for this when a single transistor or monostable timer would do.

    But then at £1.50 for a PICAXE 08, why not?

    Good job anyhow.

  3. Sorry about that. I was not aware that you had to be a member of to view anything on the site.

    So I uploaded my pics to my FB page. Here are some of the pics.

    And here is the initial code that I used, although I have changed it up a bit to be able to detect slight voltage changes, but I lost the file that had the newer code in it, so here is the first bit of code that I did.

    setfreq m4          
    low 1                
    readadc 4,b1       
    if b1 > 210 then   
            low 1         
    end if
    if b1 < 210 then   
            high 1        
    pause 50
    end if
    goto main

    Basically what I have going on here is that pin 4 of the 08M reads the voltage of the SD cards pin 7. Pin 1 of the 08M controls the LED. I was able to find a constant 5v output on the wii’s motherboard and used that to power the 08M.

    If people still insist on a schematic then I can do one up, but I’m sure it will look cheesy.

  4. I tried using a transistor at first, but what would happen if that the LED was always on when the SD card was idle, and the LED would just go dim where there was data activity. Plus at times the transistor was taking up too much voltage from the SD card’s pin 7 and would cause there to be no data written to the SD card and it would fail. I used the 08M to get around these issues so I could slow down the blink rate and so too much voltage wasn’t being taken away from the SD card’s pin 7.

  5. @philip. No it can’t. I tried it and the LED used up too much power and caused there to be no data written to the sd card. I was getting data read and data write errors like crazy when I tried it that way or with a transistor. Many of the times the SD card would not even be detected.

  6. that would just change when it’s on or not.

    You he have used a darlington array or used a 555 timer to keep the pulse ‘on’ longer, but personally I would have done it the same as him (except with a normal pic. I hate picaxes)

  7. Does this really work?

    1) I would say it is better than nothing.

    2) I would also say it is not full proof.

    Anyone who has tried to use SDCards on a large base of products knows the problem. When can you safely power the darn thing down (or pull it out)!

    The answer? Well, I don’t think a manufacturer is going to say. I’ve tried. Truth is these things manage their own memory and you don’t have a clue what they are up to. For instance when they may go off and do memory-load-averaging.

    My guess is they do house keeping when they power up then when necessary. My guess is it is safer to pull them out after you ask them if they are ready to do something. Which is something only the host can pull off easily. Even then it is all guess work.

    If anyone knows different – I for one would love to hear about it! Really – would make my life easier.

    -good luck

  8. @st2000
    SD cards use the SPI clock as the primary clock. If you don’t have the SPI clock running, the SD card will be frozen in time, unaware that anything is going on, and won’t be doing anything on their own.

    I know that in pretty much all of my applications I simply clock when I input a command, and the spec demands that I send an empty clock period in order to give the SD card enough “time” to process, because it can’t run unless there are clock pulses.

    This is (from what I recall) pretty well laid out in the spec. So in most uC cases, you can be certain that if you’re not running a command, the SD card is safe to yank.

  9. Ack, and sorry for the double post, but in a non-SPI environment (aka a built-in peripheral or fancy-schmancy fpga thing) I assume that the card still uses the clock pin for the same purpose, and thus you can assume if the clock is not running the card is safe to pull.

  10. @seer, I thought about using a 555 timer since I have one kicking around. I don’t have any op-amps nor have I ever played with one to know how to correctly use it.

    But with a 555 I would have to add in more components like capacitors and resistors and I did not want to have to add in more than needed. I really wanted to keep it simple and I succeeded in that.

  11. I remember my updated code that works better.

    setfreq m4
    low 1
    readadc 4,b1
    readadc 4,b2
    if b1 > b2 then
    	let b3 = b1 - b2
    	let b3 = b2 - b1
    end if
    if b3 > 7 then 
    	toggle 1
    	low 1
    end if
    let b1 = b2
    pause 50
    goto main

    Basically what is happening is that the micro controller and checking the voltage of pin 1 (variable b1), then it goes and and checks it again (variable b2). It then compares those 2 variables. If the value is greater than 7 then it knows that the SD card is not idle and it will proceed to toggle the output of pin 4 (for the LED).

    I had to do it this way because many times the wii will read or write data to the SD card via serial connection with data only being transfered via pin 7 of the SD card. But I have noticed that many time of trying to write data to the sd card that is all bits of 1, the 08M would see that as the card being idle because it was on high for a longer period to the point that the 08M would get a reading that was higher than 210.

    In the end, this worked out pretty sweet for someone who doesn’t have a whole boat load of electrical skills.

  12. @EE, if I knew what those were then I probably would have thought of it as an idea. Quite honestly, I don’t have really any skills in this field at all. I’m great with soldering and thats about it. I was lucky enough to pull together a few things that I had kicking around and knowing just enough about it to be able to make it happen.

    The only thing I really had going for me is that I used program in QBasic a lot as a kid.

  13. If I would have a uC laying around, for the sake of simplicity I would have done the same thing.
    With a OPamp you’ll need resistors, then a 555 (and all the peripherals) to slow down the blink, and maybe a few more things to make it work looking fine.
    Simple, easy, quite inexpensive, and it works. Exactly what an engineer’s boss would want I rather thought (and my teachers would say that too)
    But more important, that Wii got pimped up. (just a little though)

  14. So I decided to try and see if I could add in a NAND activity LED to my wii. For this I used my PICAXE 08M micro controller to to read the CE pin of the NAND flash chip to determine if there is activity. When there is any NAND activity, the CE pin become low (0 volts), but when idle the CE pin floats at around 3.5 volts.

    The SD card activity is determined by pin 7 of the SD card that the PICAXE reads. When idle, pin 7 floats at a voltage range, but when there is activity then the voltage will bounce all around.

    I changed the way that I have it now it before. Now the blue SD card activity LED is placed above the SD card slot and the red NAND activity LED is to the left of the SD card slot.

    I also added in a headphone jack to the right of the SD card slot. This headphone jack is used to reprogram the micro controller.



    The video below demos the activity of the NAND and SD card activity LED’s.


    setfreq m8                        ;Make sure the frequency is set to 8 Mhz
    low 0 , 1                         ;Make sure pins 0 and 1 are low
    readadc10 4,w0                    ;Read pin 7 of the SD card.
    if w0 < 604 or w0 > 620 then      ;values between 604 and 620 are when the SD card is idle.
        toggle 0                      ;If there is activity then toggle pin 0 (the blue LED)
        low 0                         ;If there was no activity then make sure pin 0 is low
    end if
    readadc 2, b2                     ;read the CE pin of the NAND flash
    if b2 = 0 then                    ;A value of 0 means there is NAND activity
        toggle 1                      ;If there is activity then toggle pin 1 (the red LED)
        low 1                         ;If there was no activity then make sure pin 1 is low
    goto main                         ;Go to the main: label to loop the code.

    [b][size=”3″]Future additions:[/size][/b]
    Wifi activity indicator
    CPU temp monitoring
    Fan speed controller
    Backlit LCD displaying various things.
    NAND reprogramming via PICAXE and SD card (No infectus needed)
    Wiimotes that will explode if my wife has been playing games and not doing dishes :D

  15. @DeadlyFoez or anyone else good with soldering with the wii.

    I’ve gotten into soldering recently and I like what you’ve done with the activity light.

    I’ve been having a little trouble though, I tried desoldering the SD card port and soldering on another because it stopped seeing any SD cards I put in. I’ve drive two different SD card slots but they both ended up telling my that the card was locked when it wasn’t I’m hoping you’ll be able to tell me what I’m doing wrong. I’ll see if I can PM you if you don’t get this message.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.