Chain Counter - a Winter Project

care to point how the raw option of sending the sentences would work (saves me the time waiting for the board to arrive from china or wherever that is...) Would that work on an uno, or I'll run out of memory?

Pretty much it's setting an output line high or low every 1/4800s rather than sending data to a UART and letting it do the work. Would work on an uno easily. AngusMcDoon who has posted some great projects is the BitBanging King and does this with resource limited pics.
 
sorry for the late reply, was having a couple of v.hectic days plus a few hours on the boat working on the f/b helm setup (cutting and fitting...)

fully agree, I like modular projects :D
so, yes I'm in!

So core project has arduino with wifi/bluetooth and outputs to mobile. I'd have thought that it would be more generic if it was a webpage served rather than an BT thing, but it all is tricky as some plotters already have wifi and you probably DONT want to disconnect from the plotter wifi to connect to the chaincounter one... The ethernet serving would be a strong option for more complicated setups but as you say cannot have a solution for all unless you go for a custom system with it's own screen (that's too much)

Would it make sense to actually built the kit (or send it to ppl as a kit) or is it better to find readymade boards and recommend what to buy and how to install the s/w?

[meanwhile I can in parallel built the NMEA0183 part with the cheap serial board for whoever has a GMI10/20]

On the implementation, had a look for ready made optoisolation boards, plenty 1,2,4,8 channel ones around for silly money. Do they work? planning to order one for prototyping/testing.

As far as NMEA2K is concerned, from some extra reading (cannot find yet the analysis of sentences/packets and description for building them it should be OKish to built and offer something like that, it wont ever be certified (which we probably don't care anyway) but anyway it's a v.long shot only worth it if you start thinking of ways to implement more exotic features...

If I'm lucky I'll report on NMEA0183 testing via the arduino next week once I receive the right h/w...

cheers

V.

OK
Lets see if more people are interested.

I think you may have missed a concept of mine.
Yes, we used Arduino for the basis of the development - Arduino contains some great software already done for us.
But when it comes to the actual finished board, we actually build a complete solution on a single board.
For example, our power supply will probably be either 12v or 24v - so we could handle this all on the same board (do need some good power supply design though).
As for the Arduino itself, we lay a board out using one of these http://www.ebay.co.uk/itm/Atmega328...hash=item1ea178ffce:m:mp4DGC-hkHSgexJAg9tkdLg
It could be programmed using an actual Arduino.
I guess that the radio bit (either BT or WiFi) would be a module but that needs some research.
I like the idea of a webserver - that way any device can connect to it without any special software - for example any mobile device and if a plotter were to have a web browser, it too could connect.
However, I've been using my Navis Wind system this year overnight at anchor and its BT interface works very well to a bespoke Android/iPhone app.

Anyway, lets see how many people would be interested.
 
OK
Lets see if more people are interested.

I think you may have missed a concept of mine.
Yes, we used Arduino for the basis of the development - Arduino contains some great software already done for us.
But when it comes to the actual finished board, we actually build a complete solution on a single board.

Mike,

I got that bit, however the way I see we have two options:

A. buy enough bits, and do a production line on a breadboard or however you call them

B. cherry pick bits available online, write the program and instructions and whoever wants gets them and builts them

You are tending to A on costs grounds, i'm thinking more of B on flexibility and no need of welding on behalf of the average punter. That is ofcourse unless you're planning to have a go at building them all yourself :D and making a hefty profit towards next year's diesel bill (not!)

cheers

V.

PS. Laika, having a go at realising bitbanging, got some code and testing it but the weather is too good to stay in :(
 
Mike,

I got that bit, however the way I see we have two options:

A. buy enough bits, and do a production line on a breadboard or however you call them

B. cherry pick bits available online, write the program and instructions and whoever wants gets them and builts them

You are tending to A on costs grounds, i'm thinking more of B on flexibility and no need of welding on behalf of the average punter. That is ofcourse unless you're planning to have a go at building them all yourself :D and making a hefty profit towards next year's diesel bill (not!)

cheers

V.

PS. Laika, having a go at realising bitbanging, got some code and testing it but the weather is too good to stay in :(

I suppose is is a bit of A and B

I have laid PCB boards out before but it was long time ago.
It seems that these days things are easier - and cheaper.

Have a look at the Fritzing website - http://fritzing.org/home/
It seems to me that we can produce very small runs of boards - for not much money.
In its crudest form, we could probably publish a design and let people get their own boards built themselves - again very cheaply.
Alternatively someone could "take the initiative" and buy a batch of boards and then distribute them.
Either way, I think the costs could be minimal.
Components would just be a "shopping list" that you could buy anywhere on line.

There are a few issues that I've initially identified.
Technical - any wireless modules would have to available over the long term.
Other - Licenses - we can produce the software under GNU - see here https://en.wikipedia.org/wiki/GNU_General_Public_License
We will need to be sure about the hardware license - must be possible - Arduino do it.
So a member who knows/understands the legal side would be a key member of the team.
We would also need people to write manuals - someone to manage a website/page - a discussion/questions forum etc.....

Still not enough people showing interest though.
 
I'm late to this thread (was travelling a few day's) but count me in,

actually, inspired from your thread a few years ago, I've been working with one of my sons on a chain counter, (but only briefly started) using a arduino board.

As a first exercise, we started to make a I-Phone remote controll app for the passerel;
with this app, I would like to remotely controll (wifi) a small box containing a arduino and 6 relay's, that are connected to the boats passerel control / switch box
we do have a very old rf remote controll for the passerel, but its very worn out, and might soon stop working and no spares available, that’s why we started with this.


This is how the IOS app looks like:
japa.png


so far this is ready on a arduino board with ethernet, not yet wireless.
At that stage my son became uncle, and I became grand dad, and since then our interest was somewhere else :)
Oh yes, and JAPA means Jaspers Amazing Passerell App :D

for the chain counter,
we considered a different solution for the direction detection, and that is; instead of one switch (your reed relay) using two, positioned at a few "degrees" from each other, in order to detect the direction, from looking at the fase of the pulses that are coming in.
My windlass doesn't have a switch, so I bought two "hallsensor " elements for that, to be activated by a small magnet that is glued on the gypsy wheel.

in your setup you could do with one less opticoupler I think,
because:
when you give a anker "up" command, the counter has to cound down, (less chain out)
in all other situations, when the counter gets pulses, either you give a down command, or you dump the chain without the motor, the counter has to cound "up" (more chain out), so you don't need a signal for that.
or am I missing something ?

regarding the UI,
at first, this could work from any IOS (or android) device
in a second stage, we could consider a panel / box with another android board, with a very basic numeric LED display, and a few buttons ...
I like devices / display’s that are simple and do/show just one thing, fe chain out length

regarding communication network,
I'm not so used with navnet networks, and I don't need it for this app, so I would like to avoid that,
for me , I would totally avoid any PC in the setup
I think it should be possible to have a wifi connection between the counter box, and a remote device such as a Ipad or Iphone,
Having the unit working wireless in some way would be a good solution to avoid complex wiring
Perhaps its better when all devices are connected on a LAN boat network. but I'm no specialist in this.

for protecting the electronics in the "harsh" environment of the anker winch and peaks on power supply,
we can take care of that part, (a voltage stabiliser and a few capacitors will solve that problem)
 
Last edited:
Mike,

I got that bit, however the way I see we have two options:

A. buy enough bits, and do a production line on a breadboard or however you call them

B. cherry pick bits available online, write the program and instructions and whoever wants gets them and builts them

You are tending to A on costs grounds, i'm thinking more of B on flexibility and no need of welding on behalf of the average punter. That is ofcourse unless you're planning to have a go at building them all yourself :D and making a hefty profit towards next year's diesel bill (not!)

cheers

V.

PS. Laika, having a go at realising bitbanging, got some code and testing it but the weather is too good to stay in :(

I'm totally in the B front,
buy as many parts as you can, fe arduino has many different add on boards...
my main reason is "time"
sorting out and ordering PCB's, ordering different components at different places, getting all individual parts together, ..
soldering is only a minor part, than testing, ....
I ve done that before, and had enough of it.
 
in your setup you could do with one less opticoupler I think,
because:
when you give a anker "up" command, the counter has to cound down, (less chain out)
in all other situations, when the counter gets pulses, either you give a down command, or you dump the chain without the motor, the counter has to cound "up" (more chain out), so you don't need a signal for that.
or am I missing something ?

Absolutely correct
But for my own system, the optos were cheap and I can then use very simple logic in my Arduino prog.
I don't want to loose (the detection) that the up or down buttons have been pressed so, again, these will be interrupt driven.
All the interrupt routines will do is "flip" a global variable.
Simple and positive.

Communication with a smart phone.
Wifi has its problems - would it work as a client or as an access point - either way, it would mean the smart phone would need to be connected to the correct network each time - a PIA.
The beauty of the Bluetooth is that you just switch it on and run the app.

I quite like the idea of a dedicated receiver box - but could it be made to look nice?

Still waiting to see how many people would be interested in the Open Source Project route.
I'm building my system anyway - but, as I've said earlier, my solution isn't suitable for other boats.
I think that the smart phone route is the best way forward if dedicate project is felt useful.
 
Out in SC at the moment doing jobs.
The last job was to install my winter project - the Arduino chain counter.

During the development at home, I ended up doing what Bart suggested.
i.e. - only using a signal to detect when the anchor was coming up - everything else is considered to be the anchor being deployed.

And all worked according to plan.

To do the test, I disengaged the chain from the windlass gipsy so that the windlass ran freely.
It was late in the evening so Ancam didn't show much but I took a couple of video clips.
The result is below:-

This is the display as the anchor is launched



And this is the display as it is being recovered



So, now we have an Arduino on board working as an anchor chain counter.

Just for fun, I implemented the "talking lady".
It the above clips, you can just hear that she "counts" the chain out and back every 5 metres.
I know that this will probably drive the crew mad - but thats what I do.
There is a button on the display to mute her though!!!
 
I would like to remotely controll (wifi) a small box containing a arduino and 6 relay's, that are connected to the boats passerel control / switch box
we do have a very old rf remote controll for the passerel, but its very worn out, and might soon stop working and no spares available,

There is an electronics company in Toronto that made me spare remotes for my passerel. I could not source them over here. He made two different interface versions too. Sensible pricing too.


Mike, So pleased you managed to get the chain counter working and especially with 'voice' reporting. We wouldn't want you to go completely nuts in your retirement would we? :o

£5 would have got you different colour cable ties that feed happily through the windlass. With your own code (resistor colour code) and scope factor you only have to tell swmbo the colour to lower to. I have a chain counter and this works better. :encouragement:

Still, not as much fun tho eh? ;)

Roger.
 
well done Mike !
also with the voice reporting, and integration in your network / screen software, congrats !

this chaincounter would be terribly usefull thing on our boat !
 
Hi,

Great post. I'am interesting how it's possible to get the project. I understood it's an open source, is it correct?

Best regards
Benjamin
 
Just had a look online for chain counters and fell off my chair at the cost of the Lewmar AA560/570.

A smart phone Bluetooth based solution would be great. I can build/solder a circuit board but the rest of the software is beyond me.

Was there any additional interest in this?
 
Mike, I think we should all write-OFF NMEA2K. From my understanding it's a quite closed system, expensive even to get the docs, and you have to be verified or whatever by the body or something. Much easier to work on 0183 which is just two wires and well documented sentences ;)



V.
Hi VAS

Can you help me where to find a description of this sentence?
Unfortunately the Autoanchor - link is not available.

Thanks
 
hi,

I'll get a longer reply on next few days.
To my understanding (haven't searched on this topic for sometime!) the way things are atm:

A. NMEA0183 custom sentence that AFAIK is only displayed by Garmin's GMI10 and GMI20
B. NMEA2000 sentence that noone seems to support yet!

Re NMEA0183, I've reversed engineered it (never owned the 1K black box) wasn't that difficult, I'll dig the structure of the sentence and post it
Re N2K Timo Lappalainen ttlappalainen - Overview has done all the work so you just go there and pick the libs
 
hi,

I'll get a longer reply on next few days.
To my understanding (haven't searched on this topic for sometime!) the way things are atm:

A. NMEA0183 custom sentence that AFAIK is only displayed by Garmin's GMI10 and GMI20
B. NMEA2000 sentence that noone seems to support yet!

Thanks.
I hawe Garmin GMI20 .

Garmin MFDs can display more information. Current drawn, anchor winch voltage, etc.

I have already managed to solve some functions, but unfortunately many are still missing - spillspeed..etc. So I'm looking for more information.

Thanks
 
hi,

I'll get a longer reply on next few days.
To my understanding (haven't searched on this topic for sometime!) the way things are atm:

A. NMEA0183 custom sentence that AFAIK is only displayed by Garmin's GMI10 and GMI20
B. NMEA2000 sentence that noone seems to support yet!

Re NMEA0183, I've reversed engineered it (never owned the 1K black box) wasn't that difficult, I'll dig the structure of the sentence and post it
Re N2K Timo Lappalainen ttlappalainen - Overview has done all the work so you just go there and pick the libs


THANKS!

I found the pdf file.
Everything works. Reset, setup drum circumference from Garmin. Chain speed, motor voltage, chain length, operating hours counter, etc.
:D
 
Top