Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Norway
Asked — Edited

Ez-Bv4 To Control Underwater Rov?

Hi.
I am curious if the EZ-Robot hardware and software might be a good solution as a control system for my underwater ROV that I am building.

Although I have tried to create something using arduino myself, the programming is really a steep learning curve for me.

I will be running a wired Ethernet connection from the surface and have a wifi hot spot in the rov to allow connection to the bv4.
It must control 9 brushless esc's. 6 for movement (thrusters) and 3 for a robotic arm. Also one servo for moving the camera vertically. The esc's use the same signal as servo's do, so I don't think this will be a problem.

I will also need to control 3 relays.

I have this unit for sensing battery voltage and current draw:
https://www.coolcomponents.co.uk/attopilot-voltage-and-current-sense-breakout-180a.html
This can be connected to the ADC pins correct? This is made for 3.3volts, but can it still be used maybe?

I have this IMU from OpenROV that I want to use:
http://store.openrov.com/collections/frontpage/products/openrov-imu-depth-module

I see there already is support for the MPU-9150 chip. But is it possible to also get the depth and temperature rating from the MS5803-14BA chip?

I want all to be controlled with a gamepad/joystick. This means that multiple motors must react differently to stick movements. For instance, if I want the ROV to turn in place. 2 motors must turn clockwise and two counterclockwise.

Would all this be possible to do?

Br
Ole


ARC Pro

Upgrade to ARC Pro

Experience the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

United Kingdom
#23  
@olegodo.

I think Alan was referring to my thread as I had a very similar issue. There are different kinds of relays like latching and toggle ones (which sounds like what you need), and the one I was using had the same problems as what you're having.

Richard R very kindly linked to a relay brick that is fairly cheap, and is simple plug 'n' play with a 5v regulator to a digital port, and this relay works really well using SET(D0, ON and SET(D0, OFF commands.

Hope that helps.
#24  
Yup, that is the thread. My memory is shot this week. Didn't remember that I had participated in that thread.

Alan
#25  
Thanks a lot for the response.
I read your thread @Steve G , and I have the exact same relay that you had problems with.
Should have been able to find this if I only did a search in the forums I guess *eyeroll*

So, either buy new relays or use a logic converter right?
Or might it be possible to get it to work using a pull down resistor on the signal pin?
#26  
Got the logic converters today and they did the trick.
I can now switch on and off my relays!:)

More questions though.

I have it set up so that button one on my game pad executes "Set(D20,ON)" and button two is "Set(D20,OFF)" This works fine.
But from what i read the "ToggleDigital" command should do the same job with only one button right? Pressing it once should turn the relay on D20 on, and pressing the button again should turn it off?
I tried this and it seems to work some times but not reliably.
Maybe I need to add something more to the script for the button to make this work?
Aslo, perhaps it is possible to have one button turn on/off multiple relays one after the other?
For instance. First button press turns on relay 1. Second press switches relay 1 off and turns on relay 2. Third press turns off both off. Press the button a fourth time and the cycle starts over.

If anyone can point me in the right direction for doing this it would me much appreciated!

BR
Ole.
#27  
I would script that using a variable to keep track of the current status and taje the action based on the contents of the variable.

Let me know if that isn't enough to get you on the right track and I'll write upba sample script.

Alan
#28  
When I setup relays I used a tip 120 which opened to ground to close the loop to the relay , this always worked
#29  
@thetechguru thanks for the pointer. I will try to look in to using variables for this.

@jstarne1 not quite sure what you mean. "tip 120"?

For the toggle command. could it be that I need to ad some delay for it? Or a way to ensure that it only toggles once per button press?
#30  
A tip120 is a common transistor. Used to provide a higher voltage switch from a low voltage signal (depending on voltage can be used instead of a relay, or as @jstarne1 pointed out, can be used as a cheap logic level converter to a relay. Here is a tutorial thread on their use: http://www.ez-robot.com/Community/Forum/posts.aspx?threadId=3050

Not sure about toggle command. I haven't used it much.

Alan
#31  
Okey.
After spending more time on the hardware side I am now tinkering with using the EZb to control everything. More specific the thrusters.

I want to use what is called a vectored thrust setup.
As you can see in the far right example in the picture below, this setup uses one motor/thruster in each corner of the craft. All on the horizontal plane, but at an angle.
What this allows is for greater maneuverability in all directions on the horizontal plane and more or less equal power in all directions.


User-inserted image


I have tried to set this up on my test bench now using the joystick module, a 360 controller and Multi servo for each axis.
I have set up so that the left stick on the controller moves the craft (spins the motors correctly on my test bench) forward when I push the stick forward (Y axis)
And pushes the craft left and right along the X axis when I move the left joystic in the X axis. Good stuff.. simple.
But I then want to turn the craft left and right with the right stick. (X axis on "Joystic #2") This is easy to do on its own. same way as I already did with the other stick, only reverse two of the motors and the craft would turn around its own axis.
My problem is that I also need to turn it while moving forwards, backwards or sideways. This doesn't seem to work properly with this approach.

If I'm moving forward and then turn using the right stick, all motors starts to respond to the right stick and ignore the command from the left. So the craft would stop moving forward and then turn.

Does anyone have any idea if it is possible to make this work in some way?
All suggestions are more then welcome!
And I am aware that all off this might be impossible to understand only by reading this, so if you don't get it, let me know and I will try to explain better.
#33  
After some more thinking, this is actually just the same as a normal tracked robot. I can treat it the same way, but I need to be able to turn left or right gradually while moving forward or backwards. This can't be too difficult right?
I have looked at the roli code and searched a bit for something like this, but haven't found anything that does this yet.

Any suggestions?
#34  
If turning while moving is the goal why not just use a rudder?
#35  
A rudder will not work as the craft also needs to be able to move sideways.
Instead of a rudder you could have the thrusters turn like a rudder, but that approach would complicate things a lot.

This video shows this type of propulsion in use.
#36  
I see. What thruster configuration did you decide to go with?
#37  
Nothing is fully decided yet but the "five thruster version" form the picture above is what I really wish to have and what my current frame is designed to use. This is also what the ROV in the youtube clip is using.
#38  
Quick question.
What is teh EZ-Script equivalent command for arduinos "map" command?

For instance if I want to take the joysticks -1 to 1 range and map it to 0-180 servo pos in a custom script?
#39  
Er du her fremdeler Ole? Jeg er i ferd med å starte et prosjekt og lurer på om det er EZ-B eller Arduino jeg bør satse på, og hører gjerne fra deg hvis du har lyst til å dele erfaringer / løse problemer:)

Claus (Hadeland)
PRO
Synthiam
#40  
Use multiplication:)

-or-

easier, assign the joystick to use a Virtual servo (v0-v99). And in code, simply get the virtual servo value. That way you can let the joystick control servo handle the range.

Code:


$x = GetServo(v2)


User-inserted image
#41  
Back when I tried to get this to work I had a hard time figuring out how to do it. I knew it had to be something along the lines of what DJ just posted but I didn't get it working at the time.
Because of "real life issues" of buying a new home and moving I put the whole project on hold and during that time I bought a different control solution that is made for ROV use. That system will go in my ROV and my Ez-b is now the heart of my recently built, fully automatic tennisball launcher for my dog. Way overkill to use the ez-b for that. But since I already had it and it so easy to setup I figured why the hell not. Will post pictures and video of that thing later at some point.
PRO
Synthiam
#42  
Looking forward to seeing the pictures :D. Congrats on the new home!

Glad my explanation helped! Simply set any servos for virtual, and you can receive their values in code. Just remember, if you use the same virtual servo in more than one place it will be overwritten.