BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Fri Oct 19, 2018 5:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Hexapod based on Arduino MEGA
PostPosted: Fri Apr 19, 2013 7:19 am 
Offline
Citizen

Joined: Tue Dec 25, 2012 10:57 am
Posts: 26
hello
I wanna ask, if someone can tell me can I use Arduino MEGA for an Hexapod? and if there is any tutorial for that Please?

B@N911


Top
 Profile  
 
 Post subject: Re: Hexapod based on Arduino MEGA
PostPosted: Fri Apr 19, 2013 2:15 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
Yes.

I and many others have done this. Example in my thread: http://www.lynxmotion.net/viewtopic.php?f=20&t=6730

I have the Phoenix code base converted to run on several different Arduinos and hexapods. This code base is up on my Github account (github\kurte) in the Arduino_Phoenix_Parts project.

Not enough information to tell you how. What type of servos? What do you want to driver the Servos? Something like the SSC-32?

I have driven the servos directly with an Arduino Mega, but there are many issues, as you can not plug servos directly into the Arduino Mega, so you need to do a lot of wiring, either with some shield or something else. Also Arduinos directly driving servos is susceptible to having the servos jitter. You should google about that. I have done it using the SSC-32. I have also done it with a Servo Shield, that I modified to handle 18 servos and I have done it using a Non mega Arduino from Basic Micro with their Orion shield...

Kurt


Top
 Profile  
 
 Post subject: Re: Hexapod based on Arduino MEGA
PostPosted: Fri Apr 19, 2013 11:04 pm 
Offline
Citizen

Joined: Tue Dec 25, 2012 10:57 am
Posts: 26
first I used ARC32 but i field. I could understand how I connect and the coding. now I wanna try the arduino MEGA.
I have the Arduino MEGA, Mini Maestro 24-Channel USB Servo Controller, Phoenix body kit from Lyxmotion and 18 Hitec 645 servos.
Also I have PS2 remot controller. I really need step by step tutorial coz Im really new in all these stuff. I love them and I wanna learn but I have to have a basic code to start with it. can u help me for that.
and also I can do whatever it takes. Money, parts anything :)

BANJAN


Top
 Profile  
 
 Post subject: Re: Hexapod based on Arduino MEGA
PostPosted: Sat Apr 20, 2013 4:08 pm 
Offline
Master

Joined: Tue Nov 21, 2006 5:34 pm
Posts: 662
I am not sure what to tell you here. Personally I think the Arc32 should be easier for you to setup and use than the Arduino Mega plus Polu Mini Maestro. Why? Because it has been done by at least a few people, including myself. If it were me, I would still try to get it to work with the Arc32. I would try things, like see if I am receiving valid data from the PS2? Would probably either create a separate program like the ones that are up on the Lynxmotion for the Basic Atom Pro 28, or simply add in some debug stuff into the Arc32 phoenix program...

I might start out in the ControlInput function in the phoenix_control_ps2.bas and output some debug data showing what I was receiving from the PS2, something like:

Code:
 ; New debug...
  hserout 1, [hex DualShock(0), " ", DualShock(1), " ", DualShock(2), " ", DualShock(3), |
      " ", DualShock(4), " ", DualShock(5), " ", DualShock(6),  13]

; existing code...
 
  ; Switch bot on/off
  IF (DualShock(1).bit3 = 0) and LastButton(0).bit3 THEN   ;Start Button test
   IF(HexOn) THEN


Assuming I receive anything, I would then maybe add in a little extra code that only output a line of data like this if something changed. Create a duplicate array, loop over the new elements and see if something changed and copy to the saved one. If something changed, then output this line of data...

This requires you to again have the Arc32 connected to your PC over USB and you need to click on one of the terminal tabs on the bottom of the IDE...

BUT... If you still wish to go to Arduino environment. I personally recommend you go with standard setup like others. Which for example could be a setup from Lynxmotion Botbarduino (Arduino 328P based) with SSC-32. Not as powerful as Arduino Mega, but others have and continue to this, so there is more support. And there is a tutorial that shows how to set this up (http://www.lynxmotion.com/images/html/build99f.htm)

BUT... If you wish to continue with the Mega and the Mini Maestro 24), then you will be partially on your own as I don't know of anyone who has adapted the code to use the Mini Maestro. Probably would not be that hard, to get some of it working. But not sure about some of the features and how well they work. Don't have one (or need for one) so you would either have to do it yourself or find someone else who has...

Again with any project like this, I would start off doing baby steps. That is for example first get the PS2 to work with your Arduino Mega. We use the BIll Porter PS2 library which you can read about up at: http://www.billporter.info/2010/06/05/p ... rary-v1-0/ Lynxmotion keeps their own copy of it up on Github as well. You run into issues of how to plug the PS2 cable into an Arduino Mega, which only has female connectors... Also at times you may require resistors and the like to make it work properly. Once that is working, you can then try to write some code to interface up to the Mini Maestro. Would first start with simple program that maybe simply sweeps a servo back and forth over time. Would want to experiment to see if you have the ability for the servo controller to do this with some form of timed move or if your code has to do the timing... Once that is working, then try to integrate it into the Phoenix code base, by creating a new Phoenix Servo Driver. I would start off disabling functionality like canned sequences and simply see if I could get it to init and then the functions to tell specific servos to move to some location and the commit that tells them how long that move should take. That would get you the majority of the Phoenix functionality.

Good Luck
Kurt


Top
 Profile  
 
 Post subject: Re: Hexapod based on Arduino MEGA
PostPosted: Sun Apr 21, 2013 1:19 am 
Offline
Citizen

Joined: Tue Dec 25, 2012 10:57 am
Posts: 26
KurtEck wrote:
like see if I am receiving valid data from the PS2? Would probably either create a separate program like the ones that are up on the Lynxmotion for the Basic Atom Pro 28, or simply add in some debug stuff into the Arc32 phoenix program...


Trust me I dont know how to see the receiving valid data from the PS2. how to create a separate program.

KurtEck wrote:
I might start out in the ControlInput function in the phoenix_control_ps2.bas and output some debug data showing what I was receiving from the PS2,


How to do that.

I do not have that skills that u have cos of that if u can tell me how to do them i will be thankful. Im sorry I know maybe u asking urself as long as I know nothing about these stuff why Im doing it.
I really love these stuff and I wanna learn from the first. with some basic I will get through but with out I wont go farther than what I know now.


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

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