Monday, February 15, 2021

The Next One

 Just got some exciting news this evening: the new hull for AMOS 4.0 will soon be ready! Mostly just some painting left to complete. Here are some pictures that Steven (the designer and builder) sent about an hour ago: 





This version will have loads of room for extra batteries, sensors, or other equipment. And it's super-bright orange! So it should be nice and easy to spot from afar.

Work is underway to arrange for some monitoring projects for AMOS for this year once things get a bit warmer. If you have a need for automated monitoring in a lake, river, or coastal area please let me know (murray@innaturerobotics.com). AMOS excels in shallow areas with grass and other vegetation where traditional propeller driven boats tend to get stuck. 


Tuesday, January 26, 2021

AMOS Servers and Correction Data

Over the past couple of weeks some good improvements were made to the internal communications software running on AMOS. When using the network / Internet communications mode, the previous method of communications relied upon running a server with a fixed IP address to act as a communications broker between AMOS and the host computer or phone that was being used to control the boat and view data. The server used some software that I had written called "BoatServer" and it just ran on an available Windows computer here at In Nature Robotics HQ (i.e. my basement). It required setting up the WiFi router to forward network traffic on a particular port to that computer, and also required both the host device and AMOS knowing what IP address our Internet service provider had assigned to the house. From time to time this address would change, perhaps once every few weeks. The solution was reliable most of the time, except when it wasn't. And when it wasn't, it would sometimes mean that either AMOS or the host device was unable to talk to the BoatServer software until the BoatServer software was forcibly closed and restarted. 

For a while I had been considering going back to the original simple network communications approach that I had started with a couple of years ago: running a TCP server directly on AMOS. This always worked quite well over the home WiFi network, but did not work at all when using the hotspot device on AMOS to get a cellular 4G connection to the Internet. Incoming server connections were not supported over the 4G connection. At least not directly. One possible solution was to make use of the remote.it service that I had used previously for controlling the boat over a PuTTY connection. Unfortunately though, this service seemed to have grown a bit in complexity since I used it last 2 years ago, and I was unable to follow their instructions for installing it on the Raspbian operating system that AMOS uses. So I tried switching to ngrok (https://ngrok.com/) instead, which thankfully worked great and was quite simple to install, allowing me to setup fixed IP addresses and ports for a PuTTY connection and a general TCP network / data connection for communicating between AMOS and the host device software. 

This new reliable mode of network communication was used to include RTK correction data from an RTK base antenna (once again setup on the playhouse roof). An FTDI USB-serial converter was used to receive the RTK correction data at the PC and transmit it to AMOS over the regular data / command link. At AMOS, the RTK data was extracted from the incoming commands and data and sent over a second USB-serial converter to the GPS receiver board, where it was used to apply corrections to AMOS's GPS position. The software running on AMOS was also slightly modified to output a GPS status number which was just 0, 1, or 2 depending on whether no GPS data was available, regular GPS data was available, or RTK-corrected GPS data was available. This was tested out in cold, windy weather this past weekend with pretty good results:


The above screenshot came from the map which was directly uploaded from BoatCaptain to ArcGIS. I'll try to embed the map below:

If the above map does not work, then this link will go directly to the ArcGIS web map: https://arcg.is/eLWaX0
I tried to position the boat next to known geographical landmarks: our fence, the corner of the driveway, the mailbox, a telephone pole, etc. At first, AMOS was consistently appearing about 2.5 m northwest of these real-world landmarks, until I realized that the base station position being used (it self-surveyed for about half an hour to find its own base position) was also off by about 2.5 m to the northwest. The GPS software had an option to key in your own latitude, longitude, and elevation. I was unsure of the elevation, so just used the self-surveyed result, but fine-tuning the latitude and longitude to the correct point on the playhouse roof resulted in very accurate AMOS positions, I believe to within 10's of cm of the actual location.
There have been some recent developments occurring in the workshop of Steven Fox. Check out these construction photos of the latest AMOS hull:

Saturday, January 9, 2021

Improved Magnetometer Calibration

Much of this new year has been spent working on improving the calibration of AMOS's magnetometers. The calibration jig discussed in the last blog entry has been completed and tested out, and seemed to work pretty well! Next up was an apparatus for performing a simple temperature calibration of the magnetometer sensors. To keep the temperature calibrator as simple as possible, it was decided to just put a small heater and fan into a small box with the device under test, and have everything hooked up to the Raspberry Pi on AMOS. Fortunately I had nearly all of the required parts already on hand: a spare heater cartridge from the 3D printer, an old heatsink and 12 V fan from a decades-ago junked desktop PC (never throw anything out, you might need it someday!!! 😜), an electronics enclosure box that had previously been embedded in the failed foam hull (see https://readerforgmail.blogspot.com/2020/11/breaking-mold.html), a DC-DC converter, and a 4-port relay (with just one fried port from the previous paddle experiments: https://readerforgmail.blogspot.com/2020/08/paddle-test-take-2.html).  I did need to buy a 24 V supply though to power the heater. 

Here's a pic of the interior of the temperature calibration box once it was all put together:


A simple bracket was 3D-printed to hold the PC fan and heat sink securely in place. Calibrating with this box requires chilling it for a while down to some minimum temperature, and then turning it on and letting the Pi collect data from the device under test (i.e. the magnetometer sensors). Fortunately the weather is pretty cold at this time of year, so I just did the temperature calibration outside:


The heater was powerful enough to heat up the interior from about -2 deg C up to about 37 deg C. Good enough I think to get some pretty decent linear calibrations on the magnetometer sensors:



The code on AMOS has been updated to include linear temperature calibrations for the magnetometers, so hopefully tomorrow I'll try it out in the house and then in the backyard to make sure that it's working.




Wednesday, December 30, 2020

Holiday AMOS Work

Work on AMOS took a brief pause for Christmas, but has continued on during this final week of 2020. On Monday, I had wanted to do another test of the RTK / GPS equipment using a laptop hooked up to the base station equipment (in the playhouse) and a second laptop hooked up to the remote "rover" equipment, that was moved around the backyard. This was similar to the previous test done last week, except a laptop replaced AMOS as the rover. Using a laptop running Windows allowed me to run the Windows diagnostic software that came with the equipment, to see what mode the rover was in ("acquiring 3D position fix", "RTK float mode" or "RTK fix mode"). The latter of these modes provides the best position accuracy and precision, down to cm-level. The weather that day was a bit rainy and snowy, which required the use of this handy recycling box / makeshift laptop shelter:


It soon became apparent after some walking about the backyard, that the rover antenna generally required a fairly unobstructed view of the sky in order to achieve the desired RTK fix mode for highest accuracy. If the antenna was situated on the ground near the pool, or near the house, it would fall back to RTK float mode, which is something like about +/- 1 m. Out on the water, there is usually a pretty good view of the sky, although in areas near the shoreline, embankments or tall trees might interfere somewhat with the received signal levels.

Other work this week has focused on the building of a calibration jig for the magnetometers on AMOS:



It's not fully put together yet, but the software is written for it, and the hardware just requires a couple more gluing stages to test it out. The magnetometers will be slid into a 3D-printed box that is glued atop a wooden pole with a couple of bubble levels to help keep them reasonably well confined to a horizontal plane. The metal clamps will be removed once the epoxy has finished curing (in another 12 hours or so). A small stepper motor at the base is used to rotate the pole back and forth in a circle. Extension cables will connect the magnetometers to the Raspberry Pi on AMOS, which will collect the circle data and use it to estimate the sensor offsets and gains. 

I also tested out the new 11" composite propeller blade this week, although it was somewhat of a disappointment. My kitchen-scale-based method of estimating  thrust is admittedly crude, but I couldn't detect any noticeable difference between the 11" composite blade and the inexpensive plastic 10" one. They both maxed out at about 1300 g of thrust. The composite one looks quite a bit sturdier though, so possibly it might survive occasional run-ins with shoreline bushes and trees. 

There is now a new product available on the In Nature Robotics website, the AMOS Board Kit: https://www.innaturerobotics.com/product-page/amos-board-kit. Here is a slightly cheesy promotional video for it that was auto-generated through Wix:











Tuesday, December 22, 2020

New AMOS Board

(EDIT, Jan. 07, 2021: For more info on AMOS and In Nature Robotics, please also visit https://www.innaturerobotics.com/)

 It pained me somewhat to carve up a brand new surfboard fresh out of the box, but I used the two AMOS electronics boxes as guides to carve out rectangular holes in the bow and stern and then wedged the boxes in. The fit was pretty snug, so I didn't bother gluing anything down:


I also had the new survey-grade antenna and GPS / RTK receiver board hooked up, so tried out the whole assembly on the weekend. The GPS / RTK receiver board seems to get pretty accurate GPS data fairly quickly, so only a short wait was required before AMOS took off on its course:


AMOS went up and down the river on the usual course that I had followed throughout the summer while collecting dissolved oxygen data, although this time it made the 2.75 km trip in only 33 minutes, shattering the old record of 43 minutes by 10 minutes! This included 17 ten second stops for water temperature samples, and some inefficient steering due to compass errors (see below). The improved speed made it more difficult to film while kayaking; I had to paddle hard to get ahead of it, pull out the phone, and then take some video:



 This last video showed a bit of a problem that the compass was having with giving accurate heading when the boat should have been moving south. The compass error must have been pointed towards the southeast, because the boat would start in that direction, realize that the new target direction was southwest (or even west) to get to the next waypoint, and then move in a big curve to correct for the initial path error. The temperature in the electronics box started off at 8 degrees C at the start of the test, and fell to 3 degrees C by the end. The magnetometer calibration was done at -3 degrees C, so that might have been a source of error. And probably there was some error from the Z-axis (vertical) magnetometer on the compass, since it had never been calibrated on this unit, and the new inclined angle of the bow on this boat would have caused that magnetometer to come more into play for determining heading.

Yesterday I modified a pair of AMOSRemote wireless transceivers to pass through serial data at 115200 bps, in order to test out an RTK / GPS setup with a base station and rover. I put the base antenna on top of the playhouse:


and did a couple of slow walks with the boat just inside the fence line:


The results seemed pretty good:


although were slightly outside the corner of the fence when I walked behind the pool. Possibly some satellites were obstructed at this location, or perhaps the communications link between the playhouse and AMOS became a bit less than ideal at that time. Either way, some more testing will be required to quantify what sort of accuracy can be expected under various conditions and communications ranges. Also, it would be better to have the normal communications programs on the wireless transceivers merged in somehow with the RTK wireless serial link mode. 

The weather is looking nice and warm (above zero!) for Christmas Eve, and a new 11" carbon fiber propeller arrived in the mail today, so possibly there will be an opportunity for some more river testing soon, before things freeze up. 😎




Thursday, December 17, 2020

Testing Out New Gear

Since the test with the new motor described in last week's blog ended abruptly with a tree collision, I went back the following day to try again, this time with a better "cold-temperature" magnetometer calibration. I also launched the boat from the kayak, just beyond the trees as a precaution. There was a light wind, a fair bit of current, and the sun was out providing a bit of warmth. It was almost possible to forget that it was the middle of December. 

The new motor did great - going against the current I  believe it was a lot faster than the old motor would have been:




On the return trip, going with the wind and current, the boat tended to oversteer and ended up going in a complete 360 degree circle a few times. Using a shorter surfboard, possibly with the propulsion a bit closer to the center would help with this. Adding some small fins to the bottom would help too. And likely the software could be better optimized to avoid oversteering.  

I ordered a 6 foot kids surfboard:


and a bodyboard:



recently. I hope to try them out as AMOS "platforms" soon. 

Other work this past week has focused on getting the RTK (real time kinematic) / GPS evaluation boards working with AMOS. On the weekend, I was able to get the equipment working well with one board / antenna system functioning as the "base" and the other board / antenna functioning as the "rover", both on the kitchen deck, and both plugged into the USB ports on my laptop:


For the above GPS data, I waited with the rover stationary on the deck for about a minute, and then moved it about 20 cm south and waited another minute. Looks like about +/- 3 cm or so precision there!

Of course to get this working on AMOS, the output from the base unit will need to be sent wirelessly to the rover unit. The base unit only appears to be sending a few hundred bytes per second, so that should be OK for the wireless transceiver currently on AMOS. I'll need to hookup a second transceiver to the base unit. And also packetize the outgoing data, so that it can co-exist nicely with other wireless commands potentially being sent by a user controlling the boat and viewing its data. To get
a feel for the accuracy / precision without using the RTK base unit, I put the rover unit on AMOS and carried it around the perimeter of our fence, about 1 foot inside the fence:

It seemed to be accurate to about +/- 2 m most of the time.

The final bit of news for this week was that the December issue of Ocean News and Technology finally arrived. There is a great article on the future of low-cost autonomous surface vehicles on page 42: http://digital.oceannews.com/publication/?m=9767&i=685854&p=42&ver=html5
  












Thursday, December 10, 2020

New Build With New Motor

 Much of the past few weeks have been spent assembling the electronics boxes for the next AMOS version. The LiDAR module just arrived yesterday, so it is not on yet, but pretty much all the other electronics are assembled, including a new motor. 

Both boxes combined, and including the 10AH battery weigh only about 3.5 kg. In a pretty crude test involving a kitchen scale and the propulsion / battery box positioned with its back end on the scale, I was able to compare the lifting force of the two propellers for approximately the same input voltage, and  the same 10" propeller. The new motor completely outstripped the old one, producing 2.5 times more lift for approximately the same input power, i.e. about 1300 g of force vs. about 500 g. Excited with these results, I strapped the electronics boxes onto the old AMOS surfboard:

And took it down to the river this morning for a test:


The test was very short. AMOS made an abrupt 45 degree turn and then headed directly for this clump of trees (you can just make it out in the top center of this photo):


Unfortunately the propeller broke, and that was the end of the test. There were actually 2 reasons for the directional error. One was that the box containing the AMOS-IMU (containing the electronic compass) was about 10 degrees askew of the boat:


The other more significant problem was that the magnetometer offsets changed significantly with temperature. I did a test this evening in the backyard with the box pointing roughly east and reading a reasonably accurate 81 degrees when the box was still relatively warm, at 18 deg C. After being outside for an hour, the temperature inside the box was -3 deg C, and the heading had drifted down to 41 degrees:



I don't remember temperature having as profound an effect on the previous AMOS boats, but then again I only did a limited amount of testing at negative temperatures. So to be ready for the next test (assuming it will be somewhat close to -3 deg C), I re-did the circle calibration in the backyard (the original calibration was done at room temperature). It wouldn't be hard to have the boat do its own magnetometer calibration in the water. But better would be to calibrate and model the offset and possibly gain fluctuations of the AMOS-IMU sensors with temperature. 

In other news, the RTK antenna cables just arrived today, so this weekend I hope to do some backyard surveying work. 😎