Jump to content

Welcome to TheMalibuCrew!

As a guest, you are welcome to poke around and view the majority of the content that we have to offer, but in order to post, search, contact members, and get full use out of the website you will need to Register for an Account. It's free and it's easy, so don't hesitate to join the TheMalibuCrew Family today!

$10 wifi/arduino boat temperature monitor


flapjack

Recommended Posts

We use our boat year round. I have a boat heater that automatically switches on, but it is a bit of a leap of faith. I've always wanted to know my actual boat temperature... so I built this. My wifi router is about 350 feet from the boat. I've seen videos with these things getting 3x that range.

ptyNR5c.jpg

This is my proto breadboard, but it is currently working well. I was going to share this when I get it cleaned up, slow down the data rate, etc... But I don't think I'll get to it for a couple of weeks. Thought this might be useful to folks doing early dewinterization.

I used Arduino for analog function. I plan to add voltage monitoring of my batteries and current monitoring of the system. I also will add some relays and drive a direct magnet heater on the engine block next year.

EALVCjD.jpg

I'm using ThingSpeak to store the data. I can look at the boat temps at any time from my iphone. I'll apologize in advance if you go to my data... for debug purposes, I'm updating every 20 seconds or so.

https://thingspeak.com/channels/81577

Let me know if you need a hand replicating this. Cu wire is a main expense if you don't use old network wire like I did. I heavily borrowed code. The original author is in the below script.

// esp8266_test.ino
//
// Plot LM35 data on thingspeak.com using an Arduino and an ESP8266 WiFi
// module.
//
// Author: Mahesh Venkitachalam
// Website: electronut.in

#include <SoftwareSerial.h>
#include <stdlib.h>


const int temperaturePin = 0;
const int temperaturePin2 = 1;
const int temperaturePin3 = 2;


// LED
int ledPin = 13;


// replace with your channel's thingspeak API key
String apiKey = "ZJJGXYS9ZHZ6SVKC";

// connect 10 to TX of Serial USB
// connect 11 to RX of serial USB
SoftwareSerial ser(10, 11); // RX, TX

// this runs once
void setup() {
// initialize the digital pin as an output.
pinMode(ledPin, OUTPUT);

// enable debug serial
Serial.begin(9600);
// enable software serial
ser.begin(9600);

// reset ESP8266
ser.println("AT+RST");
}


// the loop
void loop() {

// blink LED on board
digitalWrite(ledPin, HIGH);
delay(200);
digitalWrite(ledPin, LOW);


// flapjack
float voltage, degreesC, temp;
voltage = 0.0;
for(int i = 0; i < 10; i++) {
voltage += getVoltage(temperaturePin);
delay(500);
}
voltage = voltage / 10.0;
degreesC = 190.9 - voltage*90.90;
temp = degreesC * (9.0/5.0) + 32.0;

// convert to string
char buf[16];
String strTemp = dtostrf(temp, 4, 1, buf);


float voltage2, degreesC2, temp2;
voltage2 = 0.0;
for(int i = 0; i < 10; i++) {
voltage2 += getVoltage(temperaturePin2);
delay(500);
}
voltage2 = voltage2 / 10.0;
degreesC2 = 190.9 - voltage2*90.90;
temp2 = degreesC2 * (9.0/5.0) + 32.0;

// convert to string
String strTemp2 = dtostrf(temp2, 4, 1, buf);




float voltage3, degreesC3, temp3;
voltage3 = 0.0;
for(int i = 0; i < 10; i++) {
voltage3 += getVoltage(temperaturePin3);
delay(500);
}
voltage3 = voltage3 / 10.0;
degreesC3 = 190.9 - voltage2*90.90;
temp3 = degreesC3 * (9.0/5.0) + 32.0;

// convert to string
String strTemp3 = dtostrf(temp3, 4, 1, buf);



Serial.print(" temp1: ");
Serial.print(strTemp);
Serial.print(" temp2: ");
Serial.print(strTemp2);
Serial.print(" temp3: ");
Serial.println(strTemp3);

// TCP connection
String cmd = "AT+CIPSTART=\"TCP\",\"";
cmd += "184.106.153.149"; // api.thingspeak.com
cmd += "\",80";
ser.println(cmd);

if(ser.find("Error")){
Serial.println("AT+CIPSTART error");
return;
}

// prepare GET string
String getStr = "GET /update?api_key=";
getStr += apiKey;
getStr +="&field1=";
getStr += String(strTemp);
getStr +="&field2=";
getStr += String(strTemp2);
getStr +="&field3=";
getStr += String(strTemp3);
getStr += "\r\n\r\n";

// send data length
cmd = "AT+CIPSEND=";
cmd += String(getStr.length());
ser.println(cmd);

if(ser.find(">")){
ser.print(getStr);
}
else{
ser.println("AT+CIPCLOSE");
// alert user
Serial.println("AT+CIPCLOSE");
}

// thingspeak needs 15 sec delay between updates
delay(6000);
}


float getVoltage(int pin)
{
return (analogRead(pin) * 0.00322265625);
}

Edited by flapjack
  • Like 2
Link to comment

Seems like a lot of work when you can buy a wifi temp device for about $20

My google skilz suck. I did quite a bit of searching and couldn't put something together for <$100. Can you share an example?

By the way, it is a fun project for dorks like myself, and I will be able to add a lot of functionality. It took this non-EE guy about 5hrs to get this built and working. Somone copying my work should be able to piece this together in an hour.

Link to comment

Looks like the price has gone up some since I put one in my folks house. They had an older version of this that was one piece. Internet software still looks pretty much the same,

http://www.amazon.com/Crosse-926-25100-WGB-Wireless-Temperature-Humidity/dp/B0097C43BO/ref=sr_1_1?ie=UTF8&qid=1455035306&sr=8-1&keywords=lacrosse+alerts

Link to comment

Looks like the price has gone up some since I put one in my folks house. They had an older version of this that was one piece. Internet software still looks pretty much the same,

http://www.amazon.com/Crosse-926-25100-WGB-Wireless-Temperature-Humidity/dp/B0097C43BO/ref=sr_1_1?ie=UTF8&qid=1455035306&sr=8-1&keywords=lacrosse+alerts

That would work for many cases (and is a much easier solution). I honestly looked to buy something before I built this.

In my case, the problem with that system is that it needs a wired internet connection, and the wireless signal only travels 200'. You could hook up a bridge/access point, but that is less stable (and more energy consuming) than an esp8266 which can re initiate the connection to the router at each ping (5 minutes is my planned data acquisition timing).

Edited by flapjack
Link to comment

But then you can't geek out building and programming it and learn something in the process!! I'm a fan of doing it the "hard way". :lol:

I second this. But also I am now in my early thirties with 3 kids. I have moved from being the guy that will DIY anything, to "the guy who supports the DIYers monetarily". I think there is a need for all of us in this world!

Link to comment

Flapjack does your Arduino also control when the heater kicks on??? Or does the heater have it's own thermostat?

Bilge heaters have their own thermostat. Boatsafe's come on under 40 degrees.

  • Like 2
Link to comment

Flapjack does your Arduino also control when the heater kicks on??? Or does the heater have it's own thermostat?

I already owned a bilge heater. 400W Camfro for $160.

http://ecx.images-amazon.com/images/I/81NsNzWlv2L._SL1500_.jpg

For $2 you can buy an optically isolated 30A/110V relay. For next winter, I plan on hooking up a "engine block heater magnet."

1) It may be more reliable. (For another $2 I can hook up a current monitor.)

2) I'll use far less electricity (not that the current one uses much)

3) I forgot to mention this to you guys, but the thingspeak.com can be coded to send tweets/alerts under certain conditions. I'll program the thing to send notifications based on load monitoring, etc.

  • Like 1
Link to comment

I already owned a bilge heater. 400W Camfro for $160.

http://ecx.images-amazon.com/images/I/81NsNzWlv2L._SL1500_.jpg

For $2 you can buy an optically isolated 30A/110V relay. For next winter, I plan on hooking up a "engine block heater magnet."

1) It may be more reliable. (For another $2 I can hook up a current monitor.)

2) I'll use far less electricity (not that the current one uses much)

3) I forgot to mention this to you guys, but the thingspeak.com can be coded to send tweets/alerts under certain conditions. I'll program the thing to send notifications based on load monitoring, etc.

I wonder if I could use the arduino or another similar product to make a simple "boat controller" for my vlx. Plumb it with GPS too. This way I could hook it to the wifi at the lake and see the location, temp etc. But also make a simple dash with a tablet. I bet with some relays and piggybacking the 2005 VLX's sending units in the ballast tanks I could wire up a system for pre-maliview owners with presets etc. I bet axis people would be interested too.

Quit doing cool projects that inspire others! I can see a lot of solder burns in my future.

Link to comment

Hello,

I don't want to distract from this monitoring thread but for the techies out there. Is there a way to create a thermostat that you can control below 45 degrees. Household thermostats don't go down below 45. I have a heater in my garage that I would like to keep the temperature above freezing but cooler than 45. I would also like the temp swing to be greater than 2 degrees. So lets say set it for 40 let it go down to 35 before the heater kicks back on to 40 again.

Are there options out there that I am not finding?

Thanks

Terry

Link to comment

I wonder if I could use the arduino or another similar product to make a simple "boat controller" for my vlx. Plumb it with GPS too. This way I could hook it to the wifi at the lake and see the location, temp etc. But also make a simple dash with a tablet. I bet with some relays and piggybacking the 2005 VLX's sending units in the ballast tanks I could wire up a system for pre-maliview owners with presets etc. I bet axis people would be interested too.

Quit doing cool projects that inspire others! I can see a lot of solder burns in my future.

I agree with MA that this is a pretty strait forward project. The only technical challenges is the mobile app... looks like wakegirl is our coach there.

I had a warranty replacement for my MTC...over a grand! As these Malivue boats have issues in the coming years, I'm looking forward to "MartinArcher's Malivue/MTC retrofit." He'll charge us $200 and will still make 400% profit (bring your own tablet). It will be Android based, have a higher quality screen, and will be LTE linked for all my music, etc.

Link to comment

Hello,

I don't want to distract from this monitoring thread but for the techies out there. Is there a way to create a thermostat that you can control below 45 degrees. Household thermostats don't go down below 45. I have a heater in my garage that I would like to keep the temperature above freezing but cooler than 45. I would also like the temp swing to be greater than 2 degrees. So lets say set it for 40 let it go down to 35 before the heater kicks back on to 40 again.

Are there options out there that I am not finding?

Thanks

Terry

if it is a simple mercury switch, just tilt the thermostat. it takes some patience but you can get it set to whatever temp you want.

Edited by Chia
  • Like 2
Link to comment

Hello,

I don't want to distract from this monitoring thread but for the techies out there. Is there a way to create a thermostat that you can control below 45 degrees. Household thermostats don't go down below 45. I have a heater in my garage that I would like to keep the temperature above freezing but cooler than 45. I would also like the temp swing to be greater than 2 degrees. So lets say set it for 40 let it go down to 35 before the heater kicks back on to 40 again.

Are there options out there that I am not finding?

Thanks

Terry

Something like this?

http://www.123ponds.com/tc-3.html?utm_source=tc-3&utm_medium=shopping%2Bengine&utm_campaign=googleproducts&gclid=CNngoKXu68oCFUodgQodoekGvw

Link to comment

You guys got nothin on Ahmed...



FYI A starter guide for those interested...


Also - I just started a project with a Raspberry Pi that boils down to accelerometers that measure the lean of the boat and some relays that work the pumps to balance to a pre-determined angle for that perfect wave. No clue if it will work, but when I put in the new ballast pumps, I installed quick disconnects on the pumps so that I could use relays instead. I know someone else on the forum is working on this... and I wonder if I should have chose the Arduino instead... hmmm
  • Like 1
Link to comment

after reading this topic i started searching remote thermostats and as usual followed links and found this, a site dedicated to ardruino development (search thermostat for other remote options).

this topic was interesting, a remote soil moisture test project. Would seem this will be the future of auto sprinkling systems. Sensors in the ground telling the control unit when to turn the water on.

https://www.openhomeautomation.net/wireless-gardening-arduino/

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...