1. Attachments are working again! Check out this thread for more details and to report any other bugs.

CAN-VIEW (Recovered)

Discussion in 'Gen 2 Prius Audio and Electronics' started by D0li0, Oct 20, 2005.

  1. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    Well it appears that we lost the entire CAN-View thread due to the rescent crash...

    Luckily I've run accross google archives of the first 2 of 3 pages of the thread:
    http://www.google.com/search?q=cache:9yflk...owtopic%3D12077
    http://www.google.com/search?q=cache:OQWcU...t12077-s20.html
    Unfortunently, even those have been updated to empty versions of the cache...
    However I saved them locally and will attempt to reconstruct them here now...

    The original thread began with...
    eflier - Sep 14 2005, 10:06 AM

    This is in response to questions raised after a posting (#32, Sep 13, Audio & Electronics) by FrankHudon. The original topic was about the touch screen, so it seems more appropriate to start anew. I suppose its only fair to tell interested owners something about the CAN-VIEW project. Sorry if it meanders a bit.

    No, its not finished and No, its not for everybody.

    I exchanged my Classic prius for the new model September 2004. NAV wasn't available on a Canadian Prius at that time. I wanted a device that would display some interpreted CAN data directly on the MFD. With no NAV unit to simply switch external RGB, I had to make something that would plug into the back of the MFD (center 28 pin connector) This meant talking to the AVC-LAN buss to politely ask the MFD to accept an RGB video input and also in getting it to tell me touch-screen data (which is normally only available when in NAV mode).This took one microprocessor and almost 3 months of software/cursing. Then a second microprocessor connected to the OBDII connector to interpret some of the interesting CAN data. Finally a third microprocessor to take this data and generate crude compatible RGB video. (Text and colored moving bar-graphs)

    It all fits on a single printed circuit board in a die-cast box about 2" by 4" by 1" that fits

    behind the glove compartment. It currently displays NimH pack voltage, current, power, SOC, battery and engine temperature, electrical and mechanical power (in kw and BHP) plus about 80 raw CAN messages for somebody smarter to decipher. It captures maximum and minimum values. It also has a single external RGB video connector. This is for the external NAV unit I hope to interface, but it can also display a reverse-camera image when its hooked up to a NTSC-RGB converter (off-the-shelf from 3W electronics in the UK) I added this recently because I thought there wasn't enough functionality in the CAN display alone to justify the price, which, since the question was raised, probably has to be in the same ball park as Coastal's video box just because of the parts cost.

    So why isn't it on sale? Well, the unit itself is a production-ready PCB, but (BUT!) to make it a user-friendly install, the connection to the back of the MFD has to be a simple plug, not the 7 wires soldered on like right now which would probably put off almost every Prius owner. The correct connector is a Toyota 90980-12410 (which doesn't even come with any pins) japanparts.com tried very hard to order an initial 100 from Toyota for me but (even though they have my money) Toyota Japan can not/will not come up with a delivery date.It has a Tyco part number stamped on it, but Tyco engineering support say its not a genuine Tyco number.

    So I am currently trying to make an acceptable connector using a tiny printed circuit board and gold pins embedded in expoxy. If anyone else has any bright ideas, go for it!

    (it has crossed my mind that this connector may account for Coastal's delivery problems)

    I think I've said enough for now about a product you can't buy, but if I succeed in the next week or two, I will happily report in more detail Conclusion:

    1)displays a menu and then several CAN screens in color on the MFD.
    2)menu selection is by touch screen
    3)has an external RGB menu button
    4)not yet available because of the $#@*^! connector
    5)only for 2004/2005 Prius owners who do NOT have the NAV option.
    Hope this doesn't cause more anguish....
    eflier, Left Coast, Canada
     
  2. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    efusco - Sep 14 2005, 11:25 AM

    First of all, great work, you deserve credit for the accomplishment whether or not you ever create a product to market. If you can/will, please post a few nice photos of some of your touch screen images with the HV voltage and such so we can see how the finished product works.

    Next, have you seen the CAN codes in the attachment below? They may help you decipher some of the data you hadn't up to now if you hadn't seen it.

    Finally, what limits the device from being used on a NAV equipt display? Use simple terms for a non-tech like me please!

    [attachmentid=657]
     

    Attached Files:

  3. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    eflier - Sep 14 2005, 11:56 AM

    1)Yes, thanks, I've seen the .xls CAN codes. I was disappointed the acceleration ones don't exist in the base Prius and I dispute the amperage measurement, but overall they have been very helpful.

    2) I designed the device for my Prius which does not have NAV. So I have to send my data directly to the MFD using the empty plug on its back, in a format it understands. If I had factory NAV (envy!) that plug would already be filled (factory harness) and I would have to split the cable coming from the NAV unit to switch between NAV and CAN-VIEW monitor. More difficult-to-obain connectors, different software talking to the AVC-LAN, plus without a NAV-equipped Prius, no way to troubleshoot it. I assumed the unit might be of more interest to us poor base-model owners. Or am I wrong?

    3) I've added some photos you asked for, sorry if resolution is poor, originals are maybe way too big to post. Hope pictures attach properly; this is my 1st attempt.

    [attachmentid=658][attachmentid=659]
    [attachmentid=660][attachmentid=661][attachmentid=662]
     

    Attached Files:

  4. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    efusco - Sep 14 2005, 12:32 PM

    Very nice, thanks for the follow up.
     
  5. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
  6. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    dschuetz - Sep 14 2005, 01:03 PM

    I'm interested in the interfacing technology you worked out, for the same reasons as the original thread -- getting a home-grown PC to be displayed and controlled by the MFD. As far as I know, nobody else has really gone down this route, so you're quite a pioneer here. I hope you'll be willing to share the technical details, at least as far as interface circuitry and programming, with the rest of the community. I really think that this is the last hurdle to getting some really powerful add-ons, way beyond the VAIS or Coastal solutions... Stuff like a real iPod controller, for example, not something shoehorned into a CD changer emulation mode.

    Anyway, some specific questions. First, how do you switch to this source? Does a button on your box basically "take over" the MFD, or does it register on the AVC lan as a new device, and so you can simply select it from the mode buttons? (in my world, that'd mean using steering wheel buttons to switch to the input).

    Once selected, you capture on-screen presses and process them. Was that a simple matter of converting the AVC data to, say, X-Y coords on a serial stream?

    The specific application you built (CAN data viewer) is pretty niche, and I'm sure once you figure out production that you'll find people who'll buy it. But what I'd really love to see is a generic interface box for PCs or other homebrew projects. Any chance you could share your secrets, open up at least that part of the project for others to build on (and especially to help figure out whether it'll work on Nav-enabled systems)?
     
  7. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    eflier - Sep 14 2005, 01:59 PM

    I'll try to answer without giving anything too proprietary away. My box registers as a new device and is started by pressing 'INFO' three times. After that, any normal Prius screen (audio/climate/etc) overlays it until it either times-out or you press 'INFO' again (just once on subsequent entry)

    The on-screen presses normally don't exist on the AVC unless you are in NAV mode so my box also has to register in a way that ensures they will be still be sent. At that point, they are simple X, Y co-ordinates (00-FF), so yes I can see a modified box converting these to RS232 or USB for use with an external PC. Question is, are more than a couple of people interested? Poll required? And are these people with or without NAV?

    However, I must add a major caveat. The Prius MFD requires horizontal sync timing for NTSC/PAL Tv systems i.e. about 15.7khz. Even the most basic old VGA system sends out double that which the MFD responds too (if it syncs at all) as duplicate side-by-side pictures. So you need a PC-to-TV converter with RGB out and those I have tried have produced text too fuzzy to read on the MFD. So I have doubts a standard Windows program would ever be useable. (you would need custom software with bigger fonts/using large Windows fonts means moving the viewable window around with a mouse; bit impractical?)

    Finally, yes the same approach would work on NAV-equipped cars, (with different connectors and software as mentioned in previous post)

    Hope this helps.
     
  8. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    c4 - Sep 14 2005, 02:15 PM

    I sent you a PM earlier on a related topic, but now that you mention it, a secondary product might be a simplified product for experimenters that simply provides an interface to the MFD- screen coords out with either a positionable text interface (eg: put text "hello world" at coords x,y in color z- like many of the serial LCD displays support), and an NTSC input...

    I'm personally not so concerned about VGA input, particularly since most laptops these days come with a TV-out (sometimes it takes a fair bit of fiddling and finagling to get it to work, but it does work)
     
  9. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    AlphaTeam - Sep 14 2005, 02:32 PM

    A couple questioms?
    What is a CAN?
    In laymens terms what is he doing?
     
  10. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    DaveG - Sep 14 2005, 02:39 PM

    Hey Norm,

    Would it be appropriate to put a few short video clips from the footage I recorded online for people to have a look at?

    Dave
     
  11. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    DaveinOlyWA - Sep 14 2005, 02:46 PM

    WOW!! WHOA!!...how much? actually, i dont care, i want one...please let me know when you have one to sell. i have the basic model, only Nav i have is with Route 66 on a 17" powerbook
     
  12. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    engunneer - Sep 14 2005, 02:53 PM

    Yay! an Electrical Engineering question!

    CAN stands for "Controller Area Network". You may or may not know that the network that connects computers together in a building is called a LAN (Local Area Network), and some people call the internet the WAN (Wide area Network).

    In electronics, if a number of microprocessors (often called microcontrollers, or in automotive, ECUs) need to talk to each other, they use some kind of network. One well-defined standard is called CAN. if a large number of companies make parts that need to talk to each other, they may include a simple CAN interface for the engineers to use. CAN specifies a specific electrical connection and how data should be passed between the computers. So it looks like the body ECU, the Battery ECU and the MFD all talk on this CAN-bus, as it's called. since the standard is well defined, the engineers don't have to reinvent the wheel when trying to get things talking, they just use the built in CAN for communication.

    Similarly, the MFD and the JBL amp (in JBL equipped Prii) and the NAV system talk on something called the AVC-LAN (Audio/Video Communications LAN). On JBL Prii, the MFD produces a particular message on the AVC-LAN when you push a button The JBL amp then sees the mesaage and knows that it's supposed to make a "beep" noise. I once started a project to make the JBL amp ignore this "beep code"

    A similar bus in Industrial Controls Engineering is called Profibus.

    Oh, btw, this is a really great project. I am very impressed and interested.

    Edit:

    I forgot to answer your other question. What he basically did is figured out exactly how the various parts of the car tell the screen what is happening. the data sent along the CAN is from the different sensors in the car, like one that tells the car how much gas it's using at the moment, how fast the car is going, etc. this is the sort of data the MFD uses to calculate MPG so it can be displayed on the screen.

    An abstract version of a CAN message probably looks something like:
    Code:
    [sending device number] -> [recieving device number] -> [what kind of data] -> [data]
    
    . Think of each one as a forum post. One message could be
    Code:
    Battery ECU -> MFD -> Current Battery Charge -> 67%
    
    The MFD can now use that data to update the bars in the battery section of the Energy screen. The real ECU just uses numbers for it all, so it's like a code.

    He's also doing some fancy stuff like generating a video signal, which usually invloves a lot of time working out the correct timing and format. He is also using the AVC-LAN which sends data to the NAV computer telling it where on the screen was just pushed.
     
  13. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    DanMan32 - Sep 14 2005, 02:58 PM

    MAN! This is exactly the kind of stuff I wanted to do with my life *salivating*.

    Eflier, you're my hero!

    If you can do this, then you probably can make an I Agree killer and NAV speed override very easily. At least electrically, might have some trouble with the OEM connectors.

    So what this means is that the MFD in Prius DOES have an external video interface.

    Alphateam: CAN is the communications network that the drivetrain uses. Many cars these days are using it now. From it you can get battery SOC, how the motors are powered, information about the engine, etc.
    AVC is the network that the audio/visual system uses so that the NAV can talk to the head unit, which can talk to the display, which can talk to the amp. There is a gateway ECU that allows data to pass through from one network in the car to the other. This is how the MFD can display energy flow and fuel consumption.
    What this project is trying to do is give us more information as to what the car is doing and its state of affairs, and display it on the already equipped screen.
     
  14. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    dschuetz - Sep 14 2005, 03:05 PM

    Interesting. So it sounds like you can register as an info device, and you're added to the chain there, sort of. I'm guessing the second part of that description (the overlays) is when you toggle between two items, like "audio" to see the CD screen then "info" to go back to the last info screen. At any rate, cool.


    And that's probably half the magic right there.


    I would bet there are a few heavy-duty tinkerers who might want to build something truly custom and self-contained, like you have. A better iPod or even XM interface, for example, would be ideal candidates...fairly restricted screen layout, simple character/text generation requirements, etc., could really put a lot of power in a small box. Or a better A/V interface -- a really simple multi-source menu that lets you pick from multiple cameras and audio inputs, for example.

    I'm sure there are a LOT more lightweight tinkerers (like myself) who would simply want an easy interface to plug a computer into. As you pointed out, the display requirements are difficult, but not insurmountable (especially if you're working with something like Linux, or there's also a good Windows tool that really lets you muck about with display parameters, but I can't remember its name) (maybe powerbench).

    Personally, I'd love to have VGA->MFD, MFD->serial (for keypresses, maybe reduced with a microcontroller to a simplified protocol), and optionally a separate bidirectional AVC or CAN interface (for other computer related interfacing to the car).


    david.
     
  15. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    eflier - Sep 14 2005, 05:06 PM

    Sure, go ahead Dave. I just hope I can resolve the connector problem real soon, before upsetting people with something that's not quite available.
     
  16. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    Frank Hudon - Sep 14 2005, 05:26 PM

    Norm thanks for this post, I didn't want to compromise your project but people out there needed to know that the info from the CAN was being worked on. I would have like to assit you in your request for a tester but like I said it's the wifes car and I don't get to drive it very much. When done I'll take one as well and use it when I do get to use the car. Your the Man! Sorry Evan and Dan and the others but I respected Norm and his request to not mention it but seeing people dropping their money on some other device I couldn't sit idley by and not "hint" that it was under developement.
     
  17. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    hilore - Sep 14 2005, 07:11 PM

    Wow!

    I thought somebody will do this someday. Someone already
    connect a laptop to the CAN BUS and graph the info on the
    laptop, using Linux os. Here is the link.

    http://www.vassfamily.net/ToyotaPrius/CAN/cindex.html

    Why aren't ICE TEMP & RPM info available in the current PRIUS MFD?

    Thank you for sharing your hack with us.

    --Hilore
     
  18. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    JoeBananas - Sep 15 2005, 01:04 PM

    eflier,

    Is this the type of project that could be duplicated using BASIC stamp modules? I noticed that Parallax has a CAN interface called mBUS for thier BASIC Stamp line but I wonder if this is such a lower level project that BASIC Stamp modules won't do the trick.

    - Thanks

    P.S. if you need ideas for future products/features. I'd like a real digital to analog subwoofer amp interface.
     
  19. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    AlphaTeam - Sep 15 2005, 05:20 PM

    I'm still lost.
    I understand the CAN part.
    But the rest...I'm clueless.
    Thanks for trying though.
    I'm sure its usefull in ways I'll never imagine.
    Obviously.
     
  20. D0li0

    D0li0 New Member

    Joined:
    Oct 1, 2005
    118
    0
    0
    Location:
    Seattle, Wa
    200Volts - Sep 15 2005, 06:36 PM

    What was the "Tyco-Amp" p/n ? I have some people who know some people.