Page 1 of 1

V.E.S.S / fake engine sound module

Posted: Sun Jun 20, 2021 4:07 pm
by mikeselectricstuff
If anyone fancies adding fake engine noises, I notice that the hyundai Ioniq VESS module is often to be found pretty cheap on ebay, often £25-30
e.g. https://www.ebay.co.uk/itm/274838841817 ... SwnStgzd~m

And if you want to customise it, the audio is in a SPI flash device in a fairly obvious uncompressed format. I have a copy of this if anyone's interested - PM me.
I don't have CAN info, but there's a video of someone playing with the Kona VESS module :

Re: V.E.S.S / fake engine sound module

Posted: Sun Jun 20, 2021 5:12 pm
by arber333
HAH!
Imagine playing RR Merlin V12 starting sound at enable and then when driving play the sound of reving the engine before takeoff!!!

Re: V.E.S.S / fake engine sound module

Posted: Sun Jun 20, 2021 5:34 pm
by arber333
Or the legendary...



Re: V.E.S.S / fake engine sound module

Posted: Sun Jun 20, 2021 6:58 pm
by LRBen
It was always going to be this.


Re: V.E.S.S / fake engine sound module

Posted: Sun Jun 20, 2021 7:28 pm
by rstevens81
There could be some serious fun in the car park here!! So many choices ...sounds like a perfect job for an old raspberry pi ... Dial a number and it uploads to the vess.
Certainly better than the strange noises that OEM cars have to make.
Although most of us will probably be heard by the vauxhal/Opel zaferia/astra power steering pump.

Re: V.E.S.S / fake engine sound module

Posted: Sun Jun 20, 2021 7:42 pm
by arber333
LRBen wrote: Sun Jun 20, 2021 6:58 pm It was always going to be this.
TOP! :twisted:

Re: V.E.S.S / fake engine sound module

Posted: Sun Jun 20, 2021 7:57 pm
by LRBen
Just got a unit for £20 on Ebay with free postage. So I guess the MG will sound like a ringtone of the mid 2000s now.

Re: V.E.S.S / fake engine sound module

Posted: Tue Jun 22, 2021 12:54 pm
by LRBen
My VESS module arrived today. Had enough time to hook it up to the teensy and 12v. Got the standing CAN frames of the module being alive.

I found the github of that python script in the firs video so I will try and get some sounds out of it later tonight when I am back home again.

https://github.com/ereuter/vess

Re: V.E.S.S / fake engine sound module

Posted: Tue Jun 22, 2021 2:54 pm
by zilion
Maybe it's just me, but I like quiet.

But if you need some noise, you have system all ready on board. You can use frequency of the motor coils. If you have more than one motor -it's even better! :lol:



Re: V.E.S.S / fake engine sound module

Posted: Wed Jun 23, 2021 9:33 pm
by LRBen
I'm hitting a bit of a wall in sending Canbus messages to the VESS unit. I am entirely sure it is my code and not the unit.

For some reason this code isn't putting stuff onto the CANBUS. I also have some issues with the bit manipulation for the speed. But my main concern is the apparent lack of sending messages. I have tried the original FlexCAN library and get a similar result. Apologies for the messy code, I have a few different methods in there trying to figure out what works and what doesn't.

Code: Select all

// -------------------------------------------------------------
//
//

#include <FlexCAN_T4.h>
FlexCAN_T4<CAN0, RX_SIZE_256, TX_SIZE_16> Can0;
CAN_message_t msg;

byte speedmsb;
byte speedlsb;
int speedmph;
int constspeed;


// -------------------------------------------------------------
void setup(void)
{
  Can0.begin();
  Can0.setBaudRate(500000);


  delay(1000);
  Serial.println(F("Hello Teensy 3.2 CAN VESS Test."));
  speedmph = 1;
  Serial.println (speedmph);
}

// -------------------------------------------------------------
void loop(void)
{
/////// Send speed increasing by 1 every loop
constspeed = speedmph * 256;
speedlsb = lowByte (constspeed);
speedmsb = highByte (constspeed);
//byte msg2[8] = {0x60, 0x01, 0x12, 0xA0, 0x5A, 0x01, 0xC0, 0x02};
CAN_message_t txmsg;
txmsg.id = 0x524;
//memcpy (txmsg.buf, msg2, 8);
txmsg.len = 8;
txmsg.buf[0] = 0x60;
txmsg.buf[1] = 0x01; 
txmsg.buf[2] = speedmsb; 
txmsg.buf[3] = speedlsb;
txmsg.buf[4] = 0x5A;
txmsg.buf[5] = 0x01;
txmsg.buf[6] = 0xC0;
txmsg.buf[7] = 0x02;
Can0.write (txmsg);

Serial.print(txmsg.buf[0], HEX);
Serial.print(" , ");
Serial.print(txmsg.buf[1], HEX);
Serial.print(" , ");
Serial.print(txmsg.buf[2], HEX);
Serial.print(" , ");
Serial.print(txmsg.buf[3], HEX);
Serial.print(" , ");
Serial.print(txmsg.buf[4], HEX);
Serial.print(" , ");
Serial.print(txmsg.buf[5], HEX);
Serial.print(" , ");
Serial.print(txmsg.buf[6], HEX);
Serial.print(" , ");
Serial.println(txmsg.buf[7], HEX);
delay(200);

/////////////-----------Send Forward diretion message
unsigned char msg3[8] = {0x00, 0x28, 0x00, 0x10, 0x00, 0x3B, 0xD0, 0x00};
CAN_message_t txmsg2;
txmsg2.id = 0x200;
memcpy (txmsg2.buf, msg3, 8);
Can0.write (txmsg2);
///////////-------- increase speed

if ( speedmph < 31 ) {
speedmph = speedmph + 1;
/////// print data to check its working
Serial.println (speedmph);
Serial.println (constspeed);
Serial.println (speedmsb);
Serial.println (speedlsb);
}
else {
  speedmph = 1;
}



delay(500);


////////----------- Read canbus from VESS Module
 if ( Can0.read(msg) ) {
    Serial.print("CAN1 "); 
    Serial.print("MB: "); Serial.print(msg.mb);
    Serial.print("  ID: 0x"); Serial.print(msg.id, HEX );
    Serial.print("  EXT: "); Serial.print(msg.flags.extended );
    Serial.print("  LEN: "); Serial.print(msg.len);
    Serial.print(" DATA: ");
    for ( uint8_t i = 0; i < 8; i++ ) {
      Serial.print(msg.buf[i]); Serial.print(" ");
    }
    Serial.print("  TS: "); Serial.println(msg.timestamp);
} 
}

Re: V.E.S.S / fake engine sound module

Posted: Fri Jun 25, 2021 8:41 pm
by LRBen
Ok I've been messing around with the code and I am pretty certain I am now sending CAN messages.

I think there might some slight differences between the Ionic and Kona VESS units. The wiring connectors look to have a slightly different pinout on the Kona VESS unit.
The connector that came with my unit was setup as per the first post, but was missing the wire for pin 4. I think this is the temporary disable switch, ground it on start up and the unit won't make a noise until the vehicle stops.
On this Ionic unit I can power it up and get CANBUS messages from it. So I am fairly certain that is running ok. Can't get it to make any noise though using the same Canbus messages that the Kona unit was using. I've tried a couple different speakers just to make sure it wasn't a hardware issue.

So I think I'm a bit stuck on this until I can find some Ionic canbus logs with the VESS enabled.

Re: V.E.S.S / fake engine sound module

Posted: Sat Jun 26, 2021 10:05 am
by mikeselectricstuff
The Kona VESS has an internal speaker, and the hardware is very different

Re: V.E.S.S / fake engine sound module

Posted: Sun Jun 27, 2021 12:22 pm
by LRBen
Does seem very different. I would have hoped that the CAN messages would work across the models though. I'll keep looking around the internet for data on it.
It would be nice to do though. Having an OEM pedestrian safety system newer than some of the older EVs can only help if the DVLA here in the UK decided they need to inspect it.

Re: V.E.S.S / fake engine sound module

Posted: Sun Jun 27, 2021 6:57 pm
by mikeselectricstuff
I think SavvyCan has some options for fuzzing - probably not too hard to find which message(s) the Ioniq VESS responds to

Re: V.E.S.S / fake engine sound module

Posted: Wed Jun 30, 2021 9:03 pm
by sfk
So does it use 1 sound sample and bend the pitch and volume according to CAN speed input? Or are there discrete samples?

Re: V.E.S.S / fake engine sound module

Posted: Wed Jun 30, 2021 10:59 pm
by mikeselectricstuff
There are three sound samples plus a reversing bong. I don't know if it adds any pitch/modulation or other effect to these to get a smoother transition between speeds.
Attached zip contains the flash image, and an MP3 of it loaded as raw data into Audacity.

Re: V.E.S.S / fake engine sound module

Posted: Fri Jul 02, 2021 7:36 pm
by LRBen
mikeselectricstuff wrote: Sun Jun 27, 2021 6:57 pm I think SavvyCan has some options for fuzzing - probably not too hard to find which message(s) the Ioniq VESS responds to
That's a good idea, I haven't used SavvyCAN as of that comment. I didn't have much luck getting my teensy 3.2 to work as an interface to the PC unfortunately. So I'll come back to this at at later date, need to prioritise funding for a moving car before crazy frog noises.