# Arduino powered DSG Mechatronics



## Redline Developments (Mar 13, 2014)

Hi guys and girls.

First off I thought I'd introduce myself as this is my first post.
Name's Mike and I started importing a universal programmable engine management a few months back and decided I needed a nice demo car to actually prove to customers that it worked.
Had to be small, 4-wheel drive, well made and look the part. I also wanted the car to have forced induction to take full advantage of the ECU's capabilities. So after a bit of hunting around on the net I came across the a company who'd fitted an RS3 kit to a standard A3, which obviously I fell in love with. Then I came across you guys who were fitting turbo's to your VR lumps and though meh how hard can it be.
Realising that you can buy the RS3 bodykit for a 3-door on eBay I started my search and bought an A3 3.2 DSG - Ideal!

So here we are, I fitted the after market ECU and set it up to a decent base map and decided to run the OEM alongside to keep control of the fly by wire throttle and cam timing etc and most of all the CANBUS link with the dash and DSG.
However, VAG being the clever people they are, despite me fooling the OEM ECU that the injectors and coils are still connected with suitable resistors, the car will not idle and kept 'hunting' like having a vacuum leak. This is mainly due to the fact it no longer has control over the fuel mixture.
No problem, built a totally standalone throttle controller, taking into account both of the throttle pedal sensors, and the TPS on the throttle body. Problem solved 

This is where the problems started...
Went for a drive, pulls away gets into 2nd gear and then RAAAAAAAghhhhh. The DSG clutches open and the revs obviously shoot up... Another incompatible part to cure
So this is what brings me to you guys. I've seen a video on youtube of someone using an Arduino board to control a 7-speed DSG to a degree and figured I'm gonna try that myself!
I'm just here to share with you my progress so far on making a standalone DSG controller which will also run off of an Arduino Mega board.

So as not to completely ruin my Audi, incase I need to put it back to standard and buy a manual one instead I bought a 'broken' DSG box off of eBay for £140.
This particular one is a FWD diesel box but the mechatronics and gear selection is the same.










Believe it or not this gearbox wouldn't go in reverse apparently, and it was due to 2 tiny ball bearings that had dropped out of one of the selector pistons that had got stuck to the magnetic sensors, causing the mechatronics to think it was permanently in another gear!

Here we have the standard mechatronics module together with the new Arduino board I'm going to be using










With a spot of reverse engineering, I was able to work out the 4 sensors used for positioning of the selector forks.










and then all put back together...










So I've now got outputs from all the selector forks and the main input speed from the clutch pack.
Basically because of the way the DSG works, I plan to run 100% duty cycle on the clutch packs (32Bar Pressure) and see how far I can push the standard internals. I've heard of 500bhp on standard clutches and I've got a spare set from the other DSG box if I end up cooking them.

Up to now, I'm waiting on a few more components to build the driver circuit to interface the Arduino with the solenoid valves. 
Just thought I'd share incase any of you guys are interested or if your gearbox module fails you may be able to bypass it for minimum expense.
Total cost so far including buying the broken gearbox is about £180

I'll keep ya posted on any progress!


----------



## arm1tage (Apr 14, 2010)

Very very cool hacks. Probably too advanced for this forum (and me too) so that's the reason for the lack of response. Your Arduino hack has got me thinking, where else could you use it? 

How about a race Haldex controller? Maybe max out the rear bias?

Or hook into the brakes and add eLSD capability?

For MRC shock equipped cars, a Magneride controller?


and I wonder how many DSG failures are due to these loose bearings you've found!


----------



## Redline Developments (Mar 13, 2014)

Haha well I didn't mean to be intimidating, to be honest it's a massive learning curve for me too.

Haldex is next on my list as its just a simple solenoid in the mk2> onwards and a stepper motor in the mk1 haldex. 
In theory you should be able to use it for anything.
Unfortunately with the haldex you can never unlock the front wheels so full lock will cause you to wear tyres out around the corners. A bit like old school diff lock on a land rover! 

Yeh I do wonder how many gearboxes are actually fine apart from a minor fault like that...

Cheers for the support tho


----------



## VWpowa (Mar 4, 2000)

Damn this is very cool. Please continue to update on your progress

Sent from my Nexus 5 using Tapatalk


----------



## laas (Mar 26, 2014)

Nice!
I became a member of vwvortex just because of this thread 
Keep the updates coming!
How do you plan on selecting neutral? Using PID ?

Greetings from Norway


----------



## Redline Developments (Mar 13, 2014)

Wow, sorry for the late reply peeps I didn't think anyone was interested but seeing as you ask here we go 

Right so basically the above red wires are just linking the 4 sensors detecting the selector positions and supplying them each with 5v and ground.
So the replacement mechatronics module is in the car, filled with oil and I've run a few tests to prove it works.








I've used a 25-pin printer cable which was the best way I could think of getting 25 wires through a small hole in the top of the mechatronics cover. This also makes it easy to seal.
So far I can only select half the gears due to the multiplex slide valve which I believe is sticking because I washed the valve body and left it for ages before I fitted it to the car.
But the clutches both work and biting points for both are around a PWM value of 55.
I have managed to move the car in reverse and first around my garden 
Sorry about the bad video it was just a quick one in the excitement of it moving for the first time haha.
https://www.facebook.com/photo.php?v=10203039833932851&set=vb.1115290102&type=2&theater

I'm using a potentiometer for clutch control which is surprisingly difficult without practice!
Gear changes are done by reprogramming the Arduino at the moment, until I wire the hall sensors from the gear selector.

I'm waiting on a good day for weather to get back out and take the mechatronics back out to try and see why the valve isnt sliding. Then I can hopefully take it for a drive!



laas said:


> Nice!
> I became a member of vwvortex just because of this thread
> Keep the updates coming!
> How do you plan on selecting neutral? Using PID ?
> ...


Thanks for your interest 
Neutral is kept by the gearbox housing itself. Basically I've found that the values vary from 260 (1st gear) to 720 (3rd gear) and by switching the solenoids off at a value of 500, The selectors stay in between gears, exactly the same as in a normal manual gearbox.
There is a spring loaded bearing which sits in a groove on the selector and holds it in place.
A new found friend of mine is doing a similar thing with the newer 7-speed which I believe you have to constantly maintain pressure to keep them in neutral.
So no, so far I have not needed to use any prediction loops to make it work.

I'll keep you updated more often now I know you're keen to know 

Mike


----------



## VWpowa (Mar 4, 2000)

Very nice keep us posted

Sent from my Nexus 5 using Tapatalk


----------



## VW TDI Addict (Jul 31, 2002)

*Subscribed!*

:thumbup:


----------



## DasCC (Feb 24, 2009)

opcorn:


----------



## JaxACR (Dec 6, 2007)

Wow! I am impressed! This is beyond my capabilities, but I'm excited to see someone working on such an undertaking. Looking forward to your findings and progress.


----------



## shortysclimbin (Sep 27, 2005)

Very interested in this as well.. I have an older diesel I need a new automatic transmission for... It would be great to swap in a dsg standalone.


----------



## Redline Developments (Mar 13, 2014)

Right so progress so far...
Found out why I could only select half the gears. When I took the Mechatronics apart when I first had it to clean, there is a washer with a ball bearing under it under the 'Multiplex' solenoid. One side is flat and the other side has a chamfered edge where the ball bearing sits. Becuase this was upside down, the pin on the solenoid couldn't push the ball bearing out the way to allow oil pressure through. So now I have selection of ALL 6 gears plus reverse 

I've started wiring the inside of the car now to actually control the gearbox. I was always planning to use the gearstick in it's OE place and just wire into the signals to select gears, but I have since had a second thought...
I am now going to remove the gear shifter altogether and replace the panel with one similar to the Lamborghini E-gear gearbox's just to add a definite individual touch to it. So the manual gear shifting will be done only from the paddles and there will be an Auto/Manual button in the centre just like a Lambo. They also use tricks like hold both paddles for neutral, and hold down for reverse, both of which I will also be adopting 

Here are a few pics from yesterday where I've tapped into the interior wiring.
Sorry for the horrendous quality, my new phone broke so I'm using one from the Arc 

I've tapped into the 0-5V signal from the throttle pedal, this will be used for controlling how hard the gear changes are and for pulling away in 1st and Reverse.
Also the brake pedal signal, which will be used to determine which is the next gear, launch control and allow changes between reverse, neutral and 1st.










Next up was the steering wheel ECU, the 8 pins nearest the steering wheel go to the slipring which links to the wiring in the steering wheel.









The signals on these pins are can-bus type signals and I need the raw switch to ground signals from the paddles themselves so I whipped the airbag out, removed the control module inside and soldered the up and down signals to the 5v supply to the module and the signal out.









This obviously poses a problem for the steering column ECU, in that you will short it out when you press one of the paddles. So I used a stanley knife to cut the tracks on the circuit board to disable any future contact with the ECU. This way if I need to revert to standard, I can just put a blob of solder and she'll be back to standard. Then I simply ran two wires from the DSG controller to the pins on the slipring and hey presto, 2 signals which connect to ground when the paddles are pressed :thumbup:









Then with the cover back on and a few zip ties, you'd never know I'd been in there...









So that's where I am as of this morning, so todays task is connect it all up, fit it in a box then write a program to at least make it pull away in either 1st or Reverse.



shortysclimbin said:


> Very interested in this as well.. I have an older diesel I need a new automatic transmission for... It would be great to swap in a dsg standalone.


I was literally just talking to my friend who has a Mk2 with a 1.8T in about doing an aftermarket DSG conversion. In theory if this works, you should be able to put a DSG box in anything it will bolt to. And have the added bonus of not needing to worry about the gear shifter cables or linkage


----------



## EpicVW (Feb 10, 2000)

I love stuff like this. So exciting to see people push the envelope. Keep the updates coming! :thumbup:


----------



## chaveiro (Sep 18, 2004)

Hi Mike,

Cool project!
Hope you can help me diagnose a problem with my DSG 6 from 2004.
It is giving me intermittent powertrain databus hardware error / missing message from all other ecus, disappears from diag while at that state, car keep in neutral.
All other ecus (engine, abs,...) in same can bus gives only TCM missing errors.
Only have access to a DSO osciloscope, cant visually see nothing wrong on the powertrain can bus lines voltages. 
A can bus decoder whould be better that could point me on can errors / retries...

I'd suspect it's the canbus driver that is failing on the DSG. Is it a know ic like TJA1050 that can be replaced ?
Strangely i had dsg oil inside the electrical plug, how is that possible? Oil runs in contact with electric parts ? Anyway the oil resistance is in the Mohm range.

Would you mind posting a hi resolution picture of the custom circuit board inside your unit. ( and document pinout you got with your findings if possible)

Also i'd like to know the resistance readings of a good dsg so i can compare with mine.
CANHI (pin10) to CANLO (pin15)
CANHI (pin10) to GND (pin 16 and 19)
CANLO (pin15) to GND (pin 16 and 19)
CANHI (pin10) to Plus (pin 11, 8 and 13)
CANLO (pin15) to Plus (pin 11, 8 and 13)

Hope you can answer all my questions, it will trouble shoot my problem a lot. 
I have no problem dismantling the mechatronics apart if i know the problem can be fixed.


----------



## spookvdub (Mar 3, 2008)

Hi everybody
does any member here have contact info for redline developments(mike)

he has last been on vortex in 2014:facepalm:

any leads will be highly appreciated.


----------



## kornlider (Apr 7, 2012)

Hello, what progress?


----------



## Jim_Coupe (Nov 27, 2010)

Why alot of sensors.. just use the TCU Can bus ?


----------



## loadinggg (Jan 19, 2021)

Hello, I apologize in advance for the language, but I will use the trazlator, I need information if someone managed to control the dsg gearbox, I mean manual control of the levers on the steering wheel using an external controller.
possibly communicating over "canbus" using arduino?


----------

