Tuesday, July 26, 2022

Loose Fit, Tight Fit, and Misfit

This past month I was able to get AMOS out to the water a couple of times for some testing. The first time, I noticed that the boat always seemed to want to head off into the opposite direction. Initially I thought that the problem might have been an invalid initial GPS position, but even after physically moving the boat to other waypoints further along the planned track, it persisted in moving in a direction exactly opposite to the planned direction. Testing a couple of days later at home showed that the compass error was consistently about 180 degrees. I tried using an old compass calibration for the same device, but it too gave similar errors. I also double-checked the IMU board orientation within its enclosure, but it was correct. The only thing I can think of is that the polarity of the magnetometers must have been reversed somehow. Nothing in the part's datasheet says whether this is possible or not, and I'm not sure what sort of event (large magnetic field nearby?) might have caused the reversal to occur. During the last calibration, the heat got accidentally left on during the final temperature calibration, which caused some of the calibration apparatus to melt, and undoubtedly exposed the chip to some higher than normal temperatures. Perhaps higher than its specified limit of 85 degrees C. Not sure if that could have caused the polarity of the sensors to reverse though. 

For AMOS's second trip to the water, the IMU board was simply reversed, so that it could properly be used for navigation. The fish finder was running, measuring depth, and an underwater Weatherbox was used to record some underwater videos at various points along the course. Here's a short video of AMOS setting out on the course:


and the resulting interpolated depth map that was produced:


However, the Weatherbox had a bit of a leak, and must have quickly filled up with water, because none of the videos recorded were recognizable (mostly weird brown color flashes and bits of electronic noise). Unfortunately, the Raspberry Pi camera died after about 2 hours (the last recorded video was cut short) and couldn't be revived, even after a thorough drying later at home. Initially I thought that the leak might have been caused by the parts coming loose due to the temperature difference of the water (colder) vs. the air (warmer) where the parts were screwed together. But a later test at home in a bucket of room temperature water showed that the screwed together parts leaked fairly rapidly, and a closer inspection showed that there were some imperfections in the glued surface under the o-ring. Repeating the test with a different WeatherBox showed no leaking at all after 24 hours. Re-gluing the original WeatherBox, using a 10 lb weight to hold down the o-ring helped reduce the amount of leaking, but did not get rid of it entirely. It's possible there could be some other crack or imperfection in this WeatherBox that is causing leaking to occur. I think I will need to fit the WeatherBox with a leak sensor or two to help save money on Raspberry Pi cameras. 😏

I started working on populating the AMOS Wireless HAT board last week. I started with the 40-pin female socket for plugging into the 40-pin male connector on the Raspberry Pi, since I had some uncertainty about the board design and how it would fit atop the Raspberry Pi board. I soldered the 40-pin female socket to the Wireless HAT board, and then went to try plugging it into the Raspberry Pi board, but realized that the socket was soldered to the wrong side of the HAT board. Oops. So I took out another board, and soldered a new connector to the proper side of it this time. But when I tried to plug it into the Raspberry Pi board, it didn't really want to fit. I could make it fit by using a very large pipe wrench, but large pipe wrenches and circuit boards don't mix well. And commercial HAT boards plug into the Raspberry Pi board quite nicely, without any use of excess force. So I ordered some (hopefully) better 40-pin connectors on Amazon, which claim to be designed for use with the Raspberry Pi. I then tried my hand at soldering the tiny AtoD chip to the board, to see whether that was possible. It was not. The heat / size of my soldering gun, and my general lack of soldering skill was too much for the tiny pads, and they were easily mutilated and destroyed. So I also ordered a few evaluation-type AtoD boards from Amazon which are much larger and easier to solder, and adjusted the PCB design accordingly. Hopefully all of the parts and modified boards will be here in a couple of weeks, so I can try again.



Monday, April 18, 2022

AMOS Wireless HAT Module

 A lot has happened in the last few months, both in the greater world and in my own life. The war in Ukraine has unfortunately occupied much of my attention. I'm hopeful that the Russian invaders will be repelled from that country, but the present situation there is terrible, and I fear for the worst, both for Ukraine and the world as a whole. In my own life, I started officially working full-time at Measurand in March, although I had been unofficially working there full-time since November of last year. This means a bit less time for AMOS and In Nature Robotics, but the job itself is interesting, involving embedded product development and firmware. Plus having a full-time salary is helpful, given the way costs seem to be going higher and higher lately. 

In my own experience using AMOS, and in some of the feedback I've gotten from customers, one recurring issue has been the tangle of wires within the AMOS CPU box that connect the Raspberry Pi to the rest of the equipment (wireless module, AtoD, sensors, etc.). Sometimes one or more of these wires become disconnected, and it can be a challenge to find the disconnected wire and attach it to the correct location. 

Enter the new AMOS Wireless HAT (HAT stands for Hardware Attached on Top). 


It has a 40-pin header that plugs directly into the Raspberry Pi board, and uses printed circuit board traces rather than wires to connect the AMOS wireless equipment, AtoD board, and temperature and humidity sensors. It also allows direct soldering in of wires from the battery box module (for the propeller and rudder control). 

I have already noticed a few things that should be changed on the board, but the order for the first 5 prototypes is already in production, so I'll populate one to see how it goes, and then make some changes after that. 

The weather here is warming up; I'll need to get the demo AMOS up and running again to do some weekend testing again soon!


Sunday, January 23, 2022

Winter QA Testing

 Generally it's not a great idea to do AMOS testing in the winter-time. The local rivers and lakes are frozen, so an hour's drive is required to find the nearest available liquid water in the Bay of Fundy. And careful planning is required to ensure that tides, wind, waves, and the cold are all manageable. 

Two recent AMOS robot sales however required that the testing be done, so the van was loaded up in early January for a test down to McLaren Beach, just outside of St. John.



Both AMOS robots were equipped with underwater camera modules. Unfortunately, these proved to be problematic for the air temperatures of -7 deg C and water temperatures of 5 deg C. The plastic tubing, normally quite flexible at room temperature, became as stiff as steel in the cold. In shallow water, this meant that AMOS would get stuck (if it was moving slowly) or might snap off the top connector of the tubing if it struck the bottom at a high speed. So I packed everything up and headed back to make a couple of plugs for the camera holes; the underwater testing component would have to happen indoors. Fortunately the final destinations for these robots are considerably warmer than Canada in the wintertime, so freezing camera tubing won't be an issue. 

A return trip was then made to the Irving Nature Park a few days later, as McLaren Beach was inaccessible due to a recent snowstorm. The waves were stronger here, as it was less sheltered, but the first AMOS went through its sampling course flawlessly. The second one had trouble even starting however. It started up fine prior to leaving, and started up fine inside the van, but within a few minutes of having it outside on the beach (again about -7 deg C) it abruptly lost power and the LED light on the  power switch went out. My guess at this point was that the switch was faulty and didn't perform well in the cold, so after driving back I replaced it. 

A third trip was then made a few days later to Lorneville, as there was a strong wind out of the south that day, and the selected spot offered a bit of shelter from the strong open-water waves. Once again however, the AMOS robot lost power in the cold, usually shortly after the propeller was driven at high speed. This time I thought to carefully check the solar charge controller, and realized that its short-circuit protection circuit was engaging. This was a newer version of a controller which I've been using for the last 3 years; previous versions allowed you to disable the short-circuit protection feature, but this version did not. So back to Fredericton, to replace the solar charge controller with an older model. 

On the fourth trip back (to McLaren Beach), the 2nd AMOS robot also worked flawlessly:


So now both units have been shipped out and are due to arrive early this week. I'm looking forward to seeing how they will be used over the next few months. Hopefully around the middle of this year I will be able to provide an update blog with some details!

In support of these systems, the support page has been updated, and a number of YouTube instructional videos for assembly and testing have been created. These are a bit rough at present, but they should be effective I think. 




Saturday, November 13, 2021

Mini AMOS


Here are some pictures of the latest AMOS version (perhaps to be called "Mini AMOS"). It uses the same electronics boxes as the regular AMOS, except it only uses a 4 foot long bodyboard, doesn't have a solar panel, and uses a water propeller instead of the air propeller on the standard robot. The board shown below doesn't have a survey-grade GPS antenna (just uses a GPS / USB stick), but that could be added later if desired. As it stands right now, its weight is only 4.5 kg. 

There will need to be some minor software modifications to drive and control the water propeller, but these should be relatively minor. It will be interesting to see how fast it can go, and / or what kind of performance it has in wind, waves, currents, etc. 







Thursday, October 7, 2021

Flexible Underwater Ribbon Cable Guide

 The previous rigid 3-D printed shell that was used to join the underwater WeatherBox to the main electronics box on the AMOS surfboard needed to be replaced with something flexible that could flex and swing out of the way whenever underwater obstacles were encountered. 

Some inexpensive plastic tubing was purchased at Home Depot, and 3-D printed adapter parts were constructed for either end of the tubing, to join it to the WeatherBox at the bottom end and the main electronics enclosure at the top end. 


This made a nice, water-tight conduit for the camera cable to follow, but it proved to be difficult to design the top piece to be strong enough to withstand large bending moments that were produced whenever AMOS passed over a shallow, rocky area. Three different top-piece designs were fractured in separate field tests before switching to a slightly different design using a large cable gland at the top. Instead of fitting the top end of the tube over a 3-D printed male plastic piece, the top end of the tube was fitted inside the cable gland. A small amount of heat treatment with a heat gun was applied at the top end of the tube to allow it to compress slightly and ensure a snug fit. 


This design worked perfectly: it had enough "flex" to be able to swing up out of the way of obstacles, without putting too much stress at the top cable gland connection. Here is a video of AMOS crashing into an underwater rock. The WeatherBox and its cable guide swung out of the way and were undamaged:


I enjoy combing through the videos from these tests, looking for fish. Here were a couple that were briefly captured in the most recent test yesterday (October 6):


My favorite clip came at the end of the test when AMOS was just floating near a partially submerged tree. I really like how the light from the sun is shining on the tree in this video, it looks kind of magical:






Friday, September 24, 2021

AMOS Captures Some Fish

 Things have been busy lately, and there hasn't really been much occasion for taking AMOS out in the field. Over the last week though, I was able to develop some software for saving 30 fps 1920 x 1080 video files on AMOS, while still continuing to do all of its regular navigation and data saving stuff. Testing and debugging was done in the pool, and everything seemed to be working well. 

This morning I took AMOS out to Kelly's Creek to test how the navigation, sensor data saving, and video recording all worked together. I was worried that the addition of the video recording in a real environment would slow down the other functions, possibly resulting in sluggish handling or missed data samples. Everything seemed to work pretty well though, although when I had plotted the course the night before, I had not realized how low the water level actually was. The waterline was about 10 m in from where it appeared to be on the ArcGIS map that was used to setup the course. Unfortunately, the WeatherBox  that housed the camera underneath AMOS struck a rock at full speed, and the 3-D printed extension piece that connected it to the main electronics enclosure snapped under the strain. The WeatherBox was quickly flooded, but I was following close behind in the kayak and was able to turn off AMOS's power switch a few seconds later. Clearly a more flexible extension piece will be required here. Perhaps something like a short rubber hose could work?

Despite this accident, the rest of the test was a success. Depth, temperature, and conductivity data were all recorded normally, AMOS navigated itself normally, and 9 video files were recorded, mostly of air bubbles and river vegetation, but at 1:10 of the video below, you can see 3 small fish swimming by for a few seconds:


The end of the above video is where the WeatherBox struck the rock and the camera module was flooded. Unlike the last camera flooding which occurred in salt water, this one was in fresh water, and after storing the camera module in a bag of desiccant for 12 hours, it was confirmed to be unharmed. 



Wednesday, September 1, 2021

AMOS Looks Underwater

 Last month's assumption that the o-ring seal on the WeatherBox required improvement proved to be correct. The printed part had tiny imperfections underneath the o-ring that allowed water to slowly leak through. A WeatherBox customer who was using it to observe a muskrat underwater came up with a brilliant solution: he found that using some marine goop (ex. https://www.homedepot.ca/product/amazing-goop-marine-109-4-ml-3-7-oz-/1000183125) in the channel holding the o-ring worked to fill in the small imperfections in the plastic and create a watertight seal. I've built a few WeatherBox enclosures since then with the channel filled with Marine Goop and they have all worked quite well.

To take pictures and video underwater with the 6 foot AMOS surfboard, an extension piece was required to get the WeatherBox below the waterline. The bow of the surfboard where the camera is located is pitched upward at about a 20 degree angle, so this requires a curved extension piece. The creation of this extension piece required a couple of weeks. At first, rendering the model in OpenSCAD took days for my laptop to finish, although later iterations of the model used some 2-D optimizations with extrusions that shortened the rendering time to about 24 hours. The first two model attempts also had small gaps on the side with the largest radius of curvature, which led to leaking. Eventually a working model of the curved extension piece was created:


The extension piece was fitted on AMOS and used to capture this underwater backyard pool video:

Apologies to viewers for the acting talent used in the above video. In Nature Robotics operates on a tight budget. 😉

Coming up next week is the final round of  the 2021 edition of the Ocean Startup Challenge (https://oceanstartupproject.ca/challenge/). In Nature Robotics is in the mix again this year, and will be pitching on Thursday, September 9.