Good news: the lithium battery just needed a bit of a voltage boost from a plug in battery charger. The folks at Ukko Versatile Energy Solutions (https://www.ukko.io/) offered me some helpful advice: basically the battery management system (BMS) inside the lithium battery pack has a safety switch to cutoff output when the voltage falls below 10 volts. But because the solar charger on AMOS requires some battery voltage in order to turn on, it wouldn't even start to charge the battery, no matter how brightly the sun was shining.
So I bought a $20 wall charger from Amazon and used it for 3 hours to bring the battery back to about 13 volts. To help avoid this problem in the future, AMOS now has some improved software to avoid getting too close to the dangerous 10 volt cutoff. If the measured voltage drops below 12 volts, it only allows half-speed operation, and if it drops below 11 volts, it shuts down the thrusters altogether. Once the voltage gets back to 13 volts, everything goes back to normal. Now that I think about it, it should probably also send an alert email / text to notify the user about the low voltage condition. I should probably also do some tests to see exactly how long the battery can last if it is close to being depleted. It's a bit tricky to know exactly how depleted the battery is, since its voltage tends to shoot back up whenever the thrusters are turned off.
AMOS went through a couple more field trials this week: the first was in the usual spot, but because it was a Saturday, my daughters Kirsten and Bexie joined me and we brought our dog Checkers and the canoe. AMOS started out well for about a minute, but then appeared to stop in the middle of the cove and start moving in circles. We paddled back to shore with AMOS in tow and I set about clearing some lake grass from the propellers and checking over the source code while the girls and Checkers paddled around the cove. I made a few minor changes to the software, but nothing really seemed to work: the boat would always just move a little ways, and then start moving in a circle, not always in the same direction. There was a lot of grass getting stuck in the propellers, and it seemed that that was the likely culprit; a more complete check of the ship logs later that evening and a more thorough cleaning of the propellers confirmed it.
The second trial happened the next day, just a little further down the road at a small boat launch. This time I went by myself, but a family of 4 was pulling up in a motorboat just as I was getting AMOS into the water. A young boy, probably about 12 was curious:
"Is that a robot boat?"
"Well, yes it is actually!"
"Cool! I like anything to do with technology... does it use an Arduino or a Raspberry Pi?"
"It uses a Raspberry Pi, and some other electronics, The Raspberry Pi handles most of the navigation, motor control, and stuff."
"I was going to learn Python, but I figured it would probably take FOUR hours or something, so I haven't done it yet."
"I use C++ myself, although I think most people now prefer to use Python. You might find that it takes a little bit more than four hours to learn though..."
The boy would have liked to see AMOS in action, but I was afraid of it getting stuck in the grass again, so this time I towed it out through the shallows and started it on the other side of a bridge in much deeper water. The following is the (nice and straight) track that AMOS followed:
It stopped mysteriously before reaching its final destination though, and I wasn't sure at the time what had happened. A quick check over the Bluetooth link with my phone confirmed that the program was not running, so I assumed that it had crashed. Fearing that some water had gotten in again (despite adding some layers of duct tape around the problematic U-bolts) I turned off the thruster power switch, hitched AMOS to the kayak and started back. While in the process of doing this, a man and woman driving a large pontoon boat came over to inquire about what I was doing:
"Are you alright there?"
"Oh yes, I'm fine thanks!"
"Did you find that thing in the water?"
"Ummm, no it's mine actually, I'm just testing it."
"Do you need us to take it somewhere for you?"
"No, that's OK, I think it just crashed. It happens a lot actually."
They seemed a bit perplexed about this, but then motored off somewhere else, leaving me to tow it back to the boat launch. Inside the hull, there was no evidence of water, and none of the leak sensors had detected anything. Looking at the ship log on shore confirmed that AMOS had not in fact crashed, but its program had been stopped by a keyboard press, presumably sent somehow by accident over the phone's Bluetooth link. The phone had been stored in the kayak's dry storage container, so I'm not exactly sure how this might have happened. It was quite windy with some waves though, so perhaps some jostling in the container was enough to momentarily turn on or register "screen touches" that were sent to the boat. I'll have to remember to turn off the terminal program for the next test. In order to more quickly diagnose these sorts of stoppages, I wrote a small program yesterday that just prints out the last 10 lines of text from the most recent ship's log file. Something that I should be able to access and read quickly while sitting in a kayak in the middle of a river.
Today I replaced the lithium battery back in AMOS, and also added a water-proof temperature sensor, the DS18B20. The wiring changes weren't much, but took me almost 3 hours, as I'm terrible at soldering and need to check, double-check, and triple-check the schematics and board layout to make sure I'm not going to wreck anything. Luckily, nothing got wrecked, and the temperature sensor appears to be working. I plan to just tow it along behind AMOS, a few inches below the surface of the water.
No comments:
Post a Comment