We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

PWM Expansion Crashes Onion2



  • Hi any help appreciated. I have been trying to use a sail winch servo that can spin 360 degree. I have also tried regular servos. The problem happens when I send a PWM signal using the web console app. The device crashes the dock and the onion based on certain values. Is this normal. I use external power supply but same results either way. I know I can send the servo past its edge and it will chatter, but thats not when it crashes. Once it crashes it will reset consistently until you unplug the servo. Then the device resets but the port on the PWM board no longer works. You have to then reset the whole board. So it sounds like the chip on the expansion crashes but doesn't get reset. So does anyone else see the same thing or is it just my expansion board.

    Has anyone used a sail winch servo or hacked a regular servo to spin 360. If so can I see you code?

    A few ideas from using the PWM console...
    Servos just need a pulse width of somewhere between 900 to 1500 ms I think. Instead of using delay, duty cycle and frequency it would be much better to just enter the pulse width in ms. I know its so you can use it to dim leds and other stuff but the board is designed for RC type servos and 95% of us will be plugging in regular servos and just want to enter the width to figure out the exact numbers for each servo. Also in the PWM console you have to click outside of the boxes to make the page send the value to the device. Its a pain in the butt when the device starts chattering like its mad at you because of a typo.

    Thanks Andrew



  • @Andrew-Moore said in PWM Expansion Crashes Onion2:

    Hi any help appreciated. I have been trying to use a sail winch servo that can spin 360 degree. I have also tried regular servos. The problem happens when I send a PWM signal using the web console app. The device crashes the dock and the onion based on certain values. Is this normal. I use external power supply but same results either way. I know I can send the servo past its edge and it will chatter, but thats not when it crashes. Once it crashes it will reset consistently until you unplug the servo. Then the device resets but the port on the PWM board no longer works. You have to then reset the whole board. So it sounds like the chip on the expansion crashes but doesn't get reset. So does anyone else see the same thing or is it just my expansion board.

    Has anyone used a sail winch servo or hacked a regular servo to spin 360.

    That sound like a EMI (Electromagnetic interference) becouse you're controlling inductive loads. No software solution is possible.

    Try to isolate Omega power supply from Servo power supply. That is, ground and supply line can't be the same. You need two power supplies.

    You can do this by using fast-optocouplers for PWM signal.

    Omega PWM -> Fast-Opto -> PWM Servo

    Pay attention in optocoupler speed.

    Example:
    https://www.digikey.com/product-detail/en/toshiba-semiconductor-and-storage/TLP2362-TPRE/TLP2362-TPRECT-ND/5189801

    Regards



  • @Oximoron I think that's done on the expansion board. Like I said I have used external power to the expansion instead of from the Omegas power supply. The documentation says they are isolated so I am assuming so.



  • @Andrew-Moore said in PWM Expansion Crashes Onion2:

    @Oximoron I think that's done on the expansion board. Like I said I have used external power to the expansion instead of from the Omegas power supply. The documentation says they are isolated so I am assuming so.

    Are you using this board?

    https://onion.io/store/servo-pwm-expansion/

    I can't see any opto-coupler. Just a PCA9685 (I2C bus), two 2N7002 and two diodes, resistors, caps...

    You have two power supplies, but GND is the same for servo electronics and Omega CPU.

    I think that you have to isolate I2C port signals in this case (expensive solution, depends of your final application).

    Other option is try to put fast-diodes near to servos, power supplies, add filters, capacitors...but definitive and reliable solution is isolate control signals.



  • @Andrew-Moore Oximoron thanks for helping and I totally understand what your saying. I might not have stated this properly but regular servos seem to work fine. I haven't looked at the expansion schematic at all, but I've done plenty of power designs and optocoupled i/o and other forms of decoupling. I think the microchip designed for controlling the pwm has decoupling, it should be enough. I don't think I need to look there yet. You right the grounds are probably connected but I really don't think its its back emf. The regular servos can chatter like crap and I can even crank them to cause back emf. It doesn't crash. Its only when I try this sail winch servo.

    Just to make sure, I have a USB device from Polulu that controls servos from the desktop and I only works with an external; supply. It runs the servo continuously in one direction when I set it to approx. 1500 us pulse width at 20ms period. at below 500 us pulse width it stops rotating. Above 2500 us it maxes out at full speed. Its a little different than normal servos but still within the ability of the board. So I replicate those pulse widths using pwm-exp -p <port> 1.5 20(almost irrelevant). This will cause a 1500 us pulse width on the <port> , and works fine for regular servos, but crashes completely when sent to the 360 servo. BTW servo model is GWS S125 1T/2BB

    I checked the levels on the pwm voltage lines, and it corresponds with my external power when plugged in, and Omega power when I don't plug in. Omega's supply is about 4.6vdc and I give it 4.99 externally.

    Has anyone used a one of these things or even a hacked regular servo to spin 360 with the onion?

    Thanks Again



  • Two areas to look into:

    1. Drive the servo without the servo, since it's a one-way out I/O.
      <-- this checks the software/coding issues
    2. Power supply stability
      <-- you have to have a quality power supply for Omega2 (and possibly PWM board)
      <-- try to use two power supplies (one for logic: Omega2+PCA9685 and the other for GWS S125 servo) to see if the problem would go away


  • @ccs-hello Thanks ccs-hello. I drive it with the polulu USB servo thing and works fine. I've used batteries to drive the thing. You can't get much cleaner than that. I'm pretty sure its not noise or power issues. This is really old tech (servos and drivers) this stuff works in some of the worst environments like in an RC airplane.



  • [SOLVED] I found out the servo is discontinued. I think it has flaws in its design. I can't explain why it sort of works (only one direction) from the USB thing and does not from the expansion board, but I got 2 different newer winch servos and they work great in both directions from Onion and my USB thing, so it has to be a faulty servo. I have a feeling it had a 1 to 3 turn limit before breaking a cog if it driven past that, then once the cog is broken the pot doesn't return the right values and its all screwed up. Anyway the expansion board seems pretty bullet proof for noise and EMI EMF, I man handled it pretty good.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.