Introduction: Make a Swimming Robo-Snake

Picture of Make a Swimming Robo-Snake
Sneel is the name of my snake / eel swimming robot. This is documentation of hardware, software and mechanical design of  Sneel_003.  

urethane flex tubing, microcontrollers, Zigbee wireless radio, hose clamps, wires, servo motors, titanium servo brackets, silicon, marine grease, epoxy, pond pump

Sneel is a swimming robotic water-snake, constructed to explore lifelike, sinuous motion in an aquatic robot. It is designed to navigate unknown territory and extreme terrain.

Sneel is inspired by Protei, (protei.org), an international project for the design of a fleet of open source, robotic, unmanned sailboats. Sneel is a development of Protei_007.

Sneel_003 swimming in San Francisco, California, Spreckles Lake, Golden Gate Park:



Sneel is an open-source, biomimetic, locomotive, aquatic robot. The electromechanical design of Sneel mimics the structure and motion of a real water snake, as a test to explore swimming behavior in an undulating linear robot. The inspiration for Sneel originates from a fascination with reptilian forms of motility and the implications of modelling hardware from biological structures and functions. Sneel uses a custom-written software library to propagate an oscillating wave down a line of servo motors that comprise the robot’s body. The current model is a platform for the development of other low-cost snake drones, with semi-autonomous navigational control for waypoint following, and sensing capabilities for obstacle avoidance. Worldwide applications for Sneel include remote marine data collection of salinity / toxicity levels, nuclear level monitoring, pipeline or underwater exploration, fishery monitoring, and oil-collection.

Sneel version 2 swimming like a real snake:


Sneel version 2, first swim in central park:



 

Step 1: Bill of Materials

Picture of Bill of Materials

Mechanical hardware:
5x Lynxmotion servo brackets
5x Lynxmotion C-brackets
5x injection molded servo hinge
urethane dust collection tube, 5' x 2.5"
convoluted hose clamp
5/16" tubing
5/16" hose clamp
2x shop vac 2.5 to 1.25" vacuum reducer
5x servo bracketshttp://www.seeedstudio.com/depot/bracket-for-rb421-servo-p-939.html?cPath=0
urethane sealant
marine grease
marine epoxy sealant
o rings
carbon fiber 3x (1/32", 1"x12" strips)
rubber about 1/8" thick, 2"x10" at least, like this neoprene works well
loctite (green)
nylon string as a tether
optional: 
inner tube or valve for positive pressurizing with a bike pump
silica gel packs


electronics:
10 Servo motors (I recommend these Hitec ones with Karbonite gears but these are a bit pricy. Whatever you get, the nylon gears will ear out quickly so I warn against them)
3 6V NiMh battery packs
Arduino UNO
1 seeeduino mega
Xbee explorer
2x xbee series 1
xbee wireless shield
servo motor shield

servo extension wire
xbee breakout + 2 rows of 10 male header pins + 2 rows of xbee 2mm female headers


supplies:
wires
needlenose pliers
angle snips
wire strippers
small screwdriver
4-40 screws, lock or toothed nuts, and bolts
2-56 screws, lock or toothed nuts, and bolts
solder iron + solder
hack saw
drill or drill press
3 mm drill bit
optional: 
dremel

Step 2: Waterproof the Servo Motors

Picture of Waterproof the Servo Motors

See this instructables I made about waterproofing servo motors. 

But briefly:
-apply silicon marine sealant around the two seams in the plasitc of the servos, around the spot where the wires are inserted, and  where the screws are mounted on the bottom. 
-Let the motors dry for 24 hours...

-Unscrew the servo horn (the round plastic top of the servo motor).
-Apply petroleum or marine grease around the toothed shaft, and slip an o-ring around the shaft. 
-Put back on the round servo horn. Make sure it is centered (turn it one direction and make sure that it rotates about 90 degrees from center one direction and 90 degrees the other direction).
-Screw back on the circular plastic servo horn.

Step 3: Prepare the Frame: Cut the Carbon Fiber

Picture of Prepare the Frame: Cut the Carbon Fiber

-With a hacksaw, cut the carbon fiber into 4 inch pieces (each 12" x1" strip should be cut in 3 parts). I used a dremel to round the jaggedy corners. 

-Lay out one of each servo bracket 3 inches apart. Mark on the carbon fiber where the two large holes in the brackets line up, so you can drill here to screw them into the carbon fiber. 

-Drill the 4 holes in each piece of the carbon fiber using a 3 mm drill bit, or around that size. 

-Do this with 7x 4" pieces.

Step 4: Prepare the Frame: Attach the Brackets to the Carbon Fiber

Picture of Prepare the Frame: Attach the Brackets to the Carbon Fiber

-Using the fat screws that came with both brackets, line up the holes you cut with the holes in the brackets.

-Screw in the screws to attach the carbon to the brackets. Make sure you screw with the bolt on the backside of the brackets as shown in the photo.  

Step 5: Prepare the Frame: Attach the C-brackets

Picture of Prepare the Frame: Attach the C-brackets

-Line up the rubber with the c-bracket middle section (see image) and cut 5 pieces. They will be about 1" x 2"

-Line up the cut piece of rubber with one of the c-brackets, and draw a dot on the rubber where two of the holes line up.

-Use a pin to poke a hole in the rubber at the two hole-marks.

-Insert the 2-56 screws from the black clamp, through the rubber (pop it or screw it through), then through the red bracket. 

-Do this for every black/red bracket pair.

NOTE: from the image, I did things in a slightly different order than described above - you can see my servo is already attached to the servo bracket. This made it significantly more difficult to screw in the two screws here. Also, I ended up getting 1/2 inch screws but at first I was using 1 inch screws and had to grind or cut off the excess. 

Step 6: Prepare the Frame: Mount the Servos on the Brackets

Picture of Prepare the Frame: Mount the Servos on the Brackets

-In the package with the servos, there are a few parts. Grab the small rectangle cube. 

-Insert this into all four of the holes on the servo motor. Note that the rubber has a flat side. This side should be facing outwards.

-on 5 of the servos, adhere the injection molded joint (unless you have c-brackets with bearings in the bottom)

-Place the servo in the bracket as shown - the servos with the injected molded joint go on the black servo bracket.

-Screw in the 4x40 screws. Place a lock nut on the bottom and screw in the bolt. 

Step 7: Prepare the Frame: Mount the C-bracket Pairs to the Servo Brackets

Picture of Prepare the Frame: Mount the C-bracket Pairs to the Servo Brackets

-Mount the red servo-brackets to the red c-brackets, and the black to the black:
RED: 
Slip the c bracket over the servo horn and under the servo bracket, as shown in the photo. Use the screw and bearing to secure it in place. 
BLACK: 
Slip the c bracket over the servo covering most of its body. Slip it over the servo horn and under the servo bracket. Make sure that the top side on the servo horn is the side with one large hole and four small holes. The injected molded segment on the bottom should pop into place in the small hole. 

Now you should have a full length snake like structure.



Step 8: Screw in the Servo Horn to the Bracket

Picture of Screw in the Servo Horn to the Bracket

-line the holes up with the brackets and the servo horn.

-Make sure that your horn is centered (you can spin it in one direction and the other direction, then bring it about halfway back turned, to the center position, so if you put your bracket on aligned straight with the servo it will be calibrated to center position.

-use a small screwdriver to screw the bracket and the round plastic servo horn together. I like to pinch them together with pliers to make sure holes line up.

The brackets and servos should rotate freely. You should apply some grease between the two metal brackets if there is friction.
You can also apply loctite to some of the screws so that they dont come out. Make sure not to do this before you are certain you are finished, because it is very hard to undo the screw once you've applied loctite. Also, the green loctite is a little less permanent.

At this point, your snake body is ready!

Step 9: Make the Circuit

Picture of Make the Circuit

-Prepare the xbee breakout board (solder on the 2 rows of male headers and 2 rows of 2mm xbee female headers)

-Insert the xbee onto it.

-I'm using a servo motor shield from seeed studios, but I am sort of just using it as a perf board, but a convenient one because all the ground and power pins to my servo motor are already jumped together, with a screw terminal for the battery input. And ignore those wires hanging off the board - I had prefiously soldered on female header pins for another use of the board, so I removed them so I could use this here. I eventually clipped them off but you can see them in the pics.

-So if you have the servo shield, solder on the screw terminal; two rows of headers  where the 6V and GND from the battery are connected. Solder on male headers so it will mount in your seeeduino (or arduino) mega. I'm using the seeeduino again because i had it around, and because it is smaller so it fits better into the skin tube  (the protective outer layer).
Note: an arduino mega is necessary not because of the numbers of outputs but because the flash memory space in the arduino UNO is not large enough. 

-jump xbee pin 1 (3.3Vin) to Arduino 3.3V pin (see red wire)
-jump xbee tx (pin 2) to Arduino RX (pin1) (see yellow wire)
-jump xbee ground (pin 10) to arduino gnd (see black wire)
-jump power from the 6V battery input to the Arduino VIN pin (green wire)

-Solder on wires from all the digital output pins (as many servos as you are using). 
-place on the servo connectors (Red, black, white here) and insert the dOUT wires from arduino into the servo cables (white signal wire).
NOTE: if Arduino is to be housed in the frotnt of the snake, connect the pins low to high from arduino to the servos that are most close to the head to far away) . in other words: the first servo (as in when the snake is moving ahead, the servo at the HEAD) should be digital pin 2, and the tail end servo shoudl be digital pin 11. 

-Screw in wires to the screw terminals to attach to 6V and GROUND from your batteries. 

-I clipped the extra metal off (you shouldn't have to do this if you are starting from a clean board, not one with female header pins soldered in)

Step 10: Upload the Firmware

Picture of Upload the Firmware

I wrote a software library to easily generate wave locomotion based on oscillation. It calls on the Servo Arduino library to generate a sine wave propagating down the line of servos. It allows for modularity to change the sensory input, wave parameters, and number of servos. 

Download the code here. Upload it to Arduino, without the xbee plugged in (when the xbee is plugged in, the tx and rx pins (pins 1 and 0) on arduino mega are usedreferences a class that propagates a sine wave down a line of motors.

During each loop cycle: 
-The main program, references a class that propagates a sine wave down a line of motors.
-listens to a wireless RC protocol communicating to the snake via the joystick


Step 11: Make a Remote Control Transmitter, or Just Use Xbee & Computer

Picture of Make a Remote Control Transmitter, or Just Use Xbee & Computer
For this version of the snake, various character inputs (numbers 1-6) affect the wave behavior. 

OPTION 1: xbee+computer (see this instructable for more info)
-Plug in xbee to the xbee explorer. 
-Plug xbee explorer into your computer via the USB cable.
-Download and open CoolTerm.
-Click "OPTIONS".
-Make sure the BAUD RATE is set to 57600.
-Make sure that after "PORT:" it says something like "usbserial-A700xxx". If not, select "RESCAN SERIAL PORTS".
-Click OK. 
-Click "CONNECT"
-Make sure your xbee is set to 57600 baud rate:
   Type "+++" (you might not see anything written in the serial port unless you have checked "LOCAL ECHO" in the TERMINAL tab of the OPTIONS.)
   You should get "OK" returned in the serial monitor of CoolTerm. If you are not, perhaps xbee is not set to that baud rate. to debug, go back to OPTIONS and select "baud rate 9600" and try again.
   Now you have entered xbee's "command mode".
   Type "ATBD" then ENTER.(and don't wait too long or you will exit command mode).
   You should get an integer returned, corresponding to the baud rate xbee is set at. To make sure it is set to 57600, type "ATBD 6" then ENTER.
   You should get "OK" returned. 
   Now type "ATWR". 

Now, when you type the characters 1-6 in the serial monitor, when the snake is turned on, the characters should affect the motion. 

5&6: affect the speed of the rotation of the servos. 
3&4: affect the period of the wave (speed of propagation down the line of servos).
1&2: affect the amplitude of the wave.

Visualize in software how the wave behavior is affected by the various parameters, or typing in integers 1-6..


The attached graphs show the output angle values of each servo mapped over time, slightly out of phase from each other. The difference is when there is a different offset (delay in the time it takes one servo to get to the angle of the previous one in the line of waves).

If you don't want to use your computer, and want to have a free standing remote control, feel free to make an arduino based r/c. To do this, plug in the xbee to an xbee shield mounted on Arduino (see image). Make a 6 button inputs. I hacked into a joystick that had 2 extra buttons. Connect the 6 buttons to Arduino digital pins 2-7. 

Upload the following code to arduino. 
And now affect the snake behavior the same way as through coolTerm.

Step 12: Wire It Up

Picture of Wire It Up

So far: Arduino is soldered, wired and programmed; and the snake body built.

Now it's time to wire it all up:
Using your servo motor wire extenders, elongate all the servo wires so that they extend down the length of the body, up until a few inches past the last servo bracket. 

It was helpful for me to keep track of which wire was from which servo, so that when I plugged them into the perf board it was easy to plug them in in order consecutively. 

I string the wire down around the back of the carbon fiber, and tape them to the carbon fiber so that when I eventually put the vacuum skin on, it doesn't pull the wires too much. I also put tape on the junction at each wire connection just for safety.  


Step 13: Attach the Batteries

Picture of Attach the Batteries

At each carbon fiber segment, attach the batteries with the 6V/GND wires pointing towards upwards (towards the top of the servos) and towards the front of the snake.

Use two zipties to secure on the batteries to the carbon fiber. 

I used a dremmel to sand the corners of the zipties after cutting them, if they feel sharp. 

I attached four battery packs in total. I also used the servo wire extensions to extend the battery power and ground to the front of the snake, at the head, where Arduino is housed. I also made a y-link from each battery junction so they all come together at the Arduino screw terminal power and ground servo motor input.  

Before finishing the battery connections, make sure to add an on/off button: see the next step.

Step 14: Add the on / Off Buttons, and Prepare the Head and Tail Caps

Picture of Add the on / Off Buttons, and Prepare the Head and Tail Caps

I'm using one button for the water pump (12V battery) and one for the arduino / servos (6V battery). The water pump cannot be turned on unless the snake is in the water or the pump will dry up. So I turn on the snake first then turn on the pump. See the next step for attaching the water pump.

Cut two a piece of rubber about 1.75" diameter, so that it fits inside of the vacuum reducers. Cut two pieces of cord about 2 feet long, to act as tethers and to help position the body inside of the skin. 

FOR THE HEAD (near the Arduino):
Place the rubber into the vacuum reducer, and cut a small slit, large enough to pass the wires. Run the string through the vacuum reducer so that there is about 8 inches of string on the inside. There doesn't need to be too much on the outside because the tether will be located at the tail.
Run both buttons up through the vacuum reducer. Run the wire (containing power and ground) from the waterpump down through the hole in the vacuum reducer. So in total, the following wires should run through the vacuum reducer and the rubber pad : power and ground from both switches; one string; power and ground from pump.

FOR THE TAIL :
Just string the other piece of string through. Leave about 10 inches of string on the inside, and a little more on the outside. This string acts solely as a tether. You can eventually lengthen it by attaching another string to it so that you can have a longer tether. 

Now, solder the on / off button to the red 6V wire that attaches to the screw terminal, so that when you power this on, the arduino turns on and the servos get power. This button is the master on/off button.



Step 15: Prepare the Pump Battery and Elongate the Body

Picture of Prepare the Pump Battery and Elongate the Body
-Add two 4" pieces of carbon fiber to either end of the snake, so that the head and tail extend outward a few inches.

-Solder together a battery junction for the battery to connect directly to the pond pump, but solder the other on/off switch to the red wire between the battery and the pump. The battery sits right next to the Arduino.

-Attach the battery to the carbon fiber with zipties. 

Now you should have something that moves like this when the batteries are plugged in:





Step 16: Caulk the Caps

Picture of Caulk the Caps

Apply a lot of caulk to both the inside of the vacuum reducer, in the seam where the rubber is, and on the opposite side, deep in the hole. Make sure to cover all of the wires. 

Let it dry about 24 hours.


Step 17: Put on the Skin

Picture of Put on the Skin

-I added some silica gel packets just to make sure that moisture was absorbed.   

-I hot glued the Arduino just to make sure that no wires pull out. 

-If any of the servo joints are stiff or the metal is rubbing, I add some grease between the rubbing sections.

-Then slip on the skin, going from the side of Arduino down to the other side of the tail.

-Cut the tube to length, if it is too long.

-Once it is all the way on, I use the string on both sides to hoist the carbon fiber all the way into to the end of the vacuum tube. I tie a knot here to prevent slipping.  

-Put the caps on the head and tail end. Applying some marine grease can help seal it. 

Step 18: Put on the Water Pump

Picture of Put on the Water Pump

-cut length of plastic 5/16" tube to the length of the snake. Slip it over the OUTPUT nozzle on the pump (the more narrow nozzle is the output). I like to briefly blast the junction with a heatgun once I slip on the tube to make the connection nice and snug. Secure a hose-clamp around the tube at the joint.

optional: attach another hose of 7/16" to the input valve 

-Mount the pump somewhere near the front of the snake, on the bottom side (the opposite side of the servo horns). The plastic plate that comes with the pump mounts on the pump, and has a spot with two ridges on either side. I used a ziptie to wrap in a cross around the snake body to secure it.

-I also mounted the goPro but this is optional too.




Step 19: Take It Outside!

Picture of Take It Outside!

Take him outside. 

-Apply grease to the outside of the plastic buttons so no water gets in. 

-I screwed on the hose clamps onto the head and tail ends, but I am not sure this is necessary, it was just to be extra safe.  

Turn it on. 
Put it in the water. Perhaps you have to adjust the wave motion with your remote control.
Once in the water, you can turn the pump on with the other switch. 
Watch him swim and use the r/c to control his motion. 

Comments

01718459186 (author)2017-02-08

Awesome innovation keep going

Command-A (author)2015-05-23

I don't care how creepy your robot it, I love it!

mark.diaz.58118 (author)2015-04-21

holy crap! amazing!!!!

tanyaryanns (author)2015-04-14

great post!

jamesbrosuk (author)2015-02-09

I'd like to see this with a camouflaged skin and head

aerotechnic (author)2013-12-20

hmmm creepy looks like a hydrobot from Terminator http://terminator.wikia.com/wiki/Hydrobot this is how it begins people!

rjverm (author)2013-12-19

for any mobile robot power conservation is essential. if i were going to build a a water mobile robot i would probably use a water pump or a propeller type motor. and put it in a pvc pipe.

sparten11 (author)2012-08-17

all you need now is the ability to dive... perhaps if you use gravity to cause the swimming motion my diving and surfacing you could also add longevity to the swim time.

just a thought good job keep up the good work.

Ciege666 (author)sparten112013-07-06

A ballast system of some sort... Maybe a remotely controlled intake connected to a tube that you can remotely open the front, and the rear port of the tube is an outlet only valve. Open the intake to let in water and make the device heavier so that it descends.

Use an electrical current to evaporate the water in it to "add" ballast. Something to test in a pool to see battery drain, I'm not sure how long batteries would hold up to it. Sounds like a decent theory to me.

PS. I mentioned a tube because i think flooding the device would be entirely too risky for the amount of money that would go into it.

benip90 (author)Ciege6662013-08-20

I think if you added a tank (or multiple outlet tubes) to the pump, then another pump to empty that tank/tubes you could use the first to take on water and sink and the other to empty the tank or both as forward propulsion but all of this would greatly reduce the longevity but for some applications like marine life monitoring that would probably be acceptable.
using tubes means this could still be placed on the outside in a streamlined manour
But other than that protei and your sneel is awsome keep them coming

tkovar13 (author)2013-05-13

they stopped making the red brackets for anyone know if this is a good alternative? http://www.engagerc.com/servlet/the-2619/2-dsh-DOF-pan-and-tilt/Detail

avan diepen (author)2013-03-06

electronics are around 400$

roopan raj (author)2013-01-02

tell me the overall price....

andrea biffi (author)2012-12-12

wow, that's great!!

alij28 (author)2012-08-19

is it possible to make it go under the water?

akbar8 (author)2012-08-18

افرین خیلی عالیه بود

-chase- (author)2012-08-18

That's pretty cool!

My immediate thought of wondering  is if I make a dozen or so of these,add a tail fin and harness them all up - would they pull my raft around the lake like a Medusa hair driven water sled....hmmm,  have to ponder that some more..

MakingWorld (author)2012-08-18

It feast my eyes.How do you prevent the ingress of water?

Kavian Darkain (author)2012-08-16

....Not to mention the militaristic applications for this "Robo Snake".

JayGeeBSE (author)2012-08-16

If you want to detect people falling in pools then an alarm detecting waves might be a lot simpler and more effective. Love the snake as a toy though, with possible applications where a propellor might get caught in weed.

cheddar.alan (author)2012-08-16

Wonderful device, but please explain the pump. Why? When?

Quester55 (author)2012-08-16

Just one more Idea that works for me, Try to find some DIP IT , A Liquid Plastic that Air Drys for a Tight, Water proof Covering, That can be Removed Cleanly when needed. Also, Liquid Tape for those Mother boards and connectors. When done you'll save yourself about 4 to 12 OZ, on overall weight.
That's all, Like I said before, Your's is a great snake, Keep on Learning!
P/S, Remember this; " Good, Better, Best, Never let them rest, until your Good is Better & your Better is Best !

Quester55 (author)2012-08-16

F.Y.I., Sea Grease is fine, on Big Boats, But not small models, Try Mixing the best of two worlds by Combining 1/4 cup Sea Grease and 2 Liquid Oz. of Slick 50 Motor oil, Put in a mini blender, set to combine and walk away for about 5 min. when time is up, it will be warm, cool it down to room temp and apply to all joints that move.
I did this on some of my Boats and Subs and got around an 8% better RPM on my engines. It wasn't bothered by the Water temp at all.

Quester55 (author)2012-08-16

Have you considered adding Solar cells and wireless color mini cameras to the snake? Allowing power to be provided from the solar cells. the same for Neon Wire, for those night time bits of fun. Another power type could be" 3V. Lithium battery's ", Stacked in groups of 4, and Charged by Solar Cells, When resting.
Very cool snake.

Kinnishian (author)2012-08-16

Yes!!!


This awesome.

jackjackboom (author)2012-08-15

how much did it cost you?

rimar2000 (author)2012-08-15

Nice beast!

amandaghassaei (author)2012-08-15

this looks great! I'd love to see it in action!

lafnbear (author)2012-08-15

OK, watch for a sudden up-tick in Loch Ness monster-like sightings!

DIY-Guy (author)lafnbear2012-08-15

Congrats on publishing a conceptual foundation for future inventors!
Swimming snakebots could be useful as unattended pool monitors, alerting adults if a child falls in. Every second counts in a rescue.

Imagine the lifesaving applications of this kind of monitoring bot.
Residential swimming pools.
Clubhouse pools.
City recreation center pools.
Lake and pond swimming areas.
Boat dock areas.

cesar harada (author)2012-08-15

SOOOO AWWWESOME !!!!

About This Instructable

134,785views

378favorites

License:

More by gabriellalevine:two ways to reset arduino in softwareDJI Groundstation instructions for flying an octocopter on autopilotinterfacing u.fl connectors
Add instructable to: