Tuesday, May 26, 2020

New Look For the Website!

Jata has been working on improving the appearance of the website; you should definitely go have a look: https://www.innaturerobotics.com/. There are now alternating pictures on the main page, color schemes consistent with the company logo, nice looking fonts and text that is properly lined up, and overall just way better organization and appearance!



This past weekend I realized that so far this year AMOS must have been using an incorrect magnetometer calibration file. I must have copied over an old version of the file by mistake at some point over the winter. Certain orientations like east or southeast were still fairly accurate, which explains why the first couple of tests in April, where AMOS was travelling southeast down the St. John River went well. The previous method that I had used for calibrating the magnetometers involved maximizing and minimizing the X, Y, and Z magnetometer signals by slowly rotating the AMOS- IMU around and observing the data outputs on the screen until the observed min and max values no longer changed. This method could give inaccurate results however if for example there were some occasional spurious low or high outputs. So I decided to try a new method for calibrating just the X and Y magnetometers by rotating them slowly in a horizontal circle. By doing this, it was possible to use an iterative best-fit method to accurately estimate what the X and Y sensor offsets were. Testing out the calibration later on, the accuracy seemed to be typically within +/- 10 degrees, which is good enough for AMOS's navigation needs. On Saturday I took the boat out for a test in the same spot as the week before. It followed the track pretty well, and no towing was required, although I did need to push the boat away from some overhanging trees a few times, since I had forgotten to bring the chicken wire cage to protect the propeller.

The yellow dots and lines correspond to the planned waypoints and routes respectively. The white dots and lines correspond to the actual route that AMOS took, as measured by the GPS. The wind was pretty strong that day, so it was good to see that it could navigate the 4 km course correctly in about two hours.

Here are the interpolated versions of the depth and temperature that the fish finder recorded:



At the moment I'm updating the BoatCaptainMap software to include a lot of the functionality that the old version of the c++ application had. I created a C++ DLL from the old existing code to handle the communications routines, since these were a bit of a pain to write and I didn't want to do it again in c#. I also re-used some of the bitmap button images (stop sign and arrow buttons) from the old app in the new one:


At some point, these will need to be made over too, but for now they're good enough.


Tuesday, May 19, 2020

Fish Finder Depth Sensor

Sadly we did not win one of the five Volta Cohort investments last week, but it was still a valuable experience nonetheless. We were able to practice refining our pitch and improve the focus of the business, which should help us going forward.

The next couple of days were spent writing driver software and hooking up cables to convert the RS-232 output from the fish finder into depth measurements for AMOS's Raspberry Pi. I bought a 3 foot long RS-232 to USB cable for this purpose, but couldn't find the male DB-9 plug for soldering that I thought I had lying around somewhere. So  I snipped the cable near the end and pulled out the bare circuit board inside:


This afforded some better soldering points for the white, green, and black wires on the top surface of the board. And as luck would have it, I didn't mix up the green and white TX/RX cables.

The fish finder outputs NMEA 0183 sentences in ASCII text at 4800 bps, something like this:

$INDPT,1.1,0.0*47
$INHDG,,,V,,V*60
$INHDT,,T*0B
$INGLL,,,,,,V*16
$INVTG,,T,,M,,N,,K*5E
$INMTW,10.1,C*14
$PSMT,0,0,0,2,appver,0*28
$INDPT,1.1,0.0*47
$INHDG,,,V,,V*60
$INHDT,,T*0B
$INRMC,,V,,,,,,,,,*21
$PSMT,0,0,0,2,appver,0*28
$INDPT,1.1,0.0*47
$INHDG,,,V,,V*60
$INHDT,,T*0B

The lines that matter are the ones that start with either $INDPT or $INMTW. These correspond to either depth or temperature respectively. Fortunately there are lots of websites around that summarize what the NMEA sentences mean, so I didn't need to pay $1000 or more for the official standard. Writing the software driver for the Pi to parse this info was pretty straightforward. Just needed to make sure that the software polled the serial port frequently enough to keep the depth data current. Depth is sent out only once per second by the device, so it's not exactly a compute-intensive task.

On Sunday Kirsten and I took advantage of some good weather to take the canoe and AMOS out for a test. Unfortunately AMOS kept veering off to the left for no known reason. A later inspection back at the house indicated that one of the electronic compass wires had come unplugged. The following day I tried again, but the same thing happened, it kept trying to go west when it should have been going north. Wanting to test the fish finder anyway, I towed AMOS around in the kayak for about an hour. I didn't cover quite as much water as I thought I did, but the results for the depth measurements were pretty good:


and with interpolation turned on:


That evening I checked the compass calibration on the grass in our backward and found that it was indeed off by about 90 degrees, i.e. when the boat was pointed north the compass output indicated that it was facing east. I'm not sure yet if this is some new hardware problem, or if the compass calibration got messed up somehow and needs to be re-calibrated. Hopefully that'll get solved tomorrow.

Tuesday, May 12, 2020

Ready to Compete!

Our 3 minute pitch presentation was re-worked and fine-tuned this week and in my unbiased opinion it looks awesome! The big event happens tomorrow (Wednesday) at 5:30 pm AST, see https://voltaeffect.com/cohort/ for links to watch online. We are scheduled to be the 4th of 15 teams presenting, at 5:55 pm.

I had been hoping to get AMOS out on the water this weekend for a bit, but the weather did not really cooperate:


We got over 15 cm of snow on Saturday, May 9!!! There isn't really a spring season in New Brunswick. Just winter, 2nd winter, and then black fly season.

Last week this new little GPS stick arrived:

so I plugged it into the Pi and tried it out. From a cold start it wasn't as fast as advertised. It took 5 minutes to find 4 satellites (instead of the advertised 29 seconds). But this was still quite a bit faster than the 15 minutes that it was sometimes taking for the old GPS unit. The specified average accuracy was 5 m, and a quick backyard test (no I didn't really jump over the fence with AMOS) seemed to confirm this:


It's kind of a scary amount of detail that you can get in this Esri / ArcGIS mapping software... it allows you to zoom in even more than the level of this picture. Good thing I wasn't nude sun-bathing when the satellite took that picture. 😎







Tuesday, May 5, 2020

Fish Finding and Pitch Preparation

I produced a rough draft of our PowerPoint presentation for next week's Volta Cohort pitch competition (see https://voltaeffect.com/cohort-finalists-spring2020/) and Jata did a great job of re-arranging basically everything so that it looked really good! Today we did a sound / video check for a smaller Volta pitch competition which takes place tomorrow at noon. I think if you want to see it you can get a free ticket from eventbrite here: https://www.eventbrite.ca/o/volta-3570959959. The main event pitch competition for a $25000 investment in the company takes place next week, May 13.

Getting ready for the pitch hasn't left much time for hardware / software work on AMOS, but I did get a bit of code written on adding live mapping capability to the BoatCaptainMap app and did 3D-print some parts for mounting a fish finder with its ultrasound transducer to the back plate of AMOS. No, AMOS is not looking for fish, but I read somewhere that using a fish finder was the most economical way to do water depth measurements, so I figured it would be worth a try.

The fish finder uses the +12V from the AMOS battery for power, and has a cable going to an ultrasonic transducer. Normally the transducer would be mounted onto the transom of a boat, but I
3-D printed a part to secure it to the back plate, just to the right of the pH probe in the above picture. The fish finder also has a NMEA-0183 output, which sends out depth readings every second. The NMEA standard is available but it has a ridiculous price, something like $1000 or more, depending on what industry you're in. From all the free information that I could find online, it seemed like the NMEA-0183 output was basically an RS-422 signal. So along with the special NMEA-0183 cable I bought for the fish finder, I bought an RS-422 to USB converter for AMOS. But once I actually got the cable and looked at the instructions, it turns out that the signal is actually RS232, not RS-422. So this evening I just ordered a 3 foot USB to RS232 cable from Amazon which should do the job. Hopefully over the next few days I'll find some time to drill more holes in the AMOS boxes, and solder some wires to connect everything together. I'm looking forward to burning my fingers again, it's been awhile. 😄

Tuesday, April 28, 2020

Volta Cohort Pitch Competition

Back in March, our controller at Measurand mentioned a competition that I might be interested in: The Volta Cohort Pitch Event (https://voltaeffect.com/cohort-finalists-spring2020/). There was a written online application with a number of questions pertaining to your business. 15 applicants would be picked to pitch their business at an event in Halifax on May 13, and up to 5 of those would win investments of $25000 and become part of the Volta cohort where they would receive mentoring and assistance with their business. Last week an email arrived to say that In Nature Robotics had made it to the group of 15, although due to  COVID-19 the pitch event will be held entirely online. So Jata and I will have to figure out what to tell people about the company in a 3 minute online PowerPoint spiel. No problem!

Last week was also favorable for testing, although not at first. On Saturday I drove down to the same launching point as the week before, but it was much windier, and the current looked even stronger. While I was waiting for a GPS signal and making some adjustments to the protective cage, the GPS signal actually came through and the propeller whirred to life, knicking two of my knuckles. I had considered moving to a beefier more powerful propeller, but now I'm glad I didn't! Here is a short video recording of the current, which doesn't really do it justice:


I had wanted to try out some new software that had just been coded that morning. As sometimes happens, there was a tiny bug that ruined the entire test. I had forgotten to convert a heading variable from radians to degrees, which totally messed up the new algorithm to skip waypoints that the boat had already passed. So after the boat had struggled against the current for about an hour I gave up and towed it back. 

Sunday was much better. It actually would have been nice to have some strong wind and current to really test out the fixed software, but the current seemed a bit less, and there was scarcely any wind at all. It took the boat about 2 hours to go from the launching point down to a point a little beyond the Westmoreland Street Bridge, a trip of about 9 km. On the way it collected pH and temperature data, and took a number of pictures:

The route AMOS followed (I towed it upriver along the shore).

Temperature Data (with interpolation turned on)

pH Data (probably not accurate, I'm going to try cleaning the probe before the next test).

One of the planned pictures was this one of the Delta Fredericton.

Zoomed in shot of some guy in a kayak.

Nice shot of Westmoreland Street Bridge.

It took about 2 hours to tow AMOS back to the launching point, and since it was a nice day many people were out walking and biking. Quite often they would ask what I was towing and one lady even took my picture. I did my best to give them a short explanation; it was probably good practice for next month's competition. 😊

Tuesday, April 21, 2020

How to Run Down The River

This past weekend we were blessed with some nice warm, sunny weather so it seemed like an ideal time to try out the new AMOS-Cat boat on something more significant than the large puddle in our backyard. On Saturday, I biked down to the St. John River to check out a prospective launching area about 8 km upriver from the main downtown core of Fredericton. The spot had a bit of a parking area for 5 or 6 cars and a nice inclined path leading down to the water. The current looked a bit fast, but not so fast that I couldn't tow AMOS upriver in the kayak if necessary.

So I mapped out a course that would take AMOS about 8 km down to the Westmoreland Street Bridge, collect some sensor data and collect pictures at selected locations en route:


On Sunday AMOS started the course shortly after noon. There was the usual 10 or 15 minute wait for a valid GPS signal (a new GPS is on its way which should hopefully speed that up) and then it was off down the river. The strong spring current pulled it along rapidly at first, but it tended to overshoot the interpolated waypoints (there are 10 interpolated waypoints between each of the yellow markers shown above) and then reverse direction to try to get back to the waypoint that it had missed. The software has an algorithm which gives up on trying to reach a particular waypoint (and moves on to the next one) if the distance to that waypoint increases over any 4 minute interval. The problem on this day though was that in most places AMOS couldn't make any forward progress against the current, so it spent a lot of time just "hovering" out in the middle of the river, or even moving backwards in areas of strong current. I will need to change the algorithm to move onto the next waypoint whenever the direction to that waypoint is opposite to the intended direction of the planned route. That will result in some loss of waypoint achievement accuracy, but it should be preferable to waiting for long periods of time while the boat is barely moving against a strong current.

AMOS made it about 2 km down the river before I gave up and decided to tow it back upriver with the kayak. This was about 45 minutes of hard paddling! Here is a map of the route that AMOS took:


The return trip was much closer to shore to avoid as much of the current as possible and because the water was still freezing cold.

Lots of people were out walking on the nearby river trail, and many of them asked about the robot (safely from a distance) so I guess it was good publicity, even though it wasn't quite functioning as intended. Here is a short video taken of AMOS moving upriver in an area where the current wasn't too bad:






Tuesday, April 14, 2020

Backyard Puddle Test

We had a fair amount of rain yesterday and last night, which combined with the leftover snow from winter to make a giant puddle in the corner of our backyard. Although it didn't really provide quite enough room for AMOS to get going, I felt the need to try out the boat in  some actual water for the first time this year:


The boat quickly became fetched up on an alder and needed to be rescued by wading part-way into the puddle and reaching for it with a hockey stick. This version of AMOS (AMOS-Catamaran or AMOS-Cat for short) seemed to have about the same draught as the surfboard version, i.e. about one cm, maybe a bit more at the back end due to the weight of the battery.

A lot of work was done this past week on the new version of the PC BoatCaptain software for controlling AMOS and viewing info on ArcGIS maps. I was able to get the boat route, safety locations, and photographic locations all to appear properly in the application and in the saved web maps, and was also able to load those saved web maps into the application. For some reason though, I could only view multi-colored data points from within the application; when I tried to save a map with multi-colored data points in it to the web, all of the points in the web map became the same color. I suspect it's just a limitation of the SDK that I'm using, or the web service that does the saving of the map, but I asked a question on a relevant forum to see if anyone else knew.

For this week I want to focus more on the new BoatCaptain software for controlling and interacting with AMOS. The weather is quickly warming up and it will soon be time to start collecting more test data!