Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register
  • The final cut of the 9th episode of the Tesla Motors Club Podcast, featuring Chad Schwitters, the former president of Plug In America, is now available. You can watch it now on YouTube or listen to it on all major podcast networks.

Something my wife and I hacked together this week- an Android app that acts as an instrument cluster

Excellent work!

I really like your update, to put one big BSM at left edge and one at right edge. That’s much more intuitive than the earlier version, which had all the BSM sensors in a tight group.

There might be a setting to dampen how rapidly the MPH updates. Or use a dial gauge like the old Model S display.

I would probably make the power meter show KW instead of HP, and have a bit fatter line, but that’s just minor personal preference.
 
Excellent work!

I really like your update, to put one big BSM at left edge and one at right edge. That’s much more intuitive than the earlier version, which had all the BSM sensors in a tight group.

There might be a setting to dampen how rapidly the MPH updates. Or use a dial gauge like the old Model S display.

I would probably make the power meter show KW instead of HP, and have a bit fatter line, but that’s just minor personal preference.
You tap the power meter to toggle between kW and hp. There is no setting to dampen mph updates, because this is raw can data. Might be an issue with my server. It seems better lately. Dials for speed are a waste of space and I will never implement one- smoothing output introduces hysteresis lag because you have to delay the output to smooth, which gives you a rubber band effect where what you see is delayed from what your butt tells you.
 
  • Like
Reactions: tomas

tomas

Out of warranty...
Supporting Member
Oct 22, 2012
4,336
4,255
Santa Barbara/New York
You tap the power meter to toggle between kW and hp. There is no setting to dampen mph updates, because this is raw can data. Might be an issue with my server. It seems better lately. Dials for speed are a waste of space and I will never implement one- smoothing output introduces hysteresis lag because you have to delay the output to smooth, which gives you a rubber band effect where what you see is delayed from what your butt tells you.
I like dials, but that’s why it’s great that you plan to open source it. Won’t stop people from trying to delegate more work to you though 😇
 
I like dials, but that’s why it’s great that you plan to open source it. Won’t stop people from trying to delegate more work to you though 😇
Yeah, it's just literally a round peg in a square hole, on a screen that is maybe 60mm tall. More appropriate rate of change would be done with a moving tape display which is less space inefficient for a rectangular viewport. Dials exist because of mechanical gauges.
 

JHCCAZ

Electrified Engineer
Supporting Member
Feb 2, 2021
539
991
Tucson
Yeah, it's just literally a round peg in a square hole, on a screen that is maybe 60mm tall. More appropriate rate of change would be done with a moving tape display which is less space inefficient for a rectangular viewport. Dials exist because of mechanical gauges.
I certainly agree with this, but I'll offer a deeper historical perspective:
The original dial form is a product of sundials that cast a shadow from a central gnomon onto a roughly circular arrangement of hour markers (classically Roman numerals) arranged around the periphery of the dial. Clock dials followed this familiar tradition, which happily also was the most sensible mechanical indicator from the geared mechanism - and we can note the wonderful collection of gear-driven pointers and dials on the remarkable ancient-Greek Antikythera mechanism.

Some of my antique Volvos actually have a bar-graph or "ribbon" speedometer; these were somewhat popular in the fifties and sixties but I'm not sure when and where they first appeared. Some of these did use a ribbon I think, but the older Volvo / VDO ones were created by replacing the dial pointer with a horizontal cylinder laid on its side behind the cluster display. The horizontal cylinder had a colored helical section on a black (but vertically striped) background, all viewed through a horizontal-bar window mask. So as the car speeds up, you see a colored bar-graph speed indication extending from the leftmost zero position, and the stripes to the right of the red portion serve as x-axis tick marks for the number scale.

(This video bench-test was grabbed from the web and shows a European version)
A later variant replaced the colored markings with a helical slot so that a moving pointer could ride along under the number scale. There were also some designs that used a cord-and-pointer mechanism similar to a radio tuning dial. I'm not sure which this is, but this was the effect:
s-l640.jpg


Having said all of the above, I'm very happy with a simple large numeric readout and dispensing with an analog dial or bar-graph simulation altogether. For things like SOC where the current fraction of max capacity is significant, the bar-graph makes sense. Personally I don't mind just a numerical percentage reading even there, but for me it needs to be larger than what Tesla likes to give us!

Regarding the earlier comments about lag and hysteresis effect, I believe there are some pretty simple numerical filtering algorithms that can perform the smoothing without noticeable lag-error on acceleration or deceleration. These can take into account the first or second derivatives of velocity ( i.e. the acceleration and rate of change thereof) to create a simple predictor function which is also filtered for noise.
 

tomas

Out of warranty...
Supporting Member
Oct 22, 2012
4,336
4,255
Santa Barbara/New York
Yeah, it's just literally a round peg in a square hole, on a screen that is maybe 60mm tall. More appropriate rate of change would be done with a moving tape display which is less space inefficient for a rectangular viewport. Dials exist because of mechanical gauges.
Not sure you got my point, as I said I like dials… but anyone who wants one can program it when you open it up.

Now, this may be very generational, but for me reading a dial is instantaneous vs reading digits. Years of speedometers, watches and clocks have burned that into my brain, so it is far, far better a way for ME to quickly process speed and move on to the next chore of driving. The issue of a circle taking up space is purely a UI design challenge. Tesla did a great job of that in their first UI for S in 2012. One round gauge showed speedo, regen, and real time energy consumption. And inside it was the car image and odometer, so that space was not wasted.

But you as author of this thing should do what YOU see fit. We can hack at it later. 🕰
 
  • Like
Reactions: bay74
Not sure you got my point, as I said I like dials… but anyone who wants one can program it when you open it up.

Now, this may be very generational, but for me reading a dial is instantaneous vs reading digits. Years of speedometers, watches and clocks have burned that into my brain, so it is far, far better a way for ME to quickly process speed and move on to the next chore of driving. The issue of a circle taking up space is purely a UI design challenge. Tesla did a great job of that in their first UI for S in 2012. One round gauge showed speedo, regen, and real time energy consumption. And inside it was the car image and odometer, so that space was not wasted.

But you as author of this thing should do what YOU see fit. We can hack at it later.

Not sure you got my point, as I said I like dials… but anyone who wants one can program it when you open it up.

Now, this may be very generational, but for me reading a dial is instantaneous vs reading digits. Years of speedometers, watches and clocks have burned that into my brain, so it is far, far better a way for ME to quickly process speed and move on to the next chore of driving. The issue of a circle taking up space is purely a UI design challenge. Tesla did a great job of that in their first UI for S in 2012. One round gauge showed speedo, regen, and real time energy consumption. And inside it was the car image and odometer, so that space was not wasted.

But you as author of this thing should do what YOU see fit. We can hack at it later. 🕰
My point was simply that an OLED smartphone screen is much smaller than the cluster on the S.
 
There is no setting to dampen mph updates, because this is raw can data.
Maybe the data doesn't change fast enough to flicker. But "raw data" could mean it changes between 39 and 40 twenty times per second... that would be unreadable, and a visual Denial Of Service attack. Maybe it has its own dampening before the data is written to canbus.
 
This is really cool.

Have you tried to invert it to reflect it off the windshield as a HUD?
I have not, I find that using an OLED display mounted to the steering column works great and I know enough about how difficult it is to engineer a proper HUD that projects in a plane over the hood that I would find the windshield reflective one disappointing. OEM huds use a combination of diopter lenses, mirrors, and/or a clear combiner to ensure that the focal plane of the HUD is far ahead of the windshield and not merely a reflection in the windshield. I’d also make different design decisions. I did order a Hudway which appears properly engineered so if I can figure out how to sideload the app into it or connect it to an Android device, I may revisit, but I’d likely make different design decisions for a HUD.

Regardless, others will be free to implement their own dream UI once I get this to a state where I can open source it.

-n.
 
I certainly agree with this, but I'll offer a deeper historical perspective:
The original dial form is a product of sundials that cast a shadow from a central gnomon onto a roughly circular arrangement of hour markers (classically Roman numerals) arranged around the periphery of the dial. Clock dials followed this familiar tradition, which happily also was the most sensible mechanical indicator from the geared mechanism - and we can note the wonderful collection of gear-driven pointers and dials on the remarkable ancient-Greek Antikythera mechanism.

Some of my antique Volvos actually have a bar-graph or "ribbon" speedometer; these were somewhat popular in the fifties and sixties but I'm not sure when and where they first appeared. Some of these did use a ribbon I think, but the older Volvo / VDO ones were created by replacing the dial pointer with a horizontal cylinder laid on its side behind the cluster display. The horizontal cylinder had a colored helical section on a black (but vertically striped) background, all viewed through a horizontal-bar window mask. So as the car speeds up, you see a colored bar-graph speed indication extending from the leftmost zero position, and the stripes to the right of the red portion serve as x-axis tick marks for the number scale.

(This video bench-test was grabbed from the web and shows a European version)
A later variant replaced the colored markings with a helical slot so that a moving pointer could ride along under the number scale. There were also some designs that used a cord-and-pointer mechanism similar to a radio tuning dial. I'm not sure which this is, but this was the effect:
View attachment 750867

Having said all of the above, I'm very happy with a simple large numeric readout and dispensing with an analog dial or bar-graph simulation altogether. For things like SOC where the current fraction of max capacity is significant, the bar-graph makes sense. Personally I don't mind just a numerical percentage reading even there, but for me it needs to be larger than what Tesla likes to give us!

Regarding the earlier comments about lag and hysteresis effect, I believe there are some pretty simple numerical filtering algorithms that can perform the smoothing without noticeable lag-error on acceleration or deceleration. These can take into account the first or second derivatives of velocity ( i.e. the acceleration and rate of change thereof) to create a simple predictor function which is also filtered for noise.
I do love this explanation! I will leave the smoothing to others, I find that the power meter actually works pretty well as a reflection of input power to the motors, which correlates directly to accel (first derivative) and in the car it’s a good visual cue. Applying a calculus based approach to a speedo isn’t as useful, a better approach would be a Complementary Filter: Complementary filter - My IMU estimation experience

The reason being that the speed/accel is not only determined by inertia and drag but also by arbitrary input of power from the driver (i.e. accelerator pedal). If I wanted to be really smart I could use power input and speed to determine likely change in acceleration but I am not that smart. A complementary filter would likely achieve that goal better. I will leave this as an exercise for the next open source contributor. Data already updates every 16ms or so, so it feels pretty smooth.
 
Isn't that the vehicle bus? In any case are you using both the chassis and vehicle bus traffic?
Oh yes you are right, chassis bus is under the seat (at least in North American market cars). I use both but it gracefully falls back to Vehicle only, you just don’t get any autopilot data but since the live blind spot displays are driven by the ultrasonic sensors (which are on the Vehicle Bus) you will get those, just not the camera based AP blind spot warnings that only trigger when you are actually changing lanes with a turn signal on.
 
Tesla needs to hire you for UI design


Does the android phone/tablet interface with the CANserver over wifi/BT or is it hardwired?
Over wifi, you can connect to the CANServer via a local AP it sets up or have it connect to a hotspot, and WPA encryption is supported. I use a hotspot running on my dash because that preserves access to the internet through a SIM card I have installed, so I can run google assistant, maps, music on the dash as well.
 
I like it a lot. I will suggest the R and F values be always on the same order position in relation with their counter part. Meaning F always on top of R -OR- F always left of R.
Yep, already done. That pic was from my initial test and because of my layout it's easiest to put the newest gauges on top. Now that I confirmed operation they're arranged as you suggested.
 
  • Like
Reactions: Ezmendriz

Products we're discussing on TMC...

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top