Easy onboard Raspberry Pi for web boat monitoring?

simonfe

New member
Joined
1 Feb 2014
Messages
22
Location
Emsworth UK
Visit site
Battery consumption is a possible issue.

Yep, big issue for me, the nearest shorepower is a mile away!!!:ambivalence:

But seriously, for anyone on a swinging mooring there's definitely valuable information that would be great to be able to check from anywhere.

One that you have mentioned- Are my batteries getting low especially to the point of damaging them? (normally not a problem as I switch off the isolator, but we all forget things from time to time....and more as the years go by!)

Two- Is the boat still where it should be?

Three- Is the boat sinking (an extension of number 2)

..not in order of importance, but can anyone suggest others?

For a simple away from the boat monitor those 3 would probably be enough, but I can see lots more that could apply in a marina where you will be running other things like dehumidifier, charger etc
 

AngusMcDoon

Well-known member
Joined
20 Oct 2004
Messages
8,816
Location
Up some Hebridean loch
Visit site
One issue with the original Piboatmon is its power consumption was too high (20mAh+) which would slowly flatten my batteries on the mooring.

RPi is the wrong platform for low power applications. Using a better choice platform and processor it is possible to get average consumption sub-milliamp and even down to the few microamp range. PIC 18F are suitable for simple applications and ARM Cortex M for larger ones.
 

AngusMcDoon

Well-known member
Joined
20 Oct 2004
Messages
8,816
Location
Up some Hebridean loch
Visit site
Yep, big issue for me, the nearest shorepower is a mile away!!!:ambivalence:

But seriously, for anyone on a swinging mooring there's definitely valuable information that would be great to be able to check from anywhere.

One that you have mentioned- Are my batteries getting low especially to the point of damaging them? (normally not a problem as I switch off the isolator, but we all forget things from time to time....and more as the years go by!)

Two- Is the boat still where it should be?

Three- Is the boat sinking (an extension of number 2)

..not in order of importance, but can anyone suggest others?

For a simple away from the boat monitor those 3 would probably be enough, but I can see lots more that could apply in a marina where you will be running other things like dehumidifier, charger etc

I prototyped a YAPP that did pretty much that a couple of years ago. Power consumption was down to the few milliamp range without trying too hard and I estimated I could have got it down to an average of 1 milliamp by porting the application from an ARM STM32 to a PIC 18F. Its only means of raising an alarm was a SMS message but it could also respond to incoming messages for a status report. There wasn't any interest, so I didn't progress it.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,421
Location
Hopefully somewhere warm
Visit site
Yep, big issue for me, the nearest shorepower is a mile away!!!:ambivalence:

But seriously, for anyone on a swinging mooring there's definitely valuable information that would be great to be able to check from anywhere.

One that you have mentioned- Are my batteries getting low especially to the point of damaging them? (normally not a problem as I switch off the isolator, but we all forget things from time to time....and more as the years go by!)

Two- Is the boat still where it should be?

Three- Is the boat sinking (an extension of number 2)

..not in order of importance, but can anyone suggest others?

For a simple away from the boat monitor those 3 would probably be enough, but I can see lots more that could apply in a marina where you will be running other things like dehumidifier, charger etc

I'm looking from a liveaboard cruising perspective so there are many more candidates, all of which a microprocessor could handle with not too much programming, cost or soldering..in no particular order and all logged to end up in the cloud...
Amps from solar
Stuffing box temp
engine exhaust temp
position
batt voltage
batt temp.

Probably a few more along the way. Temps are easy with the ds18b20 sensors, just daisy chain as many as you want into one pin on the board. https://www.sparkfun.com/products/245

Amps easy as well - https://www.sparkfun.com/products/8882. The logging onto an SD card isn't a big deal. Getting the lot to upload onto the cloud for safe keeping is an uncracked nut so far, an arduino yun might be the way forward. With a little code to get the power draw down to a minimum. http://www.element14.com/community/.../enchanted-objects-design-challenge--sleeping

A bit over the top probably but it's fun to tinker :)
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,421
Location
Hopefully somewhere warm
Visit site
The logging onto an SD card isn't a big deal. Getting the lot to upload onto the cloud for safe keeping is an uncracked nut so far, an arduino yun might be the way forward.
For the tinkerers, another nut cracked. :) The arduino bit of the yun can talk to the linux bit . Haven't run this from arduino code yet, but it works OK on the linux side so should be OK. Looks hopeful the linux chip will spend most of it's life asleep, being woken up once in a while to upload a file saved on the sd card if there's wifi. The arduino will snooze lightly, getting up quite often to log any data onto the file on the card and waking up Mr Linux and calling the python script below. It might just work... . All for a few mA.

import ftplib
ftp = ftplib.FTP('111.11.11.11')
ftp.login('ftp@myLogIn','pass')
filepath1 = open('/mnt/sda1/test.csv','rb') # file to send
ftp.cwd("web/content")
ftp.set_pasv("0") #turn off passive mode
ftp.storbinary("APPE test.csv", filepath1, 1) # append the file
filepath1.close() # close file and FTP
ftp.quit()
 

gregcope

Well-known member
Joined
21 Aug 2004
Messages
1,621
Visit site
RPi is the wrong platform for low power applications. Using a better choice platform and processor it is possible to get average consumption sub-milliamp and even down to the few microamp range. PIC 18F are suitable for simple applications and ARM Cortex M for larger ones.

I thought I could work around the power issues by turning it off most of the time, and waking up when needed. However the power control circuit I purchased consumed 20mA on its own!!!

However I learnt allot about the logic needed so consider the Mk1a a python based prototype!
 

gregcope

Well-known member
Joined
21 Aug 2004
Messages
1,621
Visit site
Yep, big issue for me, the nearest shorepower is a mile away!!!:ambivalence:

But seriously, for anyone on a swinging mooring there's definitely valuable information that would be great to be able to check from anywhere.

One that you have mentioned- Are my batteries getting low especially to the point of damaging them? (normally not a problem as I switch off the isolator, but we all forget things from time to time....and more as the years go by!)

Two- Is the boat still where it should be?

Three- Is the boat sinking (an extension of number 2)

..not in order of importance, but can anyone suggest others?

For a simple away from the boat monitor those 3 would probably be enough, but I can see lots more that could apply in a marina where you will be running other things like dehumidifier, charger etc

Mk1a pinoatmon did all of that.

Mk2 ardunio clone based one will do more (PIR/Temp) and have a an audible alarm, as well as consuming less than 1mA on average. I need to find more contiguous free time to stick the code together.
 

gregcope

Well-known member
Joined
21 Aug 2004
Messages
1,621
Visit site
I prototyped a YAPP that did pretty much that a couple of years ago. Power consumption was down to the few milliamp range without trying too hard and I estimated I could have got it down to an average of 1 milliamp by porting the application from an ARM STM32 to a PIC 18F. Its only means of raising an alarm was a SMS message but it could also respond to incoming messages for a status report. There wasn't any interest, so I didn't progress it.

I would want a YAPP like that as basically that is what I am making...

Why not use an artmel 328P or similar and leverage the ardunio ecosystem of bits, ideas, and code?
 

stownsend

Member
Joined
15 Sep 2006
Messages
455
Location
South Wales
Visit site
I'm looking from a liveaboard cruising perspective so there are many more candidates, all of which a microprocessor could handle with not too much programming, cost or soldering..in no particular order and all logged to end up in the cloud...
Amps from solar
Stuffing box temp
engine exhaust temp
position
batt voltage
batt temp.

Probably a few more along the way. Temps are easy with the ds18b20 sensors, just daisy chain as many as you want into one pin on the board. https://www.sparkfun.com/products/245

Amps easy as well - https://www.sparkfun.com/products/8882. The logging onto an SD card isn't a big deal. Getting the lot to upload onto the cloud for safe keeping is an uncracked nut so far, an arduino yun might be the way forward. With a little code to get the power draw down to a minimum. http://www.element14.com/community/.../enchanted-objects-design-challenge--sleeping

A bit over the top probably but it's fun to tinker :)


I'm using a sim900 breakout board with a Sainsbury mobile sim card, 4 pence per text for the sms response side of the code and via HTTP Action to one of my websites, all passed in a single url then using PHP to send to a MySQL database.

Cheers

Stu
 

mlines

Active member
Joined
31 Aug 2009
Messages
2,038
Location
Finchampstead, Wokingham, Berks
www.sportsboat.org.uk
I'm using a sim900 breakout board with a Sainsbury mobile sim card, 4 pence per text for the sms response side of the code and via HTTP Action to one of my websites, all passed in a single url then using PHP to send to a MySQL database.

Cheers

Stu

That's how mine works, did you have any problems with random crashes/lockup?.

When I run it with the sim900 card switched off its fine. When I run with the sim900 card on it works for a random amount of time and then freezes. I am wondering if rf noise is getting in from the closely located sim900 transmitter.
 

mlines

Active member
Joined
31 Aug 2009
Messages
2,038
Location
Finchampstead, Wokingham, Berks
www.sportsboat.org.uk
The Arduino is a self contained processor board with header sockets on it to connect to other items. The sim900 GSM board has the plugs to match the sockets so it can piggy back onto the Arduino board. However using piggy-backing restricts you to just using the GSm board accessory and not all the other add-ons. Therefore I have built up a copper strip board with the relevant headers/sockets on it to interconnect all the items. This is a fairly standard approach to constructing something out of these little controllers. However in the case of the sim900 GSM board this appears to allow RF interference to crash the Arduino.

Therefore I did three things:

1. Soldered 10uF Electrolytic capacitors across the +5v and GND on the copper strip board at a number of locations on the board to help stabilise the supply (minimising voltage variations as the GSM transmits)
2. Soldered 10nf capacitors across +5v and GND again on the copper strip board at a number of locations to remove RF
3. Put Ferrite rings around the wiring to and from the copper strip board.

This has meant it has run for 3 days continuously now and I have moved it to a poor GSM location in the house to ensure the GSM power has automatically increased.

martin
 

stownsend

Member
Joined
15 Sep 2006
Messages
455
Location
South Wales
Visit site
That's how mine works, did you have any problems with random crashes/lockup?.

When I run it with the sim900 card switched off its fine. When I run with the sim900 card on it works for a random amount of time and then freezes. I am wondering if rf noise is getting in from the closely located sim900 transmitter.


I sorted the sim900 by uping the ampage to 2 amps (via a 9v 2amp into the mega), as its a breakout board, ground, VCC into the 5v and RX TX into the relevant Serial2 pins. At the moment its been up for 2 days - not tweaked my code yet!!!, occasionally it does fail to run the url the script but the plan is add a 2 run loop, so if it fails after 2 attemps its stops etc...

Cheers

Stu
 
Top