Can I do this with two Arduino Board?

Hello,

Newbie here. I have lots of experience with computers and RC equipment. Now I am trying to use the best of both worlds. I am interested in the feasibility of the following:

I would like to create an underwater remotely operated vehicle (ROV). I cannot use standard RC equipment because the signal does not travel through the water very well (~30 feet max). So the first requirement is being able to talk between two boards over a tether of some kind (any suggestions?). I have read, but want to confirm that this can talk over a serial line (only two wires?). How much distance can I expect from the serial line (50', 100', 1000'...)? Can this be done with two standard boards without buying additional components?

Some newbie questions that I think I know the answer to, but want to be certain: 1.) The board, once programmed, does not need to be plugged into the computer right? 2.) Does it store the code in the event of a power loss/disconnect?

I plan to start small, but in the end I need to program up a joystick and other controls on the user end. I have a really nice old joystick that is perfect for an ROV, but uses an outdated 15 pin serial connector, so the first thing I plan on doing is rewiring it to the Arduino. In parallel I would be wiring/programming the ROV to its own board. Final step would be to get the Joystick board to control the ROV end without the computer in between.

So if you have stayed with me thus far, does anything should like it cannot be done with just two boards? Is there something that should need to be added? Any comments or general suggestions would be appreciated. I would hate to hit a major roadblock because of a limitation in the board that I was not aware of. Thanks and I'm sure I'll have more questions.

I can't see why any of the things you've mentioned wouldn't work. However, why do you think you need the serial connection specifically? If you just want to connect it to a joystick, you could probably get away with just using the one board in the ROV. Run the few wires needed from the joystick down to the board on the ROV. I don't know how far a serial connection can reach, but I would assume that a higher baud rate would be less likely to work on a longer wire.

In regards to your other questions: No the board doesn't need to be connected to a computer. No the micro-controller will not lose its program when disconnected from power.

Have you considered how you are going to power the board on the ROV? Batteries? By wire? Both?

So the first requirement is being able to talk between two boards over a tether of some kind (any suggestions?)

I would suggest an RS485 tether link:

According to the above link, distances of 4000 feet are achievable.

You will need additional components, namely RS485 transceivers.

1.) The board, once programmed, does not need to be plugged into the computer right? 2.) Does it store the code in the event of a power loss/disconnect?

Correct and correct. The code is stored in non-volatile FLASH memory.

Now, the board doesn’t need to be plugged into a computer, but it still needs power…that’s what you meant, right?

Apart from RS485 transceivers I think you’ve got what you need.


Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

Thanks for the fast responses.

P_Wood: I am planning on using two boards because I'm not sure if the joystick inputs would make it to the ROV through the tether. That would also require having many (~15) individual wires running down the tether, something I'm trying to avoid. Lastly, if there is only one connection between the user and ROV, that should make troubleshooting easier.

12 volts for the thruster motors is required. This will come from either onboard or more likely a dedicated 14+/- AWG positive and negative lead in the tether. A DC-DC converter will drop the voltage as necessary within the ROV.

RuggedCircuits: Thanks for the suggestion of using RS485 transceivers. 4000 feet is excellent. I was hoping for 500 feet, not that I'll use even 500 feet.

I've read up on this a bit from your link and other searches. If you (or anyone) has more info on implementing this I would appreciate it. I am a complete novice on this. How does the transceiver work? Do I just connect one at each end (where and how?), what cable can I use? Cat5 or another cheap and common wire would be ideal.

I know that I would need a "Full Duplex Operation" as I have a compass on the ROV that needs to send info back up the line. Isolated grounds would be nice. I would like to separate the ROV as much as possible from the user end.

Thanks for the help thus far. I would like to make one online order. Right now I have the two Duemilanove boards to buy. Info on the Transievers would be helpful.

I found this:

http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1007,C1017,P1746#packagingSection

Is this what I am looking for? The price is right. Is there something else I need too? Sorry for all the questions at once.

What's your budget? Let's start with an industrial serial-to-RS485 converter and see if you freak out at the price :)

http://www.bb-elec.com/Subcategory.asp?SubCategoryId=10&Trail=2&TrailType=Top

BTW, these guys also have a lot of good info on RS485 that can answer your other questions too.

-- Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

Full duplex with RS-485 will need 4 wires, is that OK? You said 2 at the top of the thread. If not you'll have to come up with a half-duplex protocol.

Just re read and noticed this

but uses an outdated 15 pin serial connector,

It probably doesn't use all 15 pins though, that was just a normal connector to use back in the day.

You really need to do a board search for "ROV". There have been extensive previous discussions on the subject. You should find links to a guy's site where he shows several ROVs he built using PVC pipe and such. You mention you plan to advance to using an old joystick. This indicates you don't have much of a budget to work with. Instead of starting to buy stuff, start out with the equipment you have and do some testing and experimenting. You can do significant amounts of "proof of concept" testing prior to spending a lot of $$$. People in the forum love to "hanger fly" on subjects like ROVs, and some times get a little overdone on the subject. The electronics is pretty strait foward, dealing with the hydrostatic pressure issues can present some interesting challanges.

LokiChloe, listen to zoomkat. You're wanting to go beyond 30 feet in depth and distance, when 10 feet (swimming pool) will be a challenge like you wouldn't believe. You're on the right track with a tether; you need to do a lot more research on homemade ROVs, though. Here's some help:

The book that seemed to "start it all" with homebrew underwater ROVs - well worth it; buy a copy:

http://www.westcoastwords.com/books_USD/details.php?book_ID=101

Inspired by the above book - worth looking at:

http://seaperch.mit.edu/

Great place for ideas:

http://aquaticus.info/

This guy's site is -by far- one of the best out there for this kind of stuff; check out his ideas on tethers (and management of tethers!), communications, power supply, cameras, lights, direction finding, propulsion, etc:

http://www.homebuiltrovs.com/

There are many people out there who have built homemade ROVs, for personal use, as students, and for various contests (mainly educational based); you would do best to study how these people designed and built their ROVs, what their difficulties were, and how they worked around them. The book I mentioned above is really a great book to learn the basics from, but it was designed to be -very- basic; it doesn't go into concepts like on-board microcontrollers, on-board batteries and motor control, or minimal tether communication protocols and hardware.

What you are planning on doing is possible, but will require a lot of thought and more than a minimum of testing and experimentation. There is no one "right" answer, but there have been lessons learned (ie - using Rule bilge pumps for thrusters - modified or unmodified, they tend to be good down to about 30 feet). Good luck, and have fun!

:)

Graynomad: 4 wires is okay. I just do not want to have more than 10 total. It makes the tether too stiff. I already have a video and positive and negative 12 volt.

RuggedCircuits: I must say, when you said freak out I was expecting in the $500+ range each for over $1000 total. So in the $100 range I was pleasantly surprised. Other non-Arduino methods were in excess of $150 and they did not do what I wanted them to do. That said, the lower cost the better. I think I am understanding what I need now though. How many wires would the Arduino to converter for tx and rx? 2 for transmitting and 2 for receiving right?

zoomkat & cr0sh: I have searched all over the Internet, but will look harder here for specifics using the Arduino now that I know I'm not off in left field. I actually have been to and read extensively through 2 of the 3 site. The problem I have encountered was that I need (okay need is a bit strong) to have an analog connection to the ROV, not the typical on/off found on nearly all ROVs. Most ROVs use a much simpler wiring because of this. The Arduino based ROVs that I know of use a USB extension cable. I am trying to avoid this because (1) it has a short range, (2) it requires a computer and (3) I have to have another Arduino for the user end anyways for the joystick.

The joystick is actually a top of the line model from the late 90's or early 2000's when I was in to flight simulators. It has a 3-way analog stick (forward/back, left/right, spin right/left) and another analog control slider that is used for throttle on an aircraft (my vertical thruster). It then has an additional 5 switches and an up/down/left/right pad on the stick, with two more switches on the base. I chose this because I honestly could not buy a better stick today. I just need to rewire the thing as I cannot find a 15 pin serial adapter anywhere for any price, and even if I did I would probably have software issues (linux) and it would require the computer I do not want to require for use.

My budget is in the $500 range, but it is not very firm as it will be spread over months or years of experimenting. I do plan to start small, but I hate buying something and then re-buying something else later because it cannot do what I want it to. Thanks again for all your help.

RuggedCircuits: I must say, when you said freak out I was expecting in the $500+ range each for over $1000 total. So in the $100 range I was pleasantly surprised. Other non-Arduino methods were in excess of $150 and they did not do what I wanted them to do. That said, the lower cost the better. I think I am understanding what I need now though. How many wires would the Arduino to converter for tx and rx? 2 for transmitting and 2 for receiving right?

If you don't mind wiring up a DB-9 connector then this $89 job will do it:

http://www.bb-elec.com/bb-elec/literature/485OI9TB-1610ds.pdf

You will need 3 wires from the Arduino: Rx, Tx, and GND. On the RS485 side you will need 4 wires for half-duplex communication (two balanced data, one power, one isolated ground).

-- Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

Well, just as a reality check, it has been suggested to you to spend 20% of your budget on a RS-485 setup that you don’t need at this point in your project. If you hit a snag early on in your project, you will end up having spent $$$ on equipment that you will probably give away or junk. I suggest you build a gizmo that will successfully operate at the bottom of a pool that is 10’ deep. If you are successful at 10’, then you can get prepared to find funding to go to a depth of 100’. A key point should be to identify the most difficult problem to solve in your project and solve it first, then work on the easier aspects.

RuggedCircuits: Thanks for the response. This was very productive. I think I have figured it all out, but your last comment may be a bit off or I am not understanding something.

I am looking to do eventually do a full-duplex. So assuming full-duplex, from the perspective of the user side, there would a +/- transmit wire, +/- receive wire. Then an isolated ground seems necessary on top of this. Buy why the dedicated positive power? I don't see that in the pdf. I know the ROV converter needs power, but does it need to be over the tether? Can I just use power from the main power lead or on board power if I use that? This is minor, but I just want to make sure I understand as much as I can.

Thanks again, I now have the entire ROV planned out with hardware that will not be restricting long-term. Now comes the fun "well that did not work like I planned it part".

Also, I can't find the "reply to this post" button for quoting text. Am I missing something?

So assuming full-duplex, from the perspective of the user side, there would a +/- transmit wire, +/- receive wire. Then an isolated ground seems necessary on top of this. Buy why the dedicated positive power?

For an isolated converter, power needs to come FROM the ROV to operate the RS485 side of the converter. If you look at the datasheet I referenced for the $89 converter, the “2-Wire RS-485” diagram shows how to hook up the ROV side of things (and the power). I did not mean to imply you were going to transfer power across the isolation barrier.

The “RS-422/4-Wire RS-485” shows how to hook up the 6-wire ROV side of things.

Also, looking at the same datasheet I realize you’ll need an extra wire from the Arduino to supply power to the RS232 side of things (connect to DTR or RTS pin according to the “RS-232” diagram).

To quote text use the 8th icon from the right (looks like a piece of paper icon with an arrow going right) or type “[q uote]stuff[/q uote]” but without the space after the q in the word quote.


Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

Thank you RuggedCircuits, very helpful. We are both on the same page now. I just assumed you meant something you did not. The links were very helpful. I read through the pdf before, and now again, and the connection almost too easy, but we'll see what happens in practice. I'll consider this part of the project planned out for now.

The bonus of all this is that it leaves a 3 extra wires if using cat5, of which I'll probably use two for video if possible.