Close

Got Pyboard and some PVC

A project log for Cheap underwater tilt current sensor.

Cheap (<$100) underwater current sensor that can be deployed at 70ft depth. Your thoughts, comments and advice are very welcome here!

max-kviatkouskiMax Kviatkouski 05/12/2018 at 18:270 Comments

So yesterday I got my Pyboard Lite 1.0 with accelerometer.

Very nice and tiny board. Thought that it came in broken only to figure out that micro-USB cable I used was not working. Couldn't make it show up as a COM port on my Windows machine. Rest of the day was spent trying to install Ubuntu as my second OS. Everything works just fine with Ubuntu - you can see the board as a flash drive, you can connect to it using screen or ampy from  Adafruit. I needed to switch to root user to use ampy. And you cannot have both connected to PyBoard. One or the other only.

First difficulty is error handling and debugging. If you have syntax or runtime error in your scripts the only thing you'll see is green and red leds alternating on the board. The only way to figure what's going on is to connect to REPL and try to execute your script line by line - then you'll see exception or error message. If it becomes a bigger problem I'll try to find out another way to do it.

http://wiki.micropython.org/SDdatalogger provides very good foundation for datalogger implementation. So I'm following it. Code is available at https://github.com/max-kviatkouski/pyboard-current-meter-logger

Now back to another stream of work: waterproof housing. After going to Home Depot with PyBoard I figured that 2'' PVC pipes are just enough to fit the PyBoard in. Below are parts for housing v0.1.

I'm trying to keep housing as simple as possible. On the picture you see 1ft long 2'' PVC pipe (schedule 40), 2'' PVC cap, 2'' insert cap (I plan to use it as a foundation to mount PyBoard on - it is easy to insert and it will ensure consistent alignment of the board between deployments, 2'' rubber cap with clamp. I'm pretty convinced that rubber cap is where it's going to fail but nevertheless I'm willing to give it a try. I'm going to take it down to 70-80ft with me on a dive today.

Below is an assembled housing.

Discussions