Shop OBEX P1 Docs P2 Docs Learn Events
New to Propeller and I need some advice. - Page 2 — Parallax Forums

New to Propeller and I need some advice.

2»

Comments

  • minitrueminitrue Posts: 17
    edited 2014-03-13 03:52
    Thanks, Jason.

    I will try that this morning!
  • minitrueminitrue Posts: 17
    edited 2014-03-13 08:33
    robocrosstry7 - Archive [Date 2014.03.13 Time 11.26].zip


    This is the code with the servo object changed from the standard BOE to the servo32 object. That is the only change I made. It still compiles, but there is no change in the behavior. Do you guys know how I would have to change the syntax to use servo32 to specifically split up the servo tasks among the different cogs?


    On another note:

    I mentioned earlier that if only one servo is plugged in but it slows down if a second one is plugged in on another pin.) This morning I tried using a y splitter and plugging in two servos into 1 pin. This STILL caused a slow down in the response time of the servos. I am stumped by that. I know that it isn't a power issue. I run 4 servos off of 4AA's with y splitters all the time.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-13 10:55
    [PHP] but there is no change in the behavior[/PHP]

    Maybe it's not a software issue. Can you post pictures of your setup, diagrams , schematics, etc that could be helpful?
  • JasonDorieJasonDorie Posts: 1,930
    edited 2014-03-13 11:50
    I wonder if it's "browning out"? When they start moving servos pull quite a lot of power, and under load they can also pull quite a bit. If you don't have a buffering capacitor on the servo lines it could be that it's stealing power from the prop and causing it to reboot. That would easily cause the second or two lag you're seeing. Try putting a 1000uf capacitor (10v or better) across the pins for power and ground where you plug in the servos.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-03-13 12:02
    With a brownout issue possibly being the case I would suggest a simple diode capacitor filter prior to the Propeller's voltage regulator.

    + Main Supply >------->|-----o------------> + to Propeller Regulator and EEPROM
                        Diode    |
                                 | 100uF
                                 o--||--o
                                   +    |
                                        |
    GND >-------------------------------o-----> GND
    
  • GenetixGenetix Posts: 1,754
    edited 2014-03-13 13:18
    He's using a Propeller BOE which has an ADC built into it.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-15 19:22
    minitrue,

    If I were you, I'd add an MCP3208 12 bit eight channel ADC, and get rid of RCTime.

    Currently I use:

    - one cog to control up to 24 servos and/or PWM output for DC gear motorss with PWM_32_v4.spin (found it in Obex)
    - one cog to control the MCP3208 ADC with ADC_INPUT_DRIVER.spin (search for MCP3208 in Obex)
    - one cog to run FullDuplexSerial
    - one cog for the overall robot app

    Leaving me with four free cogs for future use :)

    A prop should be more than fast enough for your application.
Sign In or Register to comment.