BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Mon Oct 22, 2018 2:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 62 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Wed Apr 18, 2012 10:37 am 
Offline
Guru

Joined: Fri Feb 10, 2012 9:34 pm
Posts: 73
KurtEck wrote:
Sorry, I am not up on the basic micro website that often. I am more likely up on the Lynxmotion forums. Yes I have also seen that if a program does an end or stop, Hsero does not work properly...

The Arc32 is a nice board, but I am personally not currently doing much with them right now. Also i do not work very much on bipeds. The only one i have is a brat, currently controlled by a botboardduino (arduino compatible). But I still try to help out as best I can.

Kurt

Hi Kurt, no need for apologies! Any help is always welcome.
What I was looking for was some good guidance on making a working biped using the arc32 - but with limited information one has to depend on these forums for help.
The arc32 seems to have problems but there is no clear documentation.
Anyway, I will keep digging through the various programs to understand how to get a biped to work.
Regards
Gopal


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Mon Apr 23, 2012 4:59 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Hmm. End puts the chip to sleep which stops all interrupts but Stop just makes an infinite loop that will never exit so Stop should not affect interrupt handlers.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Tue Dec 18, 2012 4:44 pm 
Offline
Guru

Joined: Fri Feb 10, 2012 9:34 pm
Posts: 73
gokul wrote:
Nathan, that is great thanks.

I am trying to connect a small speaker (Radio shack 8 ohms mini) to the ARC32. Should the 2 connections be ground and signal ? I think that those are the correct pins.
Would a speaker be connected to a servo header or to a sensor header (the diff being I have one bank of pins at 5V as recommended by you just for sensors and the other 3 are currently at Supply levels for servos).

Regards
Gopal

After a long time I am getting back to getting my biped project!
My question is this - are there any specific servo header pins that I should use to connect the speaker ? Or can I just select any free header ? If so would this header be the one powered at the 6V servo power level or should I connect it to the headers that are at the 5V level ?

Thanks for all the help!


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Tue Dec 18, 2012 4:54 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
gokul wrote:
this - are there any specific servo header pins that I should use to connect the speaker ? Or can I just select any free header ? If so would this header be the one powered at the 6V servo power level or should I connect it to the headers that are at the 5V level ?

First the caution. It is always best to have a proper circuit for driving speakers... However I have done this on several different boards, both Arc32 and Arduinos and have never hurt a board and only had one speaker die on me...

I used to use the Radioshack speakers (make sure speaker and not buzzer). More recently I have used ones I purchased from Digikey(http://www.digikey.com/product-search/e ... 02-1155-ND) as I had them on hand for some circuit boards I designed and built. Also I liked them as they are smaller and I could get away with simply jamming the two pins into a servo extension cable, which I could then simply plug in...

If you are simply connecting the speaker up, then it does not matter what the power level is as you are only using the signal pin and ground.

Kurt


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Fri Feb 01, 2013 5:53 pm 
Offline
Guru

Joined: Fri Feb 10, 2012 9:34 pm
Posts: 73
Hi,
First the good news - my biped project is going ok so far. It has been very educational to say the least! Brat with ARC32 and now the Torso with 5 servos.

I have added additional servos for the torso etc and here is where I seem to be having a problem! There are 2 hip servos that I want to keep stationary (because I have no clue as to how to use them in the walking :D ).

I updated the NUMSERVOS in teh offset finder program and made the changes to all the tables in the program but for some reason it does not seem to write the values beyond the basic 6 legs servo infor in to the EEPROM on ARC32. My debug print outs all show correct information going in to the program and the servos are all working and moving correctly as I try to set the zero positions. I complete the setting and then when I restart the brat in a following sessions the values for the new servos seem to have not been saved.

Any ideas where I should be looking ? I am using the brat offset finder as modified by Kurt for keybooard entry (as ARC32 does not have those buttons).

Please help! Thanks


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Fri Feb 01, 2013 7:10 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Are you sure its a saving problem and not a loading back in problem? Make sure it is even trying to load them back in. If it is I'd write a simple program to write values(like 0x12,0x34,0x56 etc) to those eeprom locations and then see if those values are being loaded back in correctly. If they are then you know itsa problem with the writing in the other program but right now I think it could be either side or both.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Fri Feb 01, 2013 8:11 pm 
Offline
Guru

Joined: Fri Feb 10, 2012 9:34 pm
Posts: 73
Acidtech wrote:
Are you sure its a saving problem and not a loading back in problem? Make sure it is even trying to load them back in. If it is I'd write a simple program to write values(like 0x12,0x34,0x56 etc) to those eeprom locations and then see if those values are being loaded back in correctly. If they are then you know itsa problem with the writing in the other program but right now I think it could be either side or both.

Ah ha! That is a possibility right ? I will do exactly what you say - thanks.

I did do one thing - I isolated the read offsets code and ran it - strangely first time it seemed to show some values and then it started showing all zeros!

As far as ARC32 - how much can be written to the EEPROM - I am concerned about the servo offsets primarly. As this board can support 32 servos, can 32 servo offsets be written ?

On a different topic - can I connect something like the PUTTY terminal - while the IDE is up and running - to be used as the terminal program ? This may help me see the HSEROUTs better and may be capture them also.

Thanks again!


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Sat Feb 02, 2013 8:17 pm 
Offline
Guru

Joined: Fri Feb 10, 2012 9:34 pm
Posts: 73
Latest Update!!!! Please read and help.

OK - I found that as long as the number of servos is 15 or less connected from P0 to P14 the offset saving to EEPROM works.
The saved values are loaded and everything looks good.

The moment I go to Servo 16 connected to P15 the memory does not stay - it seems to get corrupted.
I have the ARC 32 Assy: 101508-03 (I guess that is Rev 3?).
Servos are connected to P0-P7, P8-P15 and P16-P19 - for a total of 20. All of these blocks have the VCC/VS jumper set to VS. Power is 6V NiCD to VS and 7.2V NiCd to VSS 1 & 2. Batteries are fully charged.

I have attached the modified Mechosf_kybd-extra program - you will all 20 servos defined but NUMSERVOS set to 15 - that was the last value where the eeprom memory seems to stay safe.

Please note that the program does let me set the offsets for all 20 BUT when the robot is powered on and off the values are all lost or corrupted.

I am wondering if (a) I should manually reposition the servo horns to zero position by unscrewing and repositioning on the spline or (b) use the display from the program as I set the offset and then hard code these values in to other programs instead of trusting the EEPROM.

Please help - would love to get this project completed!

Thanks
Gopal

Here are couple of screen captures from the offset display :
20 Servos - but could not save :(
[SERVO OFFSETS]
i 0 off 0
i 1 off 0
i 2 off 750
i 3 off 0
i 4 off -500
i 5 off -750
i 6 off -250
i 7 off -3000
i 8 off -1250
i 9 off -3000
i 10 off 2000
i 11 off 250
i 12 off 3000
i 13 off 1250
i 14 off 0
i 15 off 1000
i 16 off -2250
i 17 off 1000
i 18 off -1750
i 19 off 250
In write out NUMSERVOS, bcscalc 20 FA
Press a key to continue
-------------
15 servos - saved and robot able to maintain positions after power cycle.
[SERVO OFFSETS]
i 0 off -500
i 1 off -500
i 2 off 1250
i 3 off 500
i 4 off -1500
i 5 off -750
i 6 off 0
i 7 off 0
i 8 off -1500
i 9 off -3000
i 10 off 1500
i 11 off 0
i 12 off 1500
i 13 off 2000
i 14 off 0
In write out NUMSERVOS, bcscalc 15 0
Press a key to continue


Attachments:
mechosf_kybd-extra-gi-020213.bas [9.37 KiB]
Downloaded 195 times
Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Sun Feb 03, 2013 3:44 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Could be that readdm is having issues with reads (or writes) that are either over 32 bytes in length, and/or with reads that cross 32 byte boundaries.

If you look at my Arc32 code for reading in servo offsets, you will see it starts off like:
Code:
ReadServoOffsets:
   readdm 31, [ bCSIn]
   readdm 32, [str aServoOffsets\32]   ; We are storing words now.
   readdm 64, [str aServoOffsets(16)\32]

I had to break the read up chunks... I thought that at one point there was a fix such that the underlying code was going to do this for you, but I have not tested to see if that was true or not.

Kurt


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Sun Feb 03, 2013 4:46 pm 
Offline
Guru

Joined: Fri Feb 10, 2012 9:34 pm
Posts: 73
Hi Kurt, thanks! I am suspecting the same - as I have no real documentation as to the EEPROM layout etc., I am unable to tell. Also I did corrupt values when I tried a simple write/read.
As I can see the values using the displays - I have decided to hard code the offsets at the top of each program, loading it to a local array - it would have been nice to use the EEPROM though.

BTW - do you have ARC32 code in the Phoneix files ? Or do you have it elsewhere (may be a biped project :)) ? please let me know.

I will update as this progresses !
Regards
Gopal

KurtEck wrote:
Could be that readdm is having issues with reads (or writes) that are either over 32 bytes in length, and/or with reads that cross 32 byte boundaries.

If you look at my Arc32 code for reading in servo offsets, you will see it starts off like:
Code:
ReadServoOffsets:
   readdm 31, [ bCSIn]
   readdm 32, [str aServoOffsets\32]   ; We are storing words now.
   readdm 64, [str aServoOffsets(16)\32]

I had to break the read up chunks... I thought that at one point there was a fix such that the underlying code was going to do this for you, but I have not tested to see if that was true or not.

Kurt


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Mon Feb 04, 2013 4:07 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
I know from awhile ago that the EEPROM on the SSC-32 works on 32 bytes at a time... A long time ago if a read went over a 32 byte boundary, it would wrap around... So I updated my code to work with it that way.

Yes I used an Arc32 in a couple of different places. But mostly with Hexapod code. A little while ago I uploaded what I think is our most recent versions of the Phoenix code for BAPS including Arc32 up to github: https://github.com/KurtE/Phoenix_For_BAPS
In there are project files for different configurations, including some for Arc32s. As for Biped code, I don't think I did any special versions for Arc32. Probably would not be much different other than if I was using some timer interrupts and needed to change from for example A timer to B1 timer...

Kurt


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Fri Feb 08, 2013 7:20 pm 
Offline
Guru

Joined: Fri Feb 10, 2012 9:34 pm
Posts: 73
Hello Experts!

I am connecting a speaker to ARC32 - on the servo lines that are being set to VSS. The speaker is fine except it is very very low vaolume. I added a cap and it seemed to make it a bit better - still very soft. Adding caps of increasing values seems to change the tone characteristics of the sound - higher the value lower the octave.

What would be the best way to increase the volume ? Should I add a small amp ? Something small like this ? http://blog.moderndevice.com/2012/08/09/new-product-audio-amplifier-lm4889/

Please advise
Thanks
Gopal


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Sun Feb 10, 2013 10:35 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
For louder sound you will need an amp or a different speaker. The I/O pins can only drive so much power. The cap helps use some of the wasted energy which increases the volume but even in a perfect world the best this can do is increase it by 50%. Also there is no point it putting a larger cap on. And as you found it will tend to distort the sound.

We only use a direct I/O line and a cap on our Orion shield and that speaker can be annoyingly loud. I suspect you just need to get a different speaker(piezo preferably).

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Mon Feb 11, 2013 4:21 pm 
Offline
Guru

Joined: Fri Feb 10, 2012 9:34 pm
Posts: 73
Acidtech wrote:
For louder sound you will need an amp or a different speaker. The I/O pins can only drive so much power. The cap helps use some of the wasted energy which increases the volume but even in a perfect world the best this can do is increase it by 50%. Also there is no point it putting a larger cap on. And as you found it will tend to distort the sound.

We only use a direct I/O line and a cap on our Orion shield and that speaker can be annoyingly loud. I suspect you just need to get a different speaker(piezo preferably).

Thanks Nathan! I have ordered a tiny amp and hope it will help!

Right now I have other issues to work out - like the EEPROM issue mentioned above in this thread and trying to get the biped walking nicely.

I keep wondering if the 3DOF legs that are standard in brat it seems are good enough or do I have to go to a 4,5 or 6DOF leg and IK!

Any advice is always welcome.
Thanks
Gopal


Top
 Profile  
 
 Post subject: Re: ARC32 and Lynxmotion Biped code - compatible ?
PostPosted: Mon Feb 11, 2013 5:09 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
For speakers, I use the ones from Digikey (102-1155-ND) ... which is the same one used on Lynxmotion BB2 and similar to others. For me it is laud enough for what I want or as Nathan once told me: "Loud enough to be annoying"

As for Bipeds - As I mentioned in PM, I am not much of a biped person. I have a Brat as well as a Robonova which has collected dust for many years now. I know for serious walking I belie you may need an additional DOF (or 2). But as you add DOF, you add weight, which implies need stronger servos... As for IK, Not sure how many are doing this. You might look up on Lynxmotion or Trossen for the project that Kåre (Zenta) did, which I believe was called Archer.

Good Luck
Kurt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 62 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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