Emma Hoffman’s Status Report (3/22/25)

This week, I was able to work on motor control and video streaming. Going into the week, the motor control and video stream were not working together. I spent a long time on Monday debugging the socket server to try and allow us to have a non interrupted video stream and motor control. I tried to use threading to make the video stream and motor control functions work in parallel, but this was unsuccessful. I was getting errors where the video would time out, or the signal to turn on the motors were not being received by the Pi. 

Professor Kesden saw me working and offered his advice that I use an Arduino Nano ESP32 for the motors, since Arduino offers Arduino Cloud, a service that allows you to control the output pins remotely. Since I was having a lot of trouble making the server work for both the motor and the video stream, I decided to try and set up the motors with the Arduino. Arduinos also are more efficient at controlling GPIO pins than the Raspberry Pi in terms of power consumption. I was able to set up and test the motors by Friday. I connected the Arduino to a WiFi network, which took a while to figure out because the network has to be 2.4G instead of 5G. Then I made 4 cloud variables that are booleans which enable each motor and power each motor. In the end, it works a lot better than with the Raspberry Pi. We can control both motors now, and I tried to turn them on and off from across the room, at least 10 feet away, and it worked. This means that this system satisfies our distance requirements and gives us enough control. The Arduino also is better suited to get data from our temperature sensor and pH sensor. These values can be easily read and displayed on the Arduino Dashboard.

Once I removed the motors from the Pi, I was able to set up the video stream to work better than with the motors. One problem we had with the video stream was that it would time out, but now it has a much higher frame rate than we had even at the beginning of the semester. Also, the camera was showing blue and red inverted, and after some debugging, I realized that the Pi and OpenCV were using different color coding schemes, so I was able to convert the image being processed by OpenCV to use RGB instead of BGR. This fixed the color issue for the video stream.

I also assisted the team in putting together a first prototype of the boat. We used a plastic bowl as the base, which was Professor Glorias suggestion, and we attached foam board around the plastic base with waterproof sealant to make the boat more stable. We are planning on attaching the motors to the foam board instead of cutting through the plastic to prevent water from getting into the base. Unfortunately, we realized that the motors we have are not waterproof, despite being advertised as such. This means we will be ordering different motors that are still able to be powered by our Arduino and motor driver. We found motors that are built for boats and are brushed motors. At first, I was going to order ones that were brushless, but our motor driver only will power brushed motors. We were able to find waterproof motors that will work well for our application. If they take a while to come in, we can attach the motors we have to the boat above the water, so the boat will move by blowing air rather than water. This could be a work around until we get the waterproof motors.

My next steps will include working with Abie to get screenshots from the video stream into her algorithm, and to work with Maddie to understand how we can control the Z direction movement. I believe that I am still on schedule, even though this took a bit longer to figure out than I anticipated, and that we will be able to have a first draft prototype by the interim demos. See the below video clips of the motor and video!

Controlling motor from a far distance

Live Video with Fixed Color

Motors being controlled over Arduino Cloud



Leave a Reply

Your email address will not be published. Required fields are marked *