Wednesday, March 28, 2018

The Pretty Print Shop

For a birthday present, my parents gave me some money to buy a 3D printer: I'm getting the "MagicD A8 RepRap 3D Printer" from Amazon. I'm hoping to use it to better organize the jumble of electronics and interconnecting cables that this project is starting to accumulate, and also find some way of making a structural framework that securely connects the solar panel to the boat. It should also come in handy for building a structure to hold the camera boards, as I discovered this week that my crude vision algorithms are highly sensitive to misalignment of the camera boards (one screw per board into a block of wood didn't really cut it).

I read that this printer in particular is a bit noisy, and like any 3D printer needs to be in a place where it will not get disturbed. For that reason, I decided to clean out my daughters' old playhouse and move an old table into it, to hold the printer. I'm a bit worried that it might be too cold, at least for the next few weeks but other users have claimed that it should work OK (at least with the default PLA filament) if you build a bit of an enclosure around it to keep the air around the printer at a reasonable temperature. And during the daytime, it might be warm enough in there anyway.


 This past week I was able to get GPS data into the Compute module with only a few minor hiccups along the way. The module I was using (https://www.seeedstudio.com/Raspberry-PI-GPS-Module-p-2731.html) could be used over USB, so to keep things simple I hooked it into my 4-port Belkin USB hub. Unfortunately though the hub is not a powered hub, i.e. the only power it supplies to the 4-ports comes from the USB bus itself, so maybe something like 100 mA total spread around the 4 ports, I'm not sure. Anyway, the GPS module's spec sheet mentioned that it required at least 100 mA for startup, so I guess I shouldn't have been too surprised that the Compute module completely failed to detect it at bootup. At this point, I figured it couldn't hurt to just try connecting the 5 V available on my I/O board to the GPS module, while leaving the USB cable intact. This resulted in a red LED turning on on the GPS module. I then installed the recommended GPSd client software (http://www.catb.org/gpsd/) and tried to run one of their sample programs. No dice. The LED was still on, but the program said that it couldn't get a satellite lock. Some quick Internet research explained that the first time a GPS tries to get a lock or fix on the orbiting satellites can sometimes take over 10 minutes. So I took the dog for a walk, and came back an hour later to check on it. Still no luck and no lock. More careful study of the spec sheet indicated that although the main chip on the board had an internal antenna, it was really better suited to outdoor operation. So maybe there just wasn't enough signal in my basement? I carried the setup upstairs into our living room and set it near the window, hoping that would be good enough. It wasn't. I then brought the thing outside, and sure enough that red LED that had been solid the whole time suddenly started flashing once per second. I left it outside and logged into it using PuTTY and sure enough it was now providing latitude, longitude, and signal to noise ratio for the satellites that it was receiving. I also tried compiling and running some other GPSd sample C++ code and it too worked great. The GPSd project won the first "Good Code Grant" from the Alliance for Code Excellence, so it should serve me well. Sometimes adding things like this feels a bit like "standing on the shoulders of giants".  I've ordered a magnetic mount GPS antenna so that I can keep the GPS electronics on the inside of the boat. Hopefully the magnet won't mess with my compass too much!

I also made an effort to try to get the cell modem (https://itbrainpower.net/micro-3G-shield-module-du3G/3G-UMTS-micro-shield-board-module-RaspberryPI-Arduino-d-u3G-presentation.php) working too, but fell a bit short in that regard. I signed up for a $10 / month data plan on the weekend, and plopped the SIM card into the module, but again the Compute module failed to detect the board over the USB connection. This time, my more careful read of the datasheet revealed that in fact the USB connection was only used for communications, i.e. not power. For power, this thing actually requires +4V. Not sure if +5V would have worked or not, but at ~ $100 for the modem I didn't want to chance it. Ordered a +4V supply from Robotshop for a few dollars instead.

It turns out that the water tight cable fittings that I bought for getting cables in and out of the boat are too short. There is actually about an inch-thick layer of Styrofoam housed inside the yellow plastic shell of the boat. So I'll need to see if I can find some longer ones I guess.

Finding a suitable depth sounder for the boat has been surprisingly difficult. Pretty much all depth sounders that you can buy seem to be fish finders, with portable graphics displays. You can get some that are kind of cheap (< $100 knockoffs) but they don't seem to have NMEA data outputs that would allow me to "see" the data. The good fish finders with NMEA outputs seem to cost ~ $500 or so. Ugh. I did happen to find this standalone transducer with a NMEA output (http://cruzpro.com/active.html) that only cost about half that. It's from New Zealand; I'm waiting to hear back from their Canadian distributor about buying it.

No comments:

Post a Comment