An Eye on the Surf

Kevin Arndt

Issue 7, January 2018

This article includes additional downloadable resources.
Please log in to access.

Log in

Keeping an eye on the surf conditions was once a human task, but now it’s one for machines.

Kevin and his mates were tired of trekking to the beaches, only to find out the waves are far from surfable. Thanks to technology, Kevin’s remote surf monitoring tool broadcasts local surf conditions to anyone who wants to check them out! Now in its second version, it’s been providing reliable vision of the surf for almost 15 years! Clearly, we wanted to find out more.

Your remote surf cam is very cool. What inspired you to get it started (outside of checking for epic surf)?

Back in 2003 while living in Arcata CA [that’s California USA for those not familiar], I and other surfers spent what seemed a lot of time driving the roads in Humboldt County checking the surf conditions. Surf cameras were starting to become widespread in other areas, but there wasn’t a local camera on the Humboldt Coast at the time.

There’s nothing like a clear need to drive the creation of a project! Have you created anything with Raspberry Pi already, or was this your first project?

This is my first RPi project. The surfcam control was originally accomplished using a Siteplayer module, an embedded Ethernet device that served up the web interface. The site player was serially connected to a Parallax SX28 microcontroller, which controlled the time delays for the various relays that controlled the pan/tilt/zoom functions. Ten years ago I moved away from Humboldt County to Kauai, but the camera was maintained by volunteers. A year ago, during a winter storm the rusty cam control box failed and water got in, shorting the power supply and router. The electrical box was disconnected and shipped to me to fix, and this was an opportunity to use the RPi3 to upgrade the system.

image 5
This version 2.0 of the original system (developed before Raspberry Pi was popular). We're impressed by the effort put into mounting, and design considerations such as exposing the status lights for debugging.
image 1
image 2
Everything is mounted into a waterproof enclosure.
image 3
image 4

An IP camera is relatively straight forward, but what challenges did you face having the RPi control the Pelco PTZ mount?

Actually since the relay board was intact it was easy to interface the RPi3 to the existing circuit board, which had proven itself for many years of operation.

Given your previous implementation, driving from the RPi was probably very easy by comparison! There’s some serious electronics going on in that case - did you build your own power supply too?

The motors in the Pelco pan/tilt mount are 24VAC – there is a fused stepdown transformer as a power supply. A Meanwell PS-25-12 supplies 12VDC to the relay card, which has heatsinked 7805 and 7808 voltage regulators to provide +5VDC to the relay coils, the RPi3, and a NTE 2018 Darlington array. The 7808 +8VDC is to power the zoom lens motors via +5VDC relays. The NTE 2018 interfaces the 3.3VDC outputs from the RPi3 to drive the 5VDC coils on the relays.

That’s definitely some specific power requirements, we can see why you didn’t find something available off the shelf! You have removed the case from the router. Was that for space-saving reasons, or just because it looks more awesome?

One problem with the original design was that there were no status LEDs to troubleshoot the circuit. Since I no longer live were the camera is located, I decided to provide as many status LEDs as possible to aid troubleshooting. The Ethernet switch had a case where the LEDs were only visible from the edge. By stacking the RPi3, the router, and the relay card, one can see the various status and activity lights.

We would have accepted “to look hardcore” as an answer too, but good to hear it was for practical purposes! Your RPi sends you an email if the IP address changes - do you have to manually enact some changes elsewhere if that happens?

The URL is dynamic and does change although not frequently. The home router has port-forwarding enabled for connection to the RPi3 and the IP camera. The HTML for the web page has the control buttons served up by RPi3 as one server, and the streaming image from the camera as the other server. When the URL changes I update the HTML to include the new IP address of the camera image.

image 6
The system is mounted on a property with a perfect view of the surf.

Perhaps automating that can be a task for another time too? What other special features can you tell us about your system?

Google analytics is installed on the RPi3 to give information and statistics about the users. As expected, there is an increase in traffic at sunrise as surfers check the conditions, and in the afternoon in case the surf is epic and they bug out of work early to catch a most righteous surf session!

I use VNC Viewer to log on remotely from Kauai to the RPi3 desktop. From there I can edit the web page, maybe decrease the pan/tilt/zoom timing, or edit the content of the index.html. That’s such a great feature to have that kind of control.

While the Axis 2120 IP camera provides the streaming video, it also FTPs an image every 10 seconds to the host website. It is programmed to do the last static image update just before sunset – that way a surfer can see the conditions at the end of the day, otherwise the streaming image is black as it’s night time. This is actually a valuable feature because one can expect the same surf, if the conditions hold through the night.

That’s a fantastic consideration. Given this is already in its second iteration, if you had your time again on this project, starting a v1.0 with the knowledge you now have, what would you change?

The relay card is wired point-to-point and initially was a prototype. The circuit worked well and I planned to design a PCB to replace it. I questioned the reliability of that method of circuit design for long term use, but it’s still online! Also back in 2003 when I was working on this project an IP camera in a weatherproof housing affixed to a pan/tilt mount with a zoom lens were very expensive, so cost was a driving force in this project. Today IP cameras are reasonably priced and plug and play. I would consider going with an off-the-shelf setup now, even though my setup is highly configurable in software.

Plug and play is definitely more available now than ever, but sometimes having the flexibility of something you’ve created is powerful too. It’s definitely working well! Is there something new you’re working on now, or are you too busy catching waves?

I’m a retired marine engineer on Kauai and when the surf isn’t happening here, you can find me checking the surf on the Camel Rock Surf Cam!

Sounds amazing. Thanks for taking us through your project Kevin!

To check out vision from the surf cam head to http://www.camelrocksurfcam.com

Kevin Arndt

Kevin Arndt

Retired Marine Engineer and Treasurer of Kauai MakerSpace, Hawaii, USA