BasicMicro - Forums

www.basicmicro.com
It is currently Mon May 21, 2012 12:52 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: ARC-32 digital servo bug
PostPosted: Wed May 19, 2010 1:30 pm 
Offline
Citizen

Joined: Wed Oct 29, 2008 3:47 am
Posts: 12
Hi,

I'm working on a robot project where I'm using an ARC-32 board (2009 Rev2 board).
I'm using digital servos 5645MG. And I'm using the modified Phoenix code Kurt posted in this thread at Lynxmotion.
When working with setting the servo offsets I discovered something very strange. When connecting a digital servo to the ARC-32 ports the pwm output changes on the actual pin. So far I've just tested it on the servo group 3 (pin16,17,18..). What happends is that the servo moves from the centered position (1500 µS) to a position far from center (about 1761 µS). I hooked up a logic analyzer and it seemed like the pwm output got inverted :shock: and the pulselength also changes. Take a look at this screenshoot:

Attachment:
ARC32 digital servo bug.JPG
ARC32 digital servo bug.JPG [ 106.39 KiB | Viewed 1010 times ]


I got the same result on several brand new Hitec 5645 digital servos.
I've tested different powering options too (both separate VL/VS and VL=VS) with the same result.
As soon as I disconnect the digital servo and connect a non-digital servo the output goes back to normal (1500 µS) like this:

Attachment:
ARC32 std servo OK.JPG
ARC32 std servo OK.JPG [ 110.82 KiB | Viewed 1010 times ]


At the moment I'm just wondering if I'm alone with this problem. Have you tested the ARC-32 board with digital servos?


Kåre Halvorsen aka Zenta


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Wed May 19, 2010 3:33 pm 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 527
I have not tried digital servos on the Arc32. All of mine on the phoenix are 645mg. The only digital servo I have are the two that are on the AL5D arm on my rover.

:? Actually I do have my old robonova with the HSR- digital servos that I could try out. Maybe I will go up stairs and see how hard it would be to extract 1 or 2 of these... I always meant to sell this, but never got around to it...

Kurt


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Wed May 19, 2010 11:05 pm 
Offline
Citizen

Joined: Wed Oct 29, 2008 3:47 am
Posts: 12
Hi Kurt,

I'm very puzzled at the moment.. I did also test other servo groups on the ARC-32 with the same result. As soon as I connect a 5645 to the pin the pulselength changes. Removing the servo makes it go normal again. I don't think this is a software/code issue more like a hardware issue, since it works fine with no servos connected or with any standard analog servo connected.

It would be great if you or someone else can test this out too.

I'll hopefully do some more testing this evening and hook up a oscilloscope too.

-Zenta


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Thu May 20, 2010 8:05 am 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 527
I did extract a robonova servo: HSR-8498HB servo. So I will try to see what this does. If this does not reproduce, may need to try using one large scale digital servo from ARM...

You might also want to try connecting the servos to a different group of pins to see what that does. Pins 16-18 are not one of the HSERVOSTAT pins, you might try a pin that is, to see if that makes any difference.

Kurt


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Thu May 20, 2010 8:19 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
I have a 5645 to test with. I'll let you know what I find asap.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Thu May 20, 2010 9:53 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
I've tested a 5485 , 5645 and 7950TH. Your digital analyzer isn't showing you everything. If you look at the servo signal on a scope you will see the 5v servo pulse followed by 0v for a total time of about 3.3ms(eg the ARC32s servo pulse window per servo group) and then the rest of the time you will see about 2.5v until the next pulse. This is caused because the Hitec servo has an approx 47k pullup and the ARC32 has a 47k pulldown for when other servo groups are being driven to hold the line low. So we end up with a voltage divider. Because of this I'm making a software update that will allow you to use servo pins 0 to 7, 16 to 23 and 28 to 31 for digital servos without sending your board back.

Luckily we have just gotten the production boards done and haven't shipped any to customers yet (just to testers). We will be replacing the 47k pulldowns on servo pins 8 to 15 and 24 to 27 with 4.7k or 1k pulldowns. I've tested with 4.7k and it looks good be we may go with 1k to be safe. We will be removing the pulldowns all together on 0 to 7, 16 to 23 and 28 to 31 because they are muxed with I/Os and the I/Os will hold the servo signal line low instead of the pulldowns. This does have an added benefit of allowing us to use the internal pullups on several of the I/O pins without interference from the external pulldowns that will now be removed.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Thu May 20, 2010 1:02 pm 
Offline
Citizen

Joined: Wed Oct 29, 2008 3:47 am
Posts: 12
Hi,
I hooked up the oscilloscope today and I could clearly see the voltage divider effect you mentioned. That explains the strange result then.
Acidtech wrote:
Because of this I'm making a software update that will allow you to use servo pins 0 to 7, 16 to 23 and 28 to 31 for digital servos without sending your board back.

Can you really solve this with a software update? And what software are you talking about? You got me very curious there. ;)

Acidtech wrote:
We will be removing the pulldowns all together on 0 to 7, 16 to 23 and 28 to 31 because they are muxed with I/Os and the I/Os will hold the servo signal line low instead of the pulldowns. This does have an added benefit of allowing us to use the internal pullups on several of the I/O pins without interference from the external pulldowns that will now be removed.

Are you saying that the resistors (in 8 pin DIL package marked 473) can be de-soldered from the board and my problem is solved?


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Thu May 20, 2010 5:29 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
The software fix for this problem only applies to servo pins 0-7,16-23 and 28-31. Those pins ALSO have 3687 I/O pins directly on them. So when the servo pulse is in the low phase(most of the 20ms) the I/O pins on that servo pin can be held low. This would be a hard low and elliminate the voltage divider effect you see on those pins.

On the other pins, 8-15 and 24-27, you would need to desolder the 473 resistor packs and put on 472 (4.7k ohm) or 102 (eg 1k ohm) resistor packs.

Just removing the resistor packs will make the problem worse without 1) the software fix or 2) the harder pulldowns because the Hitec Digital servos' internal pullups.

Of course you can replace all the 473 resistor packes with 102 resistor packs without the software fix which will also fix the problem but my software fix will elliminate the need for the pulldowns on those pins opening up some features of those pins that would not work with the pulldown on them (eg the internal pullup capability of many of the pins).

I've tested with 4.7k pulldowns and the servo functions properly. When 4.7k is used you will see a "low" of about 0.47v. With 1k ohms you will see a low signal on the scope of 0.1v. With the current 47k resistors you see approx 2.5v.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Thu May 20, 2010 10:27 pm 
Offline
Citizen

Joined: Wed Oct 29, 2008 3:47 am
Posts: 12
Acidtech wrote:
The software fix for this problem only applies to servo pins 0-7,16-23 and 28-31. Those pins ALSO have 3687 I/O pins directly on them. So when the servo pulse is in the low phase(most of the 20ms) the I/O pins on that servo pin can be held low. This would be a hard low and elliminate the voltage divider effect you see on those pins.

At the moment I'm only using 0-7 and 16-23, so the software fix would solve it for me. Any ETA on when the software fix is available?

Since I don't have that small resistor packages available I think that must be a future project to fix.

Thanks for your help!


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Sat May 22, 2010 9:29 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
You can get the new beta Studio with the updated HSERVO2 system that will hold the servo pins low during the idle phase of the servo pulse at:

http://downloads.basicmicro.com/downloa ... 0-0-28.exe

This code does a little more work so the processor usage is now from .4% to 1.7%(all 32 servos actively moving).

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Sat May 22, 2010 10:51 pm 
Offline
Citizen

Joined: Wed Oct 29, 2008 3:47 am
Posts: 12
Acidtech wrote:
You can get the new beta Studio with the updated HSERVO2 system that will hold the servo pins low during the idle phase of the servo pulse at:

http://downloads.basicmicro.com/downloa ... 0-0-28.exe

This code does a little more work so the processor usage is now from .4% to 1.7%(all 32 servos actively moving).


Thanks for the update!


Top
 Profile  
 
 Post subject: Re: ARC-32 digital servo bug
PostPosted: Tue May 25, 2010 4:45 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
Here is Zenta showing off some of his stuff including his recent work with the ARC32.

http://www.lynxmotion.net/viewtopic.php ... 42&start=0

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO