Help with snake robot!!

Hi, I am building a snake robot as part of my final year project. The robot has to swim in water using lateral undulation (also known as serpentine motion). To achieve this the snake will be divided into n number of modules each connected by a universal joint or a ball and socket joint actuated by two servos.The modules will move with respect to each other. I won't be using the exact same configuration but it will somewhat similar.

Here is a link to video of the snake robot on which I am broadly basing my design #-Link-Snipped-#

​
1. Should I use a single processor to control the entire snake or should I put processors in each of the modules?

2. What kind of processor should I use?

Replies

  • raj87verma88
    raj87verma88
    A single micro controller would be enough unless you want to make the bot the size of the Rock Python. Though I do not have any experience in building robots, but I had once read about the snake bot in a book titled 'Amphibionics: Build Your Own Biologically Inspired Robot'. The author had made a snake bot of around 6-7 modules and each had a servo motor to power it. The microcontroller used was PIC 16F84.
  • Aashish Joshi
    Aashish Joshi
    I was thinking instead of one powerful micro controller I could use n less powerful ones. this would keep the size down and make it modular, so that even if one of the module malfunctions, I can just take it out and repair it without affecting the robot's abilities.

    But, on the down side this might make the motion of the snake a little jerky as the controllers have to operate sequentially and this might create a little time lag.

    Thanks for the suggestion on PIC 16F84.

    Also I would like to use linux as the operating system for my robot. I already have a few distros on my mind like #-Link-Snipped-#. so i would like to select a processor that can run linux. ColdFire is an alternative I am considering (if I go for a single processor design). How will that be?
  • gohm
    gohm
    Slightly off topic-

    Mad Scientist, thank you for a great project help post. You expressed a clearly defined idea with progress and troublespots outlined. I am sure you will get all the help you need from our great folks (not me, I'm just a mech πŸ˜€). Please keep us informed & it is great to see an involved engineering student not just asking for a project pre-made hand out.
  • Aashish Joshi
    Aashish Joshi
    One more query, which language should I use for coding the robot? C or Java??
  • raj87verma88
    raj87verma88
    It would be best if you can write the program in Assembly Language otherwise C is an option.
    I don't know anything about Java.
  • Aashish Joshi
    Aashish Joshi
    Thanks for the info Raj. I'm not sure which language to use. I am getting inclined towards Java, especially after reading this #-Link-Snipped-#
  • Ashraf HZ
    Ashraf HZ
    mad_scientist
    Also I would like to use linux as the operating system for my robot. I already have a few distros on my mind like #-Link-Snipped-#. so i would like to select a processor that can run linux. ColdFire is an alternative I am considering (if I go for a single processor design). How will that be?
    Oh.. respect πŸ˜›

    In my opinion, you wont need to have sophisticated microcontrollers and OS's for this if you want to prototype it up. Any standard PIC would do (such as the cheap and famous PIC16F877a). For easy debugging, C is recommended. You can also add an EPROM chip if you need more coding space.

    For sure, one PIC on its own is not enough to control the multiple servos you need due to limited PWM ports. In this case, you need to utilize a servo controller. These can control as many as 32 individual servos. And I wouldnt worry about the code being run sequentially. Depending on the speed of the microcontroller (eg 20 MHz), functions are executed near instantaneous after each other. I doubt the jerkyness is that apparent, unless you are executing a heck load of codes!

    All this, if dilligent, would take under a month. Once that is done, you can do some calibration and tests and decide whether you really need a real time OS. How much time do you have?
  • Aashish Joshi
    Aashish Joshi
    Thanks for the input ash. I have till May end to complete the project. I've had similar feedback from other friends/seniors, so I am going for a simple design. Still haven't decided on the specifics, but I hope to do that by early next year 😁

    Can you recommend any book/online resources for embedded C programming? Although I am not new to programming, I am new to embedded programming. So any help would highly appreciated.
  • navderm
    navderm
    Hi
    firstly. please think that you have a lot of time to complete the project. so i would suggest you use better systems for controls. you can learn pic or 8051 but they are not of much use in advanced controls. i would recommend you use RTLinux systems if you are good with programming and if not then AVR microcontrollers. Also i would recommend use of assembly language in AVR if you haven't learnt any other assembly but if you have knowlege of assembly of some others like 8051 then start with C. Codevision AVR will help you get started with AVR in C.

    Also why do you want to use many microcontrollers. first thing, these motor controls need to be sync. like they have to perform one after the other in differnt modules. you wont be able to control this syncing if you use many mcs.

    and by the way why are you using servo motor? i know stepper wont do the work. why not dc . if you have any specific reason please lemme know.
  • navderm
    navderm
    mad_scientist
    Can you recommend any book/online resources for embedded C programming? Although I am not new to programming, I am new to embedded programming. So any help would highly appreciated.
    AVR programming By Dhananjay Gadre.
    its a costly book but good one.
  • Ashraf HZ
    Ashraf HZ
    Welcome to CE navderm! Thanks for your contributions πŸ˜€

    navderm
    Hi
    firstly. please think that you have a lot of time to complete the project. so i would suggest you use better systems for controls. you can learn pic or 8051 but they are not of much use in advanced controls.
    Perhaps... though, it is always better to prototype a simple model to see if the snake would move properly or not. I have a feeling a simple (but still powerful) 8 bit uC is sufficient, and most of the advanced controls in it wont be used anyway. Besides, there are quite a number of high and low end chips from both the PIC and AVR range. I suppose if your seniors have used a certain brand of uC's (whether its Intel, Microchip, Atmel or even Hitachi), might as well stick to them as you'll have easy access to programming tools, both hardware and software, and help.

    and by the way why are you using servo motor? i know stepper wont do the work. why not dc . if you have any specific reason please lemme know.
    I dont think DC motors have the precision to move the snake segments at certain angles (as shown in the video, anyway). The only way you'll make a motor move a certain angle is to time it perfectly, or use continuos feedback sensors. In addition, the stator brushes might quickly wear off due to the frequent oscillations. You can use brushless DC motors for longer life, but they individually need sophisticated controllers. Servos (a subset of DC motors, actually), have the embedded precision, small size, and high torque to move them, so why not? πŸ˜€ Unfortunately, they are a little costly.

    Anyhow, for an easy quick try:
    1 x 8 bit microcontroller with supporting circuit
    1 x Servo controller (with multiple outputs)
    and however many servos you need.

    Add a lithium polymer battery to run the motors, it should be sufficient to run the snake for a while.

    Can you recommend any book/online resources for embedded C programming? Although I am not new to programming, I am new to embedded programming. So any help would highly appreciated.
    Other than the AVR software Navderm has suggested, if you wish to use PIC, the free MPLAB or the great CCS C Compiler (if you can get your hands on it) comes to mind.

    A nice PIC website to check out is:
    Program Microchip PIC micros with C - sample source code, FAQ and more
  • navderm
    navderm
    its like...my uncle said to me once....
    if you know how to write apple you know how to write alphabets.. you learn it automatically.
    personally it so happened that i started with 8051 and got stuck into it for too long. then after long i got to work with AVR and wondered why did i use 8051 ever (despite my seniors warnings agains it). i too had a feeling that i should start small and then work gradually . but seriously our lives are far too small to start and move gradually. for all the moves that we can safely jump ; we should.
    now i work with RTLinux and find its amazingly powerful.
    i think someone who knows AVR(PIC is powerful as well and i must apologize for not mentioning it earlier) its good but then dont get stuck..learn to move on and move fast.

    i seriously dont recommend using 8051. its a waste of time.

    (sorry its not a technical post and would refrain from such things in future).
  • Aashish Joshi
    Aashish Joshi
    The robot I will be building will work on the same principle, but will be a little different in design. The only difference being, that mine has to swim underwater. Thanks for the link.

You are reading an archived discussion.

Related Posts

CEans, CE has just added its 27,000[sup]th[/sup] CEan ! 😁 Rock on! 😁 Let's aim for 30,000 now 😁!
Discuss the announcement: https://www.crazyengineers.com/forum/announcements/10521-27-000-ceans.html in this thread!
hi all..I am a student of 2nd yr. I am working on a project where I need to build a model suspension bridge. The length of the suspension bridge has...
i would like to get some ideas on projects in the field of vlsi or robotics or even wireless for the final year. the project completion must not take long...
i would like to know the circut setup and the software involved to make a mobile work as a remoteπŸ˜’