Hurricane
Well-Known Member
Following on from another thread, I am providing details of a chain counter that I'm currently building.
On that thread, I stated that my design is very specific to my particular installation but there may be some "offshoots" from my solution that might be useful in other installations.
For me, this is not the first winter chain counter project.
The last one was a bit ambitious and never, properly, got off the ground.
So I have been tackling this one with much more caution.
Essentially, the problem is that the electric windlass creates an electrical noisy environment which can damage modern electronics.
Earlier this year, I installed an Anchor Camera.
I chose to integrate an IP camera into my PC network on the boat.
Once installed, any of my devices connected to my network can use the Anchor Camera.
The difficult part was to route wires from the chain locker into the forward cabin where I already have an Ethernet connection to the ship's network.
As soon as the camera was attached to the network, it was available throughout the boat.
And it really works well.
Here is a clip recorded by the camera itself of the anchor being recovered.
Our boat has never had a chain counter fitted and it would be very difficult, now, to route extra cables onto the flybridge.
However, whilst installing the wires between the chain locker and the forward cabin's network connection, I also ran a pair of wires to extend the Lewmar reed switch that is usually used as a chain counter.
This reed switch is activated by a magnet fitted into the windlass' gipsy.
Most Lewmar windlasses have this reed switch facility.
So, after the success of the Anchor Camera, I got thinking.
Maybe I could build an interface (similar to the IP camera that drives Ancam) which would also be available throughout the boat.
So, thats what this winter project is all about.
I apologise to those reading this that are cleverer than me.
I've kept this post as simple as possible so that most people can understand it.
Over the years, I've worked with a number of low cost embedded micro processors.
Last winter, I extended my home media centre which is in the living room under the TV to play the same media content on all the other TVs in the house.
All the clients are cheap Raspberry PIs which seem to handle the video processing (and streaming) well.
The Raspberry PI does have digital I/O but IMO the software isn't low level enough do run a project like the chain counter.
Back in the early 1980s when I was working with the 8080 and Z80 processors, we used a feature in the microprocessor called "interrupts".
Essentially, these are small subroutines that can be "triggered" by an external event.
As soon as an interrupt is triggered, the microprocessor stops what it is doing and just services the code within the interrupt.
In my chain counter project I don't want to miss the windlass operating the reed switch so I looked for a device that could be programmed at a reasonably low level and one that could handle interrupts efficiently.
A device that I've worked on before immediately came to mind. - The Arduino.
Lots of support and they are now very cheaply available on Ebay for, literally, just a few quid.
In fact, I already had one in my toolbox.
Unfortunately, the one I had didn't have an Ethernet interface (they do exist) so I bought an add on Ethernet card for about a fiver.
All I needed then was a means of safely interfacing the fragile electronics with the noisy outside world of the windlass.
The solution which I have tested (and it works) uses a small prototype board and some opto isolators.
Optos are an integrated circuit package that contains an LED set to shine on a light dependant transistor.
There is no actual electrical connection between an Opto's input and its output - great for this application.
If people are interested, we can discuss my circuit design as this thread progresses.
But for the moment, I've taken a few photos that, hopefully, will explain the basics of the project.
This is an Arduino - the main board - contains all the I/O connections which connect to the "outside world" using the small black vertical connectors.
This is the cheap Ethernet board that clips on top.
As said above, you can buy the main board and the Ethernet as a single board but I already had a main board.
And this is my little prototype board containing the Opto Isolators - again this just clips on top.
If you look carefully you can see 3 Optos - One will be for the windlass' reed switch and the other two will be used to "sense" the direction that the windlass is turning so that the software knows whether to count chain in or chain out.
And this is a pic of the whole thing assembled.
Finally, the next pic shows the kind of display that I will end up with.
Remember that this is a "work in progress" so this page is a bit of a "mock up".
Note that the "amount of chain out of the locker" is displayed at the top of the same screen as the Anchor Camera
Sorry - a Dolphin crept into that shot!!
On the other thread, it was thought that this might be a good place to discuss projects like this so please feel free to ask questions.
The 64,000 dollar question is - how can something like this be used on boats other than Jennywren.
On that thread, I stated that my design is very specific to my particular installation but there may be some "offshoots" from my solution that might be useful in other installations.
For me, this is not the first winter chain counter project.
The last one was a bit ambitious and never, properly, got off the ground.
So I have been tackling this one with much more caution.
Essentially, the problem is that the electric windlass creates an electrical noisy environment which can damage modern electronics.
Earlier this year, I installed an Anchor Camera.
I chose to integrate an IP camera into my PC network on the boat.
Once installed, any of my devices connected to my network can use the Anchor Camera.
The difficult part was to route wires from the chain locker into the forward cabin where I already have an Ethernet connection to the ship's network.
As soon as the camera was attached to the network, it was available throughout the boat.
And it really works well.
Here is a clip recorded by the camera itself of the anchor being recovered.
Our boat has never had a chain counter fitted and it would be very difficult, now, to route extra cables onto the flybridge.
However, whilst installing the wires between the chain locker and the forward cabin's network connection, I also ran a pair of wires to extend the Lewmar reed switch that is usually used as a chain counter.
This reed switch is activated by a magnet fitted into the windlass' gipsy.
Most Lewmar windlasses have this reed switch facility.
So, after the success of the Anchor Camera, I got thinking.
Maybe I could build an interface (similar to the IP camera that drives Ancam) which would also be available throughout the boat.
So, thats what this winter project is all about.
I apologise to those reading this that are cleverer than me.
I've kept this post as simple as possible so that most people can understand it.
Over the years, I've worked with a number of low cost embedded micro processors.
Last winter, I extended my home media centre which is in the living room under the TV to play the same media content on all the other TVs in the house.
All the clients are cheap Raspberry PIs which seem to handle the video processing (and streaming) well.
The Raspberry PI does have digital I/O but IMO the software isn't low level enough do run a project like the chain counter.
Back in the early 1980s when I was working with the 8080 and Z80 processors, we used a feature in the microprocessor called "interrupts".
Essentially, these are small subroutines that can be "triggered" by an external event.
As soon as an interrupt is triggered, the microprocessor stops what it is doing and just services the code within the interrupt.
In my chain counter project I don't want to miss the windlass operating the reed switch so I looked for a device that could be programmed at a reasonably low level and one that could handle interrupts efficiently.
A device that I've worked on before immediately came to mind. - The Arduino.
Lots of support and they are now very cheaply available on Ebay for, literally, just a few quid.
In fact, I already had one in my toolbox.
Unfortunately, the one I had didn't have an Ethernet interface (they do exist) so I bought an add on Ethernet card for about a fiver.
All I needed then was a means of safely interfacing the fragile electronics with the noisy outside world of the windlass.
The solution which I have tested (and it works) uses a small prototype board and some opto isolators.
Optos are an integrated circuit package that contains an LED set to shine on a light dependant transistor.
There is no actual electrical connection between an Opto's input and its output - great for this application.
If people are interested, we can discuss my circuit design as this thread progresses.
But for the moment, I've taken a few photos that, hopefully, will explain the basics of the project.
This is an Arduino - the main board - contains all the I/O connections which connect to the "outside world" using the small black vertical connectors.
This is the cheap Ethernet board that clips on top.
As said above, you can buy the main board and the Ethernet as a single board but I already had a main board.
And this is my little prototype board containing the Opto Isolators - again this just clips on top.
If you look carefully you can see 3 Optos - One will be for the windlass' reed switch and the other two will be used to "sense" the direction that the windlass is turning so that the software knows whether to count chain in or chain out.
And this is a pic of the whole thing assembled.
Finally, the next pic shows the kind of display that I will end up with.
Remember that this is a "work in progress" so this page is a bit of a "mock up".
Note that the "amount of chain out of the locker" is displayed at the top of the same screen as the Anchor Camera
Sorry - a Dolphin crept into that shot!!
On the other thread, it was thought that this might be a good place to discuss projects like this so please feel free to ask questions.
The 64,000 dollar question is - how can something like this be used on boats other than Jennywren.