Tuesday, May 7, 2019

Big Logs and Big Magnets

There was still a thin skim of ice over part of the head pond at Woolastook last week when I took AMOS out for a test run. The test started off poorly, with AMOS spinning around in a number of crazy circles, before the screws holding the propeller to the servo motor loosened and the propeller pitched forward onto the deck of the boat. Unfortunately I didn't have any Allen keys with me to tighten the screws, so the testing for that day pretty much had to end there.

The spinning in circles was a problem, and testing the compass output the next day revealed that the LiDAR module was no longer working and was drawing an inordinate amount of current. This current passed through a wire which happened to be in close proximity to the electronic compass, causing a great deal of noise and interference in its magnetic heading output. Opening up the LiDAR electronics enclosure revealed that some water must have gotten into it at some point, as many of the circuit components on the lower half of the board were badly corroded. Its enclosure is supposed to be IP65, so I had hoped it would do better than that if left in the rain or splashed occasionally by waves. So I guess I'll need a new LiDAR module at some point. I'm planning to upgrade to this one: https://www.robotshop.com/ca/en/lidar-lite-3-laser-rangefinder-high-performance-llv3hp.html I think since it is IPX7 rated, capable of being dunked in 1 m of water, able to communicate over I2C, and also draws less than half the current than the previous model I was using. It would also free up a serial port on the Pi for some other (TBD) purpose.

Thinking that the magnetic heading issues had been completely solved, I returned to Woolastook the next day to repeat the test. AMOS fared better this time, but still weaved badly back and forth. Some simple tweaking of the control parameters were able to mostly fix this, but when travelling in certain directions it still tended to weave back and forth quite badly. Also, there was a large amount of floating debris in the pond that day, probably from all the recent flooding the St. John River has seen lately. A couple of times, AMOS got badly slowed down after driving over (and trapping) large logs:


Here is a video showing AMOS take off in a nice straight line:





This version of AMOS moves a bit faster than its beer cooler predecessor and it does so using considerably less forward thrust (about 1 pound vs. almost 10 pounds for the beer cooler version). It is able to do this because of its shallow draught and more hydrodynamic shape.

More testing of the electronic compass today demonstrated that the Lithium ion CR2032 battery used to power the real time clock was fairly magnetic, and since it was nearby the compass was also interfering with the heading output. So I re-wired the compass module to be further away from everything, in its own corner of the front enclosure. An initial garage test seemed to indicate that it was working reasonably well, giving headings that were probably accurate to within about +/- 20 degrees. Some further tweaking of the control parameters will probably also be required, but hopefully I should be able to get this version of AMOS to move consistently in nice straight lines soon.

2 comments:

  1. IP67 is the minimum rating for anything I'd use for a marine application, and even then I'd be nervous if it were expensive or of critical importance.

    Degaussing the battery pack(s) is a standard part of our configuration process; helps keep the compass data clean.

    ReplyDelete
    Replies
    1. For now IP67 is probably the limit of what I can afford... hopefully it will be enough to get me through a year's worth of testing. There might be some benefit to making a case for the case though; for example making a 3D printed part that goes around the IP67 LiDAR to offer an additional layer of protection. The coin cell battery was only a few cm from the compass. I had wrongly assumed that it would not have a magnetic field associated with it. Now I've got the compass about 20 cm from it, so I don't think there should be any interference. Once the battery was moved about 10 cm or more away from the compass its effect was not noticeable. At Measurand we tried de-gaussing some objects for the ShapeWrap system... it seemed sort of like witchcraft. I think about half the time it actually created more of a magnetic field in objects.

      Delete