Hi Brandon
I too am trying to figure this out. I have followed the previous instructions above. My trouble seems that my motor responds when the potentiometer is half way turn up. I would like to have it respond as soon as it is turned. Any help is appreciated.
Thx Todd
Hello.
I moved your post to its own topic just to keep it organized.
Could you post more details about your setup, including pictures that show all of your connections as well as a copy of your Maestro settings file? You can save a copy of your settings file from the “File” drop-down menu of the Maestro Control Center while the controller is connected. Also, could you describe what happens in the “Status” tab of the Maestro Control Center as you move the potentiometer through its full range of motion and back, as well as how your motor responds?
Brandon
Hi Brandon
My script is basically the same as you posted in the last forum. I did change the scale numbers to adjust for when the motor starts to move or so i thought. Everything works great except i have to turn the potentiometer half way up to get the motor to move.
I will post the script here also. My setup is basic.
“0” to potentiometer
“1” to esc.
Esc’s bec is powering the
Sorry sent without finishing.
Esc’s bec is powering board. It is six volts so i jumped the 5volt out to power the rail. Ground is jumped to rail also.
begin
0 get_position # get the value of the pot, 0-1023
#Scale to between 6080 and 8000, which is 1520µs to 2000µs
dup 3 times swap 1 shift_right plus #same as multiplying by 3.5
4420 plus #add the offset
1 servo # set servo 1 to the new value
repeat
Hello.
Before getting too much into the script, you should double check (if you haven’t already) that the motor behaves how you want if you manually move the channel 1 slider in the “Status” tab of the Maestro Control Center between 1520µs and 2000µs without the script running. If it does, you can adjust your script to scale between those values like this (it looks like you changed the comments in the code, but not the scaling code itself):
begin
0 get_position
#Scale to between 6080 and 8000, which is 1520µs to 2000µs
dup 7 times 3 shift_right plus #same as multiplying by 1.875
6080 plus #add the offset
1 servo #update servo on channel 1
repeat
If that does not give you the behavior you want, could you monitor the “Status” tab of the Maestro Control Center to verify that the output on channel 1 is going between 1520µs to 2000µs as you move the potentiometer through its range of motion?
Brandon
Hi Brandon
You are awesome! It works perfectly. I wish I knew what or how you adjusted the script.
Thanks so much Todd
Brandon
My ESC has a high current shut off if I turn the pot too fast. Is there a script for a “soft start” I can use?
thx.t
You could probably add some ramping into the script like you described, but a more elegant solution would be to set a speed limit for channel 1 in the “Channel Settings” tab of the Maestro Control Center. A good starting value to try might be something like 20 or 50 (a value of 0 means no limit, 1 is the slowest you can set, and it increases from there). Please note that the speed and acceleration settings are named from the perspective of controlling a servo (i.e. doing position control), so the speed variable controls how quickly the pulse width can change. Since you are using the pulse width to set the speed of your motor (not the position), the “speed” setting is effectively controlling the acceleration in your application.
As far as understanding the script, I recommend reading through the “Maestro Scripting Language” section of the guide and experimenting with the examples there if you have not already. Learning more about the FORTH programing language might help as well (since that is what the Maestro scripting language is based on).
Brandon
What brand and model is your ESC some are programmable for a soft start or start up percentage of power. Sometimes they can be programmed by using a programmer or by using the RC transmitter and remote. Being that you are not using it as an RC type device you may need to buy ba programmer if your ESC is in fact programmable.
yes I have a programmer for my esc. I will try messing with the start up settings before I go into changing settings in the maestro. let u know how it goes!
