TigerShark ROV for exploring Puget Sound

What are you working on .... Show off your Rov's Projects here.
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: TigerShark ROV for exploring Puget Sound

Post by KR2_Diving »

TigerShark wrote:Just a quick update. I am having tons of trouble getting my 485 converters to work. I am using the wireless PS2 controller and can't figure out what pins to use for high and low to enable comms. It looks like the 485 examples have pin 13 but the PS2 is set on that right now. I am trying to use Nick Sopwith's programs since they do what I want and I can't get my programs to work but don't know what pins to use.

https://sites.google.com/site/underwate ... m/hardware

Any suggestions on where the pins are set in the program would help!

Thanks!
Hey Tigershark,
It looks like Nick used Bill Porters library for the PS2 controller.

This is the line that sets the pins for the PS2 controller:

Code: Select all

error = ps2x.config_gamepad(13,11,10,12, true, true);   //setup pins and settings:  GamePad(clock, command, attention, data, Pressures?, Rumble?) check for error
 
These pins can be changed to work with your configuration. For example, at one time, I was using all the Analog pins to connect my PS2 controller. (I also use the Bill Porter Library...)

Code: Select all

error = ps2x.config_gamepad(A2,A3,A4,A5, true, false);   // setup pins and settings

 // GamePad(clock (blue), command (orange), attention (yellow), data (brown), Pressures?, Rumble?) check for error
Another key thing to remember is that with the EASYTRANSFER library, you need to make sure your TopSide and Bottom side codes match EXACTLY!

Here is a snip from my TopSide code...

Code: Select all

//--------------------------------------------------------------------------------------------
//                               DEFINE EasyTransfer
//--------------------------------------------------------------------------------------------

// ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET
// ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET

int baudrate = 9600;               //define baudrate for serial coms. Also used with ET library
byte ETloop  = 0;                  //loop counter to recieve data more time then send data
boolean comOK = false;             //verifies communcation established
const byte comOKled  = 2;          //LED to verify Comms OK
const byte comBADled = 8;          //LED to show COMMS error
const int timeout = 1000;          //time in ms to check for timeing out of coms
long lastMessage = 0;              //placeholder for time since last message

EasyTransfer ETin, ETout;          //create two objects 

struct RECEIVE_DATA_STRUCTURE{     //put variable definitions here for the data to send/receive
  //THIS MUST EXACTLY THE SAME AS THE "SEND_DATA_STRUCTURE" ON THE OTHER ARDUINO
  byte ET_h2oSen;
};

struct SEND_DATA_STRUCTURE{        //put variable definitions here for the data to send/receive
  //THIS MUST BE EXACTLY THE SAME AS THE "RECEIVE_DATA_STRUCTURE" ON THE OTHER ARDUINO
  byte ET_brightness;
  byte ET_iluminateState;
  byte ET_FORSTBD;                   //Front Right Thruster ESC Value
  byte ET_FORPORT;                   //Front Left Thruster ESC Value
  byte ET_AFTSTBD;                   //Aft Right Thruster ESC Value
  byte ET_AFTPORT;                   //Aft Left Thruster ESC Value
  byte ET_VERT_LF;                   //Left Vertical Thruster ESC Value
  byte ET_VERT_RT;                   //Right VErtical Thruster ESC Value
  byte ET_VideoCh;                   //Channel for Video Feed

};

//give a name to the group of data
RECEIVE_DATA_STRUCTURE rxdata;
SEND_DATA_STRUCTURE txdata;

// ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET
// ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET
And here is the matching code for my BottomSide code:

Code: Select all

//--------------------------------------------------------------------------------------------
//                               DEFINE EasyTransfer
//--------------------------------------------------------------------------------------------

// ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET
// ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET

int baudrate = 9600;               //define baudrate for serial coms. Also used with ET library
byte ETloop  = 0;                  //loop counter to recieve data more time then send data
boolean comOK = false;             //verifies communcation established
const byte comOKled  = 53; //2;          //LED to verify Comms OK
const byte comBADled = 49; //8;          //LED to show COMMS error
const int timeout = 1000;          //time in ms to check for timeing out of coms
long lastMessage = 0;              //placeholder for time since last message

EasyTransfer ETin, ETout;          //create two objects 

struct RECEIVE_DATA_STRUCTURE{     //put variable definitions here for the data to send/receive
  //THIS MUST EXACTLY THE SAME AS THE "SEND_DATA_STRUCTURE" ON THE OTHER ARDUINO
  byte ET_brightness;
  byte ET_iluminateState;
  byte ET_FORSTBD;                   //Front Right Thruster ESC Value
  byte ET_FORPORT;                   //Front Left Thruster ESC Value
  byte ET_AFTSTBD;                   //Aft Right Thruster ESC Value
  byte ET_AFTPORT;                   //Aft Left Thruster ESC Value
  byte ET_VERT_LF;                   //Left Vertical Thruster ESC Value
  byte ET_VERT_RT;                   //Right VErtical Thruster ESC Value
  byte ET_VideoCh;                   //Channel for Video Feed

};

struct SEND_DATA_STRUCTURE{          //put variable definitions here for the data to send/receive
  //THIS MUST BE EXACTLY THE SAME AS THE "RECEIVE_DATA_STRUCTURE" ON THE OTHER ARDUINO
  byte ET_h2oSen;
};

//give a name to the group of data
RECEIVE_DATA_STRUCTURE rxdata;
SEND_DATA_STRUCTURE txdata;

// ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET
// ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET ET
Note that the SEND_DATA_STRUCTURE on the TOP matched the RECEIVE_DATA_STRUCTURE on the BOTTOM and vis-versa... That is VERY important to getting things working with the EasyTransfer Library...

Hope this helps out a little?

Ryan
"KR2_Diving"
kenl
Posts: 153
Joined: Oct 19th, 2013, 8:50 am
Location: South Western Australia

Re: TigerShark ROV for exploring Puget Sound

Post by kenl »

I have one of Nicks' original bottom side boards that I can check but I'm not sure what your asking? There is a serial select that simply turns off the Rx or Tx (can't remember which) so that you can load a new sketch onto the arduino.

I have attached a few pictures that I got from here or Nicks web site that should show what you need, it's been a long time since I played with it.
Attachments
ROV Ctrl Board.png
ROV Ctrl Board.png (99.85 KiB) Viewed 4689 times
Surface Interface board layout.png
Surface Interface board layout.png (29.51 KiB) Viewed 4689 times
User avatar
TigerShark
Posts: 108
Joined: Jan 7th, 2014, 2:43 pm
Location: Washington State

Re: TigerShark ROV for exploring Puget Sound

Post by TigerShark »

Wow, just the information I needed! Thanks so much. I'll take a look and see if I can get it to work tonight. I am pretty good at mechanical and electrical but when it comes to programming not so good.

I might be working with a local hardware developer soon who could make custom boards as well so if that works out we could have another option. I want to add more capability like OSD, I2C and a few other features but it would be similar and based on Arduino.
User avatar
TigerShark
Posts: 108
Joined: Jan 7th, 2014, 2:43 pm
Location: Washington State

Re: TigerShark ROV for exploring Puget Sound

Post by TigerShark »

Working on it now and I think everything is hooked up right. Can I just use the two A and B connections between the RS422s? I am under the assumption this is half duplex and comms only go one way.
User avatar
KR2_Diving
Posts: 391
Joined: Aug 30th, 2012, 11:43 am
Location: Currently: NW Suburbs of Chicago. Originally: NE Wisconsin

Re: TigerShark ROV for exploring Puget Sound

Post by KR2_Diving »

My understanding is that the MAX488 only works with Full Duplex, there is no way to make it work in "Half duplex" mode... i think..

I put together a thread with my notes on the MAX488 a year or two ago.

You can find it HERE.

Suggest double checking wiring between two boards. I see Nick used A, B, Y, Z to label pins... wouldn't hurt to double check you have the pins wired correctly...
SSN626B
Posts: 194
Joined: Nov 16th, 2013, 2:11 pm
Location: Ft. Lauderdale FL

Re: TigerShark ROV for exploring Puget Sound

Post by SSN626B »

@KR2_Diving,
There are different configurations of the MAX 488 IC.
The ones on the boards that Nick supplied have one each of an independent differential transmitter and receiver.
Therefore the output of the Topside board differential transmitter will go to the input of the ROV board differential receiver.
The output of the ROV board differential transmitter will go to the input of the Topside board differential receiver. This requires two twisted pairs in the Tether cable.
Nick never implemented the ROV board to Topside Board differential channel, though it is in his code.
Regards,
SSN626B/TCIII
User avatar
TigerShark
Posts: 108
Joined: Jan 7th, 2014, 2:43 pm
Location: Washington State

Re: TigerShark ROV for exploring Puget Sound

Post by TigerShark »

I am using the MAX485 modules like this:
http://yourduino.com/sunshop2/index.php ... tail&p=323

I still am working on it but I suspect there might be some differences in the programs. I am hoping to do only one pair on the cat5 for comms.
rossrov
Posts: 383
Joined: Feb 28th, 2013, 5:01 pm
Location: Australia

Re: TigerShark ROV for exploring Puget Sound

Post by rossrov »

Hi TigerShark. I had a look at the truth table on the MAX485 data sheet. Tie the DE and RE pins on each board together. A high on the pins puts the board in transmit mode, and a low puts it in receive mode. If you are only sending down to the ROV then this is of course easy. For bi-directional single-pair use, if whatever library or code you are using supports it, then I am guessing that probably the topside Arduino acts as the master and it sets one of it's pins high to send data, then sets the pin low to listen for anything back up the line. So, if you probe the pins with a scope or LED then perhaps when performing a joystick action you will see the pin go high. If the code can not do bi-directional single-pair, then maybe you can add some code yourself to implement the described functionality. Hope that helps :)
User avatar
TigerShark
Posts: 108
Joined: Jan 7th, 2014, 2:43 pm
Location: Washington State

Re: TigerShark ROV for exploring Puget Sound

Post by TigerShark »

Just an update. Turns out I was having multiple issues (comms with PS2 controller, 485s etc.) I had help last weekend and my programmer/ electronics expert friend figured out the issues and we are closer to having it work. Likely we will create another Arduino based board with 485 comms similar in capability to Nick's.

We also were able to thread Kevlar string through 6mm polyurethane tubing to pull 3 pairs of cat 5 through to make a tether. We will be testing a shorter one to determine buoyancy etc. and then doing the final 100m tether for my ROV. He will use a larger diameter tubing so 4 pairs can be used. I'll post more details soon.
User avatar
TigerShark
Posts: 108
Joined: Jan 7th, 2014, 2:43 pm
Location: Washington State

Re: TigerShark ROV for exploring Puget Sound

Post by TigerShark »

Big Update! I have the control system working finally and did a tank test. Details are on our local electronics group webpage:
http://kitsapcreate.org/wp/?page_id=313

I have some adjustments to make to the control system so it matches the scheme I want. I lost one of my batteries due to a bad cell but running on one with general driving around it the tank I got over an hour of run time. I was also surprised at the range of the wireless PS2 controller which worked great. Tons of power with the brushless thrusters running cut down Graupner 3 blade props. I'll post a YouTube video once I get one uploaded in addition to the one above.
Post Reply