User avatar
FalconFour
Gold Member
Posts: 324
Joined: Wed Sep 19, 2012 12:07 pm
Delivery Date: 14 Sep 2012
Leaf Number: 008681
Location: San Jose, CA
Contact: Website Facebook

Re: Hacking the VSP Box (Noise Maker)

Wed Aug 12, 2015 5:17 pm

There's some merit to it... if said burglar lived in a home nearby, they'd be tipped off at any time that your specific car is leaving, since audio goes in all directions and the sound is totally unique to the Leaf, more than they'd be by visuals - having to directly watch 24/7.

Surprised to learn that 2012 was also missing the switch - I thought 2011 and 2012 had no differences at all (except seat heaters)! That's pretty shocking, and kinda sad. Well, now they can all get the VSP button back -- I did a little more research in the "VSP default off" thread here -- http://www.mynissanleaf.com/viewtopic.p ... 56#p432856 -- and for about $40 to buy the Nissan OEM button, you can add a second VDC (traction control) Off button and wire it up to the VSP pin #5 for an on/off button just like the 2011's. :)

So, as for the progress on the hacking, I've mapped out the ROM space and extracted all the samples. They all appear to be 22050hz Yamaha ADPCM format. Sadly, there's no "base sound" that I was expecting to find - all the actual sounds I can find in the ROM are the dash "effect" sounds - power button and "ready" sounds. There's also a series of 10 very short sine-wave tones of various frequencies, and I'm not sure what their purpose is yet. I may be able to replace these base "beeps" to make the Jetsons sound though! -- if, of course, that is the purpose of their existence!

All the samples in the ROM seem to have a common 4-byte header, while the effect sounds have a single byte difference from the beep samples (I'm not sure their specific codes at the moment, kind of away from the workbench now). Strangely, each sample seems to be padded by varying numbers of 0x80 after the 4-byte header. The header also doesn't seem to correspond to the length of the sample - it's just the same 4 bytes for each type of sample (effect or beep). When I set up replacement samples, I simply overwrote the data, leaving the 4 bytes intact, and padded any remaining data with 0xFF as like the originals.

When I flashed it, I no longer had any sounds at all. Each sound was just... mute. The charger beep and backup ding still worked, though - both of which are also controlled by the VSP box (of course).

Backing it off a bit, I restored the original data and only changed the Effect 1 sounds. When I tried that, just the Effect 1 sound set was muted, and the rest played normally (quirky and silly as they are).

I'm starting to get a feeling that it may not be 0x80 padding to form a checksum, but perhaps padding as a way to "bitmap" the duration of the sound data itself - and since I overwrote that "bitmap", it figured the length was zero for each sample. I'll be hacking at it again tonight for sure! :D
100% gas-free since September 2012
2011 LEAF SL - Sep 2012~Sep 2014 - 35,737 miles
2013 LEAF S+Charge - Jan 2014-Feb 2017 - 68,065 miles
2014 LEAF SV+Premium+QC - Feb 2017-present

User avatar
FalconFour
Gold Member
Posts: 324
Joined: Wed Sep 19, 2012 12:07 pm
Delivery Date: 14 Sep 2012
Leaf Number: 008681
Location: San Jose, CA
Contact: Website Facebook

Re: Hacking the VSP Box (Noise Maker)

Wed Aug 12, 2015 11:40 pm

Hope is practically gone for the outside noise generator. :cry: I found that those tones are 22KHz 8-bit PCM sounds, and replaced them with square waves of the same tone. The car seemed to sound different at first - woo! But then I tried reversing them - placing them in reverse slot order, so the tones would be completely scrambled in practice. I ended up with the same sounds from the noisemaker - exactly the same sounds. :x

Seems that those sounds are almost definitely generated by the CPU, which I've pinned down as a Renesas 78K0R/Fx3 16-bit microcontroller with 192KB ROM and 12KB RAM. Those sounds would be easy to generate with a program, I'd think, or have the basic structure embedded in the program.

Lame.

Hope still holds out for hacking the interior sounds, though...
100% gas-free since September 2012
2011 LEAF SL - Sep 2012~Sep 2014 - 35,737 miles
2013 LEAF S+Charge - Jan 2014-Feb 2017 - 68,065 miles
2014 LEAF SV+Premium+QC - Feb 2017-present

cwerdna
Posts: 9811
Joined: Fri Jun 03, 2011 4:31 pm
Delivery Date: 28 Jul 2013
Location: SF Bay Area, CA

Re: Hacking the VSP Box (Noise Maker)

Wed Aug 12, 2015 11:49 pm

desiv wrote: I would think, with people/kids in neighborhoods, that's a time I'd want it on more than some others..
As for the crime aspect, I would think any criminal so close that they can hear a backup beep can also see your car driving away.
I totally get that and would agree w/you too except for my burglary and the below.
FalconFour wrote:There's some merit to it... if said burglar lived in a home nearby, they'd be tipped off at any time that your specific car is leaving, since audio goes in all directions and the sound is totally unique to the Leaf, more than they'd be by visuals - having to directly watch 24/7.
Exactly! Well, from police stats at a local meeting involving the police and stories we hear about arrests, it seems the burglars do NOT live in my neighborhood but come from other parts of the city and other cities. There were definitely people casing houses, sometimes posing as solicitors, fake Jehovah's witnesses/religious people, etc. They were in my backyard poking around w/flashlights thru the windows before they broke in less than 10 minutes later.

It doesn't help that my city is known to be understaffed by about 300 officers (should have ~1100, IIRC, if properly staffed) and has a policy where they will NOT respond to alarm calls unless there's verification either by witness, visual (e.g. camera) or some audio verification (e.g. remote listening to a mic).

But yes, the distinctive loud reverse noise is a tip for anyone who might be in the area casing to look over and to notice a car leaving...

BTW, in my area, per local newspaper reporting official police stats for my city, between Oct 2014 and Jan 2015 (I was burglarized in Jan 2015), we had 180 burglaries. In the same period a year before, there were only 55.

Within a week or two after my house was broken into, a house 6 houses away, on a street connected to mine was burglarized. That night, another 5-6 houses in a nearby neighborhood were burglarized. Seemed to be the same group, from what I heard on nextdoor.com. A week later, its neighbor (5 houses from me) was broken into. 2 months before my house was broken into, the house on my street 3 houses away from me was broken into. I'm in an area where median home prices are now ~$1.2 million!

'19 Bolt Premier
'13 Leaf SV w/premium package (owned)
'13 Leaf SV w/QC + LED & premium packages (lease over, car returned)

Please don't PM me with Leaf questions. Just post in the topic that seems most appropriate.

desiv
Posts: 594
Joined: Tue Jan 06, 2015 1:10 pm
Delivery Date: 04 Jan 2015
Leaf Number: 018850
Location: Lincoln City, Oregon

Re: Hacking the VSP Box (Noise Maker)

Thu Aug 13, 2015 8:15 am

cwerdna wrote:I totally get that and would agree w/you too except for my burglary and the below.
FalconFour wrote:There's some merit to it... if said burglar lived in a home nearby, they'd be tipped off at any time that your specific car is leaving, since audio goes in all directions and the sound is totally unique to the Leaf, more than they'd be by visuals - having to directly watch 24/7.
Exactly!
I don't buy that...
If said burglar lived that close and was looking for a time to get into your house, a VSP or lack thereof isn't going to stop him.
Someone going to that much trouble to target you is going to get in, Leaf or not.

There are MANY MANY things that "could" happen.
Do you make sure you never leave the house at the same time to go to work? You know a burglar could use that!
I think they would be MUCH more likely to do that than figuring out which sound goes to which car..
Delivery truck backs up in the neighborhood and they think you're gone when you aren't..

Put up some signs about video surveillance.. Fake camera or 2. (Or real ones) Motion sensing lights.
That will do MUCH more to protect your house, and you won't have to worry about backing into kids riding big wheels.. ;-)

Just my opinion..

desiv
p.s. I grew up in East L.A, so I'm not unfamiliar with high crime neighborhoods.. ;-)
2012 Leaf SL - Silver (gone - traded in)
2017 Bolt LT - Red

User avatar
FalconFour
Gold Member
Posts: 324
Joined: Wed Sep 19, 2012 12:07 pm
Delivery Date: 14 Sep 2012
Leaf Number: 008681
Location: San Jose, CA
Contact: Website Facebook

Re: Hacking the VSP Box (Noise Maker)

Thu Aug 13, 2015 7:22 pm

desiv wrote: I don't buy that...
If said burglar lived that close and was looking for a time to get into your house, a VSP or lack thereof isn't going to stop him.
Someone going to that much trouble to target you is going to get in, Leaf or not.
I dunno... I think it's less of "waiting for the opportunity" and more of "hearing the invitation". :?
100% gas-free since September 2012
2011 LEAF SL - Sep 2012~Sep 2014 - 35,737 miles
2013 LEAF S+Charge - Jan 2014-Feb 2017 - 68,065 miles
2014 LEAF SV+Premium+QC - Feb 2017-present

iluvmacs
Posts: 145
Joined: Fri Oct 28, 2011 8:08 pm
Delivery Date: 20 Dec 2011
Leaf Number: 411121
Location: Madison, WI

Re: Hacking the VSP Box (Noise Maker)

Wed Sep 02, 2015 8:09 am

FalconFour wrote:Surprised to learn that 2012 was also missing the switch - I thought 2011 and 2012 had no differences at all (except seat heaters)!
That's actually not entirely true either -- many late '11s had the "cold weather package" that gave them the seat, steering wheel, and battery heaters. So (I believe) the only known differences between an '11-CW and a '12 are the VSP off button, and the lack of a light in the glove box (yes, really, they removed it, there was a thread on that here long ago).
Delivered 6/22/13: 2013 SV+LED/QC+Prem, Blue Ocean
Loved 12/20/11-6/22/13: 2012 SL #15733 (orphan), Blue Ocean, lifetime 4.8 mi/kWh (11,356 mi). First Leaf in Wisconsin!
2018 Tesla Model 3 LR, red

Wisconsin Leaf/EV owner? Join our group!

Arlington
Posts: 95
Joined: Tue Jun 23, 2015 11:47 am
Delivery Date: 29 Oct 2015
Leaf Number: 414434

Re: Hacking the VSP Box (Noise Maker)

Tue Dec 01, 2015 8:52 pm

Since I drive in a metro with a high percentage of pedestrians and cyclists (Boston-Cambridge-Somerville MA) I want my VSP louder, or to have a sonar ping (or, sure Jetsons).

troyf
Posts: 3
Joined: Sun Nov 16, 2014 7:38 pm
Delivery Date: 16 Nov 2014

Re: Hacking the VSP Box (Noise Maker)

Mon Dec 07, 2015 6:46 pm

Arlington wrote:Since I drive in a metro with a high percentage of pedestrians and cyclists (Boston-Cambridge-Somerville MA) I want my VSP louder, or to have a sonar ping (or, sure Jetsons).
Wow, the ICE drivers need to make their cars a quiet as possible, and the EV drivers are wanting to make their cars as loud as possible. How about driving as if pedestrians have the right of way (as they do!). If they walk out in front of you, you are responsible. If you need noise, use it when needed. That's what the HORN is for.

Troy.
#

User avatar
Nubo
Posts: 5449
Joined: Fri May 28, 2010 11:01 am
Delivery Date: 31 Oct 2014
Location: Vallejo, CA

Re: Hacking the VSP Box (Noise Maker)

Tue Dec 08, 2015 8:31 am

troyf wrote:
Arlington wrote:Since I drive in a metro with a high percentage of pedestrians and cyclists (Boston-Cambridge-Somerville MA) I want my VSP louder, or to have a sonar ping (or, sure Jetsons).
Wow, the ICE drivers need to make their cars a quiet as possible, and the EV drivers are wanting to make their cars as loud as possible. How about driving as if pedestrians have the right of way (as they do!). If they walk out in front of you, you are responsible. If you need noise, use it when needed. That's what the HORN is for.

Troy.
#
The generally true assumption is that an EV is quieter than most ICE, in low-speed situations such as parking lots. Above 15-20 MPH ALL cars make lots of tire noise. Regardless of how you apportion the responsibility, the reality is that we have all become accustomed to how vehicles sound, and those auditory clues can be important in a situation like a parking lot with a dense combination of moving vehicles and pedestrians, many of whom are experiencing a high task load (looking for a spot, parking, looking for their car, dealing with kids, packages, groceries, etc...

It may be satisfying to think that accidents would not happen if everybody did the right thing at all times. But if the goal is to have fewer accidents, it helps to design them out. I.e., Right-of-way is a great concept and necessary but it's even better if that pedestrian doesn't accidentally walk in front of you in the first place!

There are inherent limitations to human perception, concentration, and multi-tasking ability and these apply even to highly-skilled. detail-oriented and highly-trained people such as airline pilots. Perfection is a myth and relying on myths leads to poor design. Of all of the stuff I learned while flying, the study of "human factors engineering" was one of the most enlightening.

http://www.britannica.com/topic/human-f ... ngineering
I noticed you're still working with polymers.

Arlington
Posts: 95
Joined: Tue Jun 23, 2015 11:47 am
Delivery Date: 29 Oct 2015
Leaf Number: 414434

Re: Hacking the VSP Box (Noise Maker)

Tue Dec 08, 2015 12:31 pm

For the same reason I like my bike's bell--as a friendly way of saying "here comes a bike; please behave as expected" (and to deliver the sometimes-required "audible signal while overtaking")--I want my car to have a friendly, audible cue for others that share the road with me. In a crisis, we use "angry" noises: cars honk and cyclists yell. I want a non-angry, non-crisis voice for my EV. that other non-car road users will think about like an ICE's "purr".
troyf wrote: How about driving as if pedestrians have the right of way (as they do!).
You seem to proceed from two false assumptions, the first about how I drive and the second about the applicable law.
I do, in fact, drive whenever possible as if pedestrians always had the ROW, and aware, for example, that speed limits of 30 and 35 are often chosen for places with more pedestrians.

But, no, as a matter of (Massachusetts) state law, Pedestrians only have an absolute ROWin marked crosswalks, and not, for example, when they chose to step into traffic from between cars mid block. I cycle more miles than I drive most weeks, too, so I drive as if cyclists are full & equal partners in sharing the road (which actually *is* the law here).

I would like my car to be louder--in a friendly way--so that those I share the street with can make decisions that are better informed by their sense of hearing

" If they walk out in front of you, you are responsible."
Not if they choose to step out from between cars mid block, which, when a downtown's pedestrian flows get heavy enough, they end up doing alarmingly often. I want to help others conform their behavior to expectations. Right now, one universal expectation is that cars make engine noise (even the Mass RMV clerk's head nearly exploded when I told her that my electric car had zero cylinders, and that the previous title had had "E" instead of a number).

Believe me, I drive (and cycle) as if pedestrians have 100% ROW everywhere (which, as a matter of law, they only have in marked crosswalks).

So, I'm trying to deter the types that'd pop out unexpectedly between a row of parallel parked cars. Even "deter" is too strong a word. I want to "inform". I want a hacked, louder-but-still-friendly VSP to "allow pedestrians to make better-informed decisions about how they interact with oncoming EVs" How's that?

If you need noise, use it when needed. That's what the HORN is for
The horn is for emergencies, and has an angry/accusatory connotation. I'm looking for something that communicates a "we're sharing this public space message" and "I'm over here, going X mph" The horn is very hard to honk in a "friendly reminder" way--the best one can do is two short "beep beep", often with insufficient reaction time. I'm trying to better avoid accidents that would be *the pedestrians' fault* should they happen.

Return to “Accessories / Mods”