Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servo default position? #3318

Closed
zakkwillow opened this issue Jul 5, 2022 · 11 comments
Closed

Servo default position? #3318

zakkwillow opened this issue Jul 5, 2022 · 11 comments

Comments

@zakkwillow
Copy link

Is there a way to set a default/neutral/blank position for servos when they are not being commanded?

My setup is xLights over wifi to an espixelstick running a PCA9685.

@AzGilrock
Copy link
Collaborator

Not currently. For servos you need to put effects across the entire timeline. Your request has actually been a desire of mine since I first created the servo ability but it’s not an easy thing to do in xlights. It was designed to be zero when there are no timelines effects. Also what most would want is not really a default but it would be better if the servos would hold at its last command.

@zakkwillow
Copy link
Author

Ok, I just thought maybe I was missing it in the setup somewhere.

Now that I know what I'm working with I can figure it out from here.

Thank you for the quick reply!

@keithsw1111
Copy link
Collaborator

The only solution I am aware of is in your player there may be an output processor that given a channel will set a channel to a value whenever it has a zero value. The downside of this ... you cant have zero values ... the upside you have a home position. I know xSchedule has such an output processor and would be surprised if FPP didnt.

@ebuechner
Copy link

I'm not sure why you're saying you can't have a zero value? I worked with Pat Delaney and Dan when the PCA9685 was added to the outputs of fpp and I use the zero Behavior all of the time to Center my servos when there's no output.
The only issue I have is I have to make sure that I at least have a value of 1 when moving the servos otherwise they glitch trying to go to Center. There are four values for zero Behavior hold, normal, to Center, stop pwm. The only problem is there's no way to represent this behavior in Xlights.

@dkulp
Copy link
Member

dkulp commented Jul 5, 2022

@ebuechner The original poster is using PCA9685 with an ESPixelStick instead of an FPP based Pi/BBB. Thus, the work we did in the PCA9685 output for FPP to get all the various options and desired behavior working is not available. Replacing the ESPixelStick with a PiZero would like work, if they could get one....

@zakkwillow
Copy link
Author

I will give the output processing in xSchedule a try. Ideally, I would really like the servos to just relax between sequences so they don't get hot. I'm definitely overworking them at times.

I haven't gotten into FPP yet because the boards are hard (read expensive) to get and I would need quite a few of them. So right now the espixelstick firmware and some d1mini clones are doing the job.

This will be my first year programming my Halloween show and my second year with xLights in general.

I really appreciate all the feedback and tips as I'm still relatively new to all this.

@ebuechner
Copy link

I have the same problem trying to get my servos to go relaxed between sequences and when they're not being used. There's two ways of doing this one would be to stop the pwm signal if you're using an analog servo. In my case I'm using digital servos so I have another Channel that is set up to a relay so that I can cut the power to the servos when they're not in use.

@dkulp
Copy link
Member

dkulp commented Jul 5, 2022

@zakkwillow You are likely better off filing a request with ESPixelStick for 0 behavior options for the PCA9685 output over there. They could likely add the options to turn off the PWM or similar like the FPP output has.

@zakkwillow
Copy link
Author

@ebuechner I had actually started looking into the power relay option. Realistically it would only add a couple dollars to my build and would be easy enough to program.

@dkulp I had originally put in a feature request with espixelstick and they jumped right on it. The firmware still needs testing, but it adds a selectable default position when no servo information is being received. I assumed incorrectly that xLights stopped sending values when there was no servo effect present. I suppose I could see how easy it would be for them to just turn off the PWM output when receiving a 0.

As a side note, I really need to learn to code 🤣

@cybercop23
Copy link
Collaborator

@zakkwillow @ebuechner anything else left here or can this be closed? If so, please close it.

@zakkwillow
Copy link
Author

Apologies for leaving this open so long. Ended up getting it handled on the hardware side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants