Shop OBEX P1 Docs P2 Docs Learn Events
power consumption vs cogs running question — Parallax Forums

power consumption vs cogs running question

roverxroverx Posts: 24
edited 2010-03-16 22:56 in Propeller 1
I'm a newbiew with the propeller, but have it running now with a 4x20·LCD ·and an RTC (DS1340), quick and easy after a day

Will be adding in an xbee and and ADC (8 channel 12 bit MAX186) within the next week work permitting

(This is replacing a bs2px with pretty much the same gear that I use to momnitor my wind and solar gear)

Question is, on power consumption (watts), I had planned on running the ADC in a separate cog, and sharing the variables back with the main routine and sending out through the xbee. The seperate cog would just loop ADC readings, and update variables the main program would read and reset (cog and main locking as necesary). But power consumption is a premium, would it better to run all through on looping routine in a single cog (basically what my bs2px does) .

end of story, does running a separate cog use additional power? compared to running a single cog at the same clock?·





·

Comments

  • dMajodMajo Posts: 855
    edited 2010-03-14 00:09
    http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropellerDatasheet-v1.2.pdf
    chapter 9 - page 27/28

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • roverxroverx Posts: 24
    edited 2010-03-14 00:28
    Thanks, I honestly never thought of looking at the data sheet (really stupid of me ) but I see the current consumption of a 8 cogs or a single cog , is the single cog consumpion additive?


    In my scenarios
    scenario A.
    main cog woud run with a waitcnt (1 seconds)
    ADC cog would run with a waitcnt of ( 100 ms (maybe less, needs testing with the ADC)) .... (looping through the adc chanels every 100 ms, storing data)

    Scenario B
    Maincog runs with a waitcnt of (100 ms) --- reads adc data as needed (all program data)
    (for the 1 second stuff from A, I'll run a counter and to what I need)
  • roverxroverx Posts: 24
    edited 2010-03-14 00:49
    I meant to add earlier the object exchange and this forum are invaluable

    - I2CObject_v2_1 ran without a hitch on the ds1340 (same mem registers as ds1307 but without eeprom)

    -debug _lcd.. no probs on the parallax 4x20 lcd

    -debug_pc .. no probs.. (just make sure·you disable the init and any other debugs if you run it without a pc connected (cost me a sec on loop timss till I figured it out )
  • AmaralAmaral Posts: 176
    edited 2010-03-15 16:15
    Well , for me that information is not clear too, if that is for all the cogs or just for one , so I just made an simple test, put four Cogs to blink a pin and measure the system consumption , nothing atached to the pins, just the internal loop of the cog !

    The consumption was increased 0.25 mA per cog added to the system, witch is really low consumption. So .. you can mesure too , and see if that is really the point for choosing !

    Amaral
  • ManAtWorkManAtWork Posts: 2,178
    edited 2010-03-16 12:40
    Hello Roverx,

    I haven't actually measured the current consumption, but as I see things the consumed energy is nearly proportional to the number of instructions executed. So it doesn't matter much whether you execute 200 instructions in one cog or 100 instructions each in two cogs (only that loading the second cog takes some power, once). A waiting cog (not busy looping but with waitcnt or waitpeq) is almost the same as a stopped cog, very low power.

    Cheers
  • roverxroverx Posts: 24
    edited 2010-03-16 20:49
    If were are looking at .24 mA , then no biggie. I have some time before putting this in use, so I may run some of my own measurements.

    Thanks for the comments
  • pjvpjv Posts: 1,903
    edited 2010-03-16 22:56
    Hi Roverx;

    You can reduce your current consumption further if you first switch the clock to RCSLOW before entering the wait. I'm doing that and seeing a consumption of about 5 micro amps while waiting; that with a single cog.

    Cheers,

    Peter (pjv)
Sign In or Register to comment.