Asked

360 Servo Speech Command Limitation Settings

I am trying to open a window with a 360 servo and the speech recognition. The gears and the servo mount have been printed. The servo that I started using was a regular (MG9956R 60 degree). The problem was that it did open the window all the way. I got it to work with speech recognition to open the window and close the window. I just received a new 360 degree KOOKYE servo and would like to limit the rotation with the speech recognition to open and close the window. Does anyone know if Synthiam can limit the amount it rotates right and left? Since this is a continuous servo I cannot get it to stop. When I say (close the window) it keeps rotating right and when I say (open the window) it keeps rotating left without stopping. I looked through the tutorials but I was not able to find anything helpful. It sounds like auto positioning may be what I should be using and limiting the servo right and left. But I can’t seem to get it to work correctly. It only spins in one direction with the Execute button and I can’t get it to work with speech recognition. The goal is to get it to open and close the window all the way with a speech command. Any ideas how I may be able to get this to work?


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

PRO
USA
#1   — Edited

Hi,

I deleted my post; it was not correct.

Here is DJ answer below

thanks, be well

#2  

Thank you EzAng.

I am new to Synthiam. Sorry for my slow understanding of the program. I created the 3 frames 1, 512, 1024 after changing the properties of the max servo position properties from 180 to 1024. Thank you for that video. My 360 continuous servo spun to the right for a few turns stopped and turned position to the left to a non stop. I think that's what it was suppose to do. How would I go about creating a frame that stops at around 3 full turns of the servo with the speech command of open window? And with another speech command of close the window turn the other way the exact amount of turns?

I tried playing with the numbers to servo settings like 20 to 100 etc. However it will not stop spinning. Totally my lack of understanding. How many frames do you think I would have to create to achieve all of this in auto position? Synthiam can achieve this with a 360 servo correct?

PRO
Synthiam
#3   — Edited

Do not use the Auto Position robot skill. The Auto Position robot skill requires servos that can move into positions with an encoder or positioning sensor. A continuous rotation servo cannot specify positions because it lacks the hardware. A continuous rotation servo doesn't have any positional feedback. It's just a motor that turns continuously in either direction. There's a blurb about continuous rotation servos and their lack of position feedback here: https://synthiam.com/Support/Advanced-Fundamentals/servo-motor#part3

You will require limit switches. A limit switch on the window or shaft allows ARC to know when to stop moving the servo.

A limit switch can be connected to a digital port of the EZB robot controller that you're using. Then, your Speech Recognition command would be something like...

JavaScript code to roll the window up



// move the servo roll-up direction
Servo.setPosition(d0, 180);

// wait until the upper limit switch is triggered
Digital.wait(d1, true);

// stop the servo from moving
Servo.release(d0);

JavaScript Code to roll the window down



// move the servo roll-down direction
Servo.setPosition(d0, 1);

// wait until the lower limit switch is triggered
Digital.wait(d2, true);

// stop the servo from moving
Servo.release(d0);

#4  

How do you intend to use these continuous servos?  Do you want them to stop at a certain specific number of rotations or when you command it to stop? For example if it's mounted to turn a wheel of a car do you want the car to travel a specific distance or just have the car stop when you say stop? If you want it to simply stop rotating by voice command without using any feedback device.  If so it may be done with a simple script that we could help you with.

#5  

Good answers and feedback from all of you. Thank you so much.

Dave, to answer your question. I want the motor to stop after a couple of rotations on its own. With out a stop command. So when I say open window the servo will rotate 2 revolution and stop on its own. And when I say close the window it will do the same rotations on the other direction and stop on its own.

DJ, I just read your comment thank you by the way very informative. Before I read it I was playing with the settings a bit last night. Here are my findings so far. I managed to get the motor to stop after a rotation and a half. I can probably push it more to like 2 rotations. Here are the settings that I used in a pic. So I am half way there so to speak. But then I read DJ's info and I am not sure if I can make it rotate the other way to close. So as of now I can get the motor to open the window with a rotation and a half with a speech command. So the question is now can I get it to rotate the other direction with the close window command the same amount of rotations and stop on its own?

Frame 1 set to 103 Frame 2 set to 36 In the action I made frame 2 the first on the list. 

User-inserted image

User-inserted image

User-inserted image

PRO
USA
#6   — Edited

Hi - this can be used for a window or what ever

User-inserted image

Servo movement panel

User-inserted image

Just two scripts:

for OPEN

User-inserted image

For SHUT

User-inserted image

#7   — Edited

Your method is interesting but I doubt you'll be able to keep the desired amount of rotations. As you load down the servo and add wheels or gears this will change. There are so many other factors that are out there that will make your rotation change a little or a lot.

The only real foolproof way to get your rotation to be exact to your needs is to install an encoder at the location of the rotation. You will also need a motor controller that can read the feedback of the encoder.

So, The motor controller is attached to the EZB, ARC sends the commands to the motor controller through the EZB,  the motor controller is attached to the encoder reads the encoder's feedback, the encoder reads the motor shaft or something that the motor it turning.

A lot of people have used and like a Sabertooth motor controller with a Kangaroo motion controller attached to it.

If you are just moving a platform on rails like a printer or something then Limit switches at the stop points can work instead.

What are you trying to move with your motor?

PRO
Belgium
#8   — Edited

just an idea. is it not possible to use seconds ? sleep(1000) is one seconds . so howmany seconds is one rotation?

PRO
USA
#9  

By the way, it is good to see you guys again   :-)

Dave and  Nomad

EzAng

#10  

Dave, I am trying to open a small window about 2ft by 2ft. It does not have to be perfect or open all the way. This is just my first project with EZ-B V4. We are a STEAM program for children K-5th grade. We are an Arduino shop. We have built many projects with Arduino and ESP32 boards. But I wanted to try Synthiam to see if this could be a good platform for teaching the next gen. Thank you so much for the advice I will look into the motor controller with the motion controller that you mentioned. The kids at our center thank you for sharing.

Nomad,  Thank you for that advice. We will take the time measurement into consideration. As I understand it there are many variables to keep in mind when using time to measure rotation. But it is worth looking into as I mentioned it does not have to be a perfect setup and there will be room for degrading servo performance that may change the rotation if measured with time.

EzAng, Thank you for the screen shoots and the scripts. Very simple but effective.:)

Our school will be closed for the next 2 weeks. I hope everyone on this thread is getting a little bit of time off to enjoy as well. I may not be online as often these next 2 weeks. So if I miss you Happy Holidays everyone. I will try my best to keep you all posted on the outcome.

PRO
Synthiam
#11  

Awesome you got something working for your needs. It’s really great to see when people share ingenious ideas to solve problems. You did something I wouldn’t have thought of doing - and it seems to work.

Thanks for the holiday wishes - and hope the same for you and family. The holidays does give me some off time for doing what I love best playing with robots:)

although I am back home at the lake visiting family right now. So it’s a mix of roboting, quading in the snow and eating lots of fish!

Off topic but how’s this for a view to wake up to:) - gonna be hard to leave this place in the new year for the boring old prairies haha

User-inserted image

#12  

WOW DJ, That place looks amazing. I am on my way with my fishing rod. I don't blame you at all. If I was there I would not want to ever leave. I am happy to hear you are having a good time with family. This is what it's all about this time of year. Enjoy the fresh fish.:)

#13  

Okay, I must have missed your explanation of what you're doing earlier. I see you did mention it. My suggestion of a motor controller is probably overkill for what you're doing. Plus very expensive. DJ suggested using limit switches. For what you're doing that's probably the best end simplest way to achieve your goal. Good luck and happy holidays. Please let us know how it turns out.