Introducing NodeROV - ROV Control Software in NodeJS
Hello Guys! As I’ve had the ROV for a year and still not had a drop of water close to it because the software was a “pain” for the ROV. I did not like how it looked, how it worked and everything. So my journey started to develop my own software.
I found NodeJS as a suitable platform and started developing. Currently I’m ready for a “test” dive when I get my ROV packed and stuffed again.
I had to modify the ROV a bit to make this work, I 3D printed my own “Sensor Board” and used a PWM Driver & 10DOF from Adafruit connected with i2c to the Arduino.
Here you see V1 of the board mounted…
Now when i started assembling this board and putting the RPi onto the mount holes i saw a problem. The left part of it are offset a bit and hits the acrylic tube! A bit of screaming later I started designing a new version putting the PWM driver in the middle.
Oh well, since i dropped the Pixhawk i had to find an alternative way to read current draw + voltage. After hours of searching for an “i2c enabled current and voltage sensor” i gave up. There are none? If there is please refer me to it so i can buy one and maybe replace my hacked one!
And as I said “hacked” here is my hacked version of an i2c enabled power module:
This consists of a power module for APM / Pixhawk (18V 90A) and an Atmega328-PU configured with 8Mhz internal clock and a software that reads, converts and stores mAh, Voltage and mAh Used onto memory and works as an i2c slave to get the data to the Raspberry pi.
Currently I have it all benched, connected up and run a test on my software, visit this link to see video of my software:
Explaining on that video you see how my system is build up, this is all HTML5 and Canvas based, video transfers over TCP protocol with frame skipping (kinda like UDP). Video is transferred as RAW h264 data and the delay i measure over 2.4Ghz wifi is about 250-300ms - Hoping its a bit less over cable. (For the record, I’ve also tried this over mobile network 4G and it was about 200ms delay there. I made a remote controlled car driving on NodeJS over 4g. Unlimited range as long as i got 3g/4g coverage! hehe).
See video of latency test: http://link.jepb.no/jOGB
I have not filled in every fields on the GUI since I have no idea on what to put in there. Also the software is not very well polished, unless someone jumps in helping me developing its gonna be a bit unpolished and not-customizeable. I was hoping to make a “settings” menu to set the PWM pins to motors, reverse pwm pins, button mapping on gamepad controller e.t.c…
Might come as I try to develop.
Also i need to work on a better vector thrust calculation. Currently I’m using one i found on a openrov forum by Rustom i think?
Hoping to enhance that to work better.
For now, nothing more to tell you about but I might update as i go! Any tip is also welcome.
One cool thing would be if anyone made an shield for the arduino with all the components needed internally, and connectors to connect either PWM or i2c enabled ESC. That would be epic, i2c enabled ESC’s would work 100% on the RPi without any drivers. dreaming