Hi Rusty - I know you have the three motor arduino control, but I wondered if the four motor code was ever uploaded? or is it still just three? I have middle schoolers (only just learning basic arduino, so zero programming chops) building a MATE competition ROV, who are hoping to have one vertical thruster, two horizontal thrusters and one lateral. We have four T100s with built in ESC. We know about this code:
but wondered if there was a four motor option? If not, I think we will go three just to be able to use the thrusters.
The arduino code can be modified pretty easily to allow a fourth channel to be used for the lateral thruster. Just copy the code relating to vertical command and add lateral (strafe) command in the same manner.
I added the changes for a 4th channel in a fork of Rusty’s git repository. Hook the 4th unused channel from the joystick to analog pin A3, and the strafe motor servo pin to digital pin 3 on the Arduino. I haven’t tested it, but this should work.
Hi Jacob, one more questions, can we use pretty much any parallax joystick, or should it have a gimbal like the one linked? I’m assuming the 5K linear pot is the critical feature, but that we could use any parallax joystick that fits that spec?
I actually decided to go this route with my project also where I am utilizing the Parallax joysticks. I just wanted to get some input from you guys. I see how the ESC’s and joysticks are both running off of the same breadboard but is it possible to use one Arduino on land, receiving commands from the joysticks, and sending those commands through an ethernet to another arduino underwater where the ESC’s will be connected? Would I need to incorporate I2C in order to control the arduino underwater or would it be able to be controlled simply through the ethernet connection?
You can definitely do that. You’ll need to come up with a way to send the joystick measurements to the other Arduino. You can use Ethernet but it might be easier to use a low-speed (4800 bps) serial connection, which is natively supported in Arduino.
On the Arduino onboard the ROV, you would listen to the incoming signals and send those to the ESCs. I would recommend looking for Ethernet or serial communication examples between two Arduino to learn how to do this properly.
I am also starting a MATE competition ROV Club at my school, and am somewhat new to using Arduino and ESCs. I understand a lot of this, but just have a power supply question. When using the original 3 thruster/2 Parallax setup, I am told the max amount of amperage I can use is 25A (according to MATE competition rules). Can I use this setup if I only have 25A to play with? Or is there a way to limit the power I use for this system? I am told I can use thrusters that require more power than what I can provide, but I have to somehow limit the power used by the thrusters in my software. Any help would be appreciated.
Hi Brian, the ESCs and the example code use a control signal called PWM to control the speed of the motor.
The faster a motor spins the more current you will draw, so if you are drawing too much current then we just need to slow the motors down.
The ESCs we sell are reversible, and this is what the arduino program is designed to use. You will find a lot of tutorials about ESCs that are not reversible, because these are the most used type.
The reversible esc works like this:
A pwm signal of 1500 is stopped, a pwm signal > 1500 is forward spin command, and a signal < 1500 is reverse spin command. The closer the signal is to 1500, the slower the motor will spin. A signal of 1900 is full speed forward, and 1100 is full speed reverse.
Hi.
Im working on a Rov project where I am using analog joystick to control my brushless motors.
This code is great, but is there a way to break down the speed before it change direction or some way to prevent reverse/foreward before motorspeed is back to zero?