Author Topic: Servos not working as expected  (Read 1050 times)

Offline skulltronix

  • Newbie
  • *
  • Posts: 44
    • View Profile
Servos not working as expected
« on: March 15, 2020, 01:27:20 PM »
Hi, I'm testing the Sparkfun I2C servo board on a Pi Zero and getting results I don't understand.

With the VSA servo import as Gil created it I have the Jaw servo set up on channel 1 with values 500-750. That is the correct range from VSA and corresponds to 1000-1500 in MS.

I've created a servo effect for the jaw.  The servo slider in the Effect Settings window will close the jaw at a setting of 50 but any value above OR below that causes it to open the jaw.  I was under the understanding that zero would be the lowest setting for the Jaw which is 500 (1000ms). And 100 would be the highest setting for the jaw 750 (1500ms). Isn't the 500-750 scaled across the 0-100?

In FPP I have the jaw set up as 1000 to 1500. MS is checked. I don't know what the Center value does. It doesn't seem to affect anything so I assume it is for the "To Center" option.

Also, I have put a pwm meter between the servo and pi and the actual pwm being generated by xlights is pretty close to the meter readings. :)

I'm available anytime to discuss this.  But give me 1/2 hour notice if you wt to see the setup screens.

Thanks!!

BTW
The current project is to get my skulls running off a pi zero without dmx cables or a pc.  It is moving along well so far.

Offline Ebuechner

  • Hero Member
  • *****
  • Posts: 750
    • View Profile
Re: Servos not working as expected
« Reply #1 on: March 15, 2020, 06:05:12 PM »
I don't know about the VSA import but I might be able to help you with some of the other settings.

Offline skulltronix

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Servos not working as expected
« Reply #2 on: March 15, 2020, 06:20:22 PM »
Thanks. Dan said that setting motion limits in both xlights and FPP might be the issue. I?ll try changing that tomorrow and get back to you.

Offline Ebuechner

  • Hero Member
  • *****
  • Posts: 750
    • View Profile
Re: Servos not working as expected
« Reply #3 on: March 15, 2020, 06:50:23 PM »
Setting values in both places definitely will cause problems.
I'm currently running nine skeletons off of fpp with 4 of them 3 axis skulls.
https://youtu.be/lOM6yeSMUnE

Offline Ebuechner

  • Hero Member
  • *****
  • Posts: 750
    • View Profile
Re: Servos not working as expected
« Reply #4 on: March 15, 2020, 07:10:23 PM »
I always set my hard limits in the controller so there's no chance of pushing a Servo past its physical limit.
The center value is there for a few reasons the first is many props require a center that can be fine tuned and the second is so you can different travel from the center position like being able to have your skull Center at 50% but limit the travel down so the jaw doesn't crash into the neck while it's talking.

Offline skulltronix

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Servos not working as expected
« Reply #5 on: March 16, 2020, 10:57:23 AM »
I've set the limits in FPP to 500-2500. The jaw now will open and close without the previous issue of centering.  But....  Any value sent from xlights in bridge mode below 27 (scale 0-100) sends values below the 1000 ms threshold supposedly set in xlights.  IE, the jaw closes too tight and will burn out the servo. 

When limits are set in FPP do you just ignore values received that are beyond the limits or do you clip them to the limits? Are you scaling anything or just passing raw data?

If you want to call my # is 916 600-2295  I'm in front of it now. 10am ps

Offline skulltronix

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Servos not working as expected
« Reply #6 on: March 16, 2020, 11:03:10 AM »
Just checking again.  Xlights is actually putting out the entire range now of 500-2500 using the servo slider even though the Jaw is set in layout to 500-750.  It doesn't look like xlights ettings are doing anything unless somehow FPP is scaling it back up because I removed the limits.  Ideally I could set the same limits in both xlights and fpp.

Obviously I'm missing something.

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Servos not working as expected
« Reply #7 on: March 16, 2020, 06:09:36 PM »
I'm not finding what you say to be true.  I just tested by creating a DMX Skull model, changed type to Skulltronix, created a sequence, dropped a Servo effect on the model, had it set for 0% for first 15 seconds and then 100% for last 15 seconds.  I inspected the FSEQ file created and the jaw channel had 0x1F4 the first half and 0x2EE the second half which is hex for 500 and 750.  Working as expected.

Offline skulltronix

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Servos not working as expected
« Reply #8 on: March 19, 2020, 04:42:42 PM »
Thanks Gil. I know you aren't feeling well and I appreciate that you checked it.

Apparently I'm not good at providing you with the detail you need.  I'll try to be more complete.

Let  me try again...  I have set up an entirely new folder for xl. I have created a new skull model. I have imported a vsa file without crashing.  When I look at Check Sequence I see a long line of these errors:

Effect problems
    ERR: Face effect with no timing selected. Model 'DMXSkull', Start 0:06.300
    ERR: Face effect with no timing selected. Model 'DMXSkull', Start 0:06.450
    ERR: Face effect with no timing selected. Model 'DMXSkull', Start 0:06.450
    ERR: Face effect with no timing selected. Model 'DMXSkull', Start 0:06.550

The only effects in the sequence are servo effects that were created during the import.  Is this enough detail to help or would you like to see the actual files?
Thanks!