VCDS and OBD diagnostic device in the On-Board Diagnostics Shop
Diesel technology, engine technology, vehicle diagnostics, repair & maintenance.

VAGCOM Adapter: Stupid Optocouplers

 
Go to page: 1, 2, 3  Next
New Topic Reply 🔗 🖨 Dieselschrauber - Index » Diesel Engine Technology
Author Message
ulf
Profi-Schrauber
Profi-Schrauber


Joined: 04/13/2002
Posts: 11058
Karma: +18 / -0   Thank you, like it!
Location: Saarland
2023 MG ZS
Premium Support

Post27-12-2002, 16:48    Subject: VAGCOM Adapter: Stupid Optocouplers Quote

Hello everyone

A few days ago, I finally dared to access the airbag control unit with VAGCOM.
Result: Cant synchronize Baud Rate, Too many Communication Errors to continue and further short-term error messages - although communication with the motor, ABS, and WFS is stable. As an adapter, I used version 2.2.

The issue with the baud rate essentially implies that the signal transmission times between the laptop and the car are unsuitable, which would then be the fault of the adapter. Since different STGs can "speak at different speeds," it seemed plausible to me that the adapter for the presumably fastest dialect of my airbag STG was too slow.

So, I connected the adapter to a rectangular generator and then measured the signal propagation times using an oscilloscope.
The results made it clear to me why finished adapters are now being banned without optocouplers and, therefore, without galvanic isolation:
The signaling times are very dependent (at least on my PC 817) on the input current of the optocouplers. As soon as the LEDs receive more current than the output transistor "just needs" to produce light in order to complete the intended switching operation, the "shut-down" time becomes longer, the more "excess" control current is supplied (= saturation of the optocoupler).

This was particularly noticeable in the case of the signal direction Auto --> Laptop: when the K-Line was activated (= Low), it took approximately 40 microseconds for RXD to switch to High. However, the reversed transition was transmitted almost without delay, which, for example, resulted in nothing being received on the K-Line from low signals < 40 µsec on the laptop.

However, the situation was not much better when looking at the laptop-car: with a high voltage of 12V at the TXD, the K-Line responded to the low transition with an approximately 16 µsec delay.
My laptop, however, only provides 6 volts, which at least eliminates the runtime issue.

After several measurements with different resistors in the input circuit of the optocouplers, I modified my adapter as follows:
R1 and R3 = 2.2k, R5a = 4.7 k, R14 = 10k. Additionally, there were 6.8k of capacitance between pin 3 and 4 of OK 1 and 2.
This allowed me to immediately establish a stable connection with my airbag control unit and also with the other control units.

However, these values probably do not guarantee a solution to all adapter problems, because the optimal resistance values are likely to depend on the specific type of optocoupler being used and may also be influenced by their manufacturing tolerances.

As a solution, it could be implemented by using trimmers of 5k each in series with R1, R3, and R5a. These trimmers would allow the adapter to be adjusted to match the specific PC/laptop and the built-in optocouplers.
This adjustment seems more important to me at the moment than the settings options with VR1 and VR2. They could also be replaced with bridges, if R9 and R13 are modified accordingly (approximately 3.3k and 68k).

I will draw version 2.3 and then email it to Rainer. . . .
Gruß Ulf
_________

MG4 Electric


Translated on 03-07-2026, 15:19.
Back to top Profile PM Garage
chris11
Profi-Schrauber
Profi-Schrauber


Joined: 10/02/2002
Posts: 326
Karma: +3 / -1   Thank you, like it!
Location: Münster

Premium Support

Post27-12-2002, 19:19    Subject: Re: VAGCOM Adapter: Stupid Optocouplers Subject: VAGCOM Adapter: Stupid Optocouplers I'm having some issues with my VAGCOM adapter. It seems the optocouplers are faulty. I've tried replacing the optocouplers with new ones, but the problem persists. I'm not sure what to do next. Has anyone else had this problem? Thanks, [Your Name] Quote

Hello Ulf,

Why is galvanic separation necessary? As long as you only use a laptop with a (non-isolated) car adapter in the car, nothing should happen. After all, they are all open collector drivers. The laptop's RS232 inputs can withstand +/- 25V according to the RS232 specification. That should be enough.


Best regards,
Christian


Translated on 03-07-2026, 15:19.
Back to top Profile PM
ulf
Profi-Schrauber
Profi-Schrauber


Joined: 04/13/2002
Posts: 11058
Karma: +18 / -0   Thank you, like it!
Location: Saarland
2023 MG ZS
Premium Support

Post27-12-2002, 20:38    Subject: Re: Galvanic Separation Subject: Galvanic Separation - Further Discussion Hi Team, Following up on our previous discussion about galvanic separation, I wanted to share some additional information and resources that might be helpful. Specifically, I'd like to discuss the following: * **Different types of galvanic separators:** There are several different types of galvanic separators available, each with its own advantages and disadvantages. Some common types include: * **Membrane separators:** These separators use a semi-permeable membrane to separate the different ions. * **Electrode separators:** These separators use electrodes to create an electric field that separates the ions. * **Hybrid separators:** These separators combine elements of both membrane and electrode separators. * **Applications of galvanic separation:** Galvanic separation has a wide range of applications, including: * **Water purification:** Galvanic separation can be used to remove contaminants from water, such as heavy metals and salts. * **Wastewater treatment:** Galvanic separation can be used to treat wastewater, such as removing organic pollutants and heavy metals. * **Desalination:** Galvanic separation can be used to desalinate water, such as removing salt from Quote

chris11 wrote:
Why is galvanic isolation necessary? As long as you only use a laptop with a (non-isolated) car adapter in the car, nothing should happen. After all, they are all open collector drivers. The laptop's RS232 inputs can withstand +/- 25V according to the RS232 specification. That should be enough.


Hi Christian

Unfortunately, an inverter stage must be inserted between RS 232 and K-Line, for example.
And they also need a reference potential for the threshold switch = ground.

If you power a laptop from the car's power grid (and this then draws some Amperes), voltage drifts can occur between the laptop and car ground, depending on the power supply circuit, which can damage the adapter.
However, this can only be solved with a special design, for example, using optocouplers.

For example, I have a laptop that can run without a battery – because I don't want to spend hundreds of euros every 2-3 years on new batteries icon_evil.gif
Gruß Ulf
_________

MG4 Electric


Translated on 03-07-2026, 15:19.
Back to top Profile PM Garage
dehlya
Guest




 


Free account, no CAN development support

Post27-12-2002, 21:42    Subject: Probably! Quote

I must disagree: Since I modified version 2.2 (the only deviation is the PC 849 and SLH LEDs - these are extremely bright, requiring more power), my main purpose has been to adjust the airbag/ABS lights. After all, I can't spend the whole day fine-tuning my pump. I've been working on various Polo 6Ns, T4s from 95, Passats from 97, Golf III/IV, and Beetles (including key adaptation), but only those from 2000 or newer. I've set the potentiometer somewhere in the middle, and since it has worked perfectly on about 30 cars so far, I haven't seen any reason to change anything... As previously mentioned, it was installed in a Bosch test clip in Luschig's 'Lochrasteraufbau'. The only thing that annoys me is the commercially available connector.r The front end is very stiff and sometimes the bushes come loose when inserting. Also, this is a problem with the Passat models.
barely accessible and difficult to operate, located next to the handbrake. To further enhance safety, I have now connected a cigarette lighter socket for power supply.
But this mini stress has nothing to do with the circuit. Thanks to the optical . Function testing makes her really enjoy it!!!
I also don't use exotic. Laptops, but still the old Compaq Armada, as well as an HP Omnibook.
If you continue to play games with me, I'll send you my back, that can't be true.


Translated on 03-07-2026, 15:19.
Back to top
ulf
Profi-Schrauber
Profi-Schrauber


Joined: 04/13/2002
Posts: 11058
Karma: +18 / -0   Thank you, like it!
Location: Saarland
2023 MG ZS
Premium Support

Post28-12-2002, 14:14    Subject: Re: The devil is in the details Quote

dehlya wrote:
I must disagree: Since I modified version 2.2 (the only difference being the PC 849 and SLH LEDs - which are extremely bright and require more power), my primary use has been to adjust the airbag/ABS lights.

I have the potentiometer set somewhere in the middle, and since it has been working perfectly with around 30 cars so far, I don't see any reason to change anything...

If you continue to play games with me, I'll send you my


Hi

I'm glad that "my baby" at least runs smoothly here and there icon_smile.gif

Before I replaced my adapter, my airbag control unit could sometimes be opened, but the connection was always quite unstable.

Therefore, my adapter was just about to work. Your adapter, which looks identical, is actually "different" due to component tolerances, and apparently in the right way. And/or the other PC saves the function...

Never change a Running System . . . but if your system does start to cause problems at some point, remember the following approaches icon_wink.gif
Gruß Ulf
_________

MG4 Electric


Translated on 03-07-2026, 15:19.
Back to top Profile PM Garage
AndyO
Guest




 


Free account, no CAN development support

Post29-12-2002, 16:47    Subject: Acceleration Condenser! Quote

Hello Ulf,

I just did some dry runs with the rectangle generator.
Solder a 100 nF capacitor in parallel to R7 and R10, and a 100 pF capacitor in parallel to R12, as an acceleration capacitor. He's amazing on the oscilloscope!
P.S. I'm still thinking about the feedback with R12!


Translated on 03-07-2026, 15:19.
Back to top
ulf
Profi-Schrauber
Profi-Schrauber


Joined: 04/13/2002
Posts: 11058
Karma: +18 / -0   Thank you, like it!
Location: Saarland
2023 MG ZS
Premium Support

Post29-12-2002, 17:54    Subject: Re: Acceleration Capacitor! Quote

AndyO wrote:
In addition, please solder a 100 nF acceleration capacitor in parallel to R7, R10, and R12. He's amazing on the oscilloscope!



Hi Andi

The worst delays occurred with my particular unit due to oversaturation(?) of the opto-output transistors.

Specifically, the output of OK3 continued to transmit for almost 40 microseconds even after the voltage at the input had been turned off.
However, no boost capacitor will help, but rather only reducing the output saturation. With 4.7 kOhm for R5a, this issue was then largely resolved.




If a 100 nF capacitor is connected in parallel to R12, this capacitance should act as a radical slew-rate brake during the low-to-high transition of the K-line, as it provides a low-impedance path to ground through D7 and T3 (base-emitter) icon_eek.gif icon_question.gif icon_question.gif

For the normal line capacitance, you can generously estimate around 1 nF, which, in combination with a 3.3 kOhm pull-up resistor on the oscilloscope, already shows a noticeably dampened rise of the K-line signal compared to the negative edge.
With 100 nF, the increase should become about 100 times slower!
Or have I made a mistake somewhere? Or, have you been able to see any such effects on the K-line?

If acceleration capacitors are placed in parallel with R7 and R10, the negative edge of the K-line will be delayed less.
What I find particularly unpleasant, however, is that when OK 1 and 2 are switched on, no purely ohmic resistor anymore limits the charging current of the capacitor, which is provided by the optocouplers and T 1 and. T 2 is running (Base-Emitter).

But this transition wasn't the problem with my adapter; the positive pulse on the K-line was significantly delayed compared to the negative pulse from TXD – also mainly due to saturation.

To limit the saturation of OK 1 and 2, I also increased R1 and R3, specifically to the point that T2 is no longer excessively "saturated," and the overall processing times between TXD and RXD have been reduced to fractions of the original duration.

This seems to be the "more environmentally friendly" solution, at least. However, temperature drifts might be more noticeable in icon_sad.gif
Gruß Ulf
_________

MG4 Electric


Translated on 03-07-2026, 15:19.
Back to top Profile PM Garage
AndyO
Guest




 


Free account, no CAN development support

Post29-12-2002, 18:29    Subject: More results! Quote

Hello Ulf,

So, the 100nF capacitors across R7 and R10 are definitely missing. The edge becomes 5 times steeper. Normally, there should be a 100 Ohm resistor in addition to R7 and R10. I also don't think that the 100nF capacitor will damage the base. RCE from OK1 and RBE from T1 are sufficient as current limiting.
I have also experimented with T3. To ensure that the impulses are cleanly delivered to the collector even at higher frequencies (50 kHz square wave), I soldered a 100pF capacitor across R12. Furthermore, current amplification is important. A BC547B achieved approximately 30% lower cutoff frequency compared to the BC879 I was using.
Try it out!


Translated on 03-07-2026, 15:19.
Back to top
ulf
Profi-Schrauber
Profi-Schrauber


Joined: 04/13/2002
Posts: 11058
Karma: +18 / -0   Thank you, like it!
Location: Saarland
2023 MG ZS
Premium Support

Post29-12-2002, 19:48    Subject: Re: More results! Quote

AndyO wrote:
so, die 100nF über R7 und R10, dürfen definitiv nicht fehlen. The slope becomes 5 times steeper.


Hi Andi

so that we are talking about the same thing: which side of the K-line is steeper? the positive (after a high) or the negative (after a low)?
Gruß Ulf
_________

MG4 Electric


Translated on 03-07-2026, 15:19.
Back to top Profile PM Garage
AndyO
Guest




 


Free account, no CAN development support

Post29-12-2002, 19:58    Subject: The rising slopes. Quote

The rising slopes are becoming steeper, while the sloping one is fine. What bothers me is the issue with OK3. The collector signal from T3 could be considered good at 50 kHz. What comes out of OK3 in terms of slopes could be better. The bridge on LED3 only provides a slight improvement. Given the low baud rates used, this should be sufficient.
P.S. Without the acceleration, you have a significant phase shift between the input signal and the K/L line.


Translated on 03-07-2026, 15:19.
Back to top
ulf
Profi-Schrauber
Profi-Schrauber


Joined: 04/13/2002
Posts: 11058
Karma: +18 / -0   Thank you, like it!
Location: Saarland
2023 MG ZS
Premium Support

Post29-12-2002, 20:05    Subject: Re: OK-Flanken Quote

AndyO wrote:
What comes out of OK3 in terms of crosses could be better. The LED3 bridge only provides a slight improvement.


Hi Andi

The signal propagation time, as measured by OK3 during "shutdown", was significantly improved after I increased R5a. Why don't you try it out icon_wink.gif
What OK types have you used?

Quote:
Without the acceleration, you have a significant phase shift between the input signal and the K/L line.


When a current of 1.5 mA flows through the input of OK 2 (PC 837), there is only a delay of 3 µsec between TXD and the K-Line, even without the acceleration capacitor on R10.
The signal on the K-line is very clean, and the positive pulse is the slowest: "curved upwards" due to the cable capacitance towards the car (approximately 3m shielded) in conjunction with the 3.3k pull-up resistor.

I'm starting to realize that our adapters probably work in quite different ways, even though they are based on the same schematic.
Gruß Ulf
_________

MG4 Electric


Translated on 03-07-2026, 15:19.
Back to top Profile PM Garage
AndyO
Guest




 


Free account, no CAN development support

Post29-12-2002, 20:08    Subject: PC817 Quote

The proposed PC817.
P.S. Do you have Netmeeting? Then call me at 80.133.184.81.


Translated on 03-07-2026, 15:19.
Back to top
ulf
Profi-Schrauber
Profi-Schrauber


Joined: 04/13/2002
Posts: 11058
Karma: +18 / -0   Thank you, like it!
Location: Saarland
2023 MG ZS
Premium Support

Post29-12-2002, 20:19    Subject: Re: PC817 Subject: Inquiry Regarding PC817 Dear Sir/Madam, I am writing to inquire about the PC817. I am interested in purchasing a PC817, but I would like to know more about it before I make a purchase. Specifically, I would like to know: * What is the PC817 used for? * What are the specifications of the PC817? * What is the price of the PC817? * Where can I purchase the PC817? Thank you for your time and consideration. Sincerely, [Your Name] Quote

AndyO wrote:
The proposed PC817s.
P.S. Do you have Netmeeting? Then call me at 80.133.184.81.


Hi Andi

I don't know Netmeeting, so I probably haven't used it either icon_eek.gif icon_question.gif icon_question.gif

However, we can continue by email (one just came back to you as undeliverable).
Gruß Ulf
_________

MG4 Electric


Translated on 03-07-2026, 15:19.
Back to top Profile PM Garage
AndyO
Guest




 


Free account, no CAN development support

Post29-12-2002, 20:33    Subject: Delay on the ascending K-side Quote

Hello Ulf,

I have investigated the K-line with and without load (12V square wave 40 kHz at R3). The delay on the rising K-edge is approximately 6us for me. The falling edge is approximately 1us. Without the acceleration capacitors, the rising values were approximately 5 times slower. What delay do you have under the given conditions?


Translated on 03-07-2026, 15:19.
Back to top
ulf
Profi-Schrauber
Profi-Schrauber


Joined: 04/13/2002
Posts: 11058
Karma: +18 / -0   Thank you, like it!
Location: Saarland
2023 MG ZS
Premium Support

Post29-12-2002, 21:17    Subject: Re: Delay on the ascending K-side Quote

AndyO wrote:
I investigated the K-line with and without load (12V square wave 40 kHz to R3). The delay on the rising K-edge is approximately 6us for me. The falling edge is about 1us. Without the acceleration capacitors, the rising values were about 5 times slower. What delay do you have under the given conditions?


Hi Andi

It was similar to yours without the capacitors:
Delay in OK 2 is approximately 8 µsec and in T2 is also approximately 8 µsec when the input is switched off = rising K-edge.
So, bei der H-L-Übergang, beträgt die Zeit zwischen TXD und K etwa 16 µsec insgesamt. During the L-H transition at TXD, there is also approximately 1 µsec.

4.7 kOhm in series to R3 reduced the 16 µsec to approximately 3 µsec - with 12 Volt as High-Level to TXD.
Further reduction of the input current at TXD then extended the duration of the L-H transition from TXD to K, because T2 became slower in conduction.

Therefore, in version 2.3, I have included a 10k-trimmer in series with R1 and R3. This allows for precise matching of the entire story to the high-speed PC COM port, and achieves the optimal minimum runtime between TXD and K while maintaining the same pulse duration.
Gruß Ulf
_________

MG4 Electric


Translated on 03-07-2026, 15:19.
Back to top Profile PM Garage
rabbit01
Guest




 


Free account, no CAN development support

Post30-12-2002, 13:40    Subject: Simulating Ulf's Op-Amp with PSpice Quote

Hi,

has given me tips on how to simulate Ulf's adapter using PSpice. I don't have an oscilloscope or a VCC rectangular generator, and in Spice, I can simulate and measure various VCC sources.

My problem is with the 'stupid' optocouplers PC817 or 847,...
I can't find the corresponding part in the libraries.
An Optocoupler is included, but with 5 pins and connecting it...???
I'm also having trouble with the LEDs, are there any ready-made components available in Bibs?
No problem. I would also be happy to share my results, which might be helpful in knowing where the problem lies when searching for the soldering error icon_wink.gif

@ulf
The programming of the program, along with the runtime testing, is, in my experience, quite challenging. It likely needs to be done in C++, and requires precise knowledge of how to interface with the comport and, specifically, how to acquire the signals in real-time. As I mentioned, finding someone with this expertise could be difficult. The idea of testing this way and optimizing the adapter's quality is good!

Greetings
Florian


Translated on 03-07-2026, 15:19.
Back to top
New Topic Reply 🔗 🖨 Dieselschrauber - Index » Diesel Engine Technology
Go to page: 1, 2, 3  Next
Similar articles and topics
Topic Forum
No new posts Dimensions GT17/BV43 Turbocharger Adapter Technical Data
No new posts Diagnose Adapter Eigenbau - On Board Diagnose - DoItYourself Troubleshooting & Guides
No new posts VAGCOM-Adapter ändern / Infos über Optokoppler? Diesel Engine Technology
No new posts Alte 1Z und VAGCOM: Hilfe durch Optokoppler-Adapter? Diesel Engine Technology
No new posts VAGCOM-USB Adapter für Profis? Diesel Engine Technology
No new posts Problem with VAGCOM Adapter 2.4 Diesel Engine Technology
Jump to:  
You cannot post new topics in this forum.