RovingEye Show
Table of Contents
1 The Idea of Roving Eye
There are various cases, in which continuously unmanned surveilling is necessary in remote or desolate places.
Equipped one water proof camera on moving platform can build one roving eye, helping people a lot.
With Latta panda SBC well protected in waterproof enclosure and high-quality waterproof connectors, this project can provide affordable solution and quick out-of-box deployment. Just as roving eye can do.
2 Waterproof Connectors define how robust the eye is.
Waterproof connectors are well designed, need proper attentions when assembling parts. As small as on spring-washer or rubber ring altogether play important roles, and can not be ignored. The Experimenting with Waterproof Connectors #5 Waterproof test on Connectors - element14 Community show the result.
Here are outside connectors to connected with USB camera and Ethernet cable.
With wires plugged
USB connector inside
Four wire of RJ45 is used as two Motor control cord, inside part,
and outside connecting, with one ethernet cable connecting two RJ-45 connectors
3 OpenVINO and Object Detection
OpenVINO is very good in this project and play object detection very quick, as
Experimenting with Waterproof Connectors #3 OpenVINO in LettaPanda - element14 Community and
shows.
Start the python loop and detect object in video in No.0 camera port,
run_object_detection(source=0, flip=True, use_popup=False)
if __name__ == '__main__': # Initialize OpenVINO Runtime. ie_core = ov.Core() model = ie_core.read_model(model=converted_model_path) compiled_model = ie_core.compile_model(model=model, device_name="CPU") input_layer = compiled_model.input(0) output_layer = compiled_model.output(0) height, width = list(input_layer.shape)[1:3] input_layer.any_name, output_layer.any_name run_object_detection(source=0, flip=True, use_popup=False) print("End of Roving script.")
At the same time , download standard firmata in Arduino Lenado Core,
void loop() { byte pin, analogPin; checkDigitalInputs(); while (Firmata.available()) Firmata.processInput(); currentMillis = millis(); if (currentMillis - previousMillis > samplingInterval) { previousMillis += samplingInterval; /* ANALOGREAD - do all analogReads() at the configured sampling interval */ for (pin = 0; pin < TOTAL_PINS; pin++) { if (IS_PIN_ANALOG(pin) && Firmata.getPinMode(pin) == PIN_MODE_ANALOG) { analogPin = PIN_TO_ANALOG(pin); if (analogInputsToReport & (1 << analogPin)) { Firmata.sendAnalog(analogPin, analogRead(analogPin)); } } } // report i2c data for all device with read continuous mode enabled if (queryIndex > -1) { for (byte i = 0; i < queryIndex + 1; i++) { readAndReportData(query[i].addr, query[i].reg, query[i].bytes, query[i].stopTX); } } } #ifdef FIRMATA_SERIAL_FEATURE
Then control the arduino core pins by arduino c# library .
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; using LattePanda.Firmata; namespace rovingEye { class Program { static void Main(string[] args) { string motormode; int motorduraion =200; Arduino arduino = new Arduino(); arduino.pinMode(4, Arduino.OUTPUT);//Set the digital pin 4 as output arduino.pinMode(5, Arduino.OUTPUT);//Set the digital pin 5 as output arduino.pinMode(6, Arduino.OUTPUT);//Set the digital pin 6 as output arduino.pinMode(7, Arduino.OUTPUT);//Set the digital pin 7 as output //Console.WriteLine("Hello, rovingEye."); if (args.Length > 0) { motormode = args[0]; if (motormode is "up") { Console.WriteLine($"Direction={motormode}"); arduino.digitalWrite(4, Arduino.LOW);//set the LED off arduino.digitalWrite(5, Arduino.HIGH);//set the LED off Thread.Sleep(motorduraion); } else if (motormode is "down") { Console.WriteLine($"Direction={motormode}"); arduino.digitalWrite(5, Arduino.LOW);//set the LED off arduino.digitalWrite(4, Arduino.HIGH);//set the LED off Thread.Sleep(motorduraion); } else if (motormode is "left") { Console.WriteLine($"Direction={motormode}"); arduino.digitalWrite(6, Arduino.LOW);//set the LED off arduino.digitalWrite(7, Arduino.HIGH);//set the LED off Thread.Sleep(motorduraion); } else if (motormode is "right") { Console.WriteLine($"Direction={motormode}"); arduino.digitalWrite(7, Arduino.LOW);//set the LED off arduino.digitalWrite(6, Arduino.HIGH);//set the LED off Thread.Sleep(motorduraion); } else { Console.WriteLine($"Direction= No operaion."); } // Reset the motor to still for new command, arduino.digitalWrite(4, Arduino.LOW);//set the LED off arduino.digitalWrite(5, Arduino.LOW);//set the LED off arduino.digitalWrite(6, Arduino.LOW);//set the LED off arduino.digitalWrite(7, Arduino.LOW);//set the LED off Thread.Sleep(200); } return; } } }
4 Roving the Eye
The waterproof enclosure with Waterproof enclosure can be fixed on crawler-type platform to moving around. The view under the platform.
Wiring parts inside and power the LatterPanda SBC
All parts included in waterproof enclosure, screw tight and fixed on the platform.
5 The Waterproof USB Camera and Upgrade
I have used this waterproof camera in sewage cleaning, it works fine. But the resolution is not so good.
Upgrade the USB camera if better one can be found. The 720p logitech USB camera is good in quliy, but can not fit for outdoor purpose.
In this project, the first camera is used.
Upgraded project can use two cameras together for better view range.
6 Summary
This project shows how waterproof connectors be used and the importance of the waterproof function.