Close

Not done!

A project log for Xantrex C35/C40/C60 Display

Replicating Xantrex's remote display with an Arduino, plus collecting more data!

eric-herbersEric Herbers 05/04/2015 at 03:460 Comments

After posting my findings on a post on allaboutcircuits it was pointed out that byte 1 really should be battery voltage. After a little investigation (and wiring in a battery temp sensor) I found that what I had been using (byte 13) was actually a comparator value for the charging logic that factored in battery temperature (causing the battery to charge to a lower voltage if it is hot).

Ultimately I found that my logic for checking the two comm lines had a fault: It assumed both went high at exactly the same time. The fallacy in that logic is that any MCU takes a number of clock cycles between actions so it can't realistically bring both high at exactly the same time. Granted, the Arduino isn't checking them at exactly the same time either, but it was painfully obvious that I was not catching them both reliably.

By writing in some logic that causes the Arduino to delay a millisecond and then check the other comm a second time ensures that it can reliably capture the sync events, leading me to reliable data for byte 0. Early on I had dismissed it as I was largely getting garbage data; that was a mistake.

I've updated the source code to correct this and will work on a schematic next.

Discussions