DIY Drive by Wire controller project.

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

transaxel
Helpful MS/Extra'er
Posts: 74
Joined: Tue Apr 22, 2008 10:41 am
Location: Austria

Re: DIY Drive by Wire controller project.

Post by transaxel »

piubrazil wrote:Unfortunatelly, the source was made in pure assembly, and all the comments are in portuguese.

I don't know why the HEX didn't work for you. I use original PicStart plus from Microchip and good old MPlab 4.0 to write my PIC programs.

The configuration header of the source for pic:

processor 18F2620
#include "p18f2620.inc"
CONFIG OSC=HS, FCMEN=OFF, PWRT=ON, BOREN=ON, XINST=OFF, CCP2MX=PORTC, WDT=ON, WDTPS=8192, MCLRE=ON, PBADEN=OFF, LVP=OFF
__idlocs H'200000'
radix dec
Thanks for your help! I use PICKIT2 but i cant find anything to implement the config words?
Where must this be done? Is it possible to implement the config into the Hex file, or must this always be set manually?

For my understanding.....if you could implement the config into the code und export in mplab, the config would be implemented in the hex file
and there would be no need to set them at the burn process - or am i wrong :?

I´m sorry but i have never worked with Microchip only a little Arduino-programming...

Greatings Gerald
Alfa Romeo 164 2.0 V6 Turbo running on MS2 Extra
Manu
Master MS/Extra'er
Posts: 723
Joined: Mon Feb 15, 2010 4:57 am
Location: Alès - France
Contact:

Re: DIY Drive by Wire controller project.

Post by Manu »

Nice Work Piubrazil. Look very interresting.

Sharing this is really cool. Many Thanks.

You're welcome

Manu
I can supply, repair or upgrade Megasquirts in FRANCE.

Image
https://www.megasquirt.fr
transaxel
Helpful MS/Extra'er
Posts: 74
Joined: Tue Apr 22, 2008 10:41 am
Location: Austria

Re: DIY Drive by Wire controller project.

Post by transaxel »

piubrazil wrote:Unfortunatelly, the source was made in pure assembly, and all the comments are in portuguese.

I don't know why the HEX didn't work for you. I use original PicStart plus from Microchip and good old MPlab 4.0 to write my PIC programs.

The configuration header of the source for pic:

processor 18F2620
#include "p18f2620.inc"
CONFIG OSC=HS, FCMEN=OFF, PWRT=ON, BOREN=ON, XINST=OFF, CCP2MX=PORTC, WDT=ON, WDTPS=8192, MCLRE=ON, PBADEN=OFF, LVP=OFF
__idlocs H'200000'
radix dec
These header could only be implemented in the assembler code - and that is not present.
The other thing is that i don´t want to become a "Microchip Specialist" :P and for those you need the complete PIC programming software...

I think it would be easier, if you could read out an WORKING PIC18F2620 from the throttle controller, and post that *.hex file.
In this file the header should be included and anyone can burn the file with several programmers.

Thanks in advance
Gerald
Alfa Romeo 164 2.0 V6 Turbo running on MS2 Extra
Blocky
MS/Extra Newbie
Posts: 1
Joined: Mon May 19, 2014 6:15 am

Re: DIY Drive by Wire controller project.

Post by Blocky »

Any updates on this? I would love to build one.
Healey3000
Experienced MS/Extra'er
Posts: 201
Joined: Sun Mar 16, 2014 3:41 pm

Re: DIY Drive by Wire controller project.

Post by Healey3000 »

Hi,

Very intriguing. I took a look at doing DBW too but the safety aspects scared me off.

One suggestion - it would be a good idea to use devices that are designed for safety critical applications and also have an automotive temperature rating. Take a look at the NCV7729D H-bridge controller. Could you also dispense with the TL494 if you used this device instead? You can SPI directly from the PIC.

A handy feature would be throttle blipping up/down for gear shifting. That's where I started with DBW, trying to find a smooth way to shift a Laycock overdrive.
Healey3000
Experienced MS/Extra'er
Posts: 201
Joined: Sun Mar 16, 2014 3:41 pm

Re: DIY Drive by Wire controller project.

Post by Healey3000 »

transaxel wrote: Where must this be done? Is it possible to implement the config into the Hex file, or must this always be set manually?

For my understanding.....if you could implement the config into the code und export in mplab, the config would be implemented in the hex file
and there would be no need to set them at the burn process - or am i wrong :?

I´m sorry but i have never worked with Microchip only a little Arduino-programming...

Greatings Gerald
I always program the config bits within my source code, so yes, it can be done.

A suggestion - take the Hex file and have MPLAB IDE decompile it back to Assembly. Add the Config statement at the top of the program and recompile. That should give you a complete Hex file with the config built in.
seb209726
Helpful MS/Extra'er
Posts: 40
Joined: Tue Dec 16, 2014 12:48 pm

Re: DIY Drive by Wire controller project.

Post by seb209726 »

Healey3000 wrote: [...] One suggestion - it would be a good idea to use devices that are designed for safety critical applications and also have an automotive temperature rating. Take a look at the NCV7729D H-bridge controller. [...]
It seems that many OEM use(d) infineon TLE
transaxel
Helpful MS/Extra'er
Posts: 74
Joined: Tue Apr 22, 2008 10:41 am
Location: Austria

Re: DIY Drive by Wire controller project.

Post by transaxel »

Healey3000 wrote:
transaxel wrote: Where must this be done? Is it possible to implement the config into the Hex file, or must this always be set manually?

For my understanding.....if you could implement the config into the code und export in mplab, the config would be implemented in the hex file
and there would be no need to set them at the burn process - or am i wrong :?

I´m sorry but i have never worked with Microchip only a little Arduino-programming...

Greatings Gerald
I always program the config bits within my source code, so yes, it can be done.

A suggestion - take the Hex file and have MPLAB IDE decompile it back to Assembly. Add the Config statement at the top of the program and recompile. That should give you a complete Hex file with the config built in.
As i said, i have not the hardware and the know how to play with PIC programming. I have taken the Print from PIUBRAZIL and changed the PIC Processor with an Arduino nano.
The controller has same functions and works well on the desk ;-)
Only thing is the 6203 H-Bridge. If you play extremly with the Throttle its getting really hot - a heatsink is mounted.
CAM00106.jpg
I have implemented advanced safety routine, also with watchdog but 3 LED´s show the Status of the Device. If there´should be a problem you can look to the led´s and you know if
PPS or TPS is the Problem. Of course the device is disabled and comes only with power off, Power on up. With an existing fault it comes not up. The function should be the same as
from PIUBRAZIL programmed. Only Arduino Platform.

Greetings Gerald
Alfa Romeo 164 2.0 V6 Turbo running on MS2 Extra
tpsretard2
Master MS/Extra'er
Posts: 662
Joined: Thu Feb 14, 2008 4:59 am

Re: DIY Drive by Wire controller project.

Post by tpsretard2 »

Are you willing to share the code?
I live tgat you have done it with an arduino.
transaxel
Helpful MS/Extra'er
Posts: 74
Joined: Tue Apr 22, 2008 10:41 am
Location: Austria

Re: DIY Drive by Wire controller project.

Post by transaxel »

tpsretard2 wrote:Are you willing to share the code?
I live tgat you have done it with an arduino.
i have to translate the text into english and than i will send you a PM

Greetings Gerald
Alfa Romeo 164 2.0 V6 Turbo running on MS2 Extra
tpsretard2
Master MS/Extra'er
Posts: 662
Joined: Thu Feb 14, 2008 4:59 am

Re: DIY Drive by Wire controller project.

Post by tpsretard2 »

thanks. i will look forward to it.
i want to do a DBW converion to my 1994 STI have the Throttle and pedal already and been playing with it a bit already, You will save me a lot of sleepless nights.. hahaa
phoenix3d
Experienced MS/Extra'er
Posts: 183
Joined: Wed Mar 19, 2008 2:12 pm
Location: South Africa

Re: DIY Drive by Wire controller project.

Post by phoenix3d »

Hi Gerald...

This looks Brilliant!...

Could you possibly send me something as well.... ;-)

Got a project with Twin DBW throttles...

Gordon.
sportage4x4
Experienced MS/Extra'er
Posts: 341
Joined: Tue Jan 04, 2005 6:29 pm
Location: Richmond Hill, Ontario, Canada

Re: DIY Drive by Wire controller project.

Post by sportage4x4 »

I would also love to see the arduino code
1990 Mazda Miata: GM Gen3 V8 swap, 4.8L, custom cam, 2x GT2860R turbos, MS3 + MS3X.
2003 Kia Rio wagon: Mazda B6T/G25MR swap, Miata CAS, IHI RHF5 @ 2bar, LSx truck coils, P&H board, boost control.
phoenix3d
Experienced MS/Extra'er
Posts: 183
Joined: Wed Mar 19, 2008 2:12 pm
Location: South Africa

Re: DIY Drive by Wire controller project.

Post by phoenix3d »

Hi Gerald..

Any update on the availability of the Code?.. Would love to start playing with this DBW car we're playing with..?

Regards
Gordon.
AbatelliCristian
Super MS/Extra'er
Posts: 855
Joined: Sun Oct 10, 2010 6:33 am

Re: DIY Drive by Wire controller project.

Post by AbatelliCristian »

transaxel
Helpful MS/Extra'er
Posts: 74
Joined: Tue Apr 22, 2008 10:41 am
Location: Austria

Re: DIY Drive by Wire controller project.

Post by transaxel »

Hi all,

sorry for late response, but way too much work.
Here is my Arduino code. I am shure it is not perfect, because i am a mechanic and not a software-programmer and this was my first experience with arduino....
But the NANO works and also the DBW Controller from PIUBRAZIL. The pdf is the wiring diagram to replace the PIC with the NANO.

Have fun ;-)
Alfa Romeo 164 2.0 V6 Turbo running on MS2 Extra
phoenix3d
Experienced MS/Extra'er
Posts: 183
Joined: Wed Mar 19, 2008 2:12 pm
Location: South Africa

Re: DIY Drive by Wire controller project.

Post by phoenix3d »

Transaxl Transaxl He's our Man!!..

Cheers and Thanks a Mill!...

TIME TO PLAY!!!!!!! :twisted:

Gordon
dkgoodrich
MS/Extra Newbie
Posts: 1
Joined: Sat Oct 10, 2015 11:09 pm

Re: DIY Drive by Wire controller project.

Post by dkgoodrich »

Can anyone revise the arduino code and translate it to English? Unfortunately most of us cant read the tags. That's how I learn haha

Is it possible to use this with one of the many motor driver boards that's ava for the Arduino's? Wouldn't that save us from having to build the circuit board the op has built?

I've attached a picture of "L298N Dual H Bridge DC Stepper Motor Drive Controller Board Module". These can be had for ~$5 off eBay. Isn't this essentially the same thing the op is building here? That drives the throttle motor from the Arduino?

Dumbed down, the arduino reads the pedal position via its potentiometer(s), sends a pwm signal to a motor driver, motor driver controls the throttle motor correct?

Any help would be greatly appreciated. I have a Arduino UNO, the L298N motor controller, a Subaru pedal and DBW TB

Keep up the good work!
transaxel
Helpful MS/Extra'er
Posts: 74
Joined: Tue Apr 22, 2008 10:41 am
Location: Austria

Re: DIY Drive by Wire controller project.

Post by transaxel »

dkgoodrich wrote:Can anyone revise the arduino code and translate it to English? Unfortunately most of us cant read the tags. That's how I learn haha

Is it possible to use this with one of the many motor driver boards that's ava for the Arduino's? Wouldn't that save us from having to build the circuit board the op has built?

I've attached a picture of "L298N Dual H Bridge DC Stepper Motor Drive Controller Board Module". These can be had for ~$5 off eBay. Isn't this essentially the same thing the op is building here? That drives the throttle motor from the Arduino?

Dumbed down, the arduino reads the pedal position via its potentiometer(s), sends a pwm signal to a motor driver, motor driver controls the throttle motor correct?

Any help would be greatly appreciated. I have a Arduino UNO, the L298N motor controller, a Subaru pedal and DBW TB

Keep up the good work!
At first: the L298 unit cannot handle the Power of an Throttlebody. Must hold minimum 3 Amps.

second: In the Attachment you find Arduino code with english comments.

Have fun, greetings Gerald
Alfa Romeo 164 2.0 V6 Turbo running on MS2 Extra
David - WI
MS/Extra Newbie
Posts: 5
Joined: Sat Aug 28, 2004 10:07 am
Location: Juneau, WI

Re: DIY Drive by Wire controller project.

Post by David - WI »

I'm just posting this link in case anybody is interested; I have MS3Pro but not drive-by-wire... I just got this in an e-mail this morning and wanted to pass it along: http://www.surpluscenter.com/New-Arriva ... 1-3493.axd

Image
Post Reply