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. 😄