Initial boot - Not standing

98 views
Skip to first unread message

Vahid K

unread,
Jun 23, 2018, 10:57:22 PM6/23/18
to Vorpal Robotics Forum
First of all, I have sourced my own parts.  I followed the instructions in this video (https://www.youtube.com/watch?time_continue=618&v=cf1dBCwsE0o) to put the Robot together.  I have tried two different servo controllers with the same results.  I have checked the connections several times.  I think I' missing a step here.  I have attached a video that shows the problem.   It plays a sequence of beeps and then points the legs upwards.  I'm using Analog Arduino code.

I tried attaching a video but Google is not allowing me.  Here is the video link on youtube: https://youtu.be/9e8lSPLG_M4

Here is the serial output
Stand Mode, Sensors:
 A3=104 A6=170 A7=268 Dist=1000
Stand Mode, Sensors:
 A3=100 A6=159 A7=243 Dist=1000
Stand Mode, Sensors:
 A3=98 A6=156 A7=231 Dist=1000
Stand Mode, Sensors:
 A3=98 A6=156 A7=230 Dist=1000
Stand Mode, Sensors:
 A3=98 A6=156 A7=230 Dist=1000
Stand Mode, Sensors:
 A3=98 A6=156 A7=230 Dist=1000
Stand Mode, Sensors:
 A3=98 A6=156 A7=229 Dist=1000

Fred Sr Bliss

unread,
Jun 24, 2018, 1:57:53 PM6/24/18
to Vorpal Robotics Forum
Did you make sure all of the leg servos were a 90 degrees before putting on the legs?

vorpalrobotics

unread,
Jun 24, 2018, 2:04:00 PM6/24/18
to Vorpal Robotics Forum
Could you put it in test mode, so each leg moves one by one, and post a video like that? I think the most likely cause is that the legs are not adjusted right. In adjust mode the should stick straight out.

Vahid K

unread,
Jun 24, 2018, 10:31:14 PM6/24/18
to Vorpal Robotics Forum
Thanks for your response and a great project.  I appreciate you taking time with this.  I really like this Robot and trying to learn the code.

https://youtu.be/1Y-qdTn343I

As you can see from the  video the legs stick out in ADJ mode, correct?  BTW, if I change KNEE_STAND to 150, It will stand.  But I don't think that's correct.

Steve Pendergrast

unread,
Jun 25, 2018, 8:12:51 AM6/25/18
to Vorpal Robotics Forum
Hello again,

Thanks for the kind words!

So after reviewing the new video it's quite clear what the problem is: you have counterclockwise servos!

This happens sometimes when self-sourcing.  Most servos on the market are "clockwise" servos. This means if you look down on the shaft, 0 degrees is as far as possible counterclockwise, and higher angles move the shaft clockwise.

Some servos are "CCW" or counterclockwise. They start at angle 0 all the way clockwise, then larger angles move them counterclockwise.

You may want to carefully read the vendor information from where you got the servo to see if the vendor mentioned which way the servo goes. Because the vast majority of servos are clockwise servos, if a vendor does not say which direction the servos go then normally you can assume they are clockwise servos.  However, the internet is basically the wild, wild west, and so you never really know what you're getting. There are plenty of vendors who give you little or no information about what you're buying, or worse yet they're giving you blatantly false information.

In any case, the fix is a simple one. In the analog version of the robot code just go to line 1347 and change:

int p = map(position,0,180,SERVOMIN,SERVOMAX);

to:

int p = map(position,180,0,SERVOMIN,SERVOMAX);

This will reverse all servo motion commands to be suitable for counterclockwise servos.

Be very careful when buying replacement servos, there is no single simple code change that will save you if you somehow mix and match both kinds of servo!  It could be done using some if statements to map some servos differently than others, but I would not suggest it as things might get kind of confusing.

Hope this helps,
Steve P.

Vahid K

unread,
Jun 26, 2018, 4:35:13 PM6/26/18
to Vorpal Robotics Forum
Hi Steve,
Thank you very much.  Your fix worked as you described it.  Honestly I didn't even know about servo rotation preference.  I checked the vendor listing again and it doesn't mention any thing about this either.

Anyhow, I was suspicious about the servos movements,  when I modified your code to use 150 instead of 30 for standing.  I now have used your code change and it is standing tall.  ADJ and Test modes are working fine as well.

The demo starts fine but after a short period the legs start to shake and it will sit down and starts twitching.  Even resting the NANO using the reset button the board doesn't stop it from twitching.  I read through some forum messages about similar issues.  So I suspect either my batteries or UBEC is not working properly.  I'm using two 18650 but I have better batteries that I use with my Quad.   I will debug this and report back my findings.

Thanks again.
Vahid K.

vorpalrobotics

unread,
Jun 26, 2018, 6:22:24 PM6/26/18
to Vorpal Robotics Forum
Ah, yes. When the robot shakes and curls up like a poisoned spider that's usually the Bec. A lot of inexpensive becs out there greatly overstate the amount of current they can output on a continuous basis. A trick if you have spares is to double up your Bec (ie put two in parallel). If that makes it work then yes it was the Bec.

Vahid K

unread,
Jun 27, 2018, 9:55:54 PM6/27/18
to Vorpal Robotics Forum
Oh yes.  Doubling up on the Bec fixed the problem mostly.  But I think they heat up and start losing power.  So I ordered a couple of your BECs form your store with a few other items.  I will make another one for duel fighting.  :)  BTW, I got  the game pad working also.  Very nice.
Reply all
Reply to author
Forward
0 new messages