A different approach to controlling the Bluerov2

I have taken a BlueRov2 chassis but used DIY electronics and control. My approach is a Rasberry PI 3 B + Pi-EzConnect Break Out Board + OzzMaker BerryGPS-IMU. Still a work in progress.

On the surface the ROV is controlled via Node-Red dashboards served up by the ROV itself. This can be driven from any mobile device via a web browser without any software download or having a joystick. The dashboard (again work in progress) is mouse or touch sensitive in terms of switches etc. Thrust direction (360 degrees) and intensity are being driven by a sliding gesture on the black panel which notes where you first place your finger and where you slide it to and how far away. Taking your finger off the panel stops all directional thrust

Main dashboard

Other dashboards screens provide gauges and graphs. The drag and drop design of node-red means that design updates are completed very fast.

The intent is to connect the ROV to mobile device (currently WiFi) via a standard router and CAT5 cable.

Tried to post other images but as a new user could only paste one :slight_smile:

11 Likes

@deepsouth,

Nice work.

So your approach is much like the OROV Cockpit which is a web page that can be viewed on any device?

I have asked Rusty about implementing this approach as an alternate to QGC, but he felt that QGC was adequate for their requirements. However BR has gone on to implement their own custom version of QGC for the BR ROVs,

I have both BR and OROV ROVs and have liked the OROV Cockpit even though they have discontinued updating the Cockitpit software. I would be interested at looking at your hardware implementation as well as further development of your web based control software.

Regards,
TCIII AVD

1 Like

Thanks TCIII,

I’ll check out the OROV Cockpit.

I’ll also post more photos when the system lets me :slight_smile:

Cheers

Andrew

More photos as promised…

The Chassis
A standard BlueRov2 Shell. If the guys at Blue Robotics have taken everything down to depth until it implodes, there is no point reinventing this costly wheel :slight_smile: .

The Electronics Controller
Fairly basic Rasberry PI 3, PI Connect break out board, and OzzMaker GPS / IMU combo. The combo provides the heading, pitch, role, GPS position (on surface), internal temperature and pressure. The cabling will be tidied up later. The standard tilt camera is connected using Rasberry PI v2 camera. The camera could change later if required. The Blue Robotics water depth, pressure, and temperature sensor is also connected.

Environmental Dashboard
The Node-Red configurable gauges and graphs of the sensors. This is served up by the Rasberry PI itself.

2 Likes

@deepsouth,

Nice work!

Do you plan to make the Node-Red software available as I am only an intermediate programmer who works off of examples to create my own code?

I assume that the ESCs and any additional hardware will be mounted behind the RPI 3 assembly?

Regards,
TCIII AVD

Hi TCIII AVD

The good thing about Node Red is that it comes pre-installed on every Rasberry PI default OS. There are plenty of good YouTube videos on how to set it up and make it look good in minutes. I have put a few good intro youtube links are the end of this post.

The coding initially is minimal or optional as Node Red is mainly drag and drop + plus configuration in the GUI. Node Red out of the box can control the Rasberry PI PINs which means it can control camera tilt, lights and thrust motors although my implementation is different and calls python scripts. It can also hook into sensor data directly off the PI. Node Red automatically stores and displays sensor data over time on graphs (e.g. plot of ROV depth over time). The timing interval for plotting is completely configurable.

My current ROV setup - work in progress

In my case the Node Red talks to the sample Python code provided by the supplier for each of the sensors. In each case I have only modified the code slightly to suit the application. I have implemented some sample Javascript into Node Red off the internet for camera display, map display, and virtual joystick functionality.

You are correct the ESC assembly will be added behind the Rasberry PI. With my assembly I am not short of space as everything is very compact and I had originally looked at putting the battery in the top enclosure. I opted not to as I am concerned about minimizing heat and condensation so I am putting it in the lower enclosure.

Sample YouTube Links to Setup Node Red

Regards

Andrew

3 Likes

@deepsouth,

Thanks for the links and the update on your implementation of Node-Red.

I have done some searching on Node-Red and you are right, there is quite a bit available on setting Node-Red up and getting it working.

Regards,
TCIII AVD

1 Like

Just an update on the plumbing without any tidy up of cables. The attached is prior to connecting ESC power to the binding posts from the battery and ESC sensor cables to the break out board. The GPS-IMU unit has been unscrewed off the top to allow access to the breakout board. The next steps are connecting the control screen to the thrusters via the touch panel. The thrusters are working fine from within the Rasberry PI and the connection is some simple python scripts.

3 Likes

Hi Andrew, how would you integrate a joystick control into the topside computer to supply commands to the subsea raspi with node red on it

Hi Michael

My approach is to not have a physical joystick (e.g. Xbox controller) although I assume this can done using the browser.

For simplicity, mobility, and independence I only have a tablet in my hands which means I can easily move around without managing different devices.

To achieve the joystick functionality, I believe there are two practical ways below. The effects of control may also be modified by the simultaneous use of on-screen buttons.

  • Virtual Joystick - the one I use (see demo code here - not my code)
  • Gyro Joystick (tablet movement) - the one I plan to build - based on HTML5 should not be hard.

The virtual joystick sends x and y distances relative to the position the finger was first pressed on the joystick. This provides direction and speed to the raspberry pi. When the finger is lifted it resets back to 0,0 distance (I.e. stop)

For me the inputs are sent via a series of short get commands to raspberry pi webserver which receives the x,y value (including + or -) and converts it into thrust direction and power. I also have software configurable max power limiters which can limit the proposed power from the joystick (e.g. benching testing thrusters out of water or max duration dives).

I am sure there may be better ways of achieving this in the future but it works for now.

Thanks Andrew, fantastic response! Is the virtual joystick running on the Raspi (subsea) and what node would you run it in? I am wanting to build a subsea tank with two drive motors. How could you convert the virtual stick movement to 2 digital outputs for direction and pwm for speed for each motor?

Hi Michael

You can use the template node in node red which allows any JavaScript to be included in the dashboard. The node red (and joystick) dashboard are served up by the raspberry pi itself.

It’s then just a case of using python on the raspberry pi to receive the joystick commands and issue the pwm commands to the thrusters.

Hi Andrew, thanks for the information. I seam to be doing something wrong. When I put the code into the dashboard template and then use the user interface I get this -

Can you give me a pointer on how to fix this?

Mick

Hi Michael

The sample joystick code you are using is made up of a couple of files. These files either need to be accessible and referenced to the template node (probably on the raspberry pi website) or (in my case) fully combined as a single Javascript file within the template node itself.

Regards

Andrew

Final build photos…

1 Like

1 Like

Loving that paint job! I’ll actually be putting together a kit next week and was looking into painting the fairings yellow for increased visibility. Do you mind sharing what paint you used on yours?

Hi

The paint is PS-6 Tamiya 100ml for Polycarbonate (yellow).

I think another post on the forum refers the same paint but mustard yellow (not my choice)

1 Like

Hi,

@deepsouth, is your flow available anywhere ?
To update on this matter, BlueOS now has a node-red extensions available.

1 Like