Tuesday, March 5, 2019

Ready For Pool Test #2

I learned this, at least, by my experiment: that if one advances confidently in the direction of his dreams, and endeavors to live the life which he has imagined, he will meet with a success unexpected in common hours. He will put some things behind, will pass an invisible boundary; new, universal, and more liberal laws will begin to establish themselves around and within him; or the old laws be expanded, and interpreted in his favor in a more liberal sense, and he will live with the license of a higher order of beings. In proportion as he simplifies his life, the laws of the universe will appear less complex, and solitude will not be solitude, nor poverty poverty, nor weakness weakness. If you have built castles in the air, your work need not be lost; that is where they should be. Now put the foundations under them.
- Walden or life in the woods,  by Henry David Thoreau

As advertised, the DS3231 real-time clock (RTC) was very simple to setup and get working with the Pi, and no programming was required. Just had to wire it up, modify a couple of configuration files, and then re-boot the Pi. Now I don't have to worry about getting an accurate time from a time server after re-booting before saving data or log files. Also, the added bonus of the RTC is that it seems to have cleaned up some occasional errors that I was getting on the I2C bus. The RTC device is on the same bus, but I removed the termination resistors from it, so I'm not sure why it would have any effect on the data quality of the other devices (inertial measurement unit (IMU) and analog to digital converter). Previously I had been getting errors (mostly from the IMU) maybe about 1% of the time, but now the errors are gone. Maybe some subtle difference in line termination or voltage levels that magically made things better.

Some additional bugs (mostly related to multi-threading) were uncovered and fixed in the Boat Captain PC software. I also modified things a bit to filter out some commands sent from the PC to the boat if a large number of them were sent in rapid succession. This helped a bit to improve the responsiveness of the remote control interface. I also updated the Android and iOS versions of the Boat Captain software, to add support for the humidity, current, and wireless received power measurements.

I have re-visted the idea of creating a waterproof enclosure for an inexpensive turbidity sensor. The inexpensive sensor basically seems to work if care is taken to shield it from ambient light and make the top part of the sensor module (where the wires plug in) waterproof. A quick 3D-printed test part indicated that it should be possible; I'm not sure if my printer is up to the task of creating a full-size enclosure though. My first effort ended in a large messy blob, as the printer generally tends to mess up on large pieces. I'll try breaking it up into separate pieces that are bolted or screwed together with O-ring seals. If that doesn't work, maybe get a printing shop to do it.

Tomorrow is another pool test, and I want to try out the new air propeller / steering mechanism. I'm also planning on setting up some short automated routes in the pool to see how well it keeps direction. I'll post a video here tomorrow evening.

The test went well - AMOS can now steer quite ably. Here are a couple of videos showing a fast power turn and a more careful turn in the corner of the pool.






No comments:

Post a Comment