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

Reducing the beeps from the JBL amp

Discussion in 'Gen 2 Prius Audio and Electronics' started by brosnan, Apr 2, 2005.

  1. brosnan

    brosnan Member

    Joined:
    May 2, 2004
    159
    11
    0
    Location:
    Silicon Valley
    Vehicle:
    2010 Prius
    Model:
    IV
    Wonder if Coastal Dave is following this? He seems to have cracked the "I agree" button (presumably) by generating AVC-LAN commands Maybe the info in this thread and the interest expressed will lead to another Coastal product.
     
  2. engunneer

    engunneer Member

    Joined:
    Mar 14, 2005
    307
    0
    0
    Location:
    Medford, MA
    Vehicle:
    2020 Prius Prime
    Model:
    XLE
    don't know if you're still up (I'm left coast, so just got home) I'll be in the chat room for a little while thinking about this.

    Edit: Can't figure out how to get into chat. I'm logged in, but it still won't let me. Firefox issue?
     
  3. brosnan

    brosnan Member

    Joined:
    May 2, 2004
    159
    11
    0
    Location:
    Silicon Valley
    Vehicle:
    2010 Prius
    Model:
    IV
    [font=Courier New:c632347510]I've learned a few new things:

    Pressing the screen only leads to AVC-LAN packets if in MAP,DEST or MENU modes (in other words if the NAV ECU would be in control of the video). In these modes you can indeed tell that someone had pressed the touchscreen and where. Examples (all numbers in hex):
    FRM TO LN DATA
    110 178 08 00 21 24 78 FB FB FB FB (press upper right)
    110 178 08 00 21 24 78 F3 10 F3 10 (lower right near I Agree)
    110 178 08 00 21 24 78 DC 27 DC 27 (centered on I Agree)
    110 178 08 00 21 24 78 15 12 15 12 (press lower left)
    110 178 08 00 21 24 78 0B F8 0B F8 (press upper left)
    110 178 08 00 21 24 78 7C 78 7C 78 (press middle)

    Volume changes lead to this type of packets:
    FRM TO LN DATA
    190 440 05 varies

    And as mentioned before, beeps from the MFD show up as
    FRM TO LN DATA
    110 440 05 00 5E 29 60 01 (50ms beep at 3.05kHz)

    So it looks like
    0x110 is the MFD
    0x178 is the NAV ECU
    0x190 is the radio and it's allowed to talk directly to the JBL
    0x440 is the JBL amplifier

    There's also something talking with address 0x1C6. It's the gateway according to this list: http://www.priuschat.com/forums/-vp66740.html#66740

    And touchpad packets seem to be of the format 00 21 24 78 x y x y where x and y are to 0 to ff. x,y is where you pressed (not release). I don't know why there are 2 copies. Maybe it's just redundancy for lower error rates. It might be hard to use the touchpad to control a PC since the packets are only generated when the NAV-ECU is in control and listening to those commands.

    Interrupts on the JPL upD6708 (pin 4) only occur for broadcast packets and those addressed to 0x440.[/font:c632347510]
     
  4. SynergyGuy

    SynergyGuy New Member

    Joined:
    Dec 7, 2004
    55
    0
    0
    Mike, this is a terrific work that you are doing!! I just don't have a digital oscilloscope at hand and you have uncovered many of the inside details I was looking for.
    After testing many different scenarios and combinations I have decided that I would gladly give up the JBL amp (and even the steering wheel controls) just for the sake of a decent sound, it is hard to believe that such advanced piece of electronic engineering design delivers so poor sound quality. However, in an effort to prevent loosing the steering wheel controls, my idea would be to come up with a little box that can understand the bare minimum basic commands that only pertain to the amp in terms of signal amplitude, that is: volume, balance and fader, to modify the incoming fixed level audio signal. Then I would add a nice digital parametric EQ with digital programmable crossover. to take care of modeling the sound quality. This way the beeps will be inherently removed and so will be the JBL amp box.

    Could you post some data samples for different volume settings? I am curious to see if the sound level is sent as an absolute or relative value? I would tend to think that the specific sound level (0-63) would be transmitted as an absolute number.
    Also, could you post some samples of the data transmitted when you modify balance and fader?

    As a side note, have you have the chance to verify my findings about the poor sound quality of the tweeters in front compared to the ones in the back?

    Thanks !!! We are getting there...
     
  5. brosnan

    brosnan Member

    Joined:
    May 2, 2004
    159
    11
    0
    Location:
    Silicon Valley
    Vehicle:
    2010 Prius
    Model:
    IV
    SynergyGuy,
    I'll see if I can snag some volume/balance/fader settings and the data that goes with it. And no I haven't looked at the sound quality issues. I'm not that fussy about car audio, so I'll likely leave my JBL intact and try to modify the beep via AVC-LAN changes.
     
  6. brosnan

    brosnan Member

    Joined:
    May 2, 2004
    159
    11
    0
    Location:
    Silicon Valley
    Vehicle:
    2010 Prius
    Model:
    IV
    [font=Courier New:067a717e12]
    Volume changes are of this format: (all numbers in hex)
    FROM TO LEN DATA
    190 440 05 00 25 74 9C 01 Volume up slightly
    190 440 05 00 25 74 9C 02 Volume up moderately
    190 440 05 00 25 74 9C 04 Volume up a lot
    190 440 05 00 25 74 9D 01 Volume down slightly
    190 440 05 00 25 74 9D 04 Volume down slightly
    So volume commands are relative and the last byte is how many steps to take. When the volume reaches 0 on the display, no further volume down commands are sent on the AVC-LAN. There may be other commands I didn't notice related to volume. Like maybe the JBL amp tells the MFD the absolute volume level after each relative packet.

    Balance,Fader,Bass,Mid,Treble are absolute as follows:
    FROM TO LEN DATA
    190 440 05 00 25 74 91 bb where bb is from 09 (left) to 17 (right)
    190 440 05 00 25 74 92 ff where ff is from 09 (front) to 17 (back)
    190 440 05 00 25 74 93 BB where BB is from 0B (min bass) to 15 (max bass)
    190 440 05 00 25 74 94 mm where mm is from 0B (min mid) to 15 (max mid)
    190 440 05 00 25 74 93 tt where tt is from 0B (min treble) to 15 (max treble)
    [/font:067a717e12]

    Bit rate is 25kbps
    a 0 is about 6.8us wide
    a 1 is about 18.5us wide
     
  7. SynergyGuy

    SynergyGuy New Member

    Joined:
    Dec 7, 2004
    55
    0
    0
    Thanks Mike. This is very good information, gives me something to start with.
     
  8. DanMan32

    DanMan32 Senior Member

    Joined:
    Aug 27, 2004
    3,799
    27
    0
    Location:
    Tampa Bay, FL
    So did you decipher this using brute force with an oscilloscope, or did you have a decoder? If you had a decoder, what did you use, where did you get it, and how did you connect it?
     
  9. frenchie

    frenchie Member

    Joined:
    Oct 19, 2004
    150
    48
    0
    Location:
    France, not far from PARIS
    Vehicle:
    Other Hybrid
    Model:
    N/A
    hello Mike & Synergyguy & all the others
    If I understood well , you should see on the AVC_lan bus some messages
    from 440 to 110 telling
    hello I am here
    here are my settings regarding:
    volume
    balance
    fader
    bass
    meeddle
    trebble
    So the mfd can show the absolute settings.
    :roll:
     
  10. brosnan

    brosnan Member

    Joined:
    May 2, 2004
    159
    11
    0
    Location:
    Silicon Valley
    Vehicle:
    2010 Prius
    Model:
    IV
    DanMan32 - It's brute force so far with an oscilloscope. But to help know where to look I triggered on the interrupt pin on the 6708 in the JBL. That way any commands being sent to the JBL could be easily seen. After that it's write down then bit patterns one by one. About 2 minutes per packet after some practice.

    frenchie - I suspect you are right (at least for volume). I'll see if I can find this type of packet. Maybe I can trigger on the SI (serial in) pin of the 6708 since that probably only has activity when the JBL amp/EQ talks.
     
  11. brosnan

    brosnan Member

    Joined:
    May 2, 2004
    159
    11
    0
    Location:
    Silicon Valley
    Vehicle:
    2010 Prius
    Model:
    IV
    Since the upd6708 looks hard to get and incapable of monitor all traffic on the AVC-LAN, I've started designing a circuit to interface between the AVC-LAN and a microcontroller. First off is a differential receiver which takes the 2 LAN wires and converts them to a signal TTL signal we can use to drive a PIC microcontroller (or similar). I've tried it out and it seems to work well and not load down or otherwise affect the AVC-LAN. With it I was able to see that when the volume knob is turned, not only are there commands from the MFD to the JPL AMP/EQ, there are also broadcasts from the JBL AMP/EQ, presumably announcing the new volume level (primarily for display on the MFD LCD).

    Still to be done - a transmitter for generating AVC-LAN signals and a microcontroller to drive it based on what it sees from the RX circuit.
     
  12. frenchie

    frenchie Member

    Joined:
    Oct 19, 2004
    150
    48
    0
    Location:
    France, not far from PARIS
    Vehicle:
    Other Hybrid
    Model:
    N/A
    hello Mike
    yes the upd6708 is hard to find , but it is the only IC able to interface correctly with the AVC LAN (or his brother uPD72042).
    What you did allows to create an AVC_LAN monitor.
    I think it is possible to get this upd6708 on ANY device connected to an AVC_LAN,so maybe you could visit scrapyards for toyota cars :mrgreen:
     
  13. DanMan32

    DanMan32 Senior Member

    Joined:
    Aug 27, 2004
    3,799
    27
    0
    Location:
    Tampa Bay, FL
  14. antieau

    antieau New Member

    Joined:
    Mar 30, 2005
    10
    0
    0
    Location:
    Michigan
    Maybe I'm just being naive here, but considering how objectionable many find this beep, doesn't anyone here know anyone within Toyota they can convince to making this a problem they'll solve for us?

    Last week, I showed my prius to a Honda Insight owner, and she now wants one to replace her Insight. When I told my fiance, she asked if I pointed out the beep. She said it would have stopped her from buying the car.
     
  15. Chucka

    Chucka Junior Member

    Joined:
    Mar 23, 2005
    39
    0
    0
    Location:
    Fairfield County, CT
    Vehicle:
    2012 Prius
    Model:
    Four
    Take a look in the "Knowledge Base" as there are directions there for eliminating the backup beeps. I was going to get rid of the beeps but decided to leave it as is.
     
  16. SynergyGuy

    SynergyGuy New Member

    Joined:
    Dec 7, 2004
    55
    0
    0
    <div class='quotetop'>QUOTE(brosnan\";p=\"79546)</div>
    Brosnan, why do you say the upd6708 is incapable of monitoring all traffic?
     
  17. Chucka

    Chucka Junior Member

    Joined:
    Mar 23, 2005
    39
    0
    0
    Location:
    Fairfield County, CT
    Vehicle:
    2012 Prius
    Model:
    Four
    Here is another idea that I would like to offer to see if someone could expand upon to see if it may be a viable idea. I would prefer to see someone develop a LAN translator with external amplifier to use in place of the JBL amplifier. If this is not possible consider this idea.

    Disconnect the L-R audio inputs to the amplifier. In its place, insert an fixed frequency fixed level oscillator. Take the individual (Front and Rear Left/Right) outputs of the amplifier and send to a rectifier circuit to generate a Front Left, Front Right, Rear Left, Rear Right DC control voltage. Apply this voltage to 4 VCA elements (Prefer THAT VCA chips). Two VCA's get their (buffered) audio input from the head units left audio signal, two VCA's get their audio input from the head units (buffered) right audio signal. The 4 VCA's gain will be controlled from the amplifiers rectified DC voltage. When the system is panned center, equal gain is requested of all four VCA elements. As the pan and balance from the head unit is adjusted, the output DC voltages will follow, making the VCA elements follow the identical pan/balance image. Amplifier level increases and decreases including no signal (0ff) would be passed to the VCA elements as a DC voltage ranging from no signal (off) to max level. This output would be buffered to RCA outputs. The RCA outputs would be used to feed a external amplifier, never having been processed by the JBL amplifier.

    In addition, a notch filter could be used to capture the nav tone output (I also suggest a simple gate circuit that would turn off when no tone is present) of the amplifier, with the signal summed to a post VCA position but with a trim pot or level control. We now have Pan, Balance, and level control as well as the nav tones (Possible idea - the nav audio output be permanently rewired to the center speaker) being controlled in this analog box with the JBL providing only the reference signal.

    We could control the EQ in the same manner by adding 3 additional oscillator input frequencies and sending the amplifier outputs through notch filters and rectrifiers and then to a VCA controlled EQ circuit but instead it may make more sense to have an in line EQ feeding the input of this magic box.

    This is just an off the wall idea for someone to expand on as it gives a pure analog solution to both signal path and signal control without moding the amplifier, but only messing with its input and output signals. (Adapter connectors that when removed reverts back to the stock installation)

    Any further comments or ideas? I (we) would like to see something developed that would allow easy use of external amplifiers on the Prius. There is at least some market for such a product. As I mentioned at the top of the message, I would prefer a LAN based solution eliminating the JBL amp, but if not this may be a reasonable option.
     
  18. engunneer

    engunneer Member

    Joined:
    Mar 14, 2005
    307
    0
    0
    Location:
    Medford, MA
    Vehicle:
    2020 Prius Prime
    Model:
    XLE
    Mike,

    I worked a bit on this tonight. I will send you what I came up with.
     
  19. DanMan32

    DanMan32 Senior Member

    Joined:
    Aug 27, 2004
    3,799
    27
    0
    Location:
    Tampa Bay, FL
    Chuck, interesting concept. Probably would be easier designing our own AVC interpreter and then feeding its control to VCAs. Would need to find VCF though for analog based EQ.

    What did you mean by nav tone? If you mean the nav lady speaking, that goes directly from NAV box straight to front driver woofer.

    One possible problem with your concept though. When the MFD sends a beep request to the JVC amp, that would probably cause all your VCAs to max out during that period. I suppose though you could use a notch filter to detect that beep and hold the VCAs' control voltages during that time.
     
  20. CheshRcat

    CheshRcat New Member

    Joined:
    Mar 20, 2005
    5
    0
    0
    It's exciting seeing the work you all are putting into this...sounds like you're getting closer to reverse engineering the AVC-LAN protocol.

    Just a thought -- has anybody contacted Toyota or one of the other partners in the AVC-LAN standard to see if technical specs on the protocol can be had or licensed? Since the push is to make this a standard comm protocol in the auto industry, they might be happy to share info for third party devices.

    If we had a protocol spec, it wouldn't be too difficult to build an intermediate device to intercept and interpret the AVC-LAN signals from the screen/HU and control any number of external devices. Since reverse engineering the protocol is a matter of time and patience, there's little incentive for Toyota and partners to keep the information too tightly controlled.

    I'll try to contact some folks and see if the spec is accessible or available to license...if the licensing cost is not too exorbitant, somebody might be interested in paying to build third party add-ons. Maybe the US patent application has some useful information...at least its available to the public.