DIY ammeter - dead cool

  • Thread starter Thread starter GHA
  • Start date Start date

GHA

Well-Known Member
Joined
26 Jun 2013
Messages
12,552
Location
Hopefully somewhere warm
Visit site
Well that was a productive couple of hours. Been thinking now and again with this idea for a while and finally stuck it in a case and wrote a little code to make it work, little baby steps but successful so far.

So what we got is >>
eG7layY.png


The bigger board at the bottom is an ESP8266 - like a arduino with wifi, very cool board and capable of doing lots - it has wifi built in. Then the little board bottom right is an INA219. Another great little board, it can measure up to 32V and up to 3.2A *REALLY* accurately. So they say anyway, I have nothing anywhere near accurate enough onboard to check. The battery isn't connected yet but it will allow the unit to run without being plugged in.
So 12v goes in then out again and into something (which uses less than 3.2A) The the ESP measures the current and voltage and sends it over wifi. The laptop reads this and a great program called node-red will display it. Or save it to a file, or loads of other options. So this is what a Nasa AIS engine draws....>>

388o55k.gif


The next stop down the road could be even better - it *should* be possible to connect this to the battery monitor shunt. Says google. Hard to guess the accuracy but apparently down to a few hundred mA. Which would be great, I've a Raspberry Pi recording loads all day every day already so having amps in/out would be nice to keep an eye on the batteries. Then, even better if it works - it might be possible to do a constant current load test - Without turning anything off!! Maybe. Have an external load controlled by the ESP with a few mosfets so the actual load coming out of the batteries stays constant -fridge goes on, external load goes a bit less. Unlikely to go all the way down to complete discharge at anchor but on a living on the hook cruising boat it would just great to do a partial load test once a month and graph ontop of other months to see it the batteries are happy or close to death. With temperature logged as well of course!


Phew...... :cool::cool:
 
Last edited:
Nice work GHA. Good to read how practical boat owning is pushing forward the boundaries. If it makes quality of life a lot better on board - and safer, too ! - then that's even better.


EDIT Overlapped PRV's contribution. I can only assume that he uses hemp ropes, and a large stone with a hole in it for an anchor. Sad, innit.

EDIT 2


Looking at the sampling rate for the program... the display is rate 1sec, but is the input more frequent ? I am wondering if it could track surge uses of e.g. engine starter/anchor winch, and see how near the fuse capacity the system is demanding.
 
Last edited:
I love the way there is a marriage between high and low tech in yachting. All this Arduino stuff has so far pretty much passed me by, but it is interesting to see what others do with it. One day I will have a go myself. Beats jamming components into a breadboard and relying on dodgy old 555 timer chips for everything!
 
What do you do at home? Don't you have any hobbies? Rather sad. Maybe why you're always so negative.... ;)

I have loads of hobbies, and sailing is one of them. Lots of sailors survive quite happily without even a basic ammeter, let alone a wifi-enabled recording jobbie. This is supposed to be a Practical Boat Owner's forum, not nerds unlimited.
 
OK, PVB, electronics may not be your bag, but for some people knowing discharge rates to a 1/10A may be part of the fun of sailing. I know a distinguished and gallant forumite who would really really love to be able to track air pressure to 0.1mb, and air temp and rel humidity to a similar precision.

It would be hard to get a more practical demonstration of Solent's "marriage between high and low tech in yachting" than GHA ammeter.

What's the cut-off point for tech gear on your boat ? Do you have DSCVHF, an echo sounder, any LEDs ? I am not suggesting we all go out and add foils to the hull, or change our solid long-life terylene sails for one-season laminates, but there has to be acceptance of progress, or you end up being a less competent, riskier, unsafer sailor.
 
I do have one criticism, that project box is way too big, don't you know small is beautiful these days. ;) Has to be on our little tub anyway! As for boats and hi tech, we had a lovely sail marred this evening by the departure of the Princess of the Sea, I kid you not, it left Southampton docks with a TV screen on top of the thing, about as big as two semi detached houses, visible from a long way away, and playing La Macarena through a very loud music system while the Dj implored all on board to clap their hands. Then the ships horn erupted not with a log sonorous moan, but a full tune worthy of an ice cream van... The days of the White Star line are truly gone. Maybe you could invent a noise cancelling cockpit device for us?
 
Last edited:
What's the cut-off point for tech gear on your boat ? Do you have DSCVHF, an echo sounder, any LEDs ?

Yes, I have DSC VHF, full instrumentation, AIS receive, plotter, radar, 2 handhelds, autopilot (interfaced to wind), 3 battery banks (one for the thruster) and LED lighting (both inside and nav lights). But I don't have an ammeter!:ambivalence:
 
So if one was interested in getting in to all this, but afraid of code, is there an easy way in? Any advice?

Just order an ESP8266 12e and make a start, I use the same code editor as Arduino for ESP, maybe a bit daunting to begin with but loads and loads of tutorials. Another option is a Raspberry Pi with Openplotter, it has support for lots of sensors built in with menus to set up.
 
Well i think this is rather cool!

I would be interested in the code (github?)

Will do . Thinking of tying in with node-red, using MQTT to set up sample rate, UDP ports etc from a laptop or raspberry pi.

TBH you can get accurate little ammeters off ebay pretty cheap, but being able to log the data opens a whole new area - plotting data can show up things you'd never spot otherwise. Being able to do some sort of regular battery discharge with a bit of control without having to turn the boat off would be such a leap forward. No one can do that. The number of cruisers that do a battery capacity test beyond leaving all the lights on overnight must be very small, some sort of accurate data would be gold dust :cool:

Just hooked it up to a charger with 2 x AA's on charge, see what happens overnight .

h0jGZIR.png
 
Last edited:
nice one GHA!

OT:
regarding enclosure size, my main problem with arduinos and various kit I've built for the boat (mostly outputing NMEA2K) is that I end up with a smallish box and having to feed 9-10 cables in it. It's pure hell, tried various things, it's all messy and awful. Bought some green 10pin linear plugs I'm going to use soon, but not too happy with them either.
Wonder what you use on your larger projects!

cheers

V.
 
Wonder what you use on your larger projects!

cheers

V.

Inside the chart table is a little messy right now.. ;) I've some car power multiway plug/sockets to tidy it up a bit.

Wifi works well with a raspberry pi but it means another board and another power supply, they don't draw much but it all adds up. Bonus of wifi is if you balls it up you just fry a fiver board instead of the rather fragile Pi. The ESP boards you can program over the air so you don't need to get at them with a USB cable, upload your tweaks over the air.
 
... What's the cut-off point for tech gear on your boat ? Do you have DSCVHF, an echo sounder, any LEDs ? I am not suggesting we all go out and add foils to the hull, or change our solid long-life terylene sails for one-season laminates, but there has to be acceptance of progress, or you end up being a less competent, riskier, unsafer sailor.

Now that's funny! I think there are quite a few that would gladly go sailing without a sounder, DSC, or LEDs, but love their laminate sails. (My laminate sails are about 6 years at this point, and I'm guessing have much shape than polyester sails at that age.) I'm pretty sure the electronics don't help me point higher, sail faster, or improve the strength of the boat. I won't tease you about sailing an 19th century tech lead mine hanging fabric rags. I'm also pretty sure that I'm a competent and skilled, and I don't think I'm an "unsafer sailor." But I could be wrong about that.

What we have here is not a distaste for progress, but a difference in what we enjoy and in what we value.

Go for your projects. Very cool. Others will have different interests.
 
Top