Home        Store        Docs        Blog

One-wire ROV control


(Richard) #1

The Arduino pulseIn(pin, HIGH) object waits for the pin to go HIGH then starts measuring pulse width until the pin goes low. Seems to me this could be used to set up a simple one-wire, one-way communication between the control box and the ROV.

On the transmit end send a synchronizing pulse width value using <servo.h> then follow with motor control pulses in sequence (left, right, vertical). Put in a little delay after each pulse out. On the receiving end receive the sync pulse then receive the motor control pulses and send to the to the appropriate ESC.

Transmit end:

syncPulse.writeMicroseconds(3000);
delay(5);
rightMotor.writeMicroseconds(xVal);
delay(5);
leftMotor.writeMicroseconds(yVal);
delay(5);
vertMotor.writeMicroseconds(zVal);
delay(5);

Receive end:

if(pulseIn(commInPin,HIGH) > 2500){
rightMotor.writeMicroseconds(pulseIn(rightPin,HIGH));
leftMotor.writeMicroseconds(pulseIn(leftPin,HIGH));
vertMotor.writeMicroseconds(pulseIn(vertPin,HIGH));
}

Do you think it will work?

 


(Rusty) #2

Hi Richard,

You could definitely do this and it would result in a very minimal tether. There are some standard one-wire communication methods and Arduino libraries to use them, so you might be able to send more sophisticated messages using one of those.

-Rusty


(Richard) #3

Thanks Rusty.