Results 1 to 4 of 4

Thread: Enabling PWM on OpenCM 9.04 causes brief output spike

  1. #1

    Enabling PWM on OpenCM 9.04 causes brief output spike

    No matter what I do, setting pinMode for a PWM-enabled output pin to PWM will cause a temporary "flash" on the pin.
    I can analogWrite() to 0 right before and right after setting the PWM mode, but it still happens.
    Meanwhile, setting mode INPUT_PULLDOWN, or setting mode OUTPUT and calling digitalWrite(LOW) will not cause this flash.

    (By "flash" I mean a brief spike of enabled output.)

    This is somewhat annoying, because I'm trying to drive an AEG MOSFET from one of these pins, and having it poke the gun when I turn on power is sub-optimal. But I need PWM because 16V is way too much for the Double Eagle gearbox ...

    I would ask on Robotsource.org, but that forum just hangs when I click the login button these days. (And it's never been good at answering questions.)

  2. #2
    Join Date
    May 2016
    Location
    White Plains, NY
    Posts
    124
    Images
    1
    Rep Power
    19

    Re: Enabling PWM on OpenCM 9.04 causes brief output spike

    I would dig into the library code and see what its actually doing. You may be able to modify the library to eliminate the spike.

    Years back I had to use another "pin" driving a FET to ground out setup spikes. It's messy and I hope you can resolve your headache in software...

  3. #3

    Re: Enabling PWM on OpenCM 9.04 causes brief output spike

    Actually, now that I think about it, I might keep the pin in OUTPUT/LOW mode when not needing to drive the FET, and just turn to PWM when it's supposed to turn on. Then the "spike" doesn't matter, because I want the power anyway. Software workarounds are best workarounds :-)

  4. #4
    Join Date
    May 2016
    Location
    White Plains, NY
    Posts
    124
    Images
    1
    Rep Power
    19

    Re: Enabling PWM on OpenCM 9.04 causes brief output spike

    Quote Originally Posted by jwatte View Post
    Software workarounds are best workarounds :-)
    Agreed! I can re-compile faster than I can wield a soldering iron. And you're never missing that part you need

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) Is my OpenCM 9.04 dead? Or do are my AX-12A servos?
    By corot in forum DYNAMIXEL & Robot Actuators
    Replies: 4
    Last Post: 10-31-2016, 04:54 PM
  2. Acceleration implementation on OpenCM?
    By jomo in forum DYNAMIXEL & Robot Actuators
    Replies: 4
    Last Post: 05-19-2016, 07:18 AM
  3. Project Darwin-Mini project with OpenCM IDE
    By klims in forum Humanoids, Walkers & Crawlers
    Replies: 2
    Last Post: 05-01-2016, 09:50 PM
  4. OpenCM IDE (Ubuntu 14.04)
    By rasheinstein in forum Arbotix, Microcontrollers, Arduino
    Replies: 2
    Last Post: 04-12-2016, 12:47 PM
  5. Project OpenCM 9.04 - B and 18 Dynamixel AX-12A servos
    By OpenRobot in forum Power
    Replies: 2
    Last Post: 11-29-2015, 05:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •