TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

Let the hacking begin... (Model S parts on the bench)

Discussion in 'Model S' started by wk057, Dec 14, 2015.

Tags:
  1. artsci

    artsci Sponsor

    Joined:
    May 10, 2012
    Messages:
    6,190
    Location:
    Timonium, Maryland
    I think I may have one in my spare parts bin. I'll take a look tomorrow.

    if you can find a solution to the camera input all kinds of possibilities arise -- video displays on the touchscreen, touchscreen dash cam, etc. Aren't there a number of unused inputs on the back? I've always wondered what they're for.

    I'll be following you work closely along with what appears to be a growing crowd:)
     
  2. zwede

    zwede 2013 P85+

    Joined:
    Jan 17, 2014
    Messages:
    628
    Location:
    Plano, TX
    Can't imagine Tesla re-invented the wheel, so my money is on the rear view camera being a regular UVC compatible camera connected via USB to the MCU and then they're using the UVC driver that already in a standard Linux kernel.
     
  3. msnow

    msnow Active Member

    Joined:
    Jul 14, 2015
    Messages:
    4,951
    Location:
    SoCal
    Curious if there's an input there that could grab AP front camera output.
     
  4. wk057

    wk057 Senior Tinkerer

    Joined:
    Feb 23, 2014
    Messages:
    5,599
    Location:
    Hickory, NC, USA
    The IC and MCU seem to be a pair based on everything I've gathered. Firmwares would have to match and all. I'll see what else I can come up with on that front later.

    Possibly. It's on the list. I may tie it into my setup here shortly to test things out. :)

    Yeah, I figure using the camera to get something to show on the 17" is a step in the right direction, even if it's a limited application. Thanks. :)

    That's quite possible. The cable suggests a differential data connection.

    The front camera setup seems to only be connected to the systems via CAN. I doubt they're going to stream camera output over the 500kbit/sec CAN bus it's connected to.
     
  5. Bangor Bob

    Bangor Bob Member

    Joined:
    Jan 5, 2015
    Messages:
    670
    Location:
    Bangor, ME
    Oh yes. Subscribed. popcorn-and-drink-smiley-emoticon.gif
     
  6. supratachophobia

    supratachophobia Active Member

    Joined:
    Sep 24, 2014
    Messages:
    3,807
    Location:
    Columbus, Ohio
    DO NOT connect to wireless OR cellular. I seem to remember a guy buying a salvage Model S that drove around his garage fine with errors until he connected to the internet and Tesla shut it down.
     
  7. msnow

    msnow Active Member

    Joined:
    Jul 14, 2015
    Messages:
    4,951
    Location:
    SoCal
    Agree. Definitely not cell although that AT&T module has probably been de-provisioned by now. But you could attach it to an internal wifi network on your router that isn't connected to the Internet.
     
  8. wk057

    wk057 Senior Tinkerer

    Joined:
    Feb 23, 2014
    Messages:
    5,599
    Location:
    Hickory, NC, USA
    Yeah, that's not going to happen. No connectivity for this guy.

    So, I was driving my fake Model S around at 255 MPH with the cruise control on pulling 320 kW with the hood, trunk, and three doors open, no brakes, flat tires, with no seat belts or air bags...

    2015-12-14%2022.44.05-1920.jpg

    Fun times... :p

    The odometer runs while I mess with this. 1 mile added every 14 seconds... lol.
     
    • Like x 2
  9. msnow

    msnow Active Member

    Joined:
    Jul 14, 2015
    Messages:
    4,951
    Location:
    SoCal
    And your rated range went from 6/7 to 98!!
     
  10. Cyclone

    Cyclone Cyclonic Member ((.oO))

    Joined:
    Jan 12, 2015
    Messages:
    5,056
    Location:
    Charlotte, NC
    The ability to set cruise at 255 mph is the best part of that shot for me! Imagine AP freaking over a shadow at that speed in a newer car! :)
     
  11. Andyw2100

    Andyw2100 Well-Known Member

    Joined:
    Oct 22, 2014
    Messages:
    6,542
    Location:
    Ithaca, NY
    Well, as long as you were doing it safely and responsibly, on that private road... :)
     
  12. Canuck

    Canuck Well-Known Member

    Joined:
    Nov 30, 2013
    Messages:
    6,125
    Location:
    South Surrey, BC
    Did you also get the battery from that vehicle for your other project or are you still waiting to hear back from Tesla on that? I imagine if you negotiated that large salvage battery purchase, you could possibly have got these goodies thrown in for not too much more to allow for the fun you are now having.
     
  13. Andyw2100

    Andyw2100 Well-Known Member

    Joined:
    Oct 22, 2014
    Messages:
    6,542
    Location:
    Ithaca, NY
    I don't know how much you followed artsci's thread on the front camera switch, so it's possible you know all this, but just in case you don't, I thought I'd share...

    My understanding (and since artsci is following this thread, he can correct whatever I get wrong or can just fill in the gaps) is that when they were working on the original front camera switch they couldn't get the display to work with anything other than the same rear camera Tesla was using. So the switch wound up being designed to use the rear camera on the front of the car, as that was the only video signal they were able to get to display on the 17" screen.

    I'm just pointing this out, in case you knew nothing about all that, in which case what you're thinking may be the easiest part may prove not to be so easy after all.
     
  14. HankLloydRight

    HankLloydRight No Roads

    Joined:
    Jan 18, 2014
    Messages:
    12,648
    Location:
    Connecticut
    So, I guess speed is stored as just one byte?

    That's amazing stuff you're doing. Care to summarize what you sent to the console to make it drive that fast and use that much energy? Are those two things related or independent?
     
  15. sundoc

    sundoc Member

    Joined:
    Aug 7, 2014
    Messages:
    389
    Location:
    Ontario, Canada
  16. GasKilla

    GasKilla No Gas Know Peace

    Joined:
    Nov 11, 2015
    Messages:
    653
    Location:
    Los Angeles, CA
    if you could find a way to splice into the line inputs everyone with an iPod or non-Bluetooth device would love to get that hack. Perhaps a switchbox that intercepts the radio line and switches to an aux input when you want to listen to your iPod then you could flip the switch and go back to the radio
     
  17. wk057

    wk057 Senior Tinkerer

    Joined:
    Feb 23, 2014
    Messages:
    5,599
    Location:
    Hickory, NC, USA
    I didn't pick up the battery from this salvage since it was already sold. As for the deal with the 90 pack swap with Tesla and keeping my 85 pack... I'm not getting my hopes up. Probably will hunt for a pack for my project once I get closer to the point of actually needing one to install.

    Yeah, I don't know the details. It just looks like a low voltage differential data link. Since I'm not messing with my actual car to get details I'll have to wait until I get a Tesla rear cam to mess with.

    Yep, speed is sent as one byte. There are a couple of bytes for the analog speed readout (which I can send to be in a different position than speed), a couple of bytes for the position of the cruise setting, and a flag for cruise enabled. That's all one CAN packet, ID 0x0256 on CAN bus 3.

    The power meter is a little more annoying. I figured out the signal for it... but haven't nailed down the encoding of it. Was tweaking bytes to get some results and was just scratching my head.

    Turns out this packet on a P85D is different than the packet this bench setup expects. The P85D sends an 8 byte packet, where a CAN log I have from another vehicle that someone sent me a while back shows it as a 6 byte packet. Not enough data yet to really figure out exactly how to finely manipulate the power meter. :(

    In case anyone else wants to take a crack at it... here is that packet logged from a P85D: http://skie.net/uploads/powermetercan.txt

    Starts sitting still, slowly up to ~20 MPH, then full throttle to 60 MPH (power ramp starts around packet 715 or so), then full regen to ~40 MPH, then some normal driving and finally stopping again. I don't have a P85D that I'll play CAN packets to, so, can't really test the results. But I know for sure that this is the only packet needed to move the power meter on my bench setup. Good luck. Maybe I'm just sleepy, but I couldn't figure out exactly what the values worked out to be. Definitely the first 4 bytes turn into the power meter read out. It's definitely not quite right on the bench IC, since full power from the P85D log ends up at ~60kW on the bench display. I'll have to log from a non-D one of these days.

    Probably pretty doable, but probably not really worth it given the bluetooth audio stuff, IMO.
     
  18. scaesare

    scaesare Well-Known Member

    Joined:
    Mar 14, 2013
    Messages:
    8,023
    Location:
    NoVA
    The front louver flap actuators are also LIN bus too.
     
  19. jaguar36

    jaguar36 Active Member

    Joined:
    Apr 10, 2014
    Messages:
    1,962
    Location:
    NJ
    Wow, 255mph and you're only averaging 241Wh/mi, did you hop it onto a hyperloop track?

    Very interested to see what you'll come up with.
     
  20. HankLloydRight

    HankLloydRight No Roads

    Joined:
    Jan 18, 2014
    Messages:
    12,648
    Location:
    Connecticut
    Just to add to what wk57 said -- there are hundreds if not more small and cheap Bluetooth devices out there to do exactly what you want -- no need to splice into the line inputs to create an AUX input. And most of them are powered/charged via micro-USB, so that's easy to do in the car.
     

Share This Page

  • 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