Page 1 of 1

CAN Scaling/Gain

Posted: Sun Jul 02, 2023 8:55 pm
by P.S.Mangelsdorf
I'm currently working on integrating Speedhut's CAN EV gauges into my project, and I'm having an issue with some of the CAN settings in my LDU.
Specifically, the issue is with Gain/Scaling.

The Speedhut gauge data sheet provides ID, Start Bit, Bit Length, Scaling, and Offset. All of the messages use either 1 or 0.1 for the Scaling. I assumed Scaling=Gain, but at least in the web interface, I can only set the Gain to an integer. What am I missing? Is it not possible to use a non-integer scaling with OpenInverter? Or do I need to do a calculation for the Gain?

I'm on FW 5.20

Re: CAN Scaling/Gain  [SOLVED]

Posted: Sun Jul 02, 2023 9:41 pm
by tom91
Scaling of 0.1 means trans mitted value is multiplied by 0.1. thus reduced.

Gain is an increase, so to achieve a 0.1 ratio you multiply 10.

Re: CAN Scaling/Gain

Posted: Sun Jul 02, 2023 11:27 pm
by P.S.Mangelsdorf
Got it, thanks!

Re: CAN Scaling/Gain

Posted: Mon Jul 03, 2023 6:13 am
by johu
5.24.R also has floating point scaling

Re: CAN Scaling/Gain

Posted: Mon Jul 03, 2023 11:45 am
by P.S.Mangelsdorf
johu wrote: Mon Jul 03, 2023 6:13 am 5.24.R also has floating point scaling
What does that mean practically?

Re: CAN Scaling/Gain

Posted: Mon Jul 03, 2023 3:29 pm
by johu
P.S.Mangelsdorf wrote: Mon Jul 03, 2023 11:45 am What does that mean practically?
You can enter 0.1
You can even enter 0.001, it will use that but it won't reflect it back to the web interface correctly.

Re: CAN Scaling/Gain

Posted: Fri Jul 07, 2023 12:15 am
by P.S.Mangelsdorf
Thanks, I was able to get things working.

I did find a new weird issue. Might need its own thread, but briefly:
With just the LDU and gauges on the bus, the gauges all act like they aren't getting messages. When I attach my CAN to usb adapter (an EVTV CANDue with the termination resistor removed) to the bus and to my computer, all of the sudden, the gauges are getting data and reading correctly. Without the gauges attached, SAVVYCAN is still seeing messages from the LDU, but obviously its difficult/impossible to check what's going on when the CANDue is removed from the bus.

The bus is terminated on the LDU board and right after the gauges, so its not a termination problem. Also, if the CANDue is connected and not powered, the gauges still don't seem to see the messages. I haven't had time to check if adding something else to the bus, rather than the CANDue, will have the same result.

Any thoughts?

Re: CAN Scaling/Gain

Posted: Fri Jul 07, 2023 8:59 am
by johu
I wonder if your gauges don't ACK the messages for some reason. Then the LDU will keep sending the same message over and over.

Re: CAN Scaling/Gain

Posted: Fri Jul 07, 2023 11:46 am
by P.S.Mangelsdorf
That could be the case. I think they are intended to just listen to the bus and be unobtrusive. I'm pretty sure they're based off of an existing product line that plugged into an OBDII port. I need to add my Model 3 PCS to the bus to get a 12V system voltage, so hopefully that will solve the issue.