[DRIVING] VW Beetle 2003

Tell us about the project you do with the open inverter
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

There's only one way to find out. I think it'll be fine but who knows.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »



Coupler and adaptor plate seem good.
Pressing a long screwdriver on to where the gearbox input shaft enters the box and the other end on to the ear while spinning doesn't highlight any excessive vibration when spinning.

Couple more holes to drill and then I can test fit to car
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

Just been working on the VCU side of things.
I seem to have problems with the timings of the canbus messages using stm32-car

video of behaviour
https://photos.google.com/share/AF1QipN ... 8xTW9RWnVn

The can period is set to 10ms but there seems to be enough delay to make the needle very erratic. Using an arduino uno and can bus module it's stable at 10ms.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: VW - Beetle 2003

Post by johu »

Look at stm32_can.cpp . I forgot to update that on github. In line 344 it should say "false" not "true" . So like this:

Code: Select all

	can_init(canDev,
		     false,          // TTCM: Time triggered comm mode?
		     true,           // ABOM: Automatic bus-off management?
		     false,          // AWUM: Automatic wakeup mode?
		     false,          // NART: No automatic retransmission?
		     false,          // RFLM: Receive FIFO locked mode?
		     false,          // TXFP: Transmit FIFO priority?
		     CAN_BTR_SJW_1TQ,
		     canSpeed[baudrate].ts1,
		     canSpeed[baudrate].ts2,
		     canSpeed[baudrate].prescaler,				// BRP+1: Baud rate prescaler
		     false,
		     false);
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

That doesn't seem to have any affect.

Adding a 1ms schedule makes it a little more stable, but still bounces around.

Code: Select all

static void Ms1Task(void)
{
    if (Param::GetInt(Param::canperiod) == CAN_PERIOD_1MS)
         can->SendAll();
   
}
.
.
.
s.AddTask(Ms1Task, 1);
The param speedmod is stable in both the plot and if I stick an arduino on the can bus with

Code: Select all

void loop()
{
    unsigned char len = 0;
    unsigned char buf[8];

    if(CAN_MSGAVAIL == CAN.checkReceive())            // check if data coming
    {
        CAN.readMsgBuf(&len, buf);    // read data,  len: data length, buf: data buf

        unsigned int canId = CAN.getCanId();
        if (canId == 640) {
          Serial.println("-----------------------------");
    
          uint16_t rpm = (buf[3] << 8) | buf[2];
          Serial.print(rpm/4, DEC);
  
          Serial.print("\t");
         
          Serial.println();
        }

    }
}
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: VW - Beetle 2003

Post by johu »

Any other device sending the same message? CAN bus well layd out and terminated?
I had a stable display even with 100ms interval.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: VW - Beetle 2003

Post by mdrobnak »

johu wrote: Sun Dec 27, 2020 5:17 pm Any other device sending the same message? CAN bus well layd out and terminated?
I had a stable display even with 100ms interval.
I agree 100%. Instrument cluster is a low-priority CAN bus item, 100 ms updates are a normal rate. 10ms should be more than sufficient. On a car with an engine, the fluctuations will actually make the needle move more, and OEMs dampen the response around idle to compensate (they usually zero out some of the least significant bits).

-Matt
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

So I've pull it from the car, put a 120ohm on the cluster end and on the stm32 end.
With the one can bus map, for id 640, 16, 16, 4, plus the hardcoded message in stm32-car.

Seems stable now at 10ms, it twitches occasionally, 100ms still rising to ~700 then dropping, so will stick with 10ms.

I'm thinking the old ECU must have had a termination in it and the other is somewhere else in the car as it doesn't appear to be in the cluster.
Screenshot 2020-12-27 at 8.42.11 pm.png
The diagram doesn't make it obvious where the 2 ends are.
Thanks for the help.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: VW - Beetle 2003

Post by johu »

Ok good, still surprised that it twitches. NART flag now low in can_init() call? I've updated it in the repo anyway.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

It is, I merged all your changes in, will experiment further. I've just put 120ohm on the stm32 end but documentation I've found suggests the ECU has 66ohm resistance.

I've also changed the oil pressure to use speedmod not speed mine seems to require it connected to gnd at 600rpm.
Attachments
FB_IMG_1609159094245.jpg
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: VW - Beetle 2003

Post by ZooKeeper »

Going way back in memory here, but if I recall my coursework correctly, BOSCH "invented" the modern CAN bus for automotive applications and there are essentially two critical measurements, key on, engine off & at the diagnostic port...

Resistance between CH & CL = 60 ohm +/-2 ohms; and secondly CHv + CLv = 5.00 +/-0.2v

From your diagram, it seems VW is essentially using internal terminating resistors for each module, a clever way to detect a missing one.
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: VW - Beetle 2003

Post by mdrobnak »

ZooKeeper wrote: Mon Dec 28, 2020 2:37 pm Going way back in memory here, but if I recall my coursework correctly, BOSCH "invented" the modern CAN bus for automotive applications and there are essentially two critical measurements, key on, engine off & at the diagnostic port...

Resistance between CH & CL = 60 ohm +/-2 ohms; and secondly CHv + CLv = 5.00 +/-0.2v

From your diagram, it seems VW is essentially using internal terminating resistors for each module, a clever way to detect a missing one.
I think that's more implying the effective resistance of the transceiver. Usually the ECU is one end of the bus, I'm not sure what's usually on the other, but whenever messing with them I've always had to put a 120 ohm resistor on the bus where the ECU was. That _should_ be all that's necessary here. And your memory is right regarding the relationship with Bosch and CAN.

I'm not sure about that voltage measurement. That would imply an idle bus I think?

-Matt
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

I'd stuck 66 ohm on the ECU replacement. There's no inverter in there at the moment so the brake pedal mimics the speed coming from the inverter.

https://photos.google.com/share/AF1QipP ... 1NVU1qYnB3

100ms still fluctuates, but 10ms works fine.

I've got the power steering pump wired in now, one of the large fuses on top of the battery was for the fans so repurposed that.
Hopefully the vacuum sensor will be here in the next few days and I can start looking at that next.

Also need to checkout why the ASR and AirBag lights remain on.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

Made some more progress this weekend. I now have brake assist, though the pump is just rammed in there at the moment, so I need to make a bracket up. It comes on and off as required. Very pleased with this. Power steering also fires up when the key is turned to 'start'.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: VW - Beetle 2003

Post by johu »

Bigpie wrote: Mon Dec 28, 2020 5:47 pm Also need to checkout why the ASR and AirBag lights remain on.
In Touran, ASR light was a matter of sending the right CAN messages as denoted in the stm32-car readme. My airbag light went on when I plugged the "front bumper sensor" into the reverse output of the transmission :) They use an equally coded plug and are on the same loom. I had to use a cheap OBD adapter to clear the fault.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

I'll have to check those out. I think the airbag light was on before I removed the engine. Apparently the loom under the passenger seat is a common cause.

I've not got the gearbox back in yet. I had some runout on my coupler and I've made friends with a cnc machinist who is making me a coupler and adaptor plate. So looking forward to seeing what he comes up with.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

Battery pack arrived. It's 8.8kwh from a Golf GTE
It took some opening. The top was plastic and must have had a full tube of silicone round it.

The pack is sitting at 350v.
Attachments
20210209_182058.jpg
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

I've now got my pack charing with an outlander charger, current savvy can is sending the frames, but looking at integrating in to simpBMS
Screenshot 2021-02-21 at 1.16.52 pm.png
20210221_131614.jpg
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

While I'm still waiting on the adaptor plate from the CNC bloke, I did get my coupler from him, so I've got on with re-mounting the gearbox and positioning the motor, and starting on getting the inverter in place.
20210313_111135.jpg
20210313_111139.jpg
20210313_134844.jpg
20210313_143608.jpg
20210313_143717.jpg
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

20210320_155638.jpg
20210320_160126.jpg
Outlander charger is mounted now. Battery modules next. Hopefully my CNC'd adaptor plate will be done soon so I can get the mounts finished for the motor.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

I little more progress on the battery mounting.
The are going in a L shape, once the mounting frame is done, I'm planning on making a fibreglass tub for them to sit in.
20210404_162203.jpg
20210404_162432(0).jpg
20210404_162255.jpg
20210404_162252.jpg
Still need to make up a mount for the motor side to the old engine mount.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: VW - Beetle 2003

Post by Bigpie »

My adaptor plate has just been delivered.
20210421_124814.jpeg
20210421_124822.jpeg
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
bobby_come_lately
Posts: 465
Joined: Sun May 03, 2020 5:39 am
Location: Manchester, UK
Has thanked: 33 times
Been thanked: 36 times
Contact:

Re: VW - Beetle 2003

Post by bobby_come_lately »

I have CNC envy.
Alibro
Posts: 829
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 248 times
Been thanked: 144 times
Contact:

Re: VW - Beetle 2003

Post by Alibro »

bobby_come_lately wrote: Wed Apr 21, 2021 12:18 pm I have CNC envy.
Having just looked at my DIY effort so do I. :D
I need a bigger hammer!
JaniK
Posts: 391
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 49 times
Been thanked: 10 times

Re: VW - Beetle 2003

Post by JaniK »

Very Nice. 👍
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
Post Reply