Journey with Confidence RV GPS App RV Trip Planner RV LIFE Campground Reviews RV Maintenance Take a Speed Test Free 7 Day Trial ×
Jayco RV Owners Forum
 


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 01-20-2018, 08:31 PM   #1
Senior Member
 
mitchmitchell's Avatar
 
Join Date: Oct 2014
Location: Flower Mound
Posts: 122
Cool Some IoT fun -- Remote AC Power Monitor

A few months ago during a rain storm, a circuit breaker popped at our trailer storage place and left our Jayco X213 without power for several weeks unbeknownst to us (we leave the trailer plugged in 24x7 so the converter can maintain the batteries). When we went to turn on the refrigerator the day before we left on a trip we found the batteries flat and our PentraMetric battery monitor screaming. We had to move the plug to another circuit to recharge the batteries overnight before we left so we'd have emergency brakes, and I'm sure this shortened the life of our two lead acid batteries significantly.

So, I started looking for a way to monitor the AC power in the trailer and get notified of any power outages. Enter Particle Asset Tracker Internet of Things kit --www.particle.io -- it has a small GPS unit, water proof case, LiPo battery, and a particle electron: an arduino like microprocessor with a cellular modem. The sim card for the modem costs $2.99 a month for 1MB of data (which is plenty for this application). There are some cheaper sims out there (Hologram) for about $0.40 per month but for technical reasons they don't keep a channel to the particle cloud open without a keepalive ping which uses up more data.

I wrote a program for the particle electron to monitor usb power and report to the particle cloud whenever power was lost (the battery acts as backup power so it can report with AC power down). It also sends the trailers position and can report if it moves (built in accelerometer). I connected the particle cloud to another service that sends sms message (www.twillio.com) so I get a text message on my phone whenever power is lost. Problem solved.

But then my geek persona kicked in and I created a node-red program on a raspberry pi I had laying around to connect to the particle cloud and whenever it sees the power loss event, send a message to our google home mini speaker to announce that the trailer has lost power.

I know I have a temperature and humidity sensor laying around here so I will eventually add it to the tracker to monitor temps in the trailer while it is sitting in storage.

The build was a lot of fun geek-wise, and easier than I thought it would be (cheaper too). Now we will probably never lose power again at the storage place
Attached Thumbnails
20180120_191259.jpg   20180120_191305.jpg   Node Red Little Jay Power Monitor.PNG  
__________________

Jayco Pinnacle 36FBTS Fifth Wheel
Ford F-450 Diesel Pickup
mitchmitchell is offline   Reply With Quote
Old 01-21-2018, 08:31 AM   #2
Site Team
 
Mustang65's Avatar
 
Join Date: Nov 2012
Location: Clearwater, FL area
Posts: 5,196
You have to love ELECTRONICS, and the IoT applications. Below is a project that I have been working on (well, in between other projects) for monitoring my RV. I have been doing the IoT before it was even named IoT, and prior to that I had phone access to my home control in the 70's.. (X10). My home in Northern IL, back in the 80's had IOT. Neighbors were amazed. Back then it was mostly ANALOG not digital. They never could figure out if we were home or away. It is so easy now to remotely access and control and get informed by things you build/buy.

This is a current high level project coupled with my Insteon home control (both accessed over the Internet).

Welcome to How-To-Doit.com – My How To DIY Projects

The last IoT project that I completed was a 16 channel smart phone remote that re boots my security cameras individually (the older models).

I use Xbee modules, Node-MCU, esp8266, NFR24L01.... Arduino, Raspberry Pi1,2,3

All fun stuff, drives DW crazy... lights going on/off, home security camera display on the wall monitor in the TT up in the mountains, garden sprinklers provided with water from 10 rain barrels coming on when the soil is dry, lights going on an off when you enter the room, security alerts when the front/back screen door or privacy gates are opened (while remotely staying in the TT), the 15 year old clothes dryer sends a text message when it is finished drying so the clothes don't get wrinkled. AND I AM NOT DONE YET!!!!

Can you imagine my TT and home, had all these electronics had been available since the 70's... WOW!!!!

Enjoy,

Don


My Registry

RVing with SOLAR
Attached Thumbnails
EAGLE - Remote Monitoring.jpg  
__________________
2013 Jayco Eagle 284BHS
2012 Ford F150XLT, EcoBoost w/3.73,Max Tow Pkg.
Our Solar Album https://www.jaycoowners.com/album.php?albumid=329
Mustang65 is offline   Reply With Quote
Old 01-21-2018, 10:24 AM   #3
Member
 
Join Date: Jan 2018
Location: NH
Posts: 51
Your setup looks great! Any idea how much current the Asset Tracker draws and how long the 2000mAh battery will last during a power failure? The storage facility where I keep my trailer doesn't have power available, which is the main reason I've held off doing something like this.

I do have a homebrew security and automation system at home and am using a GSM cellular module as backup for my WiFi. If power is lost, a 6500mAh battery will power things for about 24 hours.
NH_camper is offline   Reply With Quote
Old 01-21-2018, 10:51 AM   #4
Site Team
 
Mustang65's Avatar
 
Join Date: Nov 2012
Location: Clearwater, FL area
Posts: 5,196
Quote:
Originally Posted by NH_camper View Post
Any idea how much current the Asset Tracker draws and how long the 2000mAh battery will last during a power failure? The storage facility where I keep my trailer doesn't have power available, which is the main reason I've held off doing something like this.
Is your TT stored indoors or outdoors? Outdoors, you could put a 30-50 watt SOLAR panel on the roof and keep everything running and topped off. I have not done any measurement tests yet. Since my TT is on SOLAR, I am not concerned, but when finished will give you a number.

Don

My Registry

RVing with SOLAR
__________________
2013 Jayco Eagle 284BHS
2012 Ford F150XLT, EcoBoost w/3.73,Max Tow Pkg.
Our Solar Album https://www.jaycoowners.com/album.php?albumid=329
Mustang65 is offline   Reply With Quote
Old 01-21-2018, 11:04 AM   #5
Senior Member
 
mitchmitchell's Avatar
 
Join Date: Oct 2014
Location: Flower Mound
Posts: 122
Quote:
Originally Posted by NH_camper View Post
Your setup looks great! Any idea how much current the Asset Tracker draws and how long the 2000mAh battery will last during a power failure?
Honestly I did not bother to figure that out as I only needed the unit to survive long enough to send the 'power lost' alert. I toyed with the idea of putting it into low power mode if AC power was lost and waking up on an interrupt from the PMIC chip once power was restored, but since the trailer is not that far away decided to wait until I had tested the unit as is.
__________________

Jayco Pinnacle 36FBTS Fifth Wheel
Ford F-450 Diesel Pickup
mitchmitchell is offline   Reply With Quote
Old 01-21-2018, 01:18 PM   #6
Member
 
Join Date: Jan 2018
Location: NH
Posts: 51
I did find more complete specs for the asset tracker deeper in their website. They say typical current consumption is 180ma and 130ua in deep sleep mode.

Sleep would be ok for monitoring intrusion, assuming a suitable interrupt could be used. But other periodic reporting would probably require the tracker to be fully awake and drawing 180ma. Maybe it could be programmed to go to sleep and only report an intrusion if power is lost.

My trailer is stored outside, but I live in NH. I've thought about trying solar, but the sun gets pretty low in the winter.
NH_camper is offline   Reply With Quote
Old 01-21-2018, 02:38 PM   #7
Senior Member
 
mitchmitchell's Avatar
 
Join Date: Oct 2014
Location: Flower Mound
Posts: 122
Quote:
Originally Posted by NH_camper View Post
Sleep would be ok for monitoring intrusion, assuming a suitable interrupt could be used. But other periodic reporting would probably require the tracker to be fully awake and drawing 180ma. Maybe it could be programmed to go to sleep and only report an intrusion if power is lost.
I'm sure it can be programmed to do that. I experimented with the sleep modes some but didn't take time to add it to the application before putting the tracker in my trailer.

I accidentally tested the over the air firmware update feature today. I was playing with my particle photon which is a wifi only device and flashed it with a program I am working on -- or so I thought. Actually it turned out I had flashed the electron over the cellular connection instead. Fortunately the particle firmware was still running so I could flash the power tracker application back on to it. Otherwise that would have been a trip back to the trailer storage place.
__________________

Jayco Pinnacle 36FBTS Fifth Wheel
Ford F-450 Diesel Pickup
mitchmitchell is offline   Reply With Quote
Old 01-21-2018, 02:41 PM   #8
Site Team
 
Mustang65's Avatar
 
Join Date: Nov 2012
Location: Clearwater, FL area
Posts: 5,196
Quote:
Originally Posted by NH_camper View Post
My trailer is stored outside, but I live in NH. I've thought about trying solar, but the sun gets pretty low in the winter.
If you put a 100 watt panel on the roof and even on those cloudy days you will have enough to make up for the electronics/regular battery loss.

Don


My Registry

RVing with SOLAR
__________________
2013 Jayco Eagle 284BHS
2012 Ford F150XLT, EcoBoost w/3.73,Max Tow Pkg.
Our Solar Album https://www.jaycoowners.com/album.php?albumid=329
Mustang65 is offline   Reply With Quote
Old 01-21-2018, 02:55 PM   #9
Senior Member
 
mitchmitchell's Avatar
 
Join Date: Oct 2014
Location: Flower Mound
Posts: 122
Don,

What sensors did you use to measure your battery and LP tank weights? I've been wanting to do something similar. I found your write up on hackster.io but I didn't see any hardware reference information.

Mitch
__________________

Jayco Pinnacle 36FBTS Fifth Wheel
Ford F-450 Diesel Pickup
mitchmitchell is offline   Reply With Quote
Old 01-21-2018, 05:35 PM   #10
Site Team
 
Mustang65's Avatar
 
Join Date: Nov 2012
Location: Clearwater, FL area
Posts: 5,196
I am using the 50kG weight load cells with a SparkFun load combiner. There are 4 sensors under each LP tank as these sensors use a half-bridge circuit. Much more accurate/easier to use 4, you do not have to use dummy numbers. They are inexpensive on Amazon, make sure you get the sensors that have a boss on the little arm, I had to drill out a hole and put a bolt/nut in there to work with aluminum plate #2 on top. Under the sensor plate are 4 spacers, the prototype has 4 wooden ones, but I will cut small pieces of 1/4" square tubing as spacers. The output needs to be the average of 2000 samples as weight scales tend to float after time. The script is set to get the samples once a minute and write the output to a file so that the media-center Raspberry Pi3 will display it on the Tv's HDMI input #4, along with all the other data from the TT.

They also have a bar type load cell but, I did not think that it would balance tanks properly (while traveling) as good as 4 cells 90 degrees apart.

I used a 5 gallon water container on the prototype (kept adding water) and I was amazed at how accurate it is. The final conversion from kG to pounds is also displayed with the kG's. One issue is that you need to calibrate the scale to "0" kG load before adding the tank. You will need to keep the Arduino powered 24/7 or be prepared to lift the tank to calibrate the circuit, if you disconnect power. I am thinking of copying the "0" calibration numbers (as a variable) and storing them on the Pi, so incase the circuit loses power, the Arduino will boot and get the variable value from the Pi's memory card.

I do not think that the temperature of the LP gas will be an issue in the weight of the tank unless the tank gets extremely hot. There is an algorithm somewhere on the NET to adjust the output based on the tanks temperature.

I had to locate my camera and take a few pictures (well worth a 1000 words)
- picture of the Arduinos (4 in use) working on 1 wire DS18B20 temperature sensors using RF and an actual 1 wire circuit. I am using the NPR24L01 (2.4Ghz xmit/rcv) to pass data back and forth. I could have used the Arduino NODE-MCU (IoT), but there is a lack of security with them at this time.
- The weight scale with the 4 load cells (bottom) mounted on an aluminum plate with the temp wood spacers
- The top plate that the LP tank sits on. This plate rests on the 4 little arms of the load sensors.

Good Luck

Don

My Registry

RVing with SOLAR
Attached Thumbnails
Electronics Project - 1 wire sensors.jpg   Arduino - Pi LP Tank Scale.jpg   Arduino - Pi Tank Scale - Upper and Lower plates.jpg  
__________________
2013 Jayco Eagle 284BHS
2012 Ford F150XLT, EcoBoost w/3.73,Max Tow Pkg.
Our Solar Album https://www.jaycoowners.com/album.php?albumid=329
Mustang65 is offline   Reply With Quote
Old 01-22-2018, 02:53 PM   #11
Senior Member
 
Join Date: Jun 2016
Location: Denver
Posts: 4,195
Geeks after my own heart!!!

One nice thing about living where I do is that SparkFun is 15 mins from the house. And they have a "local pickup" option. So I can usually scratch and IoT itch quickly.

X10. Me too. I started with the 300 baud CP290 controller. I played with X10 on and off (no pun intended) for years until the late 90's when it just became to unreliable for me.

Two or three years ago, I took a chance on the "TCP Connected" brand of smart bulbs. Seeing them in Home Depot, I thought they might have the staying-power. Finally.

Nope. They work but are relics.

Last week, I impulse-bought the IKEA Tradfri smart bulbs. Here's to hoping they stay in the market a bit longer.


My current IoT RV project will be to get the OBD2 port online. I'd like more real-time chassis monitoring going on. Like "Torque" but fed into a system that does more what I want it to do!


Keep up the great work guys!!!
__________________
2016 Greyhawk 31FK
pconroy is offline   Reply With Quote
Old 01-22-2018, 03:18 PM   #12
Senior Member
 
Vasquez Kid's Avatar
 
Join Date: May 2017
Location: Sweetwater
Posts: 731
You guys are all speaking to me here as well. I'm currently working with a Photon (WiFi) for some home IOT projects and am looking at the RV for it's applications too. I've played around with the Raspberry Pi as well and I think that these two devices will be put to work in the RV as soon as I can find the free time????

Interesting that Particle is now allowing Raspberry Pi cloud-collaboration. This makes things quite powerful. I'll be exploring this as well.

As far as getting away with lower power consumption the few levels of System.sleep() or just turning the Wifi radio off until interrupted can save a bunch of power. You guys are probably already aware however.

Looking forward to hearing more about it from you guys and, if you can be patient, I'll share as well.

Cheers,

Jeff
__________________
- Jeff


2017 Jay Flight 32BHDS
2006 GMC 2500HD Classic CC SB 4x4 6.6L Duramax/Allison
Vasquez Kid is offline   Reply With Quote
Old 01-22-2018, 10:07 PM   #13
Senior Member
 
mitchmitchell's Avatar
 
Join Date: Oct 2014
Location: Flower Mound
Posts: 122
Quote:
Originally Posted by pconroy View Post
One nice thing about living where I do is that SparkFun is 15 mins from the house. And they have a "local pickup" option. So I can usually scratch and IoT itch quickly.
You, sir, live in dangerous territory!

I've got something like 8 Rpis running around the house doing various things -- Asterisk PBX, Node-Red servers, an Aircraft ADSB Tracker (with a noelec sdr dongle), an AllstarLink ham radio node (with an epaper shield showing status), an Adafruit IoT printer. I've got several beaglebones as well but they aren't dedicated to specific projects yet.

I just got Alexa and Insteon (ISY994) up and running which pretty much has eliminated the use of manual switches to turn lights on and off. We finally got rid of our Windows phones and switched to android so that's opened up a whole new world of automation.

I just got started looking at the esp8266 and esp32 devices and the Node-MCU devices -- I've been following jeelabs for a number of years now and have been really interested in his work with forth on these devices.

Keep the stories coming, this IoT stuff is revolutionary and we are just at the beginning.

Thanks!

Mitch
__________________

Jayco Pinnacle 36FBTS Fifth Wheel
Ford F-450 Diesel Pickup
mitchmitchell is offline   Reply With Quote
Old 01-22-2018, 10:51 PM   #14
Senior Member
 
Join Date: Jun 2016
Location: Denver
Posts: 4,195
Quote:
Originally Posted by mitchmitchell View Post
I've got something like 8 Rpis runnin
I've got several beaglebones
I just got Alexa
Insteon (ISY994)


I just got started looking at the esp8266 and esp32 devices and the Node-MCU devices -- I've been following jeelabs for a number of years now and have been really interested in his work with forth on these devices.

Keep the stories coming, this IoT stuff is revolutionary and we are just at the beginning.

Thanks!

Mitch
I may have you beat, by one, on RPis but you win hands-down for sheer processor counts!!!

The esp8266 caught my eye too. But the Pi Zero W has been as low as $5 here so I've been using that instead.

After a bit of an IoT hiatus, I'm back on getting the IKEA Tradfri hooked into my MQTT based home system.

https://donotfreezesoftware.blogspot...one-thats.html
__________________
2016 Greyhawk 31FK
pconroy is offline   Reply With Quote
Old 01-23-2018, 09:47 AM   #15
Senior Member
 
mitchmitchell's Avatar
 
Join Date: Oct 2014
Location: Flower Mound
Posts: 122
Quote:
Originally Posted by pconroy View Post
I'm reading through your blog on complex event processing, this adds a whole new dimension to home automation as I've looked at it - excellent writeup!

Sent from my SM-N950U using Tapatalk
__________________

Jayco Pinnacle 36FBTS Fifth Wheel
Ford F-450 Diesel Pickup
mitchmitchell is offline   Reply With Quote
Old 01-23-2018, 11:56 AM   #16
Senior Member
 
Join Date: Jun 2016
Location: Denver
Posts: 4,195
Quote:
Originally Posted by mitchmitchell View Post
I'm reading through your blog on complex event processing, this adds a whole new dimension to home automation as I've looked at it - excellent writeup!

Sent from my SM-N950U using Tapatalk
You're too kind. Thanks.

IMHO, CEP is still a niche that really hasn't caught fire, outside of financial - where its deeply embedded.

I've only done the most simplistic things with it and am still impressed by it's ability to analyze data and derive conclusion as the events stream by. I find myself persisting very little stuff in MySQL these days.
__________________
2016 Greyhawk 31FK
pconroy is offline   Reply With Quote
Old 01-23-2018, 12:34 PM   #17
Senior Member
 
mitchmitchell's Avatar
 
Join Date: Oct 2014
Location: Flower Mound
Posts: 122
I thinlk CEP would be great coupled with machine learning so thgat you did not have to program in the pattern detection, but rather be presented with the pattern the machine discerned and designate an action to take.

I'm really not taking advantage of the events that my home automation system emits, I have more sensors (48 security zones for example) than I can process at this point.

Sent from my SM-N950U using Tapatalk
__________________

Jayco Pinnacle 36FBTS Fifth Wheel
Ford F-450 Diesel Pickup
mitchmitchell is offline   Reply With Quote
Old 01-24-2018, 08:10 AM   #18
Senior Member
 
Join Date: Apr 2017
Location: Las Cruces
Posts: 1,148
It is simply amazing what you can do these days for so little money. I can still remember when a single A/D converter cost thousands of dollars so I had to use several multiplexers and step through each device. Each sensor was over $100. Then not have enough memory on the computer to store all the information over a 24hour period.

The processing power that allows the image recognition is simply amazing to see.

Heck, my phone has more power and memory than a Cray XMP we used back in the early 90's.
__________________
2017 Eagle HT 29.5BHOK (sold)
2017 Ford Powerstroke 6.7, Crew, 4x4 (sold)
2018 Toyota Highlander
Maggie, Old English Sheepdog
vcbice is offline   Reply With Quote
Old 01-24-2018, 09:00 AM   #19
Senior Member
 
Join Date: Jun 2016
Location: Denver
Posts: 4,195
Quote:
Originally Posted by vcbice View Post
Heck, my phone has more power and memory than a Cray XMP we used back in the early 90's.
It's mind boggling, isn't it. One of my first jobs was doing embedded systems. The In Circuit Emulator was the size of an oven and probably cost tens of thousands.

The first hard drive I bought, for work, was a 5MB drive for a DEC Pro-350 and cost $5K.



Kids these days just don't know what we had to deal with!
__________________
2016 Greyhawk 31FK
pconroy is offline   Reply With Quote
Old 01-24-2018, 09:28 AM   #20
Site Team
 
Mustang65's Avatar
 
Join Date: Nov 2012
Location: Clearwater, FL area
Posts: 5,196
This should bring back some memories. I just went into the closet and pulled out the box with my computer relics. They all still work just like the day they were purchased.

The Home Control computer was a stripped down Z1000 with a keyboard I added, and the original 1K of memory was barley enough to run my hot water heating system backup (freezing cold weather pump circulation timer, Northern IL). A lot of creative assembler language programming. Still works 40+ years later.

Still have some of the games that I pull out every now and then.

Don


My Registry

RVing with SOLAR
Attached Thumbnails
MISC - Old Computers.jpg  
__________________
2013 Jayco Eagle 284BHS
2012 Ford F150XLT, EcoBoost w/3.73,Max Tow Pkg.
Our Solar Album https://www.jaycoowners.com/album.php?albumid=329
Mustang65 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


» Featured Campgrounds

Reviews provided by

Powered by vBadvanced CMPS v3.2.3
Disclaimer:

This website is not affiliated with or endorsed by Jayco, Inc. or any of its affiliates. This is an independent, unofficial site.


All times are GMT -6. The time now is 09:24 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2016 Social Knowledge, LLC All Rights Reserved.