Boat Environmental Signature Measurement Device

Hello Arduino Gurus,

I am scrambling to learn arduino programming for an ambitious research project for the Coalition for a Responsible and Sustainable Navigation, an environmental non-profit organization. In this new project, we want to measure the wash and wake of all types of recreational boats, from small electric canoes up to the biggest, most powerful wakeboats. We would like advice as to how to best program to achieve the best results. Your programming advice (architecture and approach mostly) would be greatly appreciated. Thank you.

As for the physical hardware, no problem. We have access to many resources for that.

There are two things we want to accurately measure with respect to what we call boat signatures.

WASH Measurement.

Wash is the turbulent jet of water created by the propeller of the boat. We need a good overall measurement of this, in space and it time.

In past research projects, we used single or several ADCP devices. The problem we have is that these devices are expensive and require delicate calibration. Though ADCP devices are very good at measuring average 3D movements in the water column, it is only along a narrow beam in front of the device. Moreover, they also tend to have difficulty dealing with the chaotic turbulence we have with boat prop wash. We conclude that we needed something much more comprehensive and basic.

Basically, we envision to have two vertical poles (masts) suspending a vertical array of movement sensors (similar to flowmeters) on a thin stainless steel wire grid. The grid could be a 8x8 array, 1 meter apart, 7 meters x 7 meters (see image). We can design and make optimized impellers with magnets and encapsulated hall effect sensors to get nice digital inputs for arduinos using the PULSE function, no problem. Test with hacked PC fans (models with no "cogging", disconnect coils and connect to output of hall sensor) indicate that this is the simplest most reliable way to proceed.

So, a 8x8 array of these sensors streaming velocity data to PC onboard a boat nearby could be ideal. Moreover, it would be ideal to see the data realtime on the PC as to make sure everything is calm before making a boat pass. We could trigger the start of recording with a reasonable sampling rate (could be as low as 10 times per second) for the time it takes for the wash to subside (one to 3 minutes, we don't actually know yet...).

We will chose a clear lake to perform these tests and we intend to video document as well, above and below the surface. Vinyl ribbon streamers on the grid give us visual confirmation of what we are measuring. Test last summer with a GoPro using a coax wire to connect wifi to my cell phone worked great. We can watch, configure, start, stop recording and playback at will.

My question is how to best approach this challenge. Is it best to have individual arduinos communicating serially, or is it possible to scan or multiplex by rows and columns, that kind of basic stuff. All roads could lead to Rome but some are much better than others :wink: Please advise.

WAKE Measurement This is to measure the wave trains as they pass by the sensors. From that data, we can study the wave profiles, determine their speed and energy and so on.

At each side of the grid, atop the poles, we plan to have waterproof SR04T sonars above the water measuring downwards. Tests so far are most promising. I have both left/right streams sampling away in the serial monitor.

Combined? Perhaps both wash and wake can be transmitted serially and recorded to PC into one simple single formatted file. For example, we could sequentially each row of wash data followed by the wave heights in order to balance rates. Wave profiling from wake data will require a faster sampling rate than wash.

All that we need advice on is how to approach reading the data form all the sensors, streaming them serially to computer in order to observe and record them for analysis later.

Please advise. Your valuable input is most appreciated. Many thanks in advance!

Paul Isabelle, volunteer for Coalition Navigation
www.coalitionnavigation.ca

Since you want to aggregate a whole array of sensors you're probably going to want to be interrupt driven on all those pulse inputs, so they can be sensed in parallel. pin-change interrupts on the Uno allow all the pins to
be interrupt sensed, and I presume the pulse rates are fairly low so that a dozen of them won't overload the
system.

You'll need quadrature signals to get direction from each flow sensor I believe, so two signals per sensor.

The Mega has way more inputs, but not many can be interrupt sensed (fewer than on the Uno in fact).

Sending data back from individual Arduinos might need another level of aggregation, since ultimately you
probably only want a single USB connection to the laptop or whatever. Serial connections are easy to
work with and a Mega has 3 extra hardware serial ports that could be used to combine streams from satellite
microcontrollers.

Timestamping transitions might be needed, which could be an interesting challenge, although if the
system is quick enough you could do that on the host.

Note that with interrupt driven sensing you'll need to hand over any serial comms to the main loop as
serial commands should be outside of interrupt handlers. Data structures like a ring-buffer are often
useful to act as a FIFO between ISR and the main code.

Paulduino:
Basically, we envision to have two vertical poles (masts) suspending a vertical array of movement sensors (similar to flowmeters) on a thin stainless steel wire grid. The grid could be a 8x8 array, 1 meter apart, 7 meters x 7 meters (see image). We can design and make optimized impellers with magnets and encapsulated hall effect sensors to get nice digital inputs for arduinos using the PULSE function, no problem.

So, if I have this right: 64 flow sensors held in a rigid grid from, say, 1m to 8m deep

For starters I think there's some decision to be made on what's submerged and what's not.

The sensors are obviously submerged, need power and signal out. I reckon wire is the only sensible way of getting signal out, so power might as well be wired too.

What about having an Arduino with the sensor, or handling a row of sensors ?

For my money, an arduino per sensor submerged makes no sense; you still have to wire power and signal (now from the Arduino) and you have all the bother of waterproofing the thing down to 8meters.

An Arduino handing a row of sensors submerged, again sounds a real pain having connections from 8 sensors into a waterproof unit cabled back to the surface.

It's also worth considering what parts of the system are most likely to be damaged: the sensor bits on the grid.

Therefore I'd suggest prototyping one nice-and-solid movement sensor, maybe use RS485 drivers to return data (raw pulses) along the data/power cable. Waterproof it. Test the crap out of it. Then make a lot of 'em.

At this point you'll be left on a boat with 64 bits of wire in your hands.

Then I think it makes sense to have one Arduino handle, say, 8 channels of sensors. 8 of these in a nice box leaving you with the relatively simple problem of aggregating 8 data channels from Arduinos.

You could do that by implementing an RS484 bus and poll 'em with the PC, or poll 'em with another Arduino which takes the data and chucks it out over WiFi. The total datarate for this is trivial, so any Arduino should be ok.

Yours,
TonyWilk

Many thanks Mark and Tony,

Thank you for your input. It confirms the many challenges ahead that I suspected.

Yes Tony, it is a rigid 8x8 meter grid, vertically suspended in the water, from 1 meter down (to avoid propellers) all the way down to 8 meters depth (past research would indicate 5-6 meters maximum). The sensors could be rigid or pivoting to pick up velocity, but not direction (too complex and not required, the wash it turbulent but mostly horizontal and we will have video data for indications of direction and turbulence).

The hall effect sensors output a digital signal, but if I understand correctly Tony, drivers may be needed to get that signal up to the surface. When velocities will be low, the rates may be lower than our sampling rate, so I need to think about timeouts and resets.

Ideally, we need impellers (pitch, profiles, inertia,...) that turn fast, with many poles to have the highest pulse rate possible. Ideally, we need to read velocities below 0.1m/sec. The hall effect sensors and drivers (and arduinos for that matter) could be dipped, placed housings and encapsulated in epoxy or silicon gel. Careful care must be taken to avoid water creeping in from wires (lost a nice enclosed webcam that way once..:wink:

If we have microcontrollers on each sensor, they can count pulses, average results, send back formatted and table calibrated serial data when prompted with an interrupt. I have no problem encapsulating 64 little arduinos for this. What would be a good choice for this?

On board our boat, or atop the mast (wifi connection to boat), we could have our 64 wires arrive where we aggregate data and send it to the PC, wired or better, by wifi.

Please continue your sending your advice, it is very much appreciated. I will be researching each single path and component you suggest. Many thanks!

Kindest regards,

Paul

Paulduino:
The hall effect sensors output a digital signal, but if I understand correctly Tony, drivers may be needed to get that signal up to the surface.

Drivers: yes, RS485 would be a good choice for raw data and/or any serial communications down the 10's of meters of cable you are going to have.

Ideally, we need impellers (pitch, profiles, inertia,...) that turn fast, with many poles to have the highest pulse rate possible. Ideally, we need to read velocities below 0.1m/sec. The hall effect sensors and drivers (and arduinos for that matter) could be dipped, placed housings and encapsulated in epoxy or silicon gel. Careful care must be taken to avoid water creeping in from wires (lost a nice enclosed webcam that way once..:wink:

In your earlier post you mentioned 'testing with hacked PC fans'; the blade pitch on these is far from what you need (you really need something that looks like a commercial open channel current sensor) - do you have the option of 3D printing impellers ?
While you can get magnetic sensor discs and tapes with alternating N-S magnetisation, it may be worth considering optical reflective or 'slotted opto' measurement on the periphery of 'ducted fan' type of impeller

If we have microcontrollers on each sensor, they can count pulses, average results, send back formatted and table calibrated serial data when prompted with an interrupt. I have no problem encapsulating 64 little arduinos for this. What would be a good choice for this?

Yes, they could do these things when programmed - is that going to be perfectly developed before being encapsulated or will you need to be able to re-write code in them ?

Using RS485 communication along the wire to poll for data, you could implement ALL the signals required for a standard '232 to USB adapter and program it down the wire - but thats a LOT of additional drivers and wire !
With single-channel '485 it is possible to write your own communications which includes 'new code download', but that is not a 'beginner' thing.

A good choice ? The smaller the better I'd say - something like an Arduino Pro Mini + and a 'MAX485' bolt-on goodie.

Yours,
TonyWilk

P.S. I still can't see anything but disadvantages in putting the processor down with the sensor.

Many thanks Tony,

[/quote]
P.S. I still can't see anything but disadvantages in putting the processor down with the sensor.
[/quote]

There is another advantage to having everything above water, we can disconnect the brains and leave the hardware in place. These tests may have to spread over a few days, weeks...

Humm. Do you think that 3144 Hall effect sensors could drive a 5V pulse signal up 20 meters of shielded wire to the arduinos? If we use thin stereo shielded wire, we could ground the shield, send down 5V in one wire and send back the signal in the other. Each separate sensor would have it's own wiring with perhaps minimal risk of cross-talk. We would only have to pot the 3144 and a pullup resistor near the impeller magnets (several to reverse polarity) for it to work reliably.

Please advise, many thanks,

Paul

Paulduino:
Humm. Do you think that 3144 Hall effect sensors could drive a 5V pulse signal up 20 meters of shielded wire to the arduinos?

Yeh, probably....

I'm sort of hesitating here because I'm more used to making sure stuff is pretty bomb-proof and the cost of parts is swamped by the engineering and/or overall system costs. If there's a need to run any signal down more than a foot or two of cable then you usually think of some sort of line driver and protection stuff for both ends.

In this case tho, it's not going to be in an electrically noisy environment, the 3144 has it's own regulator and 25mA output drive so I guess it'd be ok.

I would put the pull-up resistor at the 'arduino end' instead of attaching it to the device, then you are sort of 'current' sensing rather than 'voltage' sensing down the wire. On the 3144, I'd add a cap on the power supply.

You can then use a 12v supply for the 3144's via 64 x 100ohm resistors, giving some resilience in case any sensor goes short for some reason.

Using opto-isolators as inputs to the Arduinos would give you electrical isolation between all that stuff in the water and your delicate 'brains'.

Yours,
TonyWilk