CAN Scaling/Gain  [SOLVED]

Discussion about various user interfaces such as web interface, displays and apps
Post Reply
P.S.Mangelsdorf
Posts: 772
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 96 times
Been thanked: 94 times

CAN Scaling/Gain

Post 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
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
tom91
Posts: 1308
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 103 times
Been thanked: 216 times

Re: CAN Scaling/Gain  [SOLVED]

Post 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.
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
P.S.Mangelsdorf
Posts: 772
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 96 times
Been thanked: 94 times

Re: CAN Scaling/Gain

Post by P.S.Mangelsdorf »

Got it, thanks!
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: CAN Scaling/Gain

Post by johu »

5.24.R also has floating point scaling
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
P.S.Mangelsdorf
Posts: 772
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 96 times
Been thanked: 94 times

Re: CAN Scaling/Gain

Post 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?
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: CAN Scaling/Gain

Post 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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
P.S.Mangelsdorf
Posts: 772
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 96 times
Been thanked: 94 times

Re: CAN Scaling/Gain

Post 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?
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: CAN Scaling/Gain

Post 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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
P.S.Mangelsdorf
Posts: 772
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 96 times
Been thanked: 94 times

Re: CAN Scaling/Gain

Post 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.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
Post Reply