cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

TriMetric Serial Data

msiminoff
Explorer II
Explorer II
I am wondering how many other folks here are taking advantage of the serial data output from their Trimetric?? I have occasionally used mine to log/graph charge and discharge info', and I'm now thinking about building a small programable interface that will use the TriMetric's data to turn devices in my TC on or off based on the battery SOC (or current or voltage).

For example;
-It could act like a diversion load controller to turn on my DC water heater only when the battery SOC is above 98% and the voltage is above 13.5V.
- It could turn off (or dim) lights or other appliances when the SOC is below a preset threshold
- It could connect the starting battery to the coach battery (via a solenoid) when the current was above a preset value (e.g. running the microwave from the inverter)
- It could trigger an audible alarm if voltage was low... or high

In addition, this interface could easily communicate with other devices (e.g. MotoBrain) to automate other everyday electrical tasks.

I'll probably make a simple prototype with an Arduino to test out the concept. Anybody else thought of this or have experience with this type of product?

Cheers
-Mark
'04 Alpenlite Saratoga 935, 328W of solar, 300Ah Odyssey batt's, Trimetric, Prosine 2.0
05 Ram3500, Cummins,Vision 19.5 w/M729F's, Dynatrac Hubs, RR airbags w/ping tanks, Superhitch, Roadmaster Swaybar, Rancho RS9000XL
The Overlhander Blog
20 REPLIES 20

OkieJIm
Explorer
Explorer
Sorry for the delay. I have been busy working on the script. I can't get it up on this forum I have it on another forum in the going green forum under my username. FYI It is in python and running on a pi3.
2003 Newmar Kountry Star 38ft. Class A Gas Traded for a Rubicon 2100 toy hauler.

wkswenson
Explorer
Explorer
Well several tries and I am still not getting data out of the meter. I need to put a scope on the output to see if maybe it is not working properly.

Below is the sketch file from the Arduino that I was using as a starting point.

void readTriMetric(uint8_t inByte) {
if (inByte == char('%')) { // check for '%' character:
if (tm_scan_37) { // check for second '%' character:
tm_scan_37 = false; // second '%' character found, so reset for next message:
++tm_buffer_index; // increment buffer index:
tm_buffer[tm_buffer_index] = '\0'; // put NULL at end:
processTriMetricBuffer();

for (uint8_t i = 0; i < 128; i++)
{
tm_buffer = '\0'; // clear the buffer by filling with NULLS:
}
} else
{
tm_scan_37 = true; // set flag:
}

tm_buffer_index = 0; // reset buffer index to start of buffer:
tm_buffer[tm_buffer_index] = inByte; // put % into correct location at index:
} else {
++tm_buffer_index; // increment buffer index:
tm_buffer[tm_buffer_index] = inByte; // put % into correct location at index:
}
}
Walter & Donna Swenson
2013 Cedar Creek 38FL - Front Living, Trail Air
2011 Dodge RAM 3500 6.7 CTD DRW CC LB
Our Website - "A Work in Progress"

jayw900
Explorer
Explorer
Do you any links on how to do this? It seems I'm not asking google the right question. I have an entry level controller so I would need something that senses and records voltage.
Sent from my laptop with 100% renewable electrons.

mapguy
Explorer
Explorer
OkieJIm wrote:
Got my first python script coded and running. This is on a raspberry pi and reading from the tm-2030. I tried to add the code to this message but it would not send. Anyone know to I can attach the code for some help in cleaning up the code.


convert the text doc to an image format and post as a picture.

OkieJIm
Explorer
Explorer
Got my first python script coded and running. This is on a raspberry pi and reading from the tm-2030. I tried to add the code to this message but it would not send. Anyone know to I can attach the code for some help in cleaning up the code.
2003 Newmar Kountry Star 38ft. Class A Gas Traded for a Rubicon 2100 toy hauler.

OkieJIm
Explorer
Explorer
I have decided to try this out again. I am still trying to get my data clean. It is random out of the tm-2030. What does come out, and is readable is correct in respect to the display. I am using a FDCI ttl to usb cable and Python script. More to come I hope soon.
2003 Newmar Kountry Star 38ft. Class A Gas Traded for a Rubicon 2100 toy hauler.

pconroy328
Explorer
Explorer
Cool stuff... While I don't have the Trimetric, I do have a couple of devices in our RV that push out data to my RPis. One approach I used, that I like, is every device publishes their own data in JSON format using MQTT. Then any other app can simply subscribe to the messages and do what they want.

It's made it easier to add a number of smaller specialized programs, in Python for example, that do smaller tasks.

Right now, I've got an OBD2 device, a GPS device and a SenseHat publishing data onto the MQTT bus. When we add Solar, I'd like to get some more of the electrical subsystems online.



The new RPi Zero W, now with built-in Wifi and Bluetooth will be a great addition!

eb145
Explorer
Explorer
Subscribed.

If anybody has an update on this topic, please reply.

I am especially interested in logging data from a TM-2030 to a Raspberry Pi.

Ed

OkieJIm
Explorer
Explorer
I would be interested in what you come up with. I have a python script on a tm-2030. I get intermittent bad data overflows and not sure why please let me know how yours goes. I had to give up on my coding but will get back into it when I have more time. I do get data and when it reads right it is correct. What language are you using?
2003 Newmar Kountry Star 38ft. Class A Gas Traded for a Rubicon 2100 toy hauler.

wkswenson
Explorer
Explorer
Ok a small update on my efforts for this... Finally purchased an Arduino board to play with and now have some code that I believe will read the output from the meter. Everything compiles and runs on the board, just have not had time with the weather to test it in the RV.

Plan is to use the Arduino to poll the TriMetric (and other items), right the data to a MySQL database on a Raspberry PI 3 that presents that data on a web page. I have the database and the basic web page working, now just need to get the connects between the devices working.

Walter
Walter & Donna Swenson
2013 Cedar Creek 38FL - Front Living, Trail Air
2011 Dodge RAM 3500 6.7 CTD DRW CC LB
Our Website - "A Work in Progress"

wkswenson
Explorer
Explorer
Ok well I tried to get this working with no luck what so ever. Not even sure where to take this with a next step right now. Will need to borrow an oscilloscope to figure this out next. And still waiting for some warmer weather!
Walter & Donna Swenson
2013 Cedar Creek 38FL - Front Living, Trail Air
2011 Dodge RAM 3500 6.7 CTD DRW CC LB
Our Website - "A Work in Progress"

wkswenson
Explorer
Explorer
Ok well my cable is ready - will be testing later today on serial input. The cable on the 2030 is a phone connector and under the shrink tubing is the diode and resistor...

Ok tried to read the data stream using the my home made cable with the FTDI cable from amazon as shown below. I have ordered a new MAXRS232 board from eBay as the one I had seems to have disappeared in the garbage box somewhere.... I have ordered a new one with the hope that will work to enable me to read the data stream.

http://www.amazon.com/gp/product/B004LC28G2 /ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1


Walter & Donna Swenson
2013 Cedar Creek 38FL - Front Living, Trail Air
2011 Dodge RAM 3500 6.7 CTD DRW CC LB
Our Website - "A Work in Progress"

CA_Traveler
Explorer III
Explorer III
I'll follow along as I'm interested in Trimetric output especially cvs data.

I can log a lot of useful data from my MPPT60 controller mostly using a LAN cable. It would be interesting to log the Trimetric volts and amps in/out of the battery bank at the same time plus other data.

KJINTF suggested I go wireless on the solar controller and I've also used that capability.
2009 Holiday Rambler 42' Scepter with ISL 400 Cummins
750 Watts Solar Morningstar MPPT 60 Controller
2014 Grand Cherokee Overland

Bob

wkswenson
Explorer
Explorer
Not sure why the image didn't show up last time:

Walter & Donna Swenson
2013 Cedar Creek 38FL - Front Living, Trail Air
2011 Dodge RAM 3500 6.7 CTD DRW CC LB
Our Website - "A Work in Progress"