Shop OBEX P1 Docs P2 Docs Learn Events
Budgeting power for an SD chip - Or... how to debug a crashing Propeller-based — Parallax Forums

Budgeting power for an SD chip - Or... how to debug a crashing Propeller-based

ElectricAyeElectricAye Posts: 4,561
edited 2008-09-13 19:47 in Propeller 1
Hi All,
I'm testing my Propeller-based data acquisition system, which I have tested in parts but just now integrated into a single system. It seems to run okay but after 20 seconds to about 2 minutes, the whole thing seems to crash. The TV output goes blank and the SD card stops writing data without closing its current file. The integrated program operates a DS1307 real time clock, two DS18B20 digital thermometers, the TV display, and writes to an SD card. The various components seemed to work without any such failure, so I'm guessing this might be a power budgeting problem, perhaps overwhelming the Propeller. Problem is, I don't know how to guess what sort of power the SD card is using. I suppose it could be that the SD card itself is somehow damaged: during debugging of other routines, I've crashed it and reformatted it so many times, it might just be plain worn out? I suppose it could also be some sort of hub memory problem, too, but that's beyond my comprehension at this point.

Anybody have any suggestions? ideas of power used by an SD during writing, etc.?

Thanks,
Mark

Comments

  • PyrotomPyrotom Posts: 84
    edited 2008-09-13 14:19
    Without seeing any of you code I-m just making a stab in the dark, but what clock rate are you using? At 80mHz the clock rolls over every 53 seconds, which is suspiciously smack in the middle of your failure time window. Could you be having a problem with clock handling?? (I just finished finding exactly this bug in my MIDI playback code, which is why it springs to my mind...)
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2008-09-13 14:20
    ElectricAye,

    There are a number of things that it could be...
    What does the power supply look like that you are using?
    Do you have a schematic that you can post?
    The code itself could be a problem if there is a COG that does not terminate properly.·· Any code to post?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-13 15:19
    SD cards' power consumption varies all over the map depending on the manufacturer and model of the SD card.
    The only way to know for sure is to get a datasheet for the SD card. Write power is normally higher than read.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-09-13 15:23
    Beau, I'm using a wall wart valued at 6 volts and 100mA. Honestly, I have just started to debug this thing so your mentioning of the Cog termination sounds intriguing.
    Pyro, I'm at 80MHz for the clock speed. I'll have to get out my stopwatch and see just when this thing craps out.
    One time it ran for a couple of hours without any problems, but most of the time it happens within a couple of minutes.
    I've never had this kind of problem with the Propeller before, so I just assumed it was a power problem. On second thought, that's probably not the case.

    I'll post some code and a schematic after I get my act together, which might take a while.

    Thanks you guys,
    Mark

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It might be the Information Age but the Eon of Ignorance has yet to end.
  • ForrestForrest Posts: 1,341
    edited 2008-09-13 15:51
    6V 100mA sounds too small. Parallax recommends a 7.5V, 300mA power supply for their Propeller Protoboards
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-09-13 17:18
    Forrest,
    thanks, I'll get another wall wart and try that out.

    Mark

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It might be the Information Age but the Eon of Ignorance has yet to end.
  • rjo_rjo_ Posts: 1,825
    edited 2008-09-13 17:29
    That's the problem[noparse]:)[/noparse]
  • OwenSOwenS Posts: 173
    edited 2008-09-13 19:47
    The Propeller alone has a maximum power consumption of 300mA (All cogs going, and all I/O pins toggling at 80Mhz (?)), according to the datasheet
Sign In or Register to comment.